/* Piecewise — download site. Brand tiles: ink, terracotta, paper, gold (same as the app icon). */
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #17161A;
  --ink-2: #2A282E;
  --paper: #F6F3EE;
  --paper-2: #ECE6DC;
  --clay: #B8492A;
  --clay-deep: #96381E;
  --gold: #C9A45C;
  --muted: #5E5A60;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  --step-3: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem);
  --gap: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  --edge: clamp(1.25rem, 0.5rem + 4vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem var(--edge); }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 600 1.3rem/1 var(--serif); letter-spacing: -0.01em; }
.bar nav { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.8rem); font-weight: 600; font-size: 0.95rem; }
.bar nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.bar nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 620px) { .bar nav a:not(.btn) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px;
  background: var(--clay); color: #fff; font: 700 1.05rem/1 var(--sans); text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.btn:hover { background: var(--clay-deep); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.95rem; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* hero: copy left, the mosaic building itself right */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--gap); align-items: center;
  padding: clamp(1.5rem, 4vw, 4rem) var(--edge) clamp(3rem, 7vw, 6.5rem); }
.hero h1 { margin: 0 0 1.2rem; font: 600 var(--step-3)/1.02 var(--serif); letter-spacing: -0.025em; max-width: 13ch; text-wrap: balance; }
.lede { margin: 0 0 2rem; font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.dl-meta { margin: 0; color: var(--muted); font-size: 0.95rem; }
.note { margin: 1.4rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 40ch; }

.mosaic { margin: 0; position: relative; justify-self: end; width: min(100%, 560px); }
.mosaic canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 14px; background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(23, 22, 26, 0.55); }
.mosaic figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: rgba(23, 22, 26, 0.72); color: var(--paper); font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .mosaic { justify-self: stretch; width: 100%; max-width: 520px; order: -1; }
  .hero h1 { max-width: 16ch; }
}

/* sections */
section h2 { margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); font: 600 var(--step-2)/1.15 var(--serif); letter-spacing: -0.015em; }
.how, .need { padding: clamp(3rem, 7vw, 6rem) var(--edge); }
.how { background: var(--paper-2); }

/* a real sequence: numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 0.45rem; align-content: start; max-width: 30ch; }
.steps li::before { content: counter(s); font: 600 2.6rem/1 var(--serif); color: var(--clay); margin-bottom: 0.4rem; }
.steps strong { font-size: var(--step-1); line-height: 1.3; }
.steps span { color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* not a sequence: a plain two-column list */
.need-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem var(--gap); max-width: 1100px; }
.need-list > div { border-top: 2px solid var(--ink); padding-top: 1rem; }
.need-list dt { font-weight: 700; font-size: var(--step-1); margin-bottom: 0.4rem; }
.need-list dd { margin: 0; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 680px) { .need-list { grid-template-columns: 1fr; } }

/* download */
.download { background: var(--ink); color: var(--paper); padding: clamp(3.5rem, 8vw, 7rem) var(--edge); }
.download-inner { max-width: 760px; }
.download h2 { color: var(--paper); }
.install { margin: 0 0 2.2rem; padding-left: 1.4rem; display: grid; gap: 0.8rem; font-size: var(--step-1); line-height: 1.45; }
.install li::marker { color: var(--gold); font-family: var(--serif); font-weight: 600; }
.install em { font-style: normal; font-weight: 700; color: #fff; }
.file { font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.dl-meta-light { color: rgba(246, 243, 238, 0.7); margin-top: 0.9rem; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; padding: 1.6rem var(--edge);
  background: var(--ink); color: rgba(246, 243, 238, 0.6); font-size: 0.9rem; border-top: 1px solid var(--ink-2); }
.foot span:first-child { font: 600 1.05rem/1.4 var(--serif); color: var(--paper); }
