/*
  WhisperBoard landing page.
  Composition: a tactile 3D keyboard on a "table" (hero), real footage on a 3D phone,
  an index that drives one stage (features), one dark moment (privacy), then quiet type.
  Motion answers the visitor (presses, selections) or the footage (step progress); the one thing that moves
  by itself is the slow idle drift of the 3D pieces (assets/js/stage/core.js), and it stops for reduced motion.
*/

:root {
  --section-y: clamp(72px, 11vw, 148px);
}

.stage-canvas { display: block; pointer-events: none; }

/* ---------- loading screen ----------
   Covers the page until the hero's assets and 3D stage are ready (app.js). Scripts only: without them the
   page is never covered. */
.splash { display: none; }
.js .splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--table);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.js .splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.js .splash-mark { width: 56px; height: 56px; border-radius: 16px; }
.splash-text { margin: 0; font: 560 0.95rem/1 var(--font-body); color: var(--muted-on-table); }
.splash-bar {
  position: relative;
  width: 120px;
  height: 3px;
  border-radius: 2px;
  background: var(--divider);
  overflow: hidden;
}
.splash-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 35%;
  background: var(--ink);
  border-radius: inherit;
  animation: splash-slide 1.3s ease-in-out infinite;
}
@keyframes splash-slide {
  from { left: -35%; }
  to { left: 100%; }
}
html.is-loading { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .splash-bar span { left: 0; width: 100%; opacity: 0.25; animation: none; }
}

/* Without scripts these controls would do nothing, so they are not shown. */
html:not(.js) .demo-hint,
html:not(.js) .demo-controls,
html:not(.js) .mic-toggle,
html:not(.js) [data-phone-toggle] { display: none; }

/* ---------- shared bits ---------- */

.pill-btn {
  font: 560 0.9rem/1 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  cursor: pointer;
  transition: background-color var(--press) var(--ease-press), color var(--press) var(--ease-press),
              border-color var(--press) var(--ease-press), transform var(--press) var(--ease-press);
}
.pill-btn:active { transform: translateY(1px); }
@media (pointer: coarse), (max-width: 899px) {
  .pill-btn { min-height: 44px; }
}
.pill-btn.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill-btn--night { background: transparent; color: var(--night-ink); border-color: var(--night-line); }
.pill-btn--night.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--primary);
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.tr-tag {
  display: inline-block;
  margin-right: 0.7em;
  font-size: 0.8rem;
  font-weight: 560;
  color: var(--muted-on-table);
}

/* ---------- CTA ---------- */

/* The official Google Play badge, only resized: 56px tall keeps it a comfortable thumb target, and the
   14px of space around it follows Google's clear-space rule (a quarter of the badge height). */
.cta { margin-top: 1.5rem; }
.cta-note { margin-top: 0.9rem; font-size: 0.92rem; color: var(--muted-on-table); }
.play-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 7px;
  transition: transform var(--press) var(--ease-press);
}
.play-badge:active { transform: translateY(1px); }
.play-badge img { display: block; width: auto; height: 56px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--table);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero.is-3d .hero-canvas { opacity: 1; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-content: start;
  padding-block: 84px 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 12.4vw, 5rem);
  font-weight: 560;
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.hero h1 span { display: block; }
.lede {
  max-width: 29em;
  margin-top: 1rem;
  font-size: clamp(1.02rem, 0.9rem + 0.55vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted-on-table);
}

.hero-demo {
  display: grid;
  justify-items: center;
  gap: 16px;
}

/* The note stands in for the app you are typing into. */
.note {
  width: min(100%, 440px);
  padding: 14px 20px 16px;
  background: var(--surface);
  color: #15151c;
  border-radius: 20px;
  font-family: Roboto, "Noto Sans", system-ui, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
              0 14px 32px -16px rgba(26, 26, 46, 0.22),
              0 2px 6px rgba(26, 26, 46, 0.06);
}
.note-title { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
/* The note is a text field: a fixed size (three lines), and once the typed text outgrows it, it scrolls, as any
   text input does. hero.js keeps the end of the text in view. */
.note-body {
  margin-top: 0.4rem;
  font-size: 1rem;
  line-height: 1.45;
  height: 4.35em;   /* three lines: the demo's first line fits, and so does the next, without scrolling */
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 26, 46, 0.28) transparent;
}
.note-body:focus { outline: none; }   /* decorative (the note is aria-hidden): a click may focus it, the Tab key never does */
.note-text { white-space: pre-wrap; }   /* the Space and Enter keys add real spaces and line breaks, which must show as typed */
.js .note-text { visibility: hidden; }
.js .hero.is-ready .note-text { visibility: visible; }

