/* ── Priszim marketing site — PRISM-NOIR design system ─────────────────────
 *
 * Palette carried from the approved 2026-07-05 design spec
 * (docs/superpowers/specs/2026-07-05-marketing-website-design.md).
 * Reconcile against docs/design/PRISM-NOIR.md once feat/w6-prism-noir merges.
 *
 * Binding rules:
 *   - beam teal (--beam) is for TEXT, LINKS, FOCUS only — never a large fill
 *   - deep teal (--teal-fill) is for FILLS only — never text (fails AA)
 *   - spectrum colors are identity moments only, NEVER money figures
 *   - ONE beam-glow chart per page; ONE ambient glow per page
 *   - prefers-reduced-motion collapses all motion
 */

/* Instrument Serif (OFL, vendored in assets/fonts/ — no external requests).
 * BRAND.md Direction A "Editorial Luxury": headlines only. NEVER numerals —
 * money figures stay SF thin tabular per PRISM-NOIR. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink:        #0D0C11;
  --surface-1:  #16151C;
  --surface-2:  #1E1C25;
  --beam:       #45E0D8;
  --teal-fill:  #0E6B6F;
  --teal-fill-hover: #0A5659;
  --pos:        #4ADE8F;
  --neg:        #FB7185;
  --text:       #F5F3F0;
  --text-dim:   rgba(245, 243, 240, 0.72);
  --text-mute:  rgba(245, 243, 240, 0.55);
  --border:     rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Spectrum — identity moments only */
  --sp-violet:  #8B7CF6;
  --sp-magenta: #EF7FBC;
  --sp-amber:   #F2B95A;
  --sp-mint:    #5EE3A1;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
          Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /* Type scale: 48 / 32 / 24 / 16 / 14 / 12 */
  --fs-display: clamp(2.25rem, 5.5vw, 3rem);
  --fs-title1:  2rem;
  --fs-title2:  1.5rem;
  --fs-body:    1rem;
  --fs-label:   0.875rem;
  --fs-caption: 0.75rem;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1080px;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 600; }
/* Display serif carries only one weight (400) — presence comes from size,
 * not boldness. Italic <em> inside a headline is the editorial accent. */
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  letter-spacing: -0.015em;
  line-height: 1.06;
}
/* Editorial scale on the homepage hero only: that headline holds the
 * room. Presence from size, never from boldness. Interior pages carry
 * longer, more literal h1s and stay a step down. */
.hero-stage h1 {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
}
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  letter-spacing: -0.01em;
  line-height: 1.06;
}
h1 em, h2 em { font-style: italic; color: var(--beam); }
h3 { font-size: var(--fs-title2); }
h4 { font-size: var(--fs-body); }
p  { margin: 0 0 1em; color: var(--text-dim); }

a { color: var(--beam); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 2px;
}

.caption { font-size: var(--fs-caption); color: var(--text-mute); }
.label   { font-size: var(--fs-label); }

.kicker {
  display: block;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 0.75rem;
}

