/* ===========================================================================
   wispa · landing v3 "Ink & Wisp"
   ...........................................................................
   Synthesis of v1 "Noir" (precision dark chassis, violet accent, live demos)
   and v2 "Letterpress" (warm ivory, Fraunces voice, editorial calm).

   Semantics, encoded in tokens and type:
     - serif (Fraunces) + --voice (warm amber)  = the human voice: raw speech,
       quotes, display headlines
     - sans (Inter)                             = the finished text wispa writes
     - mono (JetBrains Mono) + tabular numerals = the machine: keys, meters,
       terminal, model names
     - --accent (wispa violet)                  = wispa acting; the only
       interactive chroma
     - --trust (quiet sage)                     = privacy claims only

   Dark is the DEFAULT (:root). Light ([data-theme="light"]) inherits the warm
   oat paper of v2. Contrast is solved in the token layer: *-text variants are
   AA-safe for small text; --btn-fill is theme-independent under white labels.
   =========================================================================== */

:root {
  /* dark canvas: warm violet-black, not pitch black */
  --canvas: #0f0d13;
  --surface: #15121b;
  --surface-2: #1d1926;
  --elev: #181521;

  --ink: #f3efe6;          /* warm ivory: v2's paper, reborn as text */
  --body-c: #c9c4d1;
  --muted: #9b95a8;
  --muted-soft: #9a94a6;   /* fine-print tier: lifted for legibility, kept just under --muted */

  --hairline: rgba(243, 239, 230, 0.09);
  --hairline-strong: rgba(243, 239, 230, 0.17);

  --accent: #8b7dff;
  --accent-strong: #7a6bff;
  --accent-text: #a89dff;                    /* AA for small text on dark */
  --accent-soft: rgba(139, 125, 255, 0.14);

  --btn-fill: #6c5cff;                       /* theme-independent: white label */
  --btn-fill-strong: #5a49f0;
  --on-accent: #ffffff;

  --voice: #ff9d73;                          /* the human voice, warm */
  --voice-text: #ffb08d;
  --voice-soft: rgba(255, 157, 115, 0.13);

  --trust: #8fbf9d;
  --trust-soft: rgba(143, 191, 157, 0.12);

  --nav-bg: rgba(15, 13, 19, 0.7);
  --nav-bg-strong: rgba(15, 13, 19, 0.92);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 22px 48px -22px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.4), 0 36px 70px -24px rgba(0, 0, 0, 0.8);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 9px;
  --r-xl: 12px;
  --r-pill: 9999px;

  --wisp-energy: 0;   /* 0..1, set by JS while the hero demo "speaks" */
}

[data-theme="light"] {
  --canvas: #f6f2e9;
  --surface: #fffdf8;
  --surface-2: #efe8db;
  --elev: #fbf8f0;

  --ink: #1d1923;
  --body-c: #4b4552;
  --muted: #6c6575;        /* AA on the oat canvas */
  --muted-soft: #6f6879;

  --hairline: rgba(29, 25, 35, 0.11);
  --hairline-strong: rgba(29, 25, 35, 0.2);

  --accent: #6c5cff;
  --accent-strong: #5a49f0;
  --accent-text: #5a49f0;
  --accent-soft: rgba(108, 92, 255, 0.1);

  --voice: #d4592e;
  --voice-text: #c04d24;
  --voice-soft: rgba(212, 89, 46, 0.1);

  --trust: #3e5c44;
  --trust-soft: rgba(62, 92, 68, 0.1);

  --nav-bg: rgba(246, 242, 233, 0.72);
  --nav-bg-strong: rgba(246, 242, 233, 0.94);

  --shadow-sm: 0 1px 2px rgba(45, 35, 25, 0.06);
  --shadow-card: 0 1px 2px rgba(45, 35, 25, 0.06), 0 18px 40px -24px rgba(60, 45, 30, 0.28);
  --shadow-pop: 0 1px 2px rgba(45, 35, 25, 0.06), 0 30px 60px -26px rgba(60, 45, 30, 0.35);
}

/* ------------------------------------------------------------------ base -- */
* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* scroll anchoring "helpfully" nudges scrollY when in-viewport layout
     settles (font swap etc.); combined with scroll restoration that nudge
     accumulates across refreshes — the page crept upward a little more on
     every reload. Our layout reserves its space up front, so anchoring
     only does harm here. */
  overflow-anchor: none;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--body-c);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
a { color: inherit; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
}

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

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 44px);
}