.kb-slot {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 4 / 3;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;                /* a key held down (Backspace repeats) must not start a selection */
  -webkit-touch-callout: none;
}
.kb-poster {
  position: absolute;
  left: -22%;
  top: -22%;
  width: 144%;
  height: 144%;
  max-width: none;
  object-fit: contain;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.is-3d .kb-poster { opacity: 0; }
.demo-controls { position: absolute; left: 0; bottom: 0; display: flex; gap: 8px; z-index: 2; }
.demo-controls .sr-focus:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.65rem 1.05rem;
  font: 560 0.9rem/1 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 999px;
  white-space: nowrap;
}
.demo-hint {
  font-size: 0.95rem;
  color: var(--muted-on-table);
  transition: opacity 0.4s ease;
}
.demo-hint.is-gone { opacity: 0; }

@media (min-width: 900px) {
  .note { padding: 18px 22px 20px; }
  .cta { margin-top: 2rem; }
  .lede { margin-top: 1.4rem; }
  /* Diagonal: the headline owns the top left, the keyboard the bottom right. Their grid columns
     overlap (6 and 7), but the two never meet on screen because one is top-aligned, the other bottom-aligned. */
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(12px, 2vw, 28px);
    align-content: stretch;
    min-height: min(calc(100svh - 48px), 940px);
    padding-block: clamp(104px, 14.5vh, 160px) clamp(32px, 5vh, 64px);
  }
  .hero h1 { font-size: clamp(3rem, 7.3vw, 6.75rem); }
  .hero-copy { grid-column: 1 / span 7; grid-row: 1; align-self: start; }
  .hero-demo { grid-column: 6 / -1; grid-row: 1; align-self: end; gap: 14px; }
  .lede { max-width: 23em; }
  .note { justify-self: center; width: min(100%, 470px); }
}

/* Landscape phones: wide, but only about 400px tall. The diagonal composition needs height, so here the copy
   and the demo sit side by side, top aligned and smaller, and the hero simply scrolls a little. */
@media (min-width: 600px) and (max-height: 520px) and (orientation: landscape) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-content: start;
    min-height: 0;
    padding-block: 76px 32px;
  }
  .hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
  .hero-copy { grid-column: 1 / span 6; grid-row: 1; align-self: start; }
  .hero-demo { grid-column: 7 / -1; grid-row: 1; align-self: start; gap: 10px; }
  .lede { max-width: 22em; margin-top: 0.8rem; font-size: 1rem; }
  .cta { margin-top: 1.1rem; }
  .note { width: min(100%, 360px); padding: 10px 16px 12px; }
  .note-title { font-size: 1.1rem; }
  .note-body { height: 2.9em; font-size: 0.95rem; }
  .kb-slot { width: min(100%, 400px); }
}

@media (min-width: 1700px) {
  :root { --max: 1440px; }
  .hero h1 { font-size: 7.6rem; }
  .kb-slot { width: min(100%, 760px); }
  .note { width: min(100%, 520px); }
}

/* ---------- how it works ---------- */

/* The 3D phone's canvas is deliberately wider than the phone (room for tilt and shadow). On a narrow
   screen that spill must never widen the page, so the section clips the sideways overflow. */
.how { padding-block: var(--section-y); overflow-x: hidden; overflow-x: clip; }   /* hidden is the fallback for old WebViews */
.how-grid { display: grid; gap: 56px; align-items: center; }

