/* ============================================================
   JustSay — redesign
   Design system: tokens, base, components
   Display: Space Grotesk · Body: Hanken Grotesk · Mono: Space Mono
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* signature accent (tweakable) */
  --accent: #6d5dfb;
  --accent-2: #22d3ee;
  --accent-ink: #ffffff;            /* text on accent */
  --accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", monospace;

  /* rhythm */
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 56px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;
  --r-xl: 38px;

  /* density (tweakable): section vertical padding */
  --sec-pad: clamp(72px, 9vw, 140px);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Theme: light (default) ---------- */
:root, [data-theme="light"] {
  --bg: #f7f8fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --ink: #0b0f1c;
  --ink-2: #3a4255;
  --muted: #6b7385;
  --line: #e7e9f0;
  --line-2: #d7dbe6;
  --hero-grid: rgba(11, 15, 28, .045);
  --glow: color-mix(in oklab, var(--accent) 30%, transparent);
  --shadow-card: 0 1px 2px rgba(11,15,28,.05), 0 18px 40px -24px rgba(11,15,28,.25);
  --shadow-pop: 0 30px 80px -30px rgba(11,15,28,.35);
  color-scheme: light;
}

/* ---------- Theme: dark ---------- */
[data-theme="dark"] {
  --bg: #0b0f1c;
  --bg-2: #0e1424;
  --surface: #121a2e;
  --surface-2: #182241;
  --ink: #f4f6ff;
  --ink-2: #c2c9dd;
  --muted: #8893ad;
  --line: #1e2740;
  --line-2: #2a3656;
  --hero-grid: rgba(255, 255, 255, .04);
  --glow: color-mix(in oklab, var(--accent) 42%, transparent);
  --shadow-card: 0 1px 0 rgba(255,255,255,.03), 0 24px 60px -30px rgba(0,0,0,.8);
  --shadow-pop: 0 40px 110px -34px rgba(0,0,0,.85);
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.03;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: var(--sec-pad); position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.lead { color: var(--ink-2); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.kbd-mark { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 14px; --pad-x: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 30px -12px var(--glow);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 16px 40px -12px var(--glow); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-lg { --pad-y: 17px; --pad-x: 28px; font-size: 16.5px; }

/* ---------- Google Play badge ---------- */
.play-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 22px 11px 17px; border-radius: 14px;
  background: var(--ink); color: var(--bg); border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .22s, opacity .2s;
}
.play-badge:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -16px var(--glow); }
.play-badge:active { transform: translateY(0) scale(.99); }
.play-badge .pg-ico { width: 26px; height: 26px; flex: 0 0 auto; }
.play-badge .pg-txt { display: flex; flex-direction: column; line-height: 1.04; text-align: left; }
.play-badge .pg-txt small { font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; opacity: .72; }
.play-badge .pg-txt strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.play-badge.lg { padding: 13px 26px 13px 19px; }
.play-badge.lg .pg-ico { width: 31px; height: 31px; }
.play-badge.lg .pg-txt strong { font-size: 20px; }
.play-badge.sm { padding: 8px 15px 8px 12px; border-radius: 11px; gap: 8px; }
.play-badge.sm .pg-ico { width: 20px; height: 20px; }
.play-badge.sm .pg-txt small { font-size: 8.5px; letter-spacing: .07em; }
.play-badge.sm .pg-txt strong { font-size: 14px; }

/* platform row (Android now, Windows soon) */
.platforms { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.platforms .pf { display: inline-flex; align-items: center; gap: 7px; }
.platforms .pf svg { width: 15px; height: 15px; color: var(--ink-2); }
.platforms .soon {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.platforms .soon svg { width: 13px; height: 13px; color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand .logo { width: 34px; height: 34px; flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav-links a {
  padding: 9px 13px; border-radius: 10px; color: var(--ink-2);
  font-size: 15px; font-weight: 600; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-burger { display: none; }

/* ---------- Hero (shared) ---------- */
.hero { position: relative; overflow: clip; padding-top: clamp(40px, 6vw, 76px); padding-bottom: var(--sec-pad); }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}
.hero-orb {
  position: absolute; z-index: 0; pointer-events: none;
  width: 60vw; max-width: 760px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--glow), transparent 62%);
  filter: blur(20px); opacity: .9;
  top: -22%; left: 50%; transform: translateX(-50%);
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 7px 7px 7px; padding-right: 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-card);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #18c07a; box-shadow: 0 0 0 4px color-mix(in oklab, #18c07a 22%, transparent); }
.badge .pill { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }

.hero h1 {
  font-size: clamp(40px, 7.4vw, 86px);
  letter-spacing: -.035em;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: var(--ink-2); font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5; max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent); }

/* hero layout variants -------------------------------------- */
/* 2-col × 4-row grid with named areas. Demo spans rows 2-3 — from
 * the H1 baseline down to the bottom of the Get-it-on-Google-Play /
 * See-how-it-works button strip. Platforms + meta sit BELOW the
 * demo on the left (row 4); the right column in row 4 is empty so
 * the demo box doesn't have to span all the way down through them
 * (which left a big visual void on the right).
 *
 *   row 1: badge    .
 *   row 2: text    demo
 *   row 3: cta     demo  ← demo bottom aligns with bottom of cta
 *   row 4: trail    .    ← platforms + meta, demo absent
 *
 * The demo grid cell is hard-clipped (overflow:hidden + min-height:0)
 * so when the typing animation or the command-line strip would push
 * the box taller, the content gets clipped instead — the outer card
 * height stays constant, and the left column buttons don't shift. */
.hero-grid {
  position: relative; z-index: 2; display: grid;
  column-gap: clamp(36px, 5vw, 64px);
  row-gap: 24px;
  grid-template-areas:
    "badge   ."
    "text    demo"
    "cta     demo"
    "trail   .";
  align-items: stretch;
}
.hg-badge    { grid-area: badge;    align-self: start; justify-self: start; }
.hg-text     { grid-area: text;     display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hg-demo     {
  grid-area: demo; align-self: stretch;
  min-height: 0;       /* override grid item's implicit auto min */
  overflow: hidden;    /* clip when canvas content would push taller */
}
.hg-cta      { grid-area: cta;      align-self: end; }
.hg-trailing { grid-area: trail;    display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* variant: split (default) */
[data-hero="split"] .hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  /* row 2 (text+demo) absorbs leftover vertical space; rows 1, 3, 4
   * (badge / cta / trailing-strips) are content-sized. */
  grid-template-rows: auto 1fr auto auto;
}
/* variant: center */
[data-hero="center"] .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
[data-hero="center"] .hero-copy { align-items: center; }
[data-hero="center"] .hero-sub { max-width: 52ch; }
[data-hero="center"] .demo-stage { width: min(680px, 100%); }
/* variant: bold */
[data-hero="bold"] .hero-grid { grid-template-columns: minmax(0,1fr) minmax(0,.92fr); }
[data-hero="bold"] .hero h1 { font-size: clamp(46px, 9vw, 116px); line-height: .92; }
[data-hero="bold"] .hero-copy { gap: 28px; }
[data-hero="bold"] .hero-block {
  background: var(--ink); color: var(--bg);
  margin-left: calc(var(--gut) * -1); padding-left: var(--gut);
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
}

@media (max-width: 880px) {
  [data-hero] .hero-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    grid-template-areas:
      "badge"
      "text"
      "demo"
      "cta"
      "trail" !important;
    text-align: left; justify-items: stretch;
  }
  [data-hero] .hero-copy { align-items: flex-start; }
  [data-hero="center"] .hero-copy, [data-hero="center"] .hero-grid { text-align: center; justify-items: center; }
  [data-hero="center"] .hero-copy { align-items: center; }
}

/* ---------- Interactive demo (the keyboard / dictation surface) ----------
 * The hero-grid uses align-items:stretch so the demo column gets the
 * same height as the copy column. .demo-stage and .demo-app fill that
 * height and the canvas absorbs the variance: when the typing animation
 * swaps placeholder→typed→cmdline→askbar, the overall app size stays
 * constant. Without this the box visibly jumped on every keystroke. */
.demo-stage {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex;
  min-height: 0;        /* so children with overflow:hidden actually clip */
}
.demo-app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;          /* fills the locked .hg-demo grid cell */
  display: flex;
  flex-direction: column;
  min-height: 0;         /* propagate the clip downwards */
}
.demo-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.demo-topbar .app-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-size: 13px; }
.demo-topbar .app-name { font-weight: 700; font-size: 14.5px; }
.demo-topbar .app-sub { font-size: 12.5px; color: var(--muted); margin-left: auto; font-family: var(--font-mono); }