.section { padding-block: clamp(72px, 10vw, 128px); }

.section-head {
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 640px; }
.section-head .lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 52ch;
  margin-bottom: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.trust-kicker { color: var(--trust); }

/* On section heads the kicker extends into a hairline that thins out and
   finally breaks into glyph dust: set type dissolving back into particles,
   the hero's material recurring as the page's editorial rule. (The dust is
   the flex-ordered ::before, so it renders after the ::after rule.) */
.section-head .kicker,
.priv-copy .kicker {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.section-head .kicker::after,
.priv-copy .kicker::after {
  content: "";
  order: 1;
  flex: 1;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, var(--hairline-strong), var(--hairline) 55%, transparent 97%);
}
.section-head .kicker::before,
.priv-copy .kicker::before {
  content: "* : ·";
  order: 2;
  font-weight: 400;
  letter-spacing: 0.38em;
  opacity: 0.5;
}
/* centered heads keep a plain label */
.dev .section-head .kicker { display: block; }
.dev .section-head .kicker::before,
.dev .section-head .kicker::after { display: none; }

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  margin-bottom: 12px;
}
.voice-tag { color: var(--voice-text); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--elev);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong);
}
.skip-link:focus { left: 12px; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding-inline: 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--btn-fill);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 26px -12px var(--accent);
}
.btn-primary:hover { background: var(--btn-fill-strong); }
.btn-primary:active { transform: translateY(1px); }
.btn-lg { height: 54px; padding-inline: 28px; font-size: 1rem; }
/* the clean OS-download button: ivory on dark, ink on light */
.btn-mac {
  background: var(--ink);
  color: var(--canvas);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -14px rgba(0, 0, 0, 0.55);
}
.btn-mac:hover { background: color-mix(in srgb, var(--ink) 88%, var(--canvas)); }
.btn-mac:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-2); }

.icon-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--body-c);
  cursor: pointer;
  transition: background 0.2s, width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-toggle:hover { background: var(--surface-2); }

[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }

/* ------------------------------------------------------ nav (pill, fixed) -- */
.nav-wrap {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px clamp(12px, 3vw, 24px) 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
/* the pill materializes out of the haze once the visitor scrolls: it starts
   scattered (blurred, slightly high and small) and condenses into focus,
   the same gesture as the hero particles forming the logo */
.nav-wrap.nav-hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  filter: blur(6px);
}
.nav-wrap.nav-hidden .nav { pointer-events: none; }
.nav {
  position: relative; /* anchors the swimming wave */
  pointer-events: auto;
  display: flex;
  align-items: center;
  height: 48px;
  /* padding matches the active chip's top/bottom inset so it sits evenly
     inside the pill on every side (see .nav-links a below) */
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: var(--nav-bg-strong);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark { display: inline-flex; filter: drop-shadow(0 4px 12px rgba(108, 92, 255, 0.35)); }
.brand-mark img { display: block; width: 22px; height: 22px; object-fit: contain; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  position: relative;
  /* line-height:1.1 tightens the box so the active chip clears the pill top
     and bottom by the same ~6px it clears the left/right edges */
  line-height: 1.1;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.35s ease, background 0.3s ease;
}
.nav-links a { z-index: 1; } /* labels sit above the gliding chip */
.nav-links a:hover:not(.active) { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--accent-text); }
/* the active marker is a soft chip that GLIDES behind the links: a pill
   inside the pill. Pure box, no glyphs — position and width morph together
   on one spring curve, so the move reads as a single fluid gesture. */
.nav-chip {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
  will-change: transform, width;
}
.nav-chip.on { opacity: 1; }

/* the theme switch sits quietly in the top right corner of the viewport */
.theme-corner {
  position: fixed;
  top: 14px;
  right: clamp(12px, 3vw, 24px);
  z-index: 60;
  width: 34px;
  height: 34px;
  background: color-mix(in srgb, var(--canvas) 55%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--hairline);
  opacity: 0.55;
  transition: opacity 0.25s, background 0.2s, border-color 0.2s;
}
.theme-corner:hover,
.theme-corner:focus-visible {
  opacity: 1;
  border-color: var(--hairline-strong);
}

/* ------------------------------------------------------------------ hero -- */
/* a single centered column filling the first viewport: ASCII logo, title,
   sub, download, and a scroll hint pinned to the bottom edge */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 48px 88px;
}

/* the wisp: a breathing aurora that brightens while the demo "speaks".
   JS drives --wisp-energy (0..1); the base breath comes from the keyframes. */