.phone-col { display: grid; justify-items: center; gap: 14px; }
.phone {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 360 / 700;
  touch-action: pan-y;   /* a sideways drag turns the 3D phone; a vertical one still scrolls the page */
}
.phone-canvas {
  position: absolute;
  left: -40%;
  top: -12%;
  width: 180%;
  height: 124%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.phone.is-3d .phone-canvas { opacity: 1; }

/* Without WebGL the same footage sits in a plain device frame. */
.phone-flat { position: absolute; inset: 0; display: grid; place-items: center; }
.phone-video {
  display: block;
  width: 84%;
  height: auto;
  border: 9px solid #1b1c22;
  border-radius: 36px;
  background: #fff;
}
.phone.is-3d .phone-flat {
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  inset: auto;
}

.phone-meta { display: flex; align-items: center; gap: 14px; }
.phone-caption { font-size: 0.92rem; color: var(--muted); }

.how-copy { position: relative; z-index: 1; }
.how-copy h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); font-weight: 570; line-height: 1; letter-spacing: -0.035em; }
.steps { list-style: none; margin: 2.2rem 0 0; padding: 0; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: clamp(3.2rem, 7vw, 4.6rem) minmax(0, 1fr);
  gap: 0.6rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--divider);
  cursor: pointer;
}
.step:last-child { border-bottom: 1px solid var(--divider); }
.step::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: var(--p, 0%);
  background: var(--primary);
}
.step-n {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--muted);
  transition: color 0.25s ease;
}
.step.is-active .step-n { color: var(--primary); }
.step h3 {
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  font-weight: 580;
  letter-spacing: -0.02em;
  color: var(--muted);
  transition: color 0.25s ease;
}
.step.is-active h3 { color: var(--ink); }
.step p { margin-top: 0.35rem; max-width: 33em; color: var(--muted); }
.step em { font-style: normal; font-weight: 560; color: var(--ink); }
.how-foot { margin-top: 1.6rem; color: var(--muted); }

/* Side by side from small-tablet width (also landscape phones); a single column below that. */
@media (min-width: 640px) {
  .how-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(48px, 8vw, 128px); }
}

/* Phones: title first, then the phone it illustrates, then the steps. */
@media (max-width: 639px) {
  .how-grid { gap: 28px; }
  .how-copy { display: contents; }
  .how-copy h2 { order: 1; }
  .phone-col { order: 2; margin-block: -20px; }   /* the slot has room around the phone body for tilt and shadow */
  .steps { order: 3; margin: 4px 0 0; }
  .how-foot { order: 4; margin-top: 0; }
}

/* Anything narrower than a desktop gets slimmer steps, so the text keeps most of the width. */
@media (max-width: 899px) {
  .step { grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.5rem; padding-block: 1.15rem; }
  .step-n { font-size: 2.5rem; }
}

/* ---------- features ---------- */

.features { padding-block: var(--section-y); border-top: 1px solid var(--divider); }
.features h2 { max-width: 13em; font-size: clamp(2.1rem, 4.6vw, 3.8rem); font-weight: 570; line-height: 1; letter-spacing: -0.035em; }
.feat-grid { display: grid; gap: 40px; margin-top: clamp(36px, 6vw, 72px); }

.feat-item { border-top: 1px solid var(--divider); }
.feat-item:last-child { border-bottom: 1px solid var(--divider); }
.feat-tab {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 1.1rem 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: 560 clamp(1.3rem, 1.1rem + 1vw, 1.8rem)/1.15 var(--font-head);
  letter-spacing: -0.025em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.feat-tab:hover { color: var(--ink); }
/* the app's radio dot marks the active choice */
.feat-tab::before,
.way h3::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--divider);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.feat-item.is-active .feat-tab { color: var(--ink); }
.feat-item.is-active .feat-tab::before,
.way.is-active h3::before { background: var(--primary); border-color: var(--primary); }
.feat-desc { padding: 0 0 1.3rem 1.45rem; max-width: 32em; color: var(--muted); }
.js .feat-desc { display: none; }
.js .feat-item.is-active .feat-desc { display: block; }

.feat-stage { display: none; }
.js .feat-stage {
  position: relative;
  display: block;
  min-height: 500px;
  padding: clamp(22px, 3vw, 40px);
  overflow: hidden;
  background: var(--table);
  border-radius: var(--radius-xl);
}
.feat-panel { display: none; }
.feat-panel.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-height: 420px;
  animation: panel-in 0.3s var(--ease-press);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.stage-cap { margin-top: auto; font-size: 0.95rem; color: var(--muted-on-table); }

@media (min-width: 960px) {
  .feat-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .js .feat-stage { position: sticky; top: 88px; }
}

.feat-desc-live { display: none; }
.tr-out.swap,
.hist-field.swap { animation: panel-in 0.25s var(--ease-press); }

