/* Drang Studio landing page: tokens, type and layout.
   Plan: docs/LANDING_PAGE_PLAN.md section 4 (revised in the redesign slice).
   Art direction: the stage (dark, where you hear it) and the liner notes
   (light, where the proof is). Amber is the live colour: the sung word and
   the vowels Persian leaves unwritten. Green and red only mark proof status.
   Contrast (WCAG ratio), checked 2026-10-25:
   stage   on-stage 16.0, muted 7.1, amber 8.4 on #0F1012
   paper   ink 12.7, muted 5.5 on #E6E4DF; on panel ink 14.3, muted 6.2
   dark    ink 13.7, muted 6.8 on #16181B; graphite on amber 7.2
   marks   green 5.0, red 4.3 on paper (fills and outlines, 3:1 needed) */

:root {
  --stage: #0F1012;
  --stage-raised: #17191C;
  --stage-line: rgba(237, 235, 230, 0.16);
  --on-stage: #EDEBE6;
  --on-stage-muted: #A19E98;

  --paper: #E6E4DF;
  --panel: #F2F1ED;
  --ink: #1E2124;
  --ink-muted: #565A5F;
  --line: rgba(30, 33, 36, 0.16);
  --line-strong: rgba(30, 33, 36, 0.45);

  --live: #E0A126;
  --on-live: #1E2124;
  --proven: #2E6A4C;
  --testing: #E0A126;
  --not-yet: #C0392B;

  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);

  /* Perfect fourth (4:3) from 18 px */
  --step-0: 1.125rem;
  --step-1: 1.5rem;
  --step-2: 2rem;
  --step-3: 2.6875rem;
  --step-4: 3.5625rem;
  --step-5: 4.75rem;

  --font-display: "Anybody", "Vazirmatn", system-ui, sans-serif;
  --font-body: "Vazirmatn", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181B;
    --panel: #1E2124;
    --ink: #E4E2DD;
    --ink-muted: #A3A09A;
    --line: rgba(228, 226, 221, 0.14);
    --line-strong: rgba(228, 226, 221, 0.4);
    --proven: #5FBF92;
    --not-yet: #EF7A6C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

p { margin: 0 0 1rem; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
section[id], [id="top"] { scroll-margin-top: 1rem; }

h1, h2, .row-fig, .chain-n, .pull, .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  letter-spacing: -0.005em;
}

h2 {
  font-size: clamp(2.5rem, 6vw, var(--step-5));
  line-height: 0.95;
  margin: 0 0 1.5rem;
  max-width: 20ch;
}
h3, h4 { margin: 0; }

.lead { font-size: clamp(var(--step-0), 1.6vw, 1.3125rem); max-width: 60ch; }
.source, .footnote { font-size: 0.875rem; color: var(--ink-muted); }

/* ---------- Stage (dark bands) ---------- */

.stage { background: var(--stage); color: var(--on-stage); }
.stage .lead, .on-stage-muted { color: var(--on-stage-muted); }

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}
.brand { font-size: var(--step-1); text-decoration: none; margin: 0; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-size: 0.9375rem; }
.topbar nav a { color: var(--on-stage-muted); text-decoration: none; }
.topbar nav a:hover { color: var(--on-stage); text-decoration: underline; text-underline-offset: 0.3em; }

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero h1 {
  font-size: clamp(3.25rem, 8.6vw, 8.25rem);
  line-height: 0.88;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 4rem;
  align-items: end;
}
.hero-sub { color: var(--on-stage-muted); font-size: clamp(var(--step-0), 1.5vw, 1.25rem); max-width: 54ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font: 600 1rem/1 var(--font-body);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.button:disabled { opacity: 0.5; cursor: default; }
.button svg { width: 0.75rem; height: 0.875rem; fill: currentColor; }
.button-live { background: var(--live); color: var(--on-live); }
.button-ghost { border-color: var(--stage-line); color: var(--on-stage); background: transparent; }
.icon-pause { display: none; }
[data-playing] .icon-play { display: none; }
[data-playing] .icon-pause { display: block; }

/* ---------- The lyric sheet (hero visual) ---------- */

.sheet { padding-block: 0 clamp(3rem, 7vw, 5.5rem); }
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--stage-line);
  padding-top: 1.25rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}
.sheet-head h2 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; margin: 0; font-variation-settings: normal; font-stretch: normal; }
.sheet-key { margin: 0; font-size: 0.9375rem; color: var(--on-stage-muted); display: flex; align-items: center; gap: 0.6rem; }
.key-swatch { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--live); }

.sheet-line + .sheet-line { margin-top: clamp(1rem, 3vw, 2rem); }
.line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(1.25rem, 3.5vw, 3rem);
  margin: 0;
}
.line-en { text-align: right; color: var(--on-stage); font-size: clamp(var(--step-0), 1.8vw, var(--step-1)); margin: 0.5rem 0 0; }