/* Money figures: tabular, thin at hero scale, NEVER spectrum/gradient. */
.numeric {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-figure {
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  letter-spacing: -0.02em;
}

.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ── Layout ───────────────────────────────────────────────────────────── */

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: clamp(96px, 14vh, 150px) 0; }
.section-tight { padding: clamp(64px, 9vh, 96px) 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Ambient glow — exactly ONE per page, slow, reduced-motion-gated ───── */

.ambient {
  position: fixed;
  top: -30vh;
  left: 50%;
  width: 90vw;
  height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(14, 107, 111, 0.16) 0%, rgba(14, 107, 111, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-drift 26s ease-in-out infinite alternate;
}
/* Two extra layers inside the SAME ambient element (still one glow per
 * page), counter-drifting at different periods so the sky feels alive the
 * way Origin's clouds do, without imagery. Teal family only. */
.ambient::before,
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.ambient::before {
  background: radial-gradient(ellipse at 30% 60%,
    rgba(69, 224, 216, 0.05) 0%, transparent 60%);
  animation: ambient-drift-b 41s ease-in-out infinite alternate;
}
.ambient::after {
  background: radial-gradient(ellipse at 70% 40%,
    rgba(14, 107, 111, 0.10) 0%, transparent 55%);
  animation: ambient-drift-c 57s ease-in-out infinite alternate;
}
@keyframes ambient-drift {
  from { transform: translateX(-56%) scale(1); opacity: 0.85; }
  to   { transform: translateX(-44%) scale(1.08); opacity: 1; }
}
@keyframes ambient-drift-b {
  from { transform: translate(-4%, 2%) scale(1.05); }
  to   { transform: translate(5%, -3%) scale(0.97); }
}
@keyframes ambient-drift-c {
  from { transform: translate(3%, -2%) scale(0.96); }
  to   { transform: translate(-5%, 3%) scale(1.06); }
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ── Nav ──────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 12, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
}
.wordmark:hover { text-decoration: none; }
.wordmark-sm { font-size: 1.05rem; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: var(--fs-label); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn { color: var(--text); }

.nav-toggle { display: none; }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; }

/* Primary: deep teal FILL (fills only — never use beam as a fill) */
.btn-primary { background: var(--teal-fill); color: var(--text); }
.btn-primary:hover { background: var(--teal-fill-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-mute); }

.btn-sm { padding: 8px 18px; font-size: var(--fs-label); }
.btn-lg { padding: 14px 32px; }

/* ── Waitlist form ────────────────────────────────────────────────────── */

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
}
.waitlist-form input[type='email'] {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; /* iOS zoom guard */
}
.waitlist-form input[type='email']::placeholder { color: var(--text-mute); }

.waitlist-note { margin-top: 10px; font-size: var(--fs-caption); color: var(--text-mute); }

.waitlist-status { margin-top: 12px; font-size: var(--fs-label); min-height: 1.4em; }
.waitlist-status.ok { color: var(--pos); }
.waitlist-status.err { color: var(--neg); }

/* Honeypot — visually gone, still in the form for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* ── Cards & surfaces ─────────────────────────────────────────────────── */

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
/* Instant (untransitioned) hover shift — a transition here would inherit
 * the reveal stagger's transition-delay and lag the pointer. */
.card:hover { border-color: var(--border-strong); }
.card h3, .card h4 { color: var(--text); }
.card-elevated { background: var(--surface-2); }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: center;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-strip .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-label);
  color: var(--text-dim);
}
.trust-strip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-fill);
  flex: none;
}

/* ── Device mockup ────────────────────────────────────────────────────── */

.device {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  padding: 20px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  max-width: 380px;
  margin: 0 auto;
}
/* Scroll parallax: site.js drives transform on the hero device only, via
 * rAF. will-change is scoped to the class JS adds so other mockups don't
 * pay the compositing cost. */
.device-parallax { will-change: transform; }
.device-screen {
  background: var(--ink);
  border-radius: 20px;
  padding: 24px 20px;
  overflow: hidden;
}

.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-label);
}
.mock-row:last-child { border-bottom: none; }
.mock-row .name { color: var(--text-dim); }
.mock-row .value { font-variant-numeric: tabular-nums; }