.wisp {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(38% 44% at 68% 36%, var(--accent-soft), transparent 70%),
    radial-gradient(30% 36% at 76% 52%, var(--voice-soft), transparent 70%);
  /* energy drives opacity only: the breathe animation owns transform */
  opacity: calc(0.55 + var(--wisp-energy) * 0.45);
  animation: wisp-breathe 9s ease-in-out infinite;
  transition: opacity 0.5s ease;
}
@keyframes wisp-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1.5%) scale(1.05); }
}

.hero-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.7rem, 5.5vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  margin: 18px 0 14px;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 30px;
  /* reserve two lines so a fallback-font reflow never changes the stack */
  min-height: 3.2em;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.hero-scroll:hover { color: var(--ink); }
.hero-scroll svg { animation: scroll-nudge 2.2s ease-in-out infinite; }
@keyframes scroll-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.dots { display: inline-flex; gap: 6px; }
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hairline-strong);
}
.dots i:nth-child(3) { background: var(--accent); }

@keyframes caret { 50% { opacity: 0; } }

.ascii-stage {
  /* 92 columns x JetBrains Mono (0.6em advance) -> grid width = 55.2 x font-size */
  --ascii-fs: 9.5px;
  position: relative;
  background: radial-gradient(ellipse 62% 58% at 50% 50%, var(--accent-soft), transparent 72%);
  /* reserve the grid's box (36 rows x 1.09) before JS fills it: no reflow */
  min-height: calc(var(--ascii-fs) * 39.24);
  min-width: calc(var(--ascii-fs) * 55.2);
}
.ascii-stage pre {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--ascii-fs);
  line-height: 1.09;
  letter-spacing: normal;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
#asciiBase { color: rgba(243, 239, 230, 0.26); }
[data-theme="light"] #asciiBase { color: rgba(29, 25, 35, 0.34); }
#asciiBright {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b7dff 14%, #a89dff 46%, #ff9d73 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 14px rgba(150, 130, 255, 0.28);
}
[data-theme="light"] #asciiBright {
  background: linear-gradient(135deg, #5a49f0 14%, #6c5cff 46%, #d4592e 84%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

/* ------------------------------------------------------------ definition -- */
/* The page answers "what is this?" the most literal way possible: with a
   dictionary entry. Headword in the voice serif, pronunciation in the
   machine mono, one plain definition set large and quiet — hero calm,
   before any feature talk. */
.define {
  position: relative;
  isolation: isolate;
  padding-block: clamp(84px, 11vw, 150px);
  text-align: center;
}
.define::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(46% 60% at 50% 30%, var(--accent-soft), transparent 72%);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
/* the ASCII voice wave: 64 mono columns breathing like speech (bursts,
   syllables, pauses). Reserve its exact box so it never reflows. */
.define-wave {
  --dw-fs: 11px;
  position: relative;
  display: inline-block;
  margin-bottom: clamp(22px, 3.5vw, 36px);
  min-height: calc(var(--dw-fs) * 5.45); /* 5 rows x 1.09 line-height */
  min-width: calc(var(--dw-fs) * 38.4);  /* 64 cols x 0.6em advance */
}
.define-wave pre {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--dw-fs);
  line-height: 1.09;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
#dwBase { color: rgba(243, 239, 230, 0.22); }
[data-theme="light"] #dwBase { color: rgba(29, 25, 35, 0.3); }
#dwBright {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b7dff 14%, #a89dff 46%, #ff9d73 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(150, 130, 255, 0.25);
}
[data-theme="light"] #dwBright {
  background: linear-gradient(135deg, #5a49f0 14%, #6c5cff 46%, #d4592e 84%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}
.define-text {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 auto clamp(14px, 2vw, 22px);
  text-wrap: balance;
}
.define-sub {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 46ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* --------------------------------------------------------------- marquee -- */
.trust {
  padding-block: 30px;
  border-block: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.trust-label {
  text-align: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted-soft);
  margin-bottom: 18px;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-row {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-row .mapp {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
/* monochrome marks, all the same size and tone: works-with, no endorsement */
.marquee-row .mlogo {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.75;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-row .msep {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted-soft);
  opacity: 0.55;
  align-self: center;
}

/* ------------------------------------------------- section atmospheres -- */
/* The hero's wisp does not die at the fold: every section keeps a faint
   drift of it, placed a little differently each time, so scrolling reads
   as moving through one slow aurora. Decorative, token-only, static. */
.tf, .modes-sec, .gallery, .dev, .speed, .quotes, .faq {
  position: relative;
  isolation: isolate;
}
.tf::before, .modes-sec::before, .gallery::before, .dev::before,
.speed::before, .quotes::before, .faq::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* fade every wash out before the section edges: no aurora ever ends in
     a hard line where one section meets the next */
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
.tf::before {
  background:
    radial-gradient(42% 60% at 6% 16%, var(--voice-soft), transparent 70%),
    radial-gradient(30% 44% at 90% 82%, var(--accent-soft), transparent 72%);
  opacity: 0.55;
}
.modes-sec::before {
  background: radial-gradient(38% 54% at 90% 10%, var(--accent-soft), transparent 70%);
  opacity: 0.6;
}
.gallery::before {
  background: radial-gradient(42% 50% at 10% 88%, var(--accent-soft), transparent 72%);
  opacity: 0.5;
}
.dev::before {
  background: radial-gradient(36% 48% at 50% 4%, var(--accent-soft), transparent 70%);
  opacity: 0.6;
}
.speed::before {
  background:
    radial-gradient(36% 50% at 88% 14%, var(--accent-soft), transparent 70%),
    radial-gradient(26% 36% at 8% 74%, var(--voice-soft), transparent 72%);
  opacity: 0.5;
}
.quotes::before {
  background: radial-gradient(46% 58% at 50% 2%, var(--voice-soft), transparent 72%);
  opacity: 0.5;
}
.faq::before {
  background: radial-gradient(36% 46% at 80% 2%, var(--accent-soft), transparent 72%);
  opacity: 0.45;
}

/* ---------------------------------------------------------- transformation */
.tf-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}
.tf-card {
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 30px);
  min-height: 180px;
}
.tf-raw {
  background: var(--voice-soft);
  border: 1px solid color-mix(in srgb, var(--voice) 22%, transparent);
}
.tf-raw-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--body-c) 60%, var(--voice-text));
  margin: 0;
}
.tf-raw-text .strike {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--voice) 65%, transparent);
  text-decoration-thickness: 1.5px;
  opacity: 0.55;
}
/* the operator between the cards is the condensation itself: loose dust
   gathering into solid ink, reading toward the finished text */