.word { display: inline-grid; justify-items: center; text-align: center; transition: opacity 160ms ease; }
.word-fa {
  display: grid;
  font-size: clamp(2.6rem, 6.5vw, 5.25rem);
  font-weight: 600;
  line-height: 1.5;
}
/* Two copies of the word, stacked exactly: the copy with vowel marks is amber
   underneath, the plain copy covers its letters, so only the marks show amber. */
.word-fa > span { grid-area: 1 / 1; }
.word-marked { color: var(--live); }
.word-plain { color: var(--on-stage); transition: color 160ms ease; }
.word-tr { font-size: clamp(0.9375rem, 1.5vw, 1.125rem); color: var(--on-stage-muted); margin-top: -0.4em; }
.word-tr .v { color: var(--live); }
.word-en { font-size: 0.8125rem; color: var(--on-stage-muted); }

.sheet:is([data-state="playing"], [data-state="paused"]) .word[data-state="future"] { opacity: 0.3; }
.word[data-state="now"] .word-plain { color: var(--live); }
.word[data-state="now"] .word-tr { color: var(--on-stage); }

.sheet-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; margin-top: clamp(2rem, 5vw, 3.5rem); }
.seek { position: relative; display: flex; align-items: center; }
.seek input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.seek input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--live) var(--p, 0%), var(--stage-line) var(--p, 0%));
}
.seek input::-moz-range-track { height: 2px; background: var(--stage-line); }
.seek input::-moz-range-progress { height: 2px; background: var(--live); }
.seek input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.875rem; height: 0.875rem; margin-top: -6px;
  border-radius: 50%; background: var(--on-stage); border: 0;
}
.seek input::-moz-range-thumb { width: 0.875rem; height: 0.875rem; border-radius: 50%; background: var(--on-stage); border: 0; }
.seek input:disabled { cursor: default; }
.ticks { position: absolute; inset: 0; pointer-events: none; }
.ticks span { position: absolute; top: 50%; width: 1px; height: 0.625rem; transform: translateY(-50%); background: var(--on-stage-muted); }
.time { font-variant-numeric: tabular-nums; color: var(--on-stage-muted); font-size: 0.9375rem; min-width: 5.5rem; text-align: right; }

.status { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--on-stage-muted); min-height: 1.4em; }
.sheet-caption { color: var(--on-stage-muted); max-width: 62ch; margin: 1.5rem 0 0; }

/* ---------- Liner notes (light bands) ---------- */

.band { padding-block: clamp(4rem, 10vw, 8rem); }
.band:not(.stage) + .band:not(.stage) { border-top: 1px solid var(--line); }