/* On small screens the index becomes a row of pills and the description sits under it. */
@media (max-width: 959px) {
  .js .feat-index {
    display: flex;
    gap: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .js .feat-index::-webkit-scrollbar { display: none; }
  .js .feat-item { flex: none; border: 0; scroll-snap-align: center; }
  .js .feat-item:last-child { border: 0; }
  .js .feat-tab {
    width: auto;
    min-height: 44px;
    padding: 0.65rem 1.05rem;
    font-size: 1rem;
    font-weight: 560;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform var(--press) var(--ease-press);
  }
  .js .feat-tab:active { transform: translateY(1px); }
  .js .feat-tab::before { display: none; }
  .js .feat-item.is-active .feat-tab { background: var(--primary); border-color: var(--primary); color: #fff; }
  .js .feat-desc { display: none !important; }
  .js .feat-desc-live { display: block; max-width: 34em; margin-top: -12px; color: var(--muted); }
  .js .feat-stage { min-height: 440px; }
}

/* stage: languages */
.lang-wall {
  font: 500 clamp(1.1rem, 0.9rem + 0.9vw, 1.55rem)/1.55 var(--font-head);
  letter-spacing: -0.01em;
  color: var(--muted-on-table);
}
.lang-wall span { display: inline-block; margin-right: 0.85em; white-space: nowrap; }
.lang-wall .is-you { color: var(--primary); font-weight: 640; }
.lang-wall .is-you::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--primary);
  animation: blink 1.05s steps(2, start) infinite;
}

/* stage: translate */
.tr-say { font-size: 1rem; color: var(--muted-on-table); }
.tr-say q { quotes: none; color: var(--ink); font-weight: 520; }
.tr-out {
  min-height: 2.3em;
  font: 560 clamp(1.8rem, 1.2rem + 2.4vw, 3rem)/1.1 var(--font-head);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.tr-lang { margin-top: -0.6rem; font-size: 0.9rem; font-weight: 560; color: var(--primary); }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip {
  font: 520 0.88rem/1 var(--font-body);
  padding: 0.5rem 0.8rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--press) var(--ease-press), color var(--press) var(--ease-press),
              transform var(--press) var(--ease-press);
}
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

@media (pointer: coarse) {
  .chip { padding: 0.7rem 0.95rem; }
}