.tf-op {
  align-self: center;
  font-size: 1.02rem;
  letter-spacing: 0.42em;
  white-space: nowrap;
  color: var(--muted-soft);
  -webkit-user-select: none;
  user-select: none;
}
.tf-op b { color: var(--accent-text); font-weight: 500; }
.tf-polished {
  background: var(--elev);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.tf-polished-text {
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

/* ----------------------------------------------------------------- modes -- */
.modes-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.modes-source {
  background: var(--surface);
  padding: clamp(22px, 3vw, 32px);
}
.modes-source-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.24rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 80%, var(--voice-text));
  margin: 0;
}
.modes-output {
  background: var(--elev);
  padding: clamp(18px, 2.5vw, 26px);
  display: flex;
  flex-direction: column;
}
.modes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.modes-tab {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.modes-tab:hover { color: var(--ink); }
.modes-tab[aria-selected="true"] {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
/* the output pane speaks the semantic type system: finished prose is set
   in the sans wispa writes with; only the commit stays machine mono */
.modes-pre {
  flex: 1;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--body-c);
  white-space: pre-wrap;
  min-height: 150px;
  transition: opacity 0.25s ease;
}
.modes-pre[data-kind="commit"] {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------- gallery -- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
}
.gcard {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.3s;
}
.gcard:hover {
  transform: translateY(-3px);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-card);
}
.gposter {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(90% 110% at 20% 0%, var(--accent-soft), transparent 60%),
    var(--surface-2);
  border-bottom: 1px solid var(--hairline);
}