/* Beam chart — the ONE glowing chart on a page */
.beam-chart { display: block; width: 100%; height: auto; }
.beam-chart .beam-line {
  stroke: var(--beam);
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 0 6px rgba(69, 224, 216, 0.55));
}
.beam-chart .beam-fill { fill: url(#beamFill); }
.beam-chart .grid-line { stroke: var(--border); stroke-width: 1; }
.beam-chart .axis-label { fill: var(--text-mute); font-size: 10px; font-family: var(--font); }

/* Currency pills on dual-currency surfaces */
.currency-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

/* ── Chat demo ────────────────────────────────────────────────────────── */

.chat-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}
.bubble {
  padding: 12px 18px;
  border-radius: 18px;
  font-size: var(--fs-label);
  line-height: 1.5;
  max-width: 88%;
}
/* Hidden states are gated on .js (set by site.js line 1) so content is
 * never invisible when scripts don't run. */
.js .bubble {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.bubble.visible { opacity: 1; transform: none; }
.bubble-user {
  align-self: flex-end;
  background: var(--teal-fill);
  color: var(--text);
  border-bottom-right-radius: 6px;
}
.bubble-ai {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-bottom-left-radius: 6px;
}
.bubble-ai .numeric { color: var(--text); }

/* ── Feature rows ─────────────────────────────────────────────────────── */

.feature-row { margin-bottom: 96px; }
.feature-row:last-child { margin-bottom: 0; }

/* Identity moment: spectrum is allowed ONLY on non-money identity accents
 * (e.g. streak gems) — never on figures. */
.streak-gems { display: flex; gap: 12px; }
.streak-gems .gem {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--ink);
}
.gem-1 { background: var(--sp-violet); }
.gem-2 { background: var(--sp-magenta); }
.gem-3 { background: var(--sp-amber); }
.gem-4 { background: var(--sp-mint); }

/* ── Pricing ──────────────────────────────────────────────────────────── */

.price-card {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 460px;
}
.price-figure {
  font-size: var(--fs-display);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.price-per { font-size: var(--fs-body); color: var(--text-mute); }
.price-toggle { display: flex; gap: 8px; margin-bottom: 24px; }
.price-toggle button {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: var(--fs-label);
  cursor: pointer;
}
.price-toggle button[aria-pressed='true'] {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-mute);
}
.save-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(74, 222, 143, 0.12);
  color: var(--pos);
  font-size: var(--fs-caption);
  font-weight: 600;
}

.check-list { list-style: none; padding: 0; margin: 24px 0; }
.check-list li {
  padding: 8px 0 8px 30px;
  position: relative;
  color: var(--text-dim);
  font-size: var(--fs-label);
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--beam);
  font-weight: 700;
}

/* ── Comparison tables ────────────────────────────────────────────────── */

.compare-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-label);
  min-width: 560px;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 600;
}
.compare-table td { color: var(--text-dim); }
.compare-table td:first-child { color: var(--text); }
.compare-table .num { font-variant-numeric: tabular-nums; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq-list { max-width: 720px; }
.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.faq-list summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  color: var(--text-mute);
  font-size: var(--fs-title2);
  font-weight: 300;
  line-height: 1;
  flex: none;
}
.faq-list details[open] summary::after { content: '–'; }
.faq-list details p { padding-bottom: 16px; }

/* ── Personas / value grids ───────────────────────────────────────────── */

.persona-card h3 { font-size: 1.15rem; }

/* ── Prose (legal, about) ─────────────────────────────────────────────── */

.prose { max-width: 720px; }
.prose h2 { font-size: var(--fs-title2); margin-top: 2.5em; }
.prose h3 { font-size: 1.1rem; margin-top: 2em; }
.prose ul { color: var(--text-dim); padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.legal-updated { color: var(--text-mute); font-size: var(--fs-label); margin-bottom: 3em; }

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 80px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-dim); font-size: var(--fs-label); }
.footer-col a:hover { color: var(--text); }
.footer-brand .caption { margin: 12px 0 0; max-width: 260px; }
.footer-copyright { margin-top: 20px; }

/* ── Scroll reveal (JS adds .reveal-visible) ──────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
/* Must out-specify `.js .reveal` (0-2-0) or the hide rule wins forever. */
.js .reveal.reveal-visible { opacity: 1; transform: none; }

/* Children stagger: the second grid cell (usually the mockup card) lands a
 * beat after the copy. */
.js .reveal > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.reveal-visible > * { opacity: 1; transform: none; }
.js .reveal.reveal-visible > *:nth-child(2) { transition-delay: 0.15s; }

/* Beam chart draw-in: site.js measures the path, sets the dash inline, then
 * adds .drawn — the line sweeps left-to-right, the glow fill breathes in
 * after. Reduced motion (and no-JS) render the finished chart. */