/* stage: modes */
.mode-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.mode-name { font: 600 1.1rem/1.2 var(--font-head); }
.mode-note { margin-top: 0.4rem; font-size: 0.95rem; color: var(--muted); }
.mode-out { font: 540 clamp(1.4rem, 1rem + 1.6vw, 2.1rem)/1.25 var(--font-head); letter-spacing: -0.02em; }
.mode-out mark {
  padding: 0 0.18em;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.mode-templates { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mode-templates li {
  padding: 0.5rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 520;
  color: var(--muted-on-table);
  border: 1px dashed #c9ccd6;
  border-radius: 999px;
}

/* stage: history */
.hist-count { display: flex; align-items: baseline; gap: 14px; }
.hist-count strong { font: 300 clamp(3.4rem, 2.4rem + 4vw, 5.6rem)/0.9 var(--font-head); letter-spacing: -0.05em; }
.hist-count span { color: var(--muted-on-table); }
.hist-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hist-list button {
  width: 100%;
  padding: 0.7rem 0.95rem;
  text-align: left;
  font: 500 0.98rem/1.3 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--press) var(--ease-press), background-color var(--press) var(--ease-press);
}
.hist-list button:active { transform: translateY(2px); background: var(--surface-pressed); }
.hist-list li:nth-child(n+5) button { color: var(--muted); }
.hist-field {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 12px;
}
.hist-field-tag { flex: none; font-size: 0.8rem; font-weight: 560; color: var(--primary); }

/* stage: real keyboard */
.qw-field {
  min-height: 3.1rem;
  padding: 0.8rem 1rem;
  font: 400 1.05rem/1.4 Roboto, "Noto Sans", system-ui, sans-serif;
  background: var(--surface);
  border-radius: 14px;
  color: #15151c;
}
.qw { display: grid; gap: 6px; padding: 8px; background: var(--paper); border-radius: 18px; box-shadow: inset 0 1px 0 #fff; }
.qw-row { display: flex; gap: 5px; justify-content: center; }
.qw-key {
  flex: 1 1 0;
  min-width: 0;
  height: clamp(38px, 5.2vw, 46px);
  display: grid;
  place-items: center;
  padding: 0;
  font: 500 1.05rem/1 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-key);
  cursor: pointer;
  transition: transform var(--press) var(--ease-press), box-shadow var(--press) var(--ease-press), background-color var(--press) var(--ease-press);
}
.qw-key:active { transform: translateY(2px); background: var(--surface-pressed); box-shadow: var(--shadow-key-pressed); }
.qw-key.is-mic { background: var(--primary); color: #fff; }
.qw-key.is-mic:active { background: var(--primary-strong); }
.qw-key svg { width: 20px; height: 20px; fill: currentColor; }
.qw-key.w-15 { flex-grow: 1.5; }
.qw-key.w-2 { flex-grow: 2; }
.qw-key.w-4 { flex-grow: 4; }
.qw-row.is-center { padding-inline: 5%; }

/* stage: thumbs and palms. The screenshots are cropped to the keyboard itself, plus a small strip of the note above its
   indigo top line as a margin (20px at the card's 300px width, about its corner radius). The notes app is not
   WhisperBoard, so nothing else of it is in the files. 720 x 668 is that crop; keep this in step with the img sizes. */
.theme-switch { display: flex; gap: 8px; }
.shots {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 720 / 668;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(26, 26, 46, 0.1);
  box-shadow: 0 24px 40px -24px rgba(26, 26, 46, 0.4);
}
.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  transition: opacity 0.3s ease;
}
.shot-dark { opacity: 0; }
.shots[data-theme="dark"] .shot-dark { opacity: 1; }
.haptic { align-self: center; }

/* ---------- privacy (the app's Dark Premium) ---------- */

.night { background: var(--night); color: var(--night-ink); }
.night :focus-visible { outline-color: var(--night-live); }

.privacy {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--section-y);
}
.privacy-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.privacy.is-3d .privacy-canvas { opacity: 1; }
.privacy-grid { position: relative; z-index: 1; display: grid; gap: 56px; }
.privacy h2 {
  color: var(--night-ink);
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.privacy-head .kb-slot { margin: 30px auto 18px 0; width: min(88%, 560px); }
.mic-toggle { display: flex; gap: 8px; }

.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 1.5rem 0; border-top: 1px solid var(--night-line); }
.facts li:last-child { border-bottom: 1px solid var(--night-line); }
.facts h3 { color: #fff; font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); font-weight: 580; letter-spacing: -0.02em; }
.facts p { margin-top: 0.45rem; max-width: 36em; color: var(--night-muted); }

@media (min-width: 960px) {
  .privacy-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(40px, 7vw, 120px); }
}

/* Stacked layout: the keyboard sits centred under the title and the mic switch becomes a full-width
   two-way control, which is easier to hit with a thumb than two small pills. */
@media (max-width: 959px) {
  .privacy-grid { gap: 40px; }
  .privacy-head .kb-slot { margin: 20px auto 12px; width: min(100%, 520px); }
  .mic-toggle { display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; margin-inline: auto; }
  .mic-toggle .pill-btn { padding-inline: 0.8rem; }
}

/* ---------- ways: pick who transcribes ---------- */

.ways { padding-block: var(--section-y); }
.ways-grid { display: grid; gap: 52px; align-items: center; }
.ways h2 { max-width: 12em; font-size: clamp(2.1rem, 4.6vw, 3.8rem); font-weight: 570; line-height: 1; letter-spacing: -0.035em; }
.way-list { margin: 2rem 0 0; padding: 0; list-style: none; }
.way { padding: 1.25rem 0; border-top: 1px solid var(--divider); cursor: pointer; }
.way:last-child { border-bottom: 1px solid var(--divider); }
.way h3 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.way.is-active h3,
.way:hover h3 { color: var(--ink); }
.way p { padding-left: 1.45rem; max-width: 30em; color: var(--muted); }
.ways-foot { margin-top: 1.6rem; max-width: 34em; color: var(--muted); }

/* The real providers screen. Below the Add button the app screen is empty, so the frame stops just
   under it instead of showing a tall blank area. */