/* Hardest first: two hard cases side by side */
.hard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4rem); margin-top: clamp(2rem, 5vw, 3.5rem); }
.hard-case { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.hard-n { font-family: var(--font-display); font-weight: 800; font-variation-settings: "wdth" 62; font-size: var(--step-1); color: var(--ink-muted); margin: 0 0 0.5rem; }
.hard-case h3 { font-family: var(--font-display); font-weight: 800; font-variation-settings: "wdth" 62; font-stretch: 62%; font-size: clamp(var(--step-2), 4vw, var(--step-4)); line-height: 0.95; margin-bottom: 1rem; }
.hard-case > p:not([class]) { color: var(--ink-muted); max-width: 44ch; }
.hard-fig { font-family: var(--font-display); font-weight: 800; font-variation-settings: "wdth" 62; font-stretch: 62%; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; margin: 1.5rem 0 0; white-space: nowrap; }
.hard-note { font-size: 0.9375rem; color: var(--ink-muted); margin: 0.5rem 0 0; }
.hard-case .meter { margin: 1rem 0 0; }
.hard-after { font-size: var(--step-1); font-weight: 600; margin: clamp(2rem, 5vw, 3rem) 0 0.5rem; }

/* Meter segments: one per render, take or clip */
.meter { display: flex; gap: 3px; max-width: 28rem; margin: 1rem 0 0.75rem; }
.meter i { flex: 1 1 0; max-width: 1.5rem; height: 0.875rem; border: 2px solid var(--line-strong); }
.meter i.on { background: var(--proven); border-color: var(--proven); }
.meter i.part { background: var(--testing); border-color: var(--testing); }
.meter i.miss { border-color: var(--not-yet); }

.chain {
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.chain > li { position: relative; padding: 2rem 1.5rem 0 0; border-top: 2px solid var(--ink); }
.chain > li::before {
  content: "";
  position: absolute;
  top: -8px; left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.chain-n { font-size: var(--step-3); line-height: 1; margin: 0 0 0.75rem; }
.chain h3 { font-size: var(--step-0); margin-bottom: 0.4rem; }
.chain p:not(.chain-n) { color: var(--ink-muted); font-size: 1rem; }
.chain-dates .chain-n { font-size: var(--step-2); }

.chips { list-style: none; padding: 0; margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.status-proven { --status: var(--proven); }
.status-testing { --status: var(--testing); }
.status-not-yet { --status: var(--not-yet); }
.status-working { --status: var(--ink-muted); }

.group-title { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step-1); margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.swatch { width: 0.875rem; height: 0.875rem; background: var(--status); }
.group-note { color: var(--ink-muted); margin: 0.5rem 0 0; }

.rows { list-style: none; padding: 0; margin: 1.25rem 0 0; border-top: 1px solid var(--ink); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10rem, 2.4fr) minmax(0, 5fr) minmax(9rem, 2fr);
  gap: 0.5rem 2.5rem;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.row::before { content: ""; position: absolute; left: 0; top: 1.6rem; bottom: 1.6rem; width: 4px; background: var(--status); }
.row-fig { font-size: clamp(1.75rem, 3.4vw, var(--step-3)); line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.row-body h4 { font-size: var(--step-0); margin-bottom: 0.3rem; }
.row-body p { color: var(--ink-muted); margin: 0; max-width: 60ch; }
.row-body .meter { margin-bottom: 0; }
.row-src { font-size: 0.8125rem; color: var(--ink-muted); margin: 0.3rem 0 0; overflow-wrap: anywhere; }
.rows-short .row { grid-template-columns: minmax(10rem, 2.4fr) minmax(0, 7fr); }
.rows-short .row-fig { font-size: clamp(1.5rem, 2.6vw, var(--step-2)); }
.rows-short .row-body p { color: var(--ink); }

.tested { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tested li { background: var(--testing); color: var(--on-live); font-weight: 600; font-size: 0.9375rem; padding: 0.55rem 1rem; border-radius: 999px; }

.footnote { margin-top: 2rem; }

/* Singers */
.pull {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.92;
  margin: clamp(1rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 15ch;
  color: var(--on-stage);
}
#singers h2 { font-family: var(--font-body); font-size: var(--step-0); font-weight: 600; line-height: 1.4; max-width: none; color: var(--live); font-variation-settings: normal; font-stretch: normal; letter-spacing: 0; margin: 0; }
.voices { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.voices li { border-top: 1px solid var(--stage-line); padding-top: 1.25rem; }
.voices h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; }

/* Built in the open */
.rule { margin-top: clamp(2.5rem, 6vw, 4rem); font-size: var(--step-1); font-weight: 600; max-width: 40ch; }

/* Since January 2024 */
.facts { list-style: none; padding: 0; margin: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.facts li { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.fact-fig { font-family: var(--font-display); font-weight: 800; font-variation-settings: "wdth" 62; font-stretch: 62%; font-size: clamp(3rem, 6.5vw, 5.25rem); line-height: 1; margin: 0 0 0.75rem; }
.facts li p:not(.fact-fig) { color: var(--ink-muted); max-width: 32ch; }

/* Mentors */
.kicker { color: var(--live); font-weight: 600; margin: 0 0 0.75rem; }
.needs { list-style: none; padding: 0; margin: clamp(1.5rem, 4vw, 3rem) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; counter-reset: need; }
.needs li {
  counter-increment: need;
  border-top: 1px solid var(--stage-line);
  padding-top: 1.25rem;
  font-size: clamp(var(--step-1), 2.6vw, var(--step-2));
  line-height: 1.2;
  font-weight: 600;
}
.needs li::before { content: counter(need); display: block; font-family: var(--font-display); font-variation-settings: "wdth" 62; font-weight: 800; color: var(--live); font-size: var(--step-1); margin-bottom: 0.75rem; }

.footer { padding-block: 2rem 3rem; border-top: 1px solid var(--stage-line); color: var(--on-stage-muted); font-size: 0.875rem; }
.footer .brand { color: var(--on-stage); margin-bottom: 0.5rem; }

/* Persian text: same family, taller lines */
:lang(fa) { font-family: var(--font-body); }

/* ---------- Accessibility ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--live); color: var(--on-live); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 56rem) {
  .hero-foot { grid-template-columns: 1fr; }
  .hard { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; }
  .chain > li { border-top: 0; border-left: 2px solid var(--ink); padding: 0 0 2rem 1.75rem; }
  .chain > li:last-child { padding-bottom: 0; }
  .chain > li::before { top: 0.25rem; left: -8px; }
  .row, .rows-short .row { grid-template-columns: 1fr; }
  .voices, .needs, .facts { grid-template-columns: 1fr; }
}
