/* Voice Studio homepage. Split stage: cold paper on the writing side, a warm
   booth on the listening side. One hue of accent, two lightnesses (one per
   ground), because the page holds a light and a dark ground at once. */
:root {
  --paper: #e6e8eb;
  --paper-2: #d9dce0;
  --ink-w: #15171a;
  --ink-w-soft: #4a4f57;
  --amber-w: #8a5200;
  --booth: #131210;
  --booth-2: #1c1a17;
  --ink-h: #eeeae1;
  --ink-h-soft: #a8a295;
  --amber-h: #f0b24a;
  --amber-ink: #1a1300;

  --sc-canvas: var(--booth);
  --sc-surface: var(--booth-2);
  --sc-ink: var(--ink-h);
  --sc-ink-soft: var(--ink-h-soft);
  --sc-accent: var(--amber-h);
  --sc-accent-ink: var(--amber-ink);
  --sc-font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --sc-font-text: "Instrument Sans", system-ui, sans-serif;
  --sc-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sc-shadow-color: 30 20% 3%;

  --split: 50%;
  --page-p: 0;
  --pad: clamp(1.25rem, 3.6vw, 3.5rem);
}

body { background: var(--booth); }

/* ---- grounds + divider (fixed chrome) ------------------------------------ */
.grounds { position: fixed; inset: 0; z-index: -1; }
.ground { position: absolute; top: 0; bottom: 0; }
.ground--write { left: 0; width: var(--split); background: var(--paper); }
.ground--hear { left: var(--split); right: 0; background: var(--booth); }
.ground--write::after {   /* paper is never flat: a faint fibre */
  content: ""; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: multiply;
  background-image: radial-gradient(rgba(21, 23, 26, 0.05) 1px, transparent 1px); background-size: 3px 3px;
}
.divider { position: fixed; top: 0; bottom: 0; left: var(--split); width: 0; z-index: var(--sc-z-chrome); pointer-events: none; }
.divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: linear-gradient(to bottom, rgba(240, 178, 74, 0.0), rgba(240, 178, 74, 0.55) 12%, rgba(240, 178, 74, 0.55) 88%, rgba(240, 178, 74, 0)); }
.divider__label { position: absolute; top: 14px; font: 500 11px/1 var(--sc-font-text); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; transition: opacity 240ms var(--sc-ease-out); }
/* Content scrolls under the fixed labels, so each sits on a tab of its own ground. */
.divider__label { top: 14px; padding: 7px 10px; border-radius: 0 0 6px 6px; }
.divider__label--write { right: 0; color: var(--ink-w-soft); background: var(--paper); border-radius: 0 0 0 6px; }
.divider__label--hear { left: 0; color: var(--ink-h-soft); background: var(--booth); border-radius: 0 0 6px 0; }
.divider__tick { position: absolute; left: -4px; width: 8px; height: 8px; border-radius: 2px; background: var(--amber-h); top: calc(56px + var(--page-p) * (100vh - 96px)); box-shadow: 0 1px 6px rgba(240, 178, 74, 0.35); }
html.is-closing .divider__label--write { opacity: 0; }

/* ---- the split ------------------------------------------------------------ */
/* Columns are a fixed 50/50. Only the fixed grounds, the divider and the close
   follow --split: sizing these from it reflowed every section during the
   collapse, the page grew, and the close slid off the bottom (harness, 2026-10-09). */
.split { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
[data-sc-stage].split { height: 100vh; height: 100svh; }
.split--flow { min-height: 0; }
.side { position: relative; padding: var(--sc-7) var(--pad); min-width: 0; }
.side--write { background: radial-gradient(rgba(21, 23, 26, 0.035) 1px, transparent 1px) 0 0 / 3px 3px, var(--paper); color: var(--ink-w); --sc-ink: var(--ink-w); --sc-ink-soft: var(--ink-w-soft); --sc-accent: var(--amber-w); --sc-accent-ink: #fff8ec; }
.side--hear { color: var(--ink-h); }
.act { position: relative; }
.act--hush, .act--takes, .act--same, .act--plans { padding-block: clamp(3.5rem, 8vw, 8rem); }
.act--takes { padding-top: clamp(2rem, 4vw, 4rem); }

.h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem); line-height: 1.02; }
.body { max-width: 52ch; color: var(--ink-w-soft); text-wrap: pretty; margin: 0; }
.body--dark { color: var(--ink-h-soft); }
.fine { font-size: var(--sc-t-sm); color: var(--ink-h-soft); max-width: 52ch; margin: 0; }
.side--write .fine { color: var(--ink-w-soft); }
.kicker { font: 500 12px/1.2 var(--sc-font-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-w-soft); margin: 0 0 var(--sc-4); }
.side--hear .kicker { color: var(--ink-h-soft); }
.kicker--dim { opacity: 0.8; }
code, pre { font-family: var(--sc-font-mono); }
p code { font-size: 0.92em; background: rgba(21, 23, 26, 0.06); padding: 1px 6px; border-radius: 5px; }