.js .beam-chart .beam-line { transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .beam-chart:not(.drawn) .beam-fill { opacity: 0; }
.beam-chart .beam-fill { transition: opacity 0.8s ease 0.9s; }

/* ═══ PRISM CINEMA ═══════════════════════════════════════════════════════
 * The homepage as film: one beam of light enters, refracts into the
 * spectrum, and threads through every scene. Spectrum color is spent on
 * LIGHT and life moments only — money figures stay teal/green/red.
 * Everything is transform/opacity; reduced motion collapses to final
 * frames in the media block below. */

/* ── The Refraction (hero opening shot) ───────────────────────────────── */

.hero-stage { position: relative; overflow: hidden; }
.hero-stage .container { position: relative; z-index: 1; }

.refract {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.refract path { fill: none; stroke-linecap: round; }
.refract .in-beam { stroke: #E9FBFA; stroke-width: 2; }
.refract .in-beam-glow { stroke: rgba(69, 224, 216, 0.22); stroke-width: 9; }
.refract .ray { stroke-width: 1.8; opacity: 0.9; }
.refract .ray-glow { stroke-width: 11; opacity: 0.6; }
.refract .ray-violet { stroke: var(--sp-violet); }
.refract .ray-magenta { stroke: var(--sp-magenta); }
.refract .ray-amber { stroke: var(--sp-amber); }
.refract .ray-mint { stroke: var(--sp-mint); }

.prism-glyph polygon {
  fill: rgba(69, 224, 216, 0.06);
  stroke: rgba(233, 251, 250, 0.55);
  stroke-width: 1.2;
}

/* The overture: nav settles, copy rises line by line, THEN the beam
 * fires and refracts. The first 2.5 seconds are conducted, not dumped. */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.js .hero-stage .hero-head .kicker { display: inline-block; animation: heroRise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s backwards; }
.js .hero-stage .hero-head h1      { animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s backwards; }
.js .hero-stage .hero-body > div:first-child > * { animation: heroRise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.6s backwards; }
.js .hero-stage .hero-body > div:first-child > *:nth-child(2) { animation-delay: 0.72s; }
.js .hero-stage .hero-body > div:first-child > *:nth-child(n+3) { animation-delay: 0.84s; }
.js .hero-stage .device { animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.7s backwards; }

.hero-head { max-width: 1020px; margin-bottom: 48px; }
.hero-head h1 { margin-bottom: 0; }

/* Entry choreography: beam draws, prism wakes, rays fan out. */
@keyframes beamDraw { to { stroke-dashoffset: 0; } }
@keyframes prismWake { to { opacity: 1; } }
@keyframes rayBreathe {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.85; }
}
.js .refract .in-beam,
.js .refract .in-beam-glow {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: beamDraw 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 1.3s forwards;
}
.js .refract .prism-glyph {
  opacity: 0;
  animation: prismWake 0.7s ease 2.2s forwards;
}
.js .refract .ray,
.js .refract .ray-glow {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: beamDraw 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.js .refract .ray-violet  { animation-delay: 2.35s; }
.js .refract .ray-magenta { animation-delay: 2.5s; }
.js .refract .ray-amber   { animation-delay: 2.65s; }
.js .refract .ray-mint    { animation-delay: 2.8s; }
/* After the fan-out, the glow layers breathe — this page's one ambient. */
.js .refract .ray-glow {
  animation: beamDraw 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 2.5s forwards,
             rayBreathe 8s ease-in-out 4.4s infinite;
}

@media (max-width: 880px) {
  .refract { opacity: 0.55; }
}

/* ── Scroll spine: the beam that travels the page (JS-created) ────────── */

.spine {
  position: fixed;
  top: 0;
  left: 18px;
  width: 2px;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--beam),
    var(--sp-violet) 30%,
    var(--sp-magenta) 55%,
    var(--sp-amber) 78%,
    var(--sp-mint)
  );
  opacity: 0.4;
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}
@media (max-width: 1240px) { .spine { display: none; } }

/* ── Border-crossing scene ────────────────────────────────────────────── */

.border-stage {
  position: relative;
  height: 170px;
  margin: 40px auto 32px;
  max-width: 760px;
}
.border-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-strong) 0 8px,
    transparent 8px 16px
  );
}
.border-flag {
  position: absolute;
  top: 0;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flag-us { left: 0; }
.flag-ca { right: 0; }

.fx-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(69, 224, 216, 0.5) 12%,
    rgba(69, 224, 216, 0.5) 88%,
    transparent
  );
}
.fx-prism {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(233, 251, 250, 0.55);
  border-radius: 4px;
  background: rgba(69, 224, 216, 0.06);
}
.fx-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--fs-label);
  white-space: nowrap;
  will-change: left, opacity;
}
.fx-usd {
  left: 4%;
  background: var(--teal-fill);
  color: var(--text);
}
.fx-cad {
  left: calc(50% + 30px);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.fx-rate {
  position: absolute;
  left: 50%;
  top: calc(50% - 40px);
  transform: translateX(-50%);
  color: var(--text-mute);
  white-space: nowrap;
}

@keyframes fxTravelUS {
  0%       { left: 4%; opacity: 0; }
  6%       { opacity: 1; }
  40%      { left: calc(50% - 120px); opacity: 1; }
  46%, 100% { left: calc(50% - 120px); opacity: 0; }
}
@keyframes fxPrismFlash {
  0%, 40%  { box-shadow: none; background: rgba(69, 224, 216, 0.06); }
  46%      { box-shadow: 0 0 26px rgba(69, 224, 216, 0.55); background: rgba(69, 224, 216, 0.2); }
  56%, 100% { box-shadow: none; background: rgba(69, 224, 216, 0.06); }
}
@keyframes fxTravelCA {
  0%, 46%  { left: calc(50% + 30px); opacity: 0; }
  52%      { opacity: 1; }
  88%      { left: calc(96% - 110px); opacity: 1; }
  96%, 100% { left: calc(96% - 110px); opacity: 0; }
}
@keyframes fxRate {
  0%, 42%  { opacity: 0; transform: translateX(-50%) translateY(4px); }
  50%, 84% { opacity: 1; transform: translateX(-50%) translateY(0); }
  92%, 100% { opacity: 0; }
}
.js .fx-usd   { animation: fxTravelUS 8s ease-in-out infinite; }
.js .fx-prism { animation: fxPrismFlash 8s ease-in-out infinite; }
.js .fx-cad   { animation: fxTravelCA 8s ease-in-out infinite; }
.js .fx-rate  { animation: fxRate 8s ease-in-out infinite; }

@media (max-width: 880px) {
  .border-stage { height: 150px; }
  .border-flag { font-size: 0.65rem; }
}

/* ── Daily Brief: cards deal in, hold, and loop ───────────────────────── */

@keyframes briefRow {
  0%        { opacity: 0; transform: translateY(12px); }
  5%, 84%   { opacity: 1; transform: none; }
  93%, 100% { opacity: 0; transform: translateY(-6px); }
}
.js .vignette-brief .brief-row {
  animation: briefRow 9s cubic-bezier(0.22, 0.61, 0.36, 1) infinite backwards;
}
.js .vignette-brief .brief-row:nth-child(2) { animation-delay: 0s; }
.js .vignette-brief .brief-row:nth-child(3) { animation-delay: 0.5s; }
.js .vignette-brief .brief-row:nth-child(4) { animation-delay: 1s; }
.js .vignette-brief .brief-row:nth-child(5) { animation-delay: 1.5s; }

/* ── Auto-categorize vignette ─────────────────────────────────────────── */

.vignette-cat { overflow: hidden; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-label);
}
.cat-row .name { flex: 1; color: var(--text); }
.cat-row .value { color: var(--text-dim); }
.cat-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--fs-caption);
  background: rgba(69, 224, 216, 0.12);
  color: var(--beam);
  border: 1px solid rgba(69, 224, 216, 0.25);
  white-space: nowrap;
}
.learned {
  margin: 12px 0 0;
  color: var(--sp-mint);
}