.shot-frame {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 720 / 960;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: 32px;
  box-shadow: 0 34px 60px -34px rgba(26, 26, 46, 0.4), 0 8px 18px -10px rgba(26, 26, 46, 0.14);
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-crop { position: relative; }   /* the ring's percentages are measured on the full screenshot */
.shot-ring {
  position: absolute;
  left: 3%;
  width: 94%;
  top: 13.1%;
  height: 12.3%;
  border: 2px solid var(--primary);
  border-radius: 22px;
  box-shadow: 0 0 0 5px rgba(91, 91, 214, 0.14);
  pointer-events: none;
  transition: top 0.28s var(--ease-press), height 0.28s var(--ease-press);
}

@media (min-width: 900px) {
  .ways-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(48px, 8vw, 128px); }
}

/* Phones and small tablets: the screenshot uses the full column width, up to 420px, centred. */
@media (max-width: 899px) {
  .ways-grid { gap: 40px; }
  .ways-visual { width: 100%; max-width: 420px; margin-inline: auto; }
  .shot-frame { width: 100%; }
}

/* ---------- FAQ ---------- */

.faq { padding-block: var(--section-y); border-top: 1px solid var(--divider); }
.faq-grid { display: grid; gap: 36px; }
.faq h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 570; line-height: 1; letter-spacing: -0.035em; }
.faq-item { border-top: 1px solid var(--divider); interpolate-size: allow-keywords; }
.faq-item:last-child { border-bottom: 1px solid var(--divider); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  font: 560 clamp(1.1rem, 1rem + 0.5vw, 1.35rem)/1.25 var(--font-head);
  letter-spacing: -0.02em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; flex: none; width: 1.1rem; height: 1.1rem; }
.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.2s var(--ease-press), background-color 0.2s ease;
}
.faq-mark::after { transform: rotate(90deg); }
.faq-item[open] .faq-mark::before,
.faq-item[open] .faq-mark::after { background: var(--primary); }
.faq-item[open] .faq-mark::after { transform: rotate(0deg); }
.faq-item p { padding: 0 0 1.4rem; max-width: 36em; color: var(--muted); }
.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.25s var(--ease-press), content-visibility 0.25s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }

@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 8vw, 120px); }
  .faq h2 { position: sticky; top: 56px; align-self: start; }
}

/* ---------- closing ---------- */

.closing {
  position: relative;
  overflow: clip;
  text-align: center;
  background: var(--table);
  padding-top: var(--section-y);
}
.closing-mic {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(170px, 20vw, 240px);
  aspect-ratio: 1;
  margin: 0 auto 1.6rem;
}
.closing-mic img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 20px 22px rgba(26, 26, 46, 0.2)); }
.closing-mic .ring {
  position: absolute;
  inset: 14%;
  border: 2px solid rgba(91, 91, 214, 0.38);
  border-radius: 50%;
  opacity: 0;
}
.closing.is-live .closing-mic .ring { animation: ripple 3s linear infinite; }
.closing.is-live .closing-mic .r2 { animation-delay: 1s; }
.closing.is-live .closing-mic .r3 { animation-delay: 2s; }
@keyframes ripple {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(4.2); opacity: 0; }
}
.closing h2 { font-size: clamp(2.7rem, 8.4vw, 6rem); font-weight: 560; line-height: 0.96; letter-spacing: -0.045em; }
.closing .cta { display: grid; justify-items: center; }
/* The footer closes the page on the same table tone as the closing band. */
.closing { padding-bottom: clamp(64px, 9vw, 120px); }
.site-footer--table { background: var(--table); border-top-color: rgba(26, 26, 46, 0.09); }
.site-footer--table .footer-line,
.site-footer--table .legal-line { color: var(--muted-on-table); }
.site-footer--table .footer-line a:hover { color: var(--primary); }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .caret,
  .lang-wall .is-you::after { animation: none; }
  .feat-panel.is-active { animation: none; }
  .closing.is-live .closing-mic .ring { animation: none; opacity: 0.3; }
  .closing .closing-mic .r2 { transform: scale(1.9); }
  .closing .closing-mic .r3 { transform: scale(2.8); }
  .step h3, .step-n, .feat-tab, .way h3, .pill-btn, .chip, .qw-key, .hist-list button, .shot-ring, .shot { transition: none; }
  .faq-item::details-content { transition: none; }
}