.demo-canvas {
  padding: 22px 18px 16px;
  display: flex; flex-direction: column; gap: 12px;
  /* Flex-grow so the canvas absorbs all leftover vertical space
   * between the static topbar and the keyboard tray below. Combined
   * with .demo-app height:100%, this means swapping internal content
   * (placeholder → typed → cmdline → askbar) never changes the
   * outer box size — only the canvas redistributes inside. */
  flex: 1 1 auto;
  /* min-height:0 + overflow:hidden = content that would push the
   * box taller (long dictated text + the command-line strip) is
   * clipped instead, preserving the locked outer height. The user
   * accepts partial visibility of the field text in exchange for
   * a rock-solid box that doesn't shove the left-column buttons. */
  min-height: 0;
  overflow: hidden;
}
/* Field takes whatever space is left over after the bottom stack
 * has reserved its own height. min-height:0 lets the canvas clip
 * tall dictation/translation text rather than push the bottom
 * stack out of view. */
.demo-canvas .demo-field {
  flex: 1 1 auto; min-height: 0;
  overflow: hidden;
}
/* Cmdline + askbar locked together in a single bottom-anchored
 * container. Previously they were independent flex children, each
 * with margin-top:auto, which fought each other when cmdline
 * showed / hid → askbar visually jumped between mid-canvas and the
 * very bottom. The wrapper has a single margin-top:auto so the
 * whole group pins to the bottom regardless of cmdline visibility. */