@keyframes catRowIn {
  0%       { opacity: 0; transform: translateY(14px); }
  4%, 86%  { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}
@keyframes catChipPop {
  0%, 6%    { opacity: 0; transform: scale(0.6); }
  9%        { opacity: 1; transform: scale(1.12); }
  12%, 86%  { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; }
}
/* The wrong guess lives briefly, then the correction takes its place. */
@keyframes catGuess {
  0%, 6%   { opacity: 0; transform: scale(0.6); }
  9%       { opacity: 1; transform: scale(1.12); }
  12%, 38% { opacity: 1; transform: scale(1); }
  44%, 100% { opacity: 0; transform: scale(0.85); }
}
@keyframes catFixed {
  0%, 44%   { opacity: 0; transform: scale(0.6); }
  48%       { opacity: 1; transform: scale(1.12); }
  51%, 86%  { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; }
}
@keyframes catLearned {
  0%, 52%   { opacity: 0; }
  58%, 86%  { opacity: 1; }
  94%, 100% { opacity: 0; }
}
.js .cat-row { animation: catRowIn 11s ease infinite backwards; }
.js .cat-row-1 { animation-delay: 0.2s; }
.js .cat-row-2 { animation-delay: 0.9s; }
.js .cat-row-3 { animation-delay: 1.6s; }
.js .cat-row .cat-chip { animation: catChipPop 11s cubic-bezier(0.34, 1.56, 0.64, 1) infinite backwards; }
.js .cat-row-1 .cat-chip { animation-delay: 0.2s; }
.js .cat-row-2 .cat-chip { animation-delay: 0.9s; }
.js .cat-row-3 .chip-guess { animation: catGuess 11s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s infinite backwards; }
.js .cat-row-3 .chip-fixed { animation: catFixed 11s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s infinite backwards; }
.js .vignette-cat .learned { animation: catLearned 11s ease 1.6s infinite backwards; }
/* Without JS (or reduced motion), show the finished state: correction won. */
.chip-guess { display: none; }
.js .chip-guess { display: inline-block; }

/* ── Streak: months light up, then one quiet burst ────────────────────── */

.streak-gems { position: relative; }
@keyframes gemLight {
  0%       { opacity: 0.25; transform: scale(0.92); filter: saturate(0.4); }
  6%       { opacity: 1; transform: scale(1.15); filter: saturate(1); }
  10%, 88% { opacity: 1; transform: scale(1); filter: saturate(1); }
  96%, 100% { opacity: 0.25; transform: scale(0.92); filter: saturate(0.4); }
}
@keyframes streakBurst {
  0%, 22%  { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  26%      { opacity: 0.7; }
  38%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
}
.js .vignette-streak .gem { animation: gemLight 8s ease infinite backwards; }
.js .vignette-streak .gem-2 { animation-delay: 0.35s; }
.js .vignette-streak .gem-3 { animation-delay: 0.7s; }
.js .vignette-streak .gem-4 { animation-delay: 1.05s; }
.streak-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(139, 124, 246, 0.25),
    rgba(239, 127, 188, 0.12) 40%,
    transparent 70%
  );
}
.js .vignette-streak .streak-burst { animation: streakBurst 8s ease 1.05s infinite; }