/* per-use-case mock scenes (decorative, aria-hidden) */
.gmock {
  position: absolute;
  inset: 20% 16%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(160deg, #000 60%, transparent 96%);
  mask-image: linear-gradient(160deg, #000 60%, transparent 96%);
}
.pline {
  height: 8px;
  border-radius: 4px;
  background: var(--hairline-strong);
}
.pline.dim { opacity: 0.55; }
/* the line wispa just landed: accent ink with a resting caret after it.
   The caret only blinks while the card is hovered — alive under the hand. */
.pland {
  height: 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  position: relative;
}
.pland::after,
.pcode.c1::after,
.pbubble.me::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 1px;
  background: var(--accent);
}
.pland::after { right: -9px; }
.pcode.c1 { position: relative; }
.pcode.c1::after { right: -8px; height: 11px; }
.pbubble.me { position: relative; }
.pbubble.me::after { right: 9px; height: 12px; }
.gcard:hover .pland::after,
.gcard:hover .pcode.c1::after,
.gcard:hover .pbubble.me::after { animation: caret 1.05s steps(1) infinite; }
.pto {
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 4px;
}
.pnote {
  height: 12px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--voice) 35%, transparent);
  margin-bottom: 4px;
}
.pbubble {
  height: 22px;
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.pbubble.me {
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.pterm {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: 10px;
  background: #14111b; /* a terminal stays dark in both themes */
  border: 1px solid rgba(243, 239, 230, 0.1);
}
.pterm .pdots { display: flex; gap: 5px; margin-bottom: 2px; }
.pterm .pdots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(243, 239, 230, 0.17);
}
.pcode { height: 6px; border-radius: 3px; }
.pcode.c1 { background: color-mix(in srgb, #8b7dff 60%, transparent); }
.pcode.c2 { background: color-mix(in srgb, #ff9d73 55%, transparent); }
.pcode.c3 { background: rgba(243, 239, 230, 0.22); }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w95 { width: 95%; }
.gposter .gicon {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.gplay {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--btn-fill);
  color: var(--on-accent);
  box-shadow: 0 12px 30px -10px var(--accent);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.gcard:hover .gplay { transform: scale(1.08); }
.gplay svg { margin-left: 3px; }
.gdur {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--body-c);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gmeta { padding: 16px 18px 18px; }
.gmeta h3 {
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.gmeta p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* the YouTube poster: a real thumbnail with a play button; clicking it swaps
   the poster for the embedded player in place (no popup) */
.gposter-yt {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  color: inherit;
  font: inherit;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
}
.gposter-yt:focus-visible { outline-offset: -3px; }
.gshade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.44));
}
.gposter.is-playing { display: block; padding: 0; background: #000; }
.gframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ------------------------------------------------------------- developers */
.dev .section-head { margin-inline: auto; text-align: center; }
.dev .section-head .lead { margin-inline: auto; }

.terminal {
  max-width: 800px;
  margin-inline: auto;
  background: var(--elev);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
[data-theme="light"] .terminal {
  /* the terminal stays a dark object in the light theme: it is a terminal.
     Re-darken every token its children consume, so light-theme values never
     leak onto the dark surface (dots, ✓, diffs, waveform). */
  background: #191521;
  border-color: rgba(243, 239, 230, 0.12);
  --trust: #8fbf9d;
  --accent: #8b7dff;
  --accent-text: #a89dff;
  --voice: #ff9d73;
  --voice-text: #ffb08d;
  --hairline: rgba(243, 239, 230, 0.09);
  --hairline-strong: rgba(243, 239, 230, 0.17);
  --muted: #9b95a8;
  --muted-soft: #9a94a6;
  --surface-2: #1d1926;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
[data-theme="light"] .term-head {
  background: rgba(243, 239, 230, 0.05);
  border-color: rgba(243, 239, 230, 0.1);
}
.term-title { font-size: 0.76rem; color: var(--muted); }
[data-theme="light"] .terminal .term-title { color: #9b95a8; }
.term-voice {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.term-voice[data-on="true"] { opacity: 1; }

/* ------------------------------------------- the app's recording pill --- */
/* A faithful copy of wispa's real notch indicator (Indicator.tsx +
   global.css in the app repo): dark glass pill, pulsing dot (red while
   recording, violet while processing), 11 gradient waveform bars. It
   floats over the desktop in real life, so it stays dark in both themes. */
.wpill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: rgba(24, 24, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.wpill-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wpill-accent, #ff5d6c);
  box-shadow: 0 0 8px color-mix(in srgb, var(--wpill-accent, #ff5d6c) 85%, transparent);
  animation: wpill-pulse 1.1s ease-in-out infinite;
}
.wpill[data-phase="processing"] .wpill-dot {
  background: #8b7dff;
  box-shadow: 0 0 8px rgba(139, 125, 255, 0.85);
}
.wpill-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 24px;
}
.wpill-bars i {
  width: 3px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #8b7dff 55%, white),
    #8b7dff
  );
  will-change: height;
}
/* compact variant for tight chrome (the terminal header) */
.wpill-sm { height: 28px; padding: 0 11px; gap: 7px; }
.wpill-sm .wpill-dot { width: 7px; height: 7px; }
.wpill-sm .wpill-bars { height: 16px; gap: 2px; }
.wpill-sm .wpill-bars i { width: 2.5px; }
@keyframes wpill-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.term-body {
  padding: 18px 20px 22px;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.75;
  min-height: 250px;
  color: #c9c4d1;
}
.term-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9b95a8;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(243, 239, 230, 0.08);
}
.claude-monster { display: inline-flex; }

.t-line { display: flex; align-items: baseline; gap: 8px; }
.t-line + .t-line { margin-top: 3px; }
.t-caret-prompt { color: var(--voice); }
.t-prompt { color: #f3efe6; }
.t-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--voice);
  vertical-align: text-bottom;
  animation: caret 1.05s steps(1) infinite;
}
.t-step { color: #9b95a8; }
.t-bullet { color: var(--voice); }
.t-act { color: #c9c4d1; font-weight: 500; }
.t-file { color: #9b95a8; }
.t-diff { color: var(--accent-text); }
.t-ok { color: var(--trust); }
.t-okt { color: #c9c4d1; }
.t-dim { color: #767080; }

.dev .section-head h2 { margin-inline: auto; }

/* ---------------------------------------------------------------- privacy */
.priv {
  border-block: 1px solid var(--hairline);
  background:
    radial-gradient(70% 90% at 85% 10%, var(--trust-soft), transparent 60%),
    color-mix(in srgb, var(--surface) 60%, transparent);
}
.priv-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.priv-points {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.priv-points li {
  padding-left: 16px;
  border-left: 2px solid var(--trust);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.priv-points b { color: var(--ink); font-size: 0.98rem; }
.priv-points span { color: var(--muted); font-size: 0.9rem; }

.dial-card {
  background: var(--elev);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 20px 14px;
}
.dial-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dial-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 10px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.dial-list li:hover { background: var(--surface-2); }
.dial-list li b {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline-strong);
  transition: background 0.2s, box-shadow 0.2s;
}
.dial-list .dial-name { flex: 1; min-width: 0; }
.dial-list li[data-on="true"] {
  color: var(--ink);
  background: var(--trust-soft);
}
.dial-list li[data-on="true"] b {
  background: var(--trust);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--trust) 25%, transparent);
}
.dial-list .dial-tag {
  margin-left: auto;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-soft);
}

/* ------------------------------------------------------------ speed/race -- */
.race {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: stretch;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.race-vs {
  align-self: center;
  font-size: 0.72rem;
  color: var(--muted-soft);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  padding: 5px 11px;
}
.lane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(16px, 2.5vw, 22px);
}
.lane-talk { border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.lane-head { display: flex; align-items: center; justify-content: space-between; }
.lane-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.lane-label.accent { color: var(--accent-text); }
.lane-sent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted-soft);
}
.lane-window {
  background: var(--elev);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  min-height: 108px;
}
.lane-to { font-size: 0.72rem; color: var(--muted-soft); margin-bottom: 6px; }
.lane-text { font-size: 0.92rem; color: var(--ink); line-height: 1.5; }

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  padding: 10px 6px;
}
.kb-row { display: flex; gap: 5px; }
.kb-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 26px;
  padding-inline: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  border-radius: 5px;
  transition: background 0.1s, transform 0.1s, border-bottom-width 0.1s;
}
.kb-key.wide { width: 132px; }
.kb-key.med { min-width: 38px; }
.kb-key.active {
  background: var(--hairline-strong);
  color: var(--ink);
  transform: translateY(1px);
  border-bottom-width: 1px;
}

/* the talk lane's instrument is the real pill, centered where the typed
   lane shows its keyboard */
.mic-module {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  min-height: 66px;
  flex: 1; /* fills the lane so its meter aligns with the typed lane's */
}
.mic-module .wpill {
  opacity: 0.45;
  transition: opacity 0.3s;
}
.mic-module[data-on="true"] .wpill { opacity: 1; }

.meter {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--hairline);
  margin-top: auto; /* pins both lanes' meters to the same bottom edge */
}
.meter-num {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.meter-num.accent { color: var(--accent-text); }
.meter-unit { font-size: 0.68rem; color: var(--muted-soft); }
.meter-bar {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.meter-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--hairline-strong);
  transition: width 0.3s ease;
}
.meter-bar i.accent-fill {
  background: linear-gradient(90deg, var(--accent), var(--btn-fill-strong));
}

/* calculator */
.calc {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}
.calc-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 16px;
}
input[type="range"] {
  --p: 27%;
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-2) var(--p));
  outline-offset: 6px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--canvas);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--canvas);
}
.calc-value {
  margin: 12px 0 26px;
  font-size: 0.9rem;
  color: var(--muted);
}
.calc-result {
  font-size: 1.15rem;
  color: var(--body-c);
  margin-bottom: 6px;
}
.calc-result b {
  font-size: 1.5rem;
  font-weight: 600;
}
.calc-result .accent { color: var(--accent-text); }
.calc-year { color: var(--muted); margin-bottom: 18px; }
.calc-year b { color: var(--ink); font-weight: 600; }
.calc-assumption { font-size: 0.72rem; color: var(--muted-soft); margin: 0; }

/* ---------------------------------------------------------------- quotes -- */
/* Spoken words do not live in boxes. Three voices set as open serif
   pull quotes, separated by hairlines only — the editorial register the
   headline speaks in, at reading size. */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.quote-card {
  margin: 0;
  padding: clamp(6px, 1vw, 10px) clamp(26px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.quote-card:first-child { padding-left: 0; }
.quote-card:last-child { padding-right: 0; }
.quote-card + .quote-card { border-left: 1px solid var(--hairline); }
.quote-card blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.18rem, 1.6vw, 1.34rem);
  line-height: 1.48;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex: 1;
}
.quote-card blockquote::before {
  content: "\201C";
  color: var(--voice);
  font-size: 1.45em;
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 4px;
}
.quote-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}
.quote-card figcaption b { font-size: 0.9rem; color: var(--ink); }
.quote-card figcaption span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ------------------------------------------------------------------- faq -- */
.faq-list {
  max-width: 800px;
  border-top: 1px solid var(--hairline);
}
.faq-item { border-bottom: 1px solid var(--hairline); }
/* questions are asked in a human voice (serif); answers arrive as wispa's
   finished text (sans) — the transformation, played once more per row */
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent-text); }
.faq-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.faq-icon::before { inset: 7px 0; }
.faq-icon::after { inset: 0 7px; }
.faq-item[data-open="true"] .faq-icon::after { transform: scaleY(0); opacity: 0; }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-a-inner {
  padding: 0 4px 22px;
  color: var(--muted);
  max-width: 62ch;
}