.demo-bottom-stack {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: auto; flex-shrink: 0;
}
.demo-field {
  font-size: 17px; line-height: 1.55; color: var(--ink);
  min-height: 64px;
}
.demo-field .typed { font-family: var(--font-body); }
.demo-field .caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: -.18em;
  background: var(--accent); margin-left: 1px; border-radius: 2px;
  animation: blink 1.05s steps(1) infinite;
}
.demo-field.placeholder { color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }

.demo-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.demo-chip {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px; letter-spacing: .02em;
  opacity: .55; transition: opacity .25s, color .25s, border-color .25s, background .25s;
}
.demo-chip.on { opacity: 1; color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* command line (hero demo) — the spoken instruction, shown as you
 * say it. Sits inside .demo-bottom-stack so positioning comes from
 * the parent — no margin-top needed here (was margin-top:auto, which
 * conflicted with .demo-askbar and made both jump around). */
.demo-cmdline {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
}
.demo-cmdline[hidden] { display: none; }
.demo-cmdline .cl-ico { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); }
.demo-cmdline .cl-ico svg { width: 18px; height: 18px; }
.demo-cmdline .cl-quote {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; color: var(--ink);
  font-style: italic; min-width: 0; flex: 1;
}
.demo-cmdline .cl-quote::before { content: "“"; opacity: .55; }
.demo-cmdline .cl-quote.spoke::after { content: "”"; opacity: .55; }
.demo-cmdline .cl-lang {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent);
  background: var(--surface); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px;
}
.demo-cmdline .cl-lang:empty { display: none; }