/* ---- buttons -------------------------------------------------------------- */
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 26px; border-radius: 12px; background: var(--ink-w); color: var(--paper); font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: var(--sc-e2); transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out); }
.cta:hover { background: #000000d9; }
.cta:active { transform: translateY(1px) scale(0.98); }
.cta--big { height: 58px; padding: 0 34px; font-size: 1.1rem; background: var(--amber-h); color: var(--amber-ink); }
.cta--big:hover { background: #f5c46d; }
.quiet-link { color: var(--ink-w); font-weight: 500; text-underline-offset: 0.25em; }
.quiet-link:hover { color: var(--amber-w); }

.play { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(240, 178, 74, 0.5); background: transparent; color: var(--amber-h); cursor: pointer; transition: background-color 140ms var(--sc-ease-out), transform 120ms var(--sc-ease-out); }
.play svg { fill: currentColor; }
.play:hover { background: rgba(240, 178, 74, 0.12); }
.play:active { transform: scale(0.95); }
.play--big { width: 64px; height: 64px; background: var(--amber-h); color: var(--amber-ink); border: 0; box-shadow: var(--sc-e2); }
.play--big:hover { background: #f5c46d; }
.play--sm { width: 32px; height: 32px; }
.play .i-pause, .is-playing .i-play { display: none; }
.is-playing .i-pause { display: inline; }
.play:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- 1 hero ---------------------------------------------------------------- */
.hero-write { display: flex; flex-direction: column; justify-content: space-between; padding-top: 24px; padding-bottom: clamp(2rem, 7vh, 5rem); }
.mark { display: inline-flex; align-items: center; gap: 9px; font: 700 17px/1 var(--sc-font-display); color: var(--ink-w); text-decoration: none; letter-spacing: -0.01em; }
.mark svg { color: var(--amber-w); }
.hero-copy { max-width: 34rem; }
.hero-h1 { font-size: clamp(2.7rem, 1.4rem + 4.1vw, 5.6rem); font-weight: 700; line-height: 0.96; color: var(--ink-w); }
.hero-sub { margin: var(--sc-5) 0 0; font-size: var(--sc-t-lg); line-height: 1.42; color: var(--ink-w-soft); max-width: 30ch; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: var(--sc-5); margin-top: var(--sc-6); flex-wrap: wrap; }

.hero-hear { padding: 0; overflow: hidden; }
.signin { position: absolute; z-index: 30; top: 16px; right: var(--pad); color: var(--ink-h); font-weight: 500; text-decoration: none; padding: 6px 2px; }
.signin:hover { color: var(--amber-h); }
.booth { position: absolute; inset: 0; overflow: hidden; }
.plane { position: absolute; display: block; max-width: none; will-change: transform; }
.plane--plate { inset: -6% -4% -10% -4%; width: 108%; height: 116%; object-fit: cover; object-position: 35% 40%; }
.plane--haze { inset: 0; background: radial-gradient(60% 45% at 18% 16%, rgba(240, 178, 74, 0.22), transparent 70%), radial-gradient(80% 60% at 60% 100%, rgba(19, 18, 16, 0.9), transparent 70%); pointer-events: none; }
/* translate (not transform) centres it: the engine owns transform for parallax. */
.plane--mic { left: 50%; bottom: 11%; height: 62%; width: auto; aspect-ratio: 280 / 943; translate: -50% 0; }
.plane--mic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); transition: transform 600ms var(--sc-ease-out); }
/* Near plane: the booth's own side wall, close to the lens. A crop of the plate,
   scaled up, softened and masked so it frames the microphone from the right. */
.plane--frame { top: -8%; bottom: -12%; right: -6%; width: 34%; z-index: 4; pointer-events: none; }
.plane--frame i { position: absolute; inset: 0; background: url(/home/plate.webp) 96% 50% / auto 150% no-repeat; filter: blur(5px) brightness(0.62); -webkit-mask-image: linear-gradient(to left, #000 55%, transparent); mask-image: linear-gradient(to left, #000 55%, transparent); }
.booth__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: linear-gradient(to bottom, rgba(19, 18, 16, 0), rgba(19, 18, 16, 0.8) 65%, var(--booth)); z-index: 5; pointer-events: none; }
.hero-hear__line { position: absolute; z-index: 10; left: var(--pad); right: var(--pad); bottom: clamp(2rem, 7vh, 5rem); margin: 0; font-size: clamp(1.6rem, 0.9rem + 1.9vw, 2.8rem); font-weight: 500; line-height: 1.04; color: var(--ink-h); max-width: 18ch; }

/* ---- 2 hush ---------------------------------------------------------------- */
.hush-desc { font: 500 clamp(1.5rem, 0.9rem + 1.7vw, 2.5rem)/1.18 var(--sc-font-display); letter-spacing: -0.015em; margin: 0; max-width: 24ch; color: var(--ink-w); }
.hush-hear { display: flex; flex-direction: column; justify-content: center; }
.flatline { width: 100%; height: 40px; margin-bottom: var(--sc-4); }
.flatline path { stroke: var(--amber-h); stroke-width: 1.5; opacity: 0.45; fill: none; vector-effect: non-scaling-stroke; }

/* ---- 3 peak: letters to waveform ------------------------------------------- */
.peak-write { display: flex; flex-direction: column; justify-content: center; }
.peak-title { font: 500 12px/1.2 var(--sc-font-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-w-soft); margin: 0 0 var(--sc-5); }
.peak-src { font: 500 clamp(1.7rem, 0.9rem + 2.3vw, 3.3rem)/1.14 var(--sc-font-display); letter-spacing: -0.02em; margin: 0; max-width: 20ch; color: var(--ink-w); position: relative; z-index: 40; }
.peak-src .w { white-space: nowrap; }
.peak-src .ch { display: inline-block; position: relative; will-change: transform; }
.peak-src .ch .g { display: inline-block; }
.peak-src .ch .bar { position: absolute; left: 50%; top: 50%; width: var(--bw, 4px); height: var(--bh, 20px); margin-left: calc(var(--bw, 4px) / -2); margin-top: calc(var(--bh, 20px) / -2); border-radius: 3px; background: var(--amber-h); opacity: 0; transform: scaleY(0.02); }
.peak-src.is-played .ch .bar { opacity: 0.42; }
.peak-src .ch.on .bar { opacity: 1 !important; }
.peak-write { position: relative; }
.peak-after { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(2rem, 8vh, 5rem); max-width: 34rem; }
.peak-after__desc { margin: 0 0 var(--sc-4); font: 500 var(--sc-t-lg)/1.4 var(--sc-font-display); color: var(--ink-w); }
.peak-after__note { margin: 0; color: var(--ink-w-soft); }
.peak-hear { overflow: visible; }
.wavefield { position: absolute; left: var(--pad); right: var(--pad); top: 18%; height: 44%; }
.midline { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(240, 178, 74, 0.25); }
.peak-player { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(2rem, 8vh, 5rem); display: flex; gap: var(--sc-5); align-items: center; }
.peak-line { margin: 0 0 6px; font: 500 var(--sc-t-lg)/1.35 var(--sc-font-display); color: var(--ink-h); max-width: 34ch; }

/* ---- 4 takes ----------------------------------------------------------------- */
.takes { display: grid; gap: var(--sc-3); align-content: center; }
.take { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sc-4); padding: var(--sc-4) var(--sc-4); border-radius: 14px; background: var(--booth-2); box-shadow: var(--sc-edge); }
.take--kept { background: #24201a; box-shadow: var(--sc-edge), inset 0 0 0 1px rgba(240, 178, 74, 0.35); }
.take__bars { display: flex; align-items: center; gap: 2px; height: 34px; min-width: 0; overflow: hidden; }
.take__bars i { flex: 1 1 0; min-width: 2px; max-width: 5px; border-radius: 2px; background: rgba(240, 178, 74, 0.45); }
.take__bars i.on { background: var(--amber-h); }
.take__label { font-weight: 600; white-space: nowrap; }
.take__label em { font-style: normal; font-weight: 400; color: var(--ink-h-soft); font-family: var(--sc-font-mono); font-size: 12px; margin-left: 6px; }

/* ---- 5 same voice -------------------------------------------------------- */
.lines { list-style: none; padding: 0; margin: var(--sc-6) 0 0; display: grid; gap: var(--sc-5); }
.lines li { font: 500 clamp(1.15rem, 0.9rem + 0.7vw, 1.5rem)/1.3 var(--sc-font-display); color: var(--ink-w); max-width: 30ch; }
.same-hear { align-self: center; }
.line-play { display: flex; align-items: center; gap: var(--sc-4); width: 100%; max-width: 26rem; padding: var(--sc-3) var(--sc-4); border-radius: 12px; border: 0; background: var(--booth-2); color: var(--ink-h); font-weight: 500; text-align: left; cursor: pointer; box-shadow: var(--sc-edge); transition: background-color 150ms var(--sc-ease-out); }
.line-play:hover { background: #24201a; }
.line-play.is-playing { background: #2b251b; }

/* ---- 6 line ---------------------------------------------------------------- */
.line-write, .line-hear { display: flex; flex-direction: column; justify-content: center; gap: var(--sc-5); }
.code { margin: 0; padding: var(--sc-5); border-radius: 14px; background: var(--paper-2); color: var(--ink-w); font-size: clamp(12px, 0.7rem + 0.25vw, 14px); line-height: 1.6; overflow-x: auto; white-space: pre; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.code--dark { background: var(--booth-2); color: var(--ink-h); box-shadow: var(--sc-edge); }
.code b { color: var(--amber-h); font-weight: 500; }
.side--write .code b { color: var(--amber-w); }

/* ---- 7 plans -------------------------------------------------------------- */
.plan { padding: var(--sc-4) 0; border-top: 1px solid rgba(21, 23, 26, 0.14); }
.plan--dark { border-top-color: rgba(238, 234, 225, 0.12); }
.plan--pick { border-top-color: rgba(240, 178, 74, 0.6); }
.plan__price { margin: 0; font: 700 clamp(2rem, 1.4rem + 1.6vw, 3rem)/1 var(--sc-font-display); letter-spacing: -0.02em; }
.plan__price small { font: 500 0.95rem var(--sc-font-text); color: var(--ink-w-soft); margin-left: 4px; letter-spacing: 0; }
.plan--dark .plan__price small { color: var(--ink-h-soft); }
.plan__what { margin: 6px 0 0; color: var(--ink-w-soft); }
.plan--dark .plan__what { color: var(--ink-h-soft); }
.plan__what b { color: var(--ink-w); }
.plan--dark .plan__what b { color: var(--ink-h); }

/* ---- 8 close: the collapse --------------------------------------------------- */
/* No position here: the engine makes every stage sticky, and overriding it let
   the closing screen scroll away instead of holding (harness, 2026-10-09). */
.close { height: 100vh; height: 100svh; color: var(--ink-h); }
.close__inner { position: absolute; left: calc(var(--split) + var(--pad)); right: var(--pad); top: 30%; max-width: 46rem; }
.close__h { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 6rem); font-weight: 700; line-height: 0.98; margin-bottom: var(--sc-6); }
.foot { position: absolute; left: calc(var(--split) + var(--pad)); right: var(--pad); bottom: 22px; display: flex; flex-wrap: wrap; gap: var(--sc-3) var(--sc-6); font-size: var(--sc-t-sm); color: var(--ink-h-soft); }
.foot a { color: var(--ink-h); text-decoration: none; }
.foot a:hover { color: var(--amber-h); }

/* ---- phone: the split turns horizontal ------------------------------------- */
@media (max-width: 760px) {
  .grounds, .divider { display: none; }
  .split, [data-sc-stage].split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side--write { background: var(--paper); }
  .side--hear { background: var(--booth); }
  .side::before { position: absolute; top: 12px; right: var(--pad); font: 500 10px/1 var(--sc-font-text); letter-spacing: 0.14em; text-transform: uppercase; }
  .split--flow .side--write::before { content: "You write"; color: var(--ink-w-soft); }
  .split--flow .side--hear::before { content: "You hear"; color: var(--ink-h-soft); }
  .side { padding: var(--sc-6) var(--pad); }
  .act--hush, .act--takes, .act--same, .act--plans { padding-block: 0; }

  .hero-write { padding-top: 16px; padding-bottom: var(--sc-5); }
  .hero-copy { margin-top: var(--sc-5); }
  .hero-h1 { font-size: clamp(2.3rem, 9.5vw, 3rem); }
  .hero-sub { font-size: 1.02rem; }
  .hero-actions { margin-top: var(--sc-5); }
  .hero-hear { min-height: 0; }
  .plane--mic { height: 80%; bottom: 10%; }
  .plane--frame { width: 30%; }
  .hero-hear__line { font-size: 1.35rem; bottom: var(--sc-4); }
  .signin { top: auto; bottom: auto; top: 12px; }

  .peak { grid-template-rows: auto 1fr; }
  .peak-write { justify-content: flex-start; padding-top: var(--sc-6); padding-bottom: var(--sc-4); }
  .peak-src { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .wavefield { top: 12%; height: 36%; }
  .peak-player { bottom: var(--sc-5); gap: var(--sc-4); }
  .play--big { width: 54px; height: 54px; }
  .peak-line { font-size: 1rem; }
  .peak-after { bottom: var(--sc-4); }
  .peak-after .kicker { margin-bottom: var(--sc-2); }
  .peak-after__desc { font-size: 1rem; margin-bottom: var(--sc-2); }
  .peak-after__note { font-size: 0.9rem; }

  .line-write, .line-hear { gap: var(--sc-3); justify-content: flex-start; }
  .code { font-size: 11.5px; padding: var(--sc-4); }
  .line-hear .body { display: none; }
  .act--line .h2 { font-size: 1.8rem; }

  .close { background: var(--booth); }
  .close__inner, .foot { left: var(--pad); }
  .close__inner { top: 26%; }
}

@media (prefers-reduced-motion: reduce) {
  .plane { will-change: auto; }
  .plane--mic img { transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
