/* dudan website. One scroll story with the phone as the constant, under the app's Dusk sky
   that fades to night. Colors come from the app (ui/theme: Sky.kt and Accent.kt). Dark only.

   Motion touches transform and opacity only. Scroll-linked behavior is position: sticky and
   IntersectionObserver in script.js; nothing listens to scroll events. */

@font-face { font-family: "Google Sans Flex"; src: url("fonts/google-sans-flex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("fonts/google-sans-flex-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("fonts/google-sans-flex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Google Sans Code"; src: url("fonts/google-sans-code-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;

  /* Night, and the Dusk sky above it */
  --night: #0b0c22;
  --deep: #17173a;
  --sky-top: #232c62;
  --sky-high: #394891;
  --sky-mid: #5061a6;
  --sky-horizon: #8676ba;
  --light: #8fa6e6;
  --glow: #c08ab4;
  --sheet: #262950;

  /* Teal accent, as in the app's send button */
  --accent: #55d9c9;
  --on-accent: #062520;
  --accent-soft: #abeee5;

  /* The one light surface on the page: the Moon accent with the sky's ink on it */
  --moon: #f4f4f8;
  --ink: #17173a;
  --ink-2: #4a4d70;
  --ink-link: #0b5f57;

  /* The logo's orb */
  --orb-1: #1f86ff;
  --orb-2: #4a55fb;
  --orb-3: #a24cff;

  --text: #f7f7fc;
  --text-2: #cbcde2;
  --text-3: #aeb1cc;

  --hairline: rgba(255, 255, 255, 0.12);
  --outline: rgba(255, 255, 255, 0.24);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.1);
  --code-bg: rgba(0, 0, 16, 0.4);

  --font: "Google Sans Flex", "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Google Sans Code", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --nav-h: 64px;
  --r-phone: 44px;
  --phone-pad: 9px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--night);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--mono); font-size: 0.9em; white-space: nowrap; background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
dd { margin: 0; }

.sprite { display: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.icon use { fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}
.skip:focus { top: 12px; }

.kicker { font: 400 0.8125rem/1.4 var(--mono); color: var(--accent); letter-spacing: 0.02em; }
.kicker-ink { color: var(--ink-link); }
.fine { font-size: 0.9375rem; color: var(--text-3); line-height: 1.55; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 1rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-soft); color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { color: var(--text); border: 1px solid var(--outline); background: var(--glass); }
.btn-ghost:hover { color: var(--text); background: var(--glass-2); border-color: rgba(255, 255, 255, 0.36); transform: translateY(-1px); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* The play button: lighter than the ghost button, with the play symbol in a disc. */
.btn-play { padding: 0 12px 0 0; gap: 0.65em; color: var(--text); }
.btn-play:hover { color: var(--text); }
.play-disc {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass-2);
  border: 1px solid var(--outline);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.play-disc .icon { width: 14px; height: 14px; }
.btn-play:hover .play-disc { background: var(--text); color: var(--ink); border-color: var(--text); transform: scale(1.06); }
.btn-meta { color: var(--text-3); font-weight: 400; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  background: rgba(11, 12, 34, 0.6);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav-logo { display: block; margin-right: auto; border-radius: 8px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.nav-links a:hover { color: var(--text); }

/* The story: hero and chapters on the left, the phone on the right.
   The section starts under the app's Dusk sky and reaches night by the first chapter. */
.story {
  position: relative;
  isolation: isolate;
  background: var(--night);
}
.story::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 150vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 40% at 88% 4%, rgba(143, 166, 230, 0.34), transparent 70%),
    radial-gradient(45% 36% at 2% 62%, rgba(192, 138, 180, 0.2), transparent 70%),
    linear-gradient(180deg, #212a5f 0%, #364590 36%, #4a5aa0 58%, #2a3070 82%, var(--night) 100%);
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.flow { container-type: inline-size; min-width: 0; padding-bottom: 14vh; }

/* Hero */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-content: center;
  padding-block: clamp(40px, 6vh, 72px) clamp(48px, 8vh, 96px);
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.375rem, 8.4cqi, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h1-line { display: inline; }
.h1-dim { color: var(--text-2); }
.lead {
  margin-top: 28px;
  max-width: 40ch;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--text-2);
}
.lead a { color: var(--text); }
.hero .cta-row { margin-top: 32px; }

.needs { margin-top: clamp(40px, 6vh, 64px); padding-top: 24px; border-top: 1px solid var(--hairline); }
.needs-title { font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); }
.needs-list { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.needs-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.45; color: var(--text); }
.needs-list .icon { color: var(--accent); margin-top: 1px; }
.needs-note { margin-top: 16px; font-size: 0.9375rem; color: var(--text-3); }
@container (max-width: 560px) { .needs-list { grid-template-columns: 1fr; } }

/* Chapters */
.chapter {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-content: center;
  padding-block: 8vh;
}
.chapter h3 {
  margin-top: 14px;
  max-width: 15ch;
  font-size: clamp(2rem, 6.6cqi, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.chapter h3 code { font-size: 0.9em; padding: 0.02em 0.3em; background: rgba(255, 255, 255, 0.1); }
.chapter > p:not(.kicker):not(.fine) { margin-top: 22px; max-width: 46ch; font-size: 1.125rem; color: var(--text-2); }
.chapter .fine { margin-top: 14px; max-width: 52ch; }
.asks { margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.asks li {
  max-width: 34ch;
  padding: 10px 16px;
  border-radius: 20px 20px 20px 6px;
  background: rgba(85, 217, 201, 0.2);
  color: var(--text);
  line-height: 1.4;
}

/* The phone. One frame in the rail holds every screen; the inline frames only get
   content on narrow screens, when script.js moves the screens into the chapters. */
.phone {
  position: relative;
  width: 100%;
  padding: var(--phone-pad);
  border-radius: var(--r-phone);
  background: #0e0f26;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 50px 100px -40px rgba(3, 3, 20, 0.9),
    0 20px 40px -20px rgba(3, 3, 20, 0.7);
}
.screens {
  position: relative;
  aspect-ratio: 720 / 1616;
  border-radius: calc(var(--r-phone) - var(--phone-pad));
  overflow: hidden;
  background: #1c2050;
}
.screen { position: absolute; inset: 0; opacity: 0; }
.screen.is-active { opacity: 1; }
.screen > img, .screen > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen > video { background: #1c2050; }
.phone-inline .screen { opacity: 1; }

/* The side button, with a press ring while the page moves. */
.side-key {
  position: absolute;
  right: -4px;
  top: 21%;
  width: 4px;
  height: 66px;
  border-radius: 0 3px 3px 0;
  background: #363a68;
}
.side-key::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
}

.rail { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; min-width: 0; }
.phone-rail { width: min(100%, 340px, calc((100vh - 176px) / 2.244)); }
.phone-rail::before {
  content: "";
  position: absolute;
  inset: -18% -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(74, 85, 251, 0.5), rgba(162, 76, 255, 0.18) 55%, transparent 100%);
  filter: blur(24px);
}
.phone-inline { display: none; }

/* Phone control illustration */
.mock {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 5.5% 6% 8%;
  color: var(--text);
  background:
    radial-gradient(60% 40% at 90% 0%, rgba(143, 166, 230, 0.28), transparent 70%),
    linear-gradient(180deg, #202860 0%, #33418a 55%, #4a5aa4 100%);
  container-type: inline-size;
}
.mock-status { display: flex; justify-content: space-between; align-items: center; font-size: 4.6cqi; font-weight: 500; }
.mock-bars { width: 8cqi; height: 3.4cqi; border-radius: 2px; background: linear-gradient(90deg, transparent 0 40%, #fff 40% 60%, transparent 60% 75%, #fff 75%); }
.mock-toast {
  margin-top: 8cqi;
  display: flex;
  gap: 4cqi;
  align-items: center;
  padding: 4.5cqi 5cqi;
  border-radius: 6cqi;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--hairline);
}
.mock-toast .icon { width: 9cqi; height: 9cqi; color: var(--text); }
.mock-toast div { display: grid; gap: 0.8cqi; min-width: 0; }
.mock-toast-from { font-size: 3.6cqi; color: var(--text-2); line-height: 1.2; }
.mock-toast-text { font-size: 4.6cqi; line-height: 1.25; }
.mock-timer { display: grid; align-content: center; justify-items: center; gap: 3cqi; text-align: center; }
.mock-timer .icon { width: 12cqi; height: 12cqi; color: var(--accent); }
.mock-time { font: 600 24cqi/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mock-label { font-size: 4.2cqi; color: var(--text-2); }

/* Why not just Telegram: the one light moment on the page */
.why { background: var(--moon); color: var(--ink); padding-block: clamp(72px, 12vw, 160px); }
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: start;
}
.why h2 {
  margin-top: 16px;
  font-size: clamp(2.5rem, 1rem + 5.4vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 11ch;
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}
.why-answer { display: grid; gap: 22px; }
.why-answer > p:first-child { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.4rem); line-height: 1.45; color: var(--ink); max-width: 40ch; }
.why-list { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
.why-list dt, .why-list dd { padding: 16px 0; border-top: 1px solid rgba(23, 23, 58, 0.14); }
.why-list dt { font: 400 0.875rem/1.7 var(--mono); color: var(--ink-link); padding-right: 20px; }
.why-list dd { color: var(--ink); line-height: 1.5; max-width: 56ch; }
.why-caveat { padding-top: 18px; border-top: 1px solid rgba(23, 23, 58, 0.14); color: var(--ink-2); max-width: 56ch; }
.why a { color: var(--ink-link); }

/* The maker's note, next to the phone it was built for */
.note { background: var(--deep); padding-block: clamp(72px, 10vw, 128px); }
.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.note h2 {
  margin-top: 14px;
  font-size: clamp(1.75rem, 1.1rem + 2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.note blockquote { margin: 28px 0 0; display: grid; gap: 1em; }
.note blockquote p { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--text); max-width: 56ch; }
.note-by { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 0.9375rem; color: var(--text-3); max-width: 56ch; }
.note-figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.note-figure figcaption { font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); }

/* Spec sheet */
.spec { background: var(--night); padding-block: clamp(72px, 10vw, 128px); }
.spec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.spec-figure { position: sticky; top: calc(var(--nav-h) + 32px); margin: 0; display: grid; gap: 14px; justify-items: center; }
.spec-figure figcaption { font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); text-align: center; max-width: 30ch; }
.crop {
  width: min(100%, 320px);
  border-radius: 28px 28px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.spec h2, .setup h2 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.spec dl { margin-top: 36px; display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.spec dt, .spec dd { padding: 20px 0; border-top: 1px solid var(--hairline); }
.spec dt { font: 400 0.875rem/1.7 var(--mono); color: var(--accent); padding-right: 24px; }
.spec dd { color: var(--text-2); max-width: 62ch; }
.fold {
  width: 100%;
  max-width: 520px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 50px 100px -40px rgba(3, 3, 20, 0.9);
}
/* Setup */
.setup { background: var(--deep); padding-block: clamp(72px, 10vw, 128px); }
.setup-head { max-width: 640px; }
.setup-head p { margin-top: 16px; font-size: 1.125rem; color: var(--text-2); }
.setup-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.steps { counter-reset: step; display: grid; gap: 32px; max-width: 640px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; row-gap: 10px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / span 4;
  font: 400 0.875rem/1.9 var(--mono);
  color: var(--accent);
}
.steps li > * { grid-column: 2; }
.steps h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; }
.steps p { color: var(--text-2); }
pre {
  margin: 4px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}
pre code { background: none; padding: 0; font-size: inherit; white-space: pre; }

.download {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 30px 28px;
  display: grid;
  gap: 14px;
  justify-items: start;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.download-icon { width: 64px; height: 64px; margin-bottom: 4px; }
.download h3 { font-size: 1.375rem; }
.download-meta { color: var(--text-2); font-size: 0.9375rem; }
.download .btn { margin-top: 4px; }
.qr {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.qr img { width: 96px; height: 96px; border-radius: 10px; }
.qr p { font-size: 0.875rem; color: var(--text-2); line-height: 1.5; }

/* Questions */
.faq { background: var(--night); padding-block: clamp(72px, 10vw, 128px); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; }
.faq-list { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-child { border-top: 1px solid var(--hairline); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--text-3); transition: transform 0.3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 4px 22px; color: var(--text-2); max-width: 62ch; }

/* Footer */
.footer { padding-block: 40px 56px; border-top: 1px solid var(--hairline); background: var(--night); }
.footer-inner { display: grid; justify-items: center; text-align: center; gap: 20px; }
.reveal { width: min(100%, 560px); margin-bottom: -24px; }
.footer-line { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); letter-spacing: -0.01em; color: var(--text-2); }
.footer .cta-row { justify-content: center; }
.footer-links { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.footer-links a:hover { color: var(--text); }

/* The intro video in a dialog. It fills the viewport, so a click outside the player lands
   on the dialog itself and closes it. The 16:9 frame fits both the width and the height. */
html { scrollbar-gutter: stable; }
html:has(.video[open]) { overflow: hidden; }
.video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--gutter);
  border: 0;
  background: transparent;
  color: var(--text);
}
.video[open] { display: grid; place-items: center; }
.video::backdrop { background: rgba(6, 7, 22, 0.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.video-box { width: min(100%, 1120px, (100dvh - 2 * var(--gutter) - 56px) * 16 / 9); display: grid; gap: 12px; justify-items: end; }
.video-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: var(--glass-2);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.video-close:hover { background: rgba(255, 255, 255, 0.18); }
.video-close:active { transform: scale(0.94); }
.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 50px 100px -40px rgba(3, 3, 20, 0.9);
}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.9s var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: 0.06s; }
  .hero > :nth-child(3) { animation-delay: 0.12s; }
  .hero > :nth-child(4) { animation-delay: 0.18s; }
  .hero > :nth-child(n + 5) { animation-delay: 0.26s; }
  .rail { animation: rise 1.1s 0.12s var(--ease) both; }

  .screen { transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); transform: scale(1.02); }
  .screen.is-active { transform: none; }
  .phone-inline .screen { transform: none; }
  .side-key::after { animation: press 2.6s 1.2s ease-out infinite; }

  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .video[open] .video-box { animation: pop 0.45s var(--ease) both; }
  .video[open]::backdrop { animation: fade 0.3s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes press {
  0% { opacity: 0.9; transform: scale(0.4); }
  45%, 100% { opacity: 0; transform: scale(2.2); }
}

/* The footer wordmark waits for its reveal animation. */
.js .reveal:not(.is-playing) { visibility: hidden; }

@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .video::backdrop { background: rgba(6, 7, 22, 0.94); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .download { background: var(--sheet); }
  .asks li { background: #1f4a4d; }
}

/* Tablet and below: the story stacks and each chapter gets its own phone. */
@media (max-width: 959px) {
  .nav-links { display: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { position: static; height: auto; order: 2; padding-bottom: 48px; }
  .phone-rail { width: min(78%, 300px); }
  .js .rail { display: none; }
  .flow { padding-bottom: 0; }
  .hero { min-height: 0; padding-top: clamp(32px, 6vh, 64px); }
  .hero h1 { font-size: clamp(2.375rem, 9.6cqi, 4.25rem); }
  .phone-inline.has-screen { display: block; margin: 40px auto 0; width: min(78%, 300px); }
  .hero .phone-inline.has-screen { margin-top: 44px; }
  .needs { margin-top: 44px; }
  .needs-list { grid-template-columns: 1fr; }
  .chapter { min-height: 0; padding-block: 56px 24px; }
  .chapter h3 { max-width: 16ch; }
  .why-grid { grid-template-columns: 1fr; }
  .why h2 { position: static; }
  .note-grid { grid-template-columns: 1fr; }
  .note-figure { order: -1; }
  .fold { max-width: 560px; }
  .faq-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-figure { position: static; order: 2; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-figure { position: static; order: 2; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-figure { position: static; order: 2; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-figure { position: static; order: 2; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-figure { position: static; order: 2; }
  .setup-grid { grid-template-columns: 1fr; }
  .download { position: static; max-width: 460px; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --nav-h: 60px; }
  .nav-logo img { height: 26px; }
  .hero h1 { font-size: clamp(2rem, 10cqi, 3.25rem); }
  .lead { font-size: 1.125rem; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .chapter h3 { font-size: clamp(1.9rem, 9cqi, 2.75rem); }
  .spec dl, .why-list { grid-template-columns: 1fr; }
  .spec dt, .why-list dt { padding: 20px 0 6px; }
  .spec dd, .why-list dd { padding-top: 0; border-top: 0; }
  .why-list dt { padding-top: 16px; }
  .steps li { grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
  pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .qr { display: none; }
  .download { max-width: none; }
}