/* "or say your own command" — also inside .demo-bottom-stack now,
 * so the parent's gap spaces it from cmdline; no own margin needed. */
.demo-askbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px dashed var(--line-2);
  transition: border-color .2s, background .2s;
}
.demo-askbar:focus-within { border-style: solid; border-color: var(--accent); background: var(--surface); }
.demo-askbar .ab-ico { flex: 0 0 auto; width: 15px; height: 15px; color: var(--muted); }
.demo-askbar .ab-ico svg { width: 15px; height: 15px; }
.demo-askbar:focus-within .ab-ico { color: var(--accent); }
.demo-askbar input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
}
.demo-askbar input::placeholder { color: var(--muted); }
.demo-field .morph { animation: morphin .5s var(--ease); }
@keyframes morphin { from { opacity: .25; filter: blur(3px); } to { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { .demo-field .morph { animation: none; } }

/* keyboard tray */
.demo-keys {
  background: var(--surface-2); border-top: 1px solid var(--line);
  padding: 14px 16px 18px; display: flex; align-items: flex-start; gap: 12px;
}
.mic-key, .cmd-key {
  position: relative; flex: 0 0 auto;
  width: 78px; height: 78px; border-radius: 22px;
  border: none; display: grid; place-items: center;
  transition: transform .14s var(--ease), box-shadow .2s, opacity .2s, background .2s;
  touch-action: none; user-select: none;
}
.mic-key { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.25); }
.cmd-key { background: var(--ink); color: var(--bg); box-shadow: 0 10px 26px -12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.14); }
.mic-key svg, .cmd-key svg { width: 30px; height: 30px; }
.key-cap {
  position: absolute; bottom: 7px; left: 0; right: 0;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; text-align: center; opacity: .85;
}
.mic-key svg, .cmd-key svg { margin-top: -8px; }
.mic-key:hover, .cmd-key:not(:disabled):hover { transform: translateY(-1px); }
.cmd-key:disabled { opacity: .4; cursor: default; }
.cmd-key.armed { animation: cmdpulse 1.4s var(--ease) infinite; }
@keyframes cmdpulse { 0%,100% { box-shadow: 0 10px 26px -12px rgba(0,0,0,.5), 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 10px 26px -12px rgba(0,0,0,.5), 0 0 0 9px var(--accent-soft); } }
.mic-key.holding, .cmd-key.holding { transform: scale(.94); }
.mic-key.holding { box-shadow: 0 6px 18px -8px var(--glow), 0 0 0 8px var(--accent-soft); }
.cmd-key.holding { box-shadow: 0 6px 18px -8px rgba(0,0,0,.5), 0 0 0 8px var(--accent-soft); }
.mic-key .ring, .cmd-key .ring { position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; }
.mic-key.holding .ring, .cmd-key.holding .ring { animation: ring 1.1s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.4); opacity: 0; } }

/* Status row above keys. min-height locks the row tall enough to
 * accommodate a 2-line hint (status 19px + wave 30px + 2-line hint
 * ~38px + 2×9px gap + 4px padding ≈ 110px) so the demo-keys row
 * height stays constant whether the hint wraps to one line or two.
 * Without this lock, a 1-line hint shrank the row by ~19px and the
 * outer card appeared to "breathe". */