/* ── Chat: typed, streamed, looped (engine in site.js) ────────────────── */

.chat-demo .word { opacity: 0; }
.chat-demo .word.on { opacity: 1; transition: opacity 0.12s ease; }
.bubble-thinking {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.bubble-thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-mute);
  animation: thinkDot 1s ease-in-out infinite;
}
.bubble-thinking i:nth-child(2) { animation-delay: 0.18s; }
.bubble-thinking i:nth-child(3) { animation-delay: 0.36s; }
@keyframes thinkDot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 1; transform: translateY(-3px); }
}
.chat-demo.chat-fading .bubble { opacity: 0 !important; transition: opacity 0.6s ease; }

/* ── Micro-interactions (system-wide motion language) ─────────────────── */

.btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease, box-shadow 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 24px rgba(14, 107, 111, 0.45);
}
.btn-primary:active { transform: scale(0.98); }
.card, .card-elevated {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 0.35s ease;
}
.feature-row .card:hover,
.feature-row .card-elevated:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
/* Device float: a slow bob layered under the scroll parallax (which owns
 * the outer .device transform — the float lives on the screen inside). */
@keyframes deviceFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.js .hero-stage .device-screen { animation: deviceFloat 9s ease-in-out infinite; }

/* ── Hero secondary CTA ───────────────────────────────────────────────── */

.hero-secondary {
  display: block;
  margin-top: 12px;
  color: var(--beam);
  text-decoration: none;
}
.hero-secondary:hover { text-decoration: underline; }