/* ------------------------------------------------------------------- cta -- */
.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.wisp-cta {
  inset: -30% -10%;
  background:
    radial-gradient(45% 55% at 50% 8%, var(--accent-soft), transparent 70%),
    radial-gradient(30% 40% at 62% 24%, var(--voice-soft), transparent 70%);
  animation-duration: 11s;
}
.cta-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
/* the knot closes the page as a compact bookend above "Start speaking." */
.cta .ascii-stage {
  --ascii-fs: 8px;
  margin-bottom: 12px;
}
/* scattered ASCII particles that gather into the logo on hover (hero).
   The font-size is the scaling knob: the 76x34 grid is 45.6x wide and
   ~37x tall its font-size. It adapts to whichever is tighter, viewport
   height (minus ~460px for title/sub/button/paddings, so the whole hero
   fits one screen) or width, capped at 10px. */
.ascii-logo {
  --logo-fs: clamp(6px, min(calc((100vh - 460px) / 37), calc((100vw - 48px) / 46)), 10px);
  --logo-fs: clamp(6px, min(calc((100svh - 460px) / 37), calc((100vw - 48px) / 46)), 10px);
  position: relative;
  touch-action: manipulation;
  /* reserve the grid's exact box (34 rows x 1.09 line-height, 76 cols x 0.6em)
     BEFORE JS fills it, so the hero never reflows on load */
  min-height: calc(var(--logo-fs) * 37.06);
  min-width: calc(var(--logo-fs) * 45.6);
}
.ascii-logo pre {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--logo-fs);
  line-height: 1.09;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