.demo-keyinfo {
  display: flex; flex-direction: column; gap: 9px;
  min-width: 0; flex: 1; padding-top: 4px;
  min-height: 110px;
}
.demo-hint { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo-status { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; }
.demo-status .lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: background .2s; }
.demo-status.live .lamp { background: #ff5470; box-shadow: 0 0 0 4px color-mix(in oklab,#ff5470 24%, transparent); }
.demo-status.live { color: var(--accent); }

/* waveform */
.wave { display: flex; align-items: center; gap: 4px; height: 30px; }
.wave i {
  width: 4px; height: 6px; border-radius: 3px; background: var(--line-2);
  transition: background .2s;
}
.wave.live i { background: var(--accent); animation: bounce 1s ease-in-out infinite; }
.wave.live i:nth-child(2){ animation-delay:.08s } .wave.live i:nth-child(3){ animation-delay:.16s }
.wave.live i:nth-child(4){ animation-delay:.24s } .wave.live i:nth-child(5){ animation-delay:.32s }
.wave.live i:nth-child(6){ animation-delay:.40s } .wave.live i:nth-child(7){ animation-delay:.48s }
.wave.live i:nth-child(8){ animation-delay:.56s } .wave.live i:nth-child(9){ animation-delay:.64s }
.wave.live i:nth-child(10){ animation-delay:.72s } .wave.live i:nth-child(11){ animation-delay:.80s }
.wave.live i:nth-child(12){ animation-delay:.88s }
@keyframes bounce { 0%,100% { height: 6px; } 50% { height: 26px; } }
@media (prefers-reduced-motion: reduce) { .wave.live i { animation: none; height: 16px; } .mic-key.holding .ring { animation: none; } }

.demo-hint { font-size: 12.5px; color: var(--muted); }
.demo-hint b { color: var(--ink-2); font-weight: 700; }

/* ---------- Section heads ---------- */
.sec-head { display: flex; flex-direction: column; gap: 16px; max-width: 60ch; }
.sec-head.center { align-items: center; text-align: center; margin-inline: auto; }
.sec-head h2 { font-size: clamp(28px, 4.2vw, 46px); }
.sec-head .lead { max-width: 52ch; }

/* ---------- "Next to your keyboard" feature band ---------- */
.swap {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 70px);
  align-items: center;
}
.swap-visual {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 26px; position: relative; overflow: hidden;
}
.kbd-list { display: flex; flex-direction: column; gap: 10px; }
.kbd-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2);
  transition: border-color .25s, background .25s, transform .25s;
}
.kbd-row .ki { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: 0 0 auto; }
.kbd-row .kn { font-weight: 700; font-size: 15px; }
.kbd-row .kd { font-size: 13px; color: var(--muted); }
.kbd-row .kbadge { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kbd-row.active { border-color: var(--accent); background: var(--accent-soft); }
.kbd-row.active .ki { background: var(--accent); color: var(--accent-ink); }
.kbd-row.active .kbadge { color: var(--accent); }
.swap-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: 16px; text-align: center; }