/* ── Tension: chaos → clarity ─────────────────────────────────────────── */

.tension-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 28px auto 0;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.tension-toggle button {
  padding: 8px 20px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-label);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.tension-toggle button.on {
  background: var(--teal-fill);
  color: var(--text);
}

.tension-stage {
  position: relative;
  height: 400px;
  max-width: 820px;
  margin: 36px auto 0;
}
/* Scattered fragments of the old way. Each carries the vector (--tx/--ty)
 * it travels when it collapses into the one clear answer. */
.shard {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.55s ease;
}
.shard .numeric { color: var(--text); }
.shard-1 { left: 4%;  top: 8%;  --rot: -6deg; --tx: 300px;  --ty: 130px; }
.shard-2 { left: 30%; top: 2%;  --rot: 4deg;  --tx: 120px;  --ty: 160px; }
.shard-3 { right: 6%; top: 10%; --rot: 7deg;  --tx: -280px; --ty: 120px; }
.shard-4 { left: 10%; bottom: 12%; --rot: 3deg;  --tx: 260px;  --ty: -110px; }
.shard-5 { left: 44%; bottom: 4%;  --rot: -5deg; --tx: 20px;   --ty: -150px; }
.shard-6 { right: 8%; bottom: 16%; --rot: -3deg; --tx: -250px; --ty: -90px; }
.tension-stage[data-state='clarity'] .shard {
  transform: translate(var(--tx), var(--ty)) rotate(0deg) scale(0.3);
  opacity: 0;
}

.clarity-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(400px, 92%);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.22s,
              opacity 0.5s ease 0.22s;
}
.tension-stage[data-state='clarity'] .clarity-card {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.clarity-figure {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--text);
  line-height: 1.1;
}

@media (max-width: 880px) {
  .tension-stage { height: 340px; }
  .shard { padding: 10px 12px; font-size: var(--fs-caption); }
}

/* ── Interactive demo: three tabs, one device ─────────────────────────── */

.demo-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 28px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.demo-tabs button {
  padding: 8px 22px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-label);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.demo-tabs button[aria-selected='true'] {
  background: var(--teal-fill);
  color: var(--text);
}