#logoBase { color: rgba(243, 239, 230, 0.24); }
[data-theme="light"] #logoBase { color: rgba(29, 25, 35, 0.32); }
#logoBright {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b7dff 14%, #a89dff 46%, #ff9d73 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 14px rgba(150, 130, 255, 0.28);
}
[data-theme="light"] #logoBright {
  background: linear-gradient(135deg, #5a49f0 14%, #6c5cff 46%, #d4592e 84%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}
.cta-title { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.cta-title .line-a { display: block; }
.cta-title .line-b {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-text);
}
.cta-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 28px;
}

/* ---------------------------------------------------------------- footer -- */
.footer {
  border-top: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  padding-block: clamp(44px, 6vw, 64px) 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: clamp(36px, 5vw, 56px);
}
.footer-tagline { color: var(--muted); font-size: 0.9rem; max-width: 30ch; margin-top: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  margin: 0 0 4px;
}
.footer-col a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
}
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
}
.footer-bottom p { margin: 0; font-size: 0.74rem; color: var(--muted-soft); }
.footer-legal { display: flex; flex-direction: column; gap: 5px; }
.footer-legal p + p { opacity: 0.75; }

.lang-select { position: relative; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--body-c);
  font-family: var(--sans);
  font-size: 0.84rem;
  cursor: pointer;
}
.lang-trigger:hover { background: var(--surface-2); }
.lang-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.chev { transition: transform 0.2s; }
.lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 150px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--elev);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  z-index: 60;
}
.lang-option {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  color: var(--body-c);
  cursor: pointer;
}
.lang-option:hover { background: var(--surface-2); color: var(--ink); }
.lang-option[aria-selected="true"]::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
}