/* ---------- Inside the keyboard: 3 jobs ---------- */
.jobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.job {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.job:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-pop); }
.job .jico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.job .jico svg { width: 24px; height: 24px; }
.job h3 { font-size: 20px; letter-spacing: -.01em; }
.job p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.job .jtag { margin-top: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* Featured card — uses brand accent in BOTH themes so it pops on
   either page background. Previous `background: var(--ink)` flipped
   to bright white on dark theme (and dark slab on light theme) —
   both reads as "another theme spilled into the page" rather than
   "this card is important". Solid accent reads as on-brand emphasis
   regardless of theme. White-tinted child colours (rather than
   var(--bg) tinted) so the dimming behaviour is consistent across
   themes too. */
.job.feature { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.job.feature p { color: color-mix(in oklab, #ffffff 84%, transparent); }
.job.feature .jico { background: color-mix(in oklab, #ffffff 18%, transparent); color: var(--accent-ink); }
.job.feature .jtag { color: color-mix(in oklab, #ffffff 72%, transparent); }

/* Compact horizontal variant for numbered step lists (download
 * "Set up in under a minute"). 4 cards across on desktop, stacked
 * dense rows on phone so a whole 4-step list fits inside one
 * viewport rather than scrolling forever. */
.jobs.steps { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .jobs.steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .jobs.steps { grid-template-columns: 1fr; gap: 10px; }
  .jobs.steps .job {
    flex-direction: row; align-items: flex-start; gap: 14px;
    padding: 14px 16px; border-radius: var(--r-md);
  }
  .jobs.steps .job .jico {
    width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
    font-size: 15px; align-self: flex-start; margin-top: 2px;
  }
  .jobs.steps .job > h3, .jobs.steps .job > p { margin: 0; }
  .jobs.steps .job h3 { font-size: 16px; }
  .jobs.steps .job p { font-size: 14px; line-height: 1.45; }
  /* Stack heading + paragraph in a sub-column to the right of the
   * icon. Wrap text children in a flex column via the parent. */
  .jobs.steps .job { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; row-gap: 4px; }
  .jobs.steps .job .jico { grid-column: 1; grid-row: 1 / span 2; }
  .jobs.steps .job h3 { grid-column: 2; grid-row: 1; }
  .jobs.steps .job p { grid-column: 2; grid-row: 2; }
}

/* ---------- Use cases ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px;
  background: var(--surface); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .3s var(--ease), border-color .3s;
}
.case:hover { transform: translateY(-3px); border-color: var(--accent); }
.case .ctag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.case h3 { font-size: 19px; line-height: 1.12; }
.case p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.case .cquote { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; margin-top: 4px; }
.case b { color: var(--ink); font-weight: 700; }

/* ---------- Command demo strip ---------- */
.cmd-demo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.cmd-pane { padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.cmd-pane.src { border-right: 1px solid var(--line); }
.cmd-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cmd-text { font-size: clamp(16px, 1.8vw, 19px); line-height: 1.55; color: var(--ink); min-height: 4.5em; }
.cmd-pane.res { background: var(--surface-2); }
.cmd-pane.res .cmd-label { color: var(--accent); }
.cmd-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.cmd-pill {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--ink-2); transition: all .2s;
}
.cmd-pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cmd-pill:hover { border-color: var(--accent); color: var(--accent); }
.cmd-pill[aria-pressed="true"]:hover { color: var(--accent-ink); }
@media (max-width: 760px){ .cmd-demo { grid-template-columns: 1fr; } .cmd-pane.src { border-right: none; border-bottom: 1px solid var(--line); } }

/* ---------- Pricing ---------- */
/* Pricing hero card — same accent-on-both-themes treatment as
   .job.feature. Was inverse-ink (white-on-dark in light theme,
   dark-on-light in dark theme), both jarring against the rest of
   the page; accent is on-brand without being a theme-swap shock. */
.price {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,4vw,56px); align-items: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--r-xl); padding: clamp(34px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.price::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(70% 120% at 100% 0%, var(--glow), transparent 60%);
  opacity:.7;
}
.price h2 { font-size: clamp(30px, 4.6vw, 54px); position: relative; }
.price .price-sub { color: color-mix(in oklab, #ffffff 80%, transparent); position: relative; max-width: 44ch; }
.price-card {
  background: var(--bg-2); color: var(--ink); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-pop); position: relative;
  display: flex; flex-direction: column; gap: 16px;
}
.price-amt { display: flex; align-items: baseline; gap: 8px; }
.price-amt .big { font-family: var(--font-display); font-size: 54px; font-weight: 700; letter-spacing: -.03em; }
.price-amt .per { color: var(--muted); font-weight: 600; }
.price-trial { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); align-self: flex-start; padding: 6px 12px; border-radius: 999px; }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.price-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.price-list svg { width: 19px; height: 19px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }

/* ---------- Studio ---------- */
.studio { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.studio-card {
  display: flex; align-items: center; gap: 15px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.studio-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.studio-card .si { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); flex: 0 0 auto; }
.studio-card .sn { font-weight: 700; font-size: 16px; }
.studio-card .sd { font-size: 13px; color: var(--muted); }
.studio-card .arr { margin-left: auto; color: var(--muted); transition: transform .25s, color .25s; }
.studio-card:hover .arr { color: var(--accent); transform: translate(3px,-3px); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; display: flex; flex-direction: column; gap: 24px; align-items: center; }
.cta-band h2 { font-size: clamp(32px, 5.5vw, 64px); letter-spacing: -.03em; }
.cta-band .lead { max-width: 44ch; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 54px 40px; }
.footer-top { display: flex; gap: 30px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { max-width: 30ch; display: flex; flex-direction: column; gap: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; }
.footer-cols { display: flex; gap: clamp(30px, 6vw, 80px); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 14.5px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.cla-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); transition: color .2s; }
.cla-lockup:hover { color: var(--ink-2); }
.cla-lockup img { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
.cla-lockup b { color: var(--ink-2); font-weight: 700; }

/* real JustSay app icon, used as a brand chip */
.app-icon { width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto; box-shadow: 0 1px 3px rgba(11,15,28,.25); }
.app-icon.lg { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow-card); }
.studio-logo { display: inline-flex; align-items: center; gap: 9px; }
.studio-logo img { width: 20px; height: 20px; border-radius: 6px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* failsafe: snap to final state in non-painting / broken-observer contexts */
.reveal-snap .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
.reveal[data-d="1"]{ transition-delay:.06s } .reveal[data-d="2"]{ transition-delay:.12s }
.reveal[data-d="3"]{ transition-delay:.18s } .reveal[data-d="4"]{ transition-delay:.24s }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .jobs { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .studio { grid-template-columns: 1fr; }
  .swap { grid-template-columns: 1fr; }
  .price { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .nav-right .play-badge { display: none; } /* CTA lives in the burger menu on phones */
  .nav-inner { gap: 10px; height: 62px; }
  .jobs, .cases { grid-template-columns: 1fr; }
  .demo-keys { flex-wrap: wrap; }
  .hero { padding-top: 22px; }
  .hero-meta { gap: 9px 16px; }
  body { font-size: 16px; }
}
@media (max-width: 560px) {
  :root { --gut: 18px; }
  .hero h1 { font-size: clamp(34px, 11vw, 54px); letter-spacing: -.03em; }
  .hero-sub { font-size: 16.5px; }
  .hero-cta { width: 100%; }
  .hero-cta .play-badge, .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .platforms { font-size: 12.5px; gap: 8px 12px; }
  .demo-canvas { min-height: 150px; }
  .mic-key { width: 76px; height: 76px; border-radius: 22px; }
  .mic-key svg { width: 30px; height: 30px; }
  .job, .case { padding: 22px 20px; }
  .price { padding: 30px 22px; }
  .price-amt .big { font-size: 46px; }
  .sec-head h2 { font-size: clamp(26px, 7.5vw, 36px); }
  .cta-band h2 { font-size: clamp(30px, 9vw, 46px); }
  .price-card { padding: 24px; }
  .footer-top { gap: 28px; }
  /* tame the 'bold' hero variant so it can never overflow on phones */
  [data-hero="bold"] .hero-block { margin-left: 0; padding-left: 0; border-radius: 0; background: transparent; color: inherit; }
  [data-hero="bold"] .hero h1 { font-size: clamp(38px, 13vw, 62px); line-height: .98; }
}

/* mobile menu sheet */
.msheet { position: fixed; inset: 0; z-index: 80; display: none; }
.msheet.open { display: block; }
.msheet-scrim { position: absolute; inset: 0; background: rgba(5,8,16,.5); backdrop-filter: blur(2px); }
.msheet-panel {
  position: absolute; top: 12px; right: 12px; left: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.msheet-panel a { padding: 14px 14px; border-radius: 12px; font-weight: 700; font-size: 17px; color: var(--ink); }
.msheet-panel a:hover { background: var(--surface-2); }
.msheet-panel .btn { justify-content: center; margin-top: 8px; }