.demo-device { max-width: 360px; text-align: left; }
.demo-device .device-screen {
  position: relative;
  min-height: 380px;
}
.demo-panel {
  position: absolute;
  inset: 0;
  padding: 24px 20px;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.demo-panel.demo-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Pointer tilt (JS sets --tiltX/--tiltY; touch and reduced motion skip) */
[data-tilt] {
  transform: perspective(900px)
             rotateX(var(--tiltX, 0deg))
             rotateY(var(--tiltY, 0deg));
  transition: transform 0.18s ease-out;
}

/* ── Converge: the closing shot ───────────────────────────────────────── */

.converge-stage { position: relative; }
.converge {
  display: block;
  width: min(100%, 900px);
  height: 150px;
  margin: 0 auto 12px;
  pointer-events: none;
}
.converge path { fill: none; stroke-linecap: round; }
.cv-ray { stroke-width: 1.5; opacity: 0.55; }
.cv-violet { stroke: var(--sp-violet); }
.cv-magenta { stroke: var(--sp-magenta); }
.cv-amber { stroke: var(--sp-amber); }
.cv-mint { stroke: var(--sp-mint); }
.cv-beam { stroke: #E9FBFA; stroke-width: 2; opacity: 0.8; }
.js .converge path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.converge-play .cv-ray { animation: beamDraw 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.converge-play .cv-magenta { animation-delay: 0.12s; }
.converge-play .cv-amber { animation-delay: 0.24s; }
.converge-play .cv-mint { animation-delay: 0.36s; }
.converge-play .cv-beam { animation: beamDraw 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 1s forwards; }

/* ── Film grain: the ink reads as emulsion, not a hex code ────────────── */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ── Life scene: a product card living inside the life it pays for ────── */

.life-scene {
  position: relative;
  height: min(72vh, 560px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.life-scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bias the crop toward the dock and the couple, not the empty sky. */
  object-position: 50% 72%;
  display: block;
}
/* Quiet scrim behind the card corner so it never fights the image. */
.life-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    rgba(13, 12, 17, 0.55),
    transparent 45%
  );
}
.goal-card {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 1;
  width: min(340px, calc(100% - 56px));
  padding: 20px 22px;
  background: rgba(22, 21, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.goal-amount {
  font-size: 1.5rem;
  color: var(--text);
  margin: 6px 0 12px;
}
.goal-target { font-size: var(--fs-label); color: var(--text-mute); }
.goal-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
/* Goals are an identity surface — spectrum mint is allowed here. */
.goal-fill {
  display: block;
  height: 100%;
  width: 82%;
  border-radius: 999px;
  background: var(--sp-mint);
}
/* The fill draws in when the scene reveals. */
.js .reveal .goal-fill {
  width: 0;
  transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s;
}
.js .reveal.reveal-visible .goal-fill { width: 82%; }

@media (max-width: 880px) {
  .life-scene { height: 440px; }
  .goal-card { left: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); }
}

/* Full-width art-directed image or film under a page hero */
.page-hero-media {
  margin: 48px 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.page-hero-media img,
.page-hero-media video {
  display: block;
  width: 100%;
  height: auto;
}
.page-hero-media video { aspect-ratio: 16 / 9; object-fit: cover; }

/* ── Film band: the full-bleed cinematic moment ───────────────────────── */

.film-band {
  position: relative;
  height: min(78vh, 620px);
  overflow: hidden;
}
.film-band .film-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Legibility scrim: deepest at top and bottom so the band blends into
 * the ink of the sections around it. */
.film-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 12, 17, 0.72),
    rgba(13, 12, 17, 0.18) 45%,
    rgba(13, 12, 17, 0.78)
  );
}
.film-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.film-copy h2 { margin: 0; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }

/* ── Scroll-scrubbed scenes (progressive enhancement) ─────────────────── */
/* Where the browser supports scroll-driven animations, the border crossing
 * and the closing convergence stop running on a clock and instead follow
 * the reader's own scroll — you drag the money across the border. */

@supports (animation-timeline: view()) {
  .js .fx-usd {
    animation: fxTravelUS auto both;
    animation-timeline: view();
    animation-range: entry 40% cover 85%;
  }
  .js .fx-prism {
    animation: fxPrismFlash auto both;
    animation-timeline: view();
    animation-range: entry 40% cover 85%;
  }
  .js .fx-cad {
    animation: fxTravelCA auto both;
    animation-timeline: view();
    animation-range: entry 40% cover 85%;
  }
  .js .fx-rate {
    animation: fxRate auto both;
    animation-timeline: view();
    animation-range: entry 40% cover 85%;
  }
  .js .converge .cv-ray {
    animation: beamDraw auto both;
    animation-timeline: view();
    animation-range: entry 15% entry 90%;
  }
  .js .converge .cv-beam {
    animation: beamDraw auto both;
    animation-timeline: view();
    animation-range: entry 80% cover 45%;
  }
}

/* ── Reduced motion: collapse ALL motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ambient, .ambient::before, .ambient::after { animation: none; }
  .device-parallax { transform: none !important; }
  .reveal, .reveal > *, .bubble,
  .js .beam-chart:not(.drawn) .beam-fill {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Prism Cinema: hold the final frame of every scene. */
  .spine { display: none; }
  .js .chip-guess { display: none; }
  .streak-burst { opacity: 0 !important; }
  .brief-row, .cat-row, .cat-chip, .gem, .learned {
    opacity: 1 !important;
    transform: none !important;
  }
  /* fx elements keep their centering transforms; just stop the travel. */
  .fx-pill, .fx-rate, .fx-prism {
    animation: none !important;
    opacity: 1 !important;
  }
  .refract .in-beam, .refract .in-beam-glow,
  .refract .ray, .refract .ray-glow {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .refract .prism-glyph { opacity: 1 !important; animation: none !important; }
  .converge path {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  [data-tilt] { transform: none !important; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .feature-row { margin-bottom: 64px; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s ease;
  }
  .nav-toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: var(--fs-body); }
  .nav-links a.btn { margin-top: 12px; }

  .waitlist-form { flex-direction: column; }
  .device { max-width: 320px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