/* --------------------------------------------------------------- reveals -- */
/* gated on html.js (set pre-paint) so content stays visible without JS.
   Content does not fade in, it MATERIALIZES: scattered (blurred, low,
   slightly small) condensing into focus — the same gesture as the hero
   particles forming the logo and the nav pill condensing in. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(7px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------------------------------------------- headline condensation --- */
/* On first reveal a section title resolves out of the hero's glyph ramp:
   a mono particle hovers where each letter will land, then the letter
   condenses in (violet cooling to ink) while the particle burns off.
   Built by JS (condenseHeadline): the intact kerned text stays in the DOM,
   hidden as transparent background-clipped text; each landed letter is
   revealed by an ink rect in the h2's own background, so the settled
   headline is always the real text run — nothing ever swaps or shifts. */
.cond-host { position: relative; }
h2.condensing {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-repeat: no-repeat;
}
.cond {
  position: absolute;
  pointer-events: none;
}
.cond-ch { position: absolute; display: block; }
.cond-r {
  display: block;
  color: var(--ink);
  opacity: 0;
  transform: translateY(0.14em);
  filter: blur(6px);
  animation: cond-r-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms) forwards;
}
.cond-g {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.6em;
  color: var(--accent-text);
  opacity: 0.7;
  animation: cond-g-out 0.5s ease var(--d, 0ms) forwards;
}
@keyframes cond-r-in {
  0% { opacity: 0; transform: translateY(0.14em); filter: blur(6px); color: var(--accent-text); }
  55% { color: var(--accent-text); }
  100% { opacity: 1; transform: none; filter: none; color: var(--ink); }
}
@keyframes cond-g-out {
  to { opacity: 0; transform: scale(0.4); }
}

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 960px) {
  .ascii-stage { --ascii-fs: min(10.5px, calc((100vw - 48px) / 55.5)); }
  .priv-grid { grid-template-columns: 1fr; }
  .quotes-grid { grid-template-columns: 1fr; max-width: 620px; }
  .quote-card { padding: 26px 0; }
  .quote-card:first-child { padding-top: 6px; }
  .quote-card:last-child { padding-bottom: 6px; }
  .quote-card + .quote-card { border-left: 0; border-top: 1px solid var(--hairline); }
  .modes-card { grid-template-columns: 1fr; }
  .race { grid-template-columns: 1fr; }
  .race-vs { justify-self: center; }
}

@media (max-width: 760px) {
  .nav { height: 42px; padding-inline: 6px; }
  .nav-links a { padding: 6px 10px; font-size: 0.82rem; }
  .theme-corner { top: 10px; }
  .tf-grid { grid-template-columns: 1fr; }
  /* stacked layout: the dust condenses downward, glyphs stay upright */
  .tf-op {
    justify-self: center;
    width: 1.3em;
    letter-spacing: 0;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .define-wave { --dw-fs: min(11px, calc((100vw - 48px) / 38.4)); }
  .lane { padding: 14px; }
  .kb-row { gap: 3px; }
  .keyboard { gap: 4px; padding-inline: 0; }
  .kb-key { min-width: 17px; height: 21px; font-size: 9px; padding-inline: 2px; }
  .kb-key.med { min-width: 26px; }
  .kb-key.wide { width: 84px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee-row { animation: none; }
  .wisp { animation: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
