/* ════════════════════════════════════════════════════════════════════
   MEVY · WEB · styles.css
   Pure CSS, modern features, graceful degradation.
   Layers · @property · container queries · scroll-driven · view transitions
   ════════════════════════════════════════════════════════════════════ */

@layer reset, tokens, theme, type, layout, components, motion, utilities;

/* ─────────────────────────── @property registrations ─ */
@property --cursor-x { syntax: '<number>'; inherits: true; initial-value: 0.5; }
@property --cursor-y { syntax: '<number>'; inherits: true; initial-value: 0.5; }
@property --scroll   { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --mesh-rot { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --orb-dx   { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --orb-dy   { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ════════════════════════════════════════════════════ @layer reset ─ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    color-scheme: light dark;
  }
  body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  a { color: inherit; text-decoration-skip-ink: auto; }
  button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
  img, svg { display: block; max-width: 100%; }
  ul, ol { list-style: none; }
  :focus-visible { outline: none; }
}

/* ═════════════════════════════════════════════════ @layer tokens ─ */
@layer tokens {
  :root {
    /* Mevy Light */
    --bg:        #FAF5E8;
    --bg-deep:   #F3EAD3;
    --bg-glass:  rgba(250, 245, 232, 0.72);
    --ink:       #1E2A24;
    --ink-dim:   color-mix(in oklch, var(--ink) 65%, transparent);
    --ink-faint: color-mix(in oklch, var(--ink) 42%, transparent);
    --sage:      #3D7A63;
    --sage-soft: color-mix(in oklch, var(--sage) 14%, transparent);
    --sage-deep: oklch(from var(--sage) calc(l - 0.06) c h);
    --warn:      #B87B2E;
    --rose:      #B86A6A;
    --plum:      #8A6BA8;
    --amber:     #C68A3A;
    --hair:      color-mix(in oklch, var(--ink) 8%, transparent);
    --hair-strong: color-mix(in oklch, var(--ink) 14%, transparent);
    --motes:     rgba(216, 187, 110, 0.6);
    --orb-glow:  rgba(242, 201, 101, 0.55);
    --orb-c0:    #FFF5D9;
    --orb-c1:    #F2C965;
    --orb-c2:    #C4933A;

    /* Type */
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Motion */
    --ease-decel: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out:   cubic-bezier(0.32, 0.72, 0, 1);
    --ease-std:   cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast:   180ms;
    --dur-base:   320ms;
    --dur-slow:   640ms;
    --dur-page:   880ms;

    /* Layout */
    --edge: 28px;
    --max:  760px;
    --max-wide: 980px;
    --section-y: 96px;
    --radius-pill: 100px;
    --radius-card: 22px;
  }
}

/* ══════════════════════════════════════════════════ @layer theme ─ */
@layer theme {
  @media (prefers-color-scheme: dark) {
    :root {
      --bg:        #0E1512;
      --bg-deep:   #08100D;
      --bg-glass:  rgba(14, 21, 18, 0.72);
      --ink:       #EFE9DC;
      --ink-dim:   color-mix(in oklch, var(--ink) 72%, transparent);
      --ink-faint: color-mix(in oklch, var(--ink) 42%, transparent);
      --sage:      #8DD7B3;
      --sage-soft: color-mix(in oklch, var(--sage) 15%, transparent);
      --sage-deep: oklch(from var(--sage) calc(l - 0.10) c h);
      --warn:      #E5A555;
      --rose:      #D89494;
      --plum:      #B59AD0;
      --amber:     #E8B872;
      --hair:      color-mix(in oklch, var(--ink) 10%, transparent);
      --hair-strong: color-mix(in oklch, var(--ink) 16%, transparent);
      --motes:     rgba(255, 255, 255, 0.85);
      --orb-glow:  rgba(141, 215, 179, 0.55);
      --orb-c0:    #C4F0D6;
      --orb-c1:    #8DD7B3;
      --orb-c2:    #3D7A63;
    }
  }

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    font-variant-numeric: tabular-nums;
    transition:
      background 800ms var(--ease-decel),
      color 800ms var(--ease-decel);
  }
  ::selection { background: var(--sage); color: var(--bg); }
}

/* ═══════════════════════════════════════════════════ @layer type ─ */
@layer type {
  .greet {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    font-size: clamp(2.6rem, 7.6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.034em;
    color: var(--ink);
    text-wrap: balance;
    transition: font-variation-settings 800ms var(--ease-decel);
  }
  .greet em {
    font-style: italic;
    font-variation-settings: 'opsz' 96;
    color: var(--sage);
  }
  .greet:hover em {
    font-variation-settings: 'opsz' 144;
  }

  .h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 72;
    font-size: clamp(1.9rem, 4.2vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.026em;
    color: var(--ink);
    text-wrap: balance;
    max-width: 18ch;
  }
  .h2 em {
    font-style: italic;
    font-variation-settings: 'opsz' 56;
    color: var(--sage);
  }

  .lede {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-variation-settings: 'opsz' 24;
    font-size: clamp(1.05rem, 1.55vw, 1.2rem);
    line-height: 1.55;
    letter-spacing: -0.008em;
    color: var(--ink-dim);
    text-wrap: pretty;
    max-width: 36ch;
    margin-top: 20px;
  }
  .lede b {
    font-style: normal;
    font-weight: 400;
    color: var(--sage);
  }

  .prose {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 20;
    font-size: 17px;
    line-height: 1.62;
    letter-spacing: -0.005em;
    color: var(--ink-dim);
    text-wrap: pretty;
    max-width: 38ch;
    margin-top: 16px;
  }
  .prose em { font-style: italic; color: var(--sage); }
  .prose strong { font-weight: 400; color: var(--warn); }

  .eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-dim);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
  }
  .eyebrow::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--sage);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sage);
    animation: breath 3s ease-in-out infinite;
    flex-shrink: 0;
  }
  .eyebrow.no-dot::before { display: none; }
  .eyebrow.warn { color: var(--warn); }
  .eyebrow.warn::before {
    background: var(--warn);
    box-shadow: 0 0 10px var(--warn);
  }

  .meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 14px;
  }

  a {
    color: var(--sage);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity var(--dur-fast) var(--ease-std), color var(--dur-fast) var(--ease-std);
  }
  a:hover { opacity: 0.75; }
  a:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 4px;
    border-radius: 2px;
  }

  .skip {
    position: absolute;
    left: -9999px;
    background: var(--ink);
    color: var(--bg);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 12px;
    text-decoration: none;
  }
  .skip:focus { left: 16px; top: 16px; z-index: 9999; }
}

/* ════════════════════════════════════════════════ @layer layout ─ */
@layer layout {
  main { display: block; }

  .section {
    max-width: var(--max);
    margin-inline: auto;
    padding: var(--section-y) var(--edge);
    position: relative;
    container-type: inline-size;
  }
  .section.wide { max-width: var(--max-wide); }
  .section.tight { padding-block: 64px; }

  .hr {
    height: 1px;
    background: var(--hair);
    max-width: var(--max);
    margin-inline: auto;
  }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 132px var(--edge) 80px;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    isolation: isolate;
    overflow: clip;
  }
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    width: 100%;
  }
  .hero .orb-wrap {
    margin: 0 auto 44px;
    width: 104px;
    height: 104px;
    position: relative;
    container-type: size;
  }
  .hero .eyebrow {
    justify-content: center;
  }
  .hero .greet {
    text-align: center;
  }
  .hero .lede {
    margin-inline: auto;
    max-width: 32ch;
    text-align: center;
  }

  .scroll-cue {
    margin-top: 64px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .scroll-cue::after {
    content: '';
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, var(--ink-faint), transparent);
    animation: pulldown 2.6s ease-in-out infinite;
  }

  .closing {
    text-align: center;
    padding: 132px var(--edge) 80px;
  }
  .closing .eyebrow { justify-content: center; }
  .closing .greet {
    text-align: center;
    margin-inline: auto;
    max-width: 18ch;
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .closing .lede {
    margin: 24px auto 0;
    text-align: center;
    max-width: 30ch;
  }
}

/* ═════════════════════════════════════════════ @layer components ─ */
@layer components {

  /* ─── Top nav ─ */
  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 14px var(--edge);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    background: var(--bg-glass);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur-base) var(--ease-std);
  }
  .nav.scrolled { border-bottom-color: var(--hair); }

  .nav .progress {
    position: absolute;
    inset: auto 0 0 0;
    height: 1.5px;
    background: var(--sage);
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0.85;
  }

  .mark {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
  .mark::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--sage);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sage);
    animation: breath 3s ease-in-out infinite;
  }
  .mark:hover { opacity: 1; color: var(--sage); }

  .lang {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }
  .lang .current { color: var(--ink); }
  .lang a {
    color: var(--ink-faint);
    text-decoration: none;
  }
  .lang a:hover { color: var(--sage); opacity: 1; }
  .lang .sep { color: var(--ink-faint); opacity: 0.6; }

  /* ─── Chapter side-nav ─ */
  .chapters {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-std);
  }
  .chapters.visible { opacity: 1; }
  @media (min-width: 980px) {
    .chapters { display: flex; }
  }
  .chapters a {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink-faint);
    transition: background var(--dur-fast) var(--ease-std),
                transform var(--dur-base) var(--ease-decel);
    position: relative;
  }
  .chapters a:hover {
    background: var(--sage);
    transform: scale(1.5);
  }
  .chapters a.active {
    background: var(--sage);
    transform: scale(1.8);
    box-shadow: 0 0 12px var(--sage);
  }
  .chapters a::before {
    content: attr(data-label);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ink-dim);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-std);
  }
  .chapters a:hover::before { opacity: 1; }

  /* ─── Living background ─ */
  .living {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse 800px 600px at calc(26% + var(--cursor-x, 0.5) * 4%) calc(22% + var(--cursor-y, 0.5) * 2%),
        color-mix(in oklch, var(--orb-glow) 50%, transparent) 0%, transparent 60%),
      radial-gradient(ellipse 700px 500px at calc(78% - var(--cursor-x, 0.5) * 3%) 82%,
        color-mix(in oklch, var(--sage) 14%, transparent) 0%, transparent 60%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    transition: background 600ms var(--ease-decel);
  }
  .motes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.65;
  }
  .mote {
    position: absolute;
    width: 2px; height: 2px;
    background: var(--motes);
    border-radius: 50%;
    box-shadow: 0 0 4px var(--motes);
    animation: float 16s ease-in-out infinite;
  }
  @media (prefers-color-scheme: dark) {
    .mote {
      width: 1.5px; height: 1.5px;
      box-shadow: 0 0 3px var(--motes);
      animation: twinkle 5s ease-in-out infinite;
    }
  }
  .mote:nth-child(1)  { top: 18%; left: 12%; animation-delay: 0s; }
  .mote:nth-child(2)  { top: 32%; left: 84%; animation-delay: 1.4s; }
  .mote:nth-child(3)  { top: 68%; left: 22%; animation-delay: 2.8s; }
  .mote:nth-child(4)  { top: 78%; left: 76%; animation-delay: 4.2s; }
  .mote:nth-child(5)  { top: 14%; left: 62%; animation-delay: 0.8s; }
  .mote:nth-child(6)  { top: 54%; left:  8%; animation-delay: 3.2s; }
  .mote:nth-child(7)  { top: 88%; left: 48%; animation-delay: 2.1s; }
  .mote:nth-child(8)  { top: 24%; left: 38%; animation-delay: 5.0s; }
  .mote:nth-child(9)  { top: 62%; left: 92%; animation-delay: 1.0s; }
  .mote:nth-child(10) { top: 44%; left: 56%; animation-delay: 3.8s; }
  .mote:nth-child(11) { top: 36%; left: 18%; animation-delay: 4.6s; }
  .mote:nth-child(12) { top: 72%; left: 64%; animation-delay: 0.4s; }

  /* ─── Breathing orb (SVG) ─ */
  .orb {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
  }
  .orb .ring   { transform-origin: center; animation: ring 4.5s ease-in-out infinite; }
  .orb .ring2  { transform-origin: center; animation: ring 4.5s ease-in-out infinite reverse; }
  .orb .core   {
    transform-origin: center;
    animation: orbBreath 4.5s ease-in-out infinite;
    transform: translate(calc(var(--orb-dx, 0) * 4px), calc(var(--orb-dy, 0) * 4px));
    transition: transform 800ms var(--ease-decel);
  }
  .orb .glow   { transform-origin: center; animation: glowBreath 4.5s ease-in-out infinite; }
  .orb .iris   {
    transform-origin: center;
    transform: translate(calc(var(--orb-dx, 0) * 6px), calc(var(--orb-dy, 0) * 6px));
    transition: transform 800ms var(--ease-decel);
  }
  @media (prefers-color-scheme: light) {
    .orb .ring, .orb .ring2 { opacity: 0; }
  }

  /* ─── River SVG ─ */
  .river-vis {
    margin: 36px calc(-1 * var(--edge)) 0;
    max-width: none;
    position: relative;
  }
  .river-vis svg { width: 100%; height: auto; display: block; }
  .river-vis .past   { stroke: var(--ink-dim); }
  .river-vis .future { stroke: var(--sage); }
  .river-vis .node-done   { fill: var(--ink-dim); opacity: 0.5; }
  .river-vis .node-now    {
    fill: var(--sage);
    transform-origin: center;
    transform-box: fill-box;
    animation: nodePulse 2.4s ease-in-out infinite;
  }
  .river-vis .node-soon  { fill: none; stroke: var(--sage); stroke-width: 1.5; }
  .river-vis .node-later { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; }
  .river-vis .axis  {
    fill: var(--ink-faint);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
  }
  .river-vis .label {
    fill: var(--ink-dim);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .river-vis .label-now {
    fill: var(--sage);
    font-weight: 700;
  }
  .river-vis .now-label {
    fill: var(--bg);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
  }
  .river-vis .now-pill { fill: var(--sage); }
  .river-vis .guide    { stroke: var(--hair); stroke-dasharray: 2 5; }

  /* Scroll-drawn path (modern browsers only) */
  @supports (animation-timeline: view()) {
    .river-vis .future {
      stroke-dasharray: 800;
      stroke-dashoffset: 800;
      animation: drawPath linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 50%;
    }
    .river-vis .now-pill,
    .river-vis .now-label,
    .river-vis .node-now,
    .river-vis .label-now,
    .river-vis .now-guide,
    .river-vis .node-soon,
    .river-vis .node-later {
      opacity: 0;
      animation: fadeIn linear both;
      animation-timeline: view();
      animation-range: entry 30% cover 60%;
    }
  }

  /* ─── AI quote ─ */
  .ai-quote {
    margin-top: 32px;
    padding: 0 0 0 22px;
    border-left: 2px solid var(--sage);
  }
  .ai-quote .prose { max-width: 42ch; margin-top: 0; }
  .ai-quote .prose + .prose {
    margin-top: 14px;
    font-size: 15px;
    color: var(--ink-faint);
  }
  .ai-disclaim {
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
  }

  /* ─── Family dots ─ */
  .family-row {
    display: flex;
    gap: 28px;
    margin-top: 40px;
    flex-wrap: wrap;
    container-type: inline-size;
  }
  .person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 70px;
  }
  .person .dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    animation: orbBreath 4.5s ease-in-out infinite;
    position: relative;
  }
  .person .dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0.25;
    animation: ring 4.5s ease-in-out infinite;
  }
  .person.you   .dot { background: var(--sage);  color: var(--sage);  box-shadow: 0 0 20px color-mix(in oklch, var(--sage) 40%, transparent); }
  .person.mom   .dot { background: var(--amber); color: var(--amber); box-shadow: 0 0 20px color-mix(in oklch, var(--amber) 40%, transparent); animation-delay: -1.1s; }
  .person.dad   .dot { background: var(--rose);  color: var(--rose);  box-shadow: 0 0 20px color-mix(in oklch, var(--rose) 40%, transparent); animation-delay: -2.2s; }
  .person.child .dot { background: var(--plum);  color: var(--plum);  box-shadow: 0 0 20px color-mix(in oklch, var(--plum) 40%, transparent); animation-delay: -3.3s; }
  .person .name {
    font-family: var(--serif);
    font-style: italic;
    font-size: 15px;
    color: var(--ink);
    font-variation-settings: 'opsz' 18;
  }
  .person .role {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 2px;
  }

  /* ─── Calm comparison ─ */
  .compare {
    margin-top: 36px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    container-type: inline-size;
  }
  @container (min-width: 580px) {
    .compare { grid-template-columns: 1fr 1fr; gap: 28px; }
  }
  .compare > div {
    padding: 22px 24px;
    border: 1px solid var(--hair);
    border-radius: 18px;
    background: color-mix(in oklch, var(--bg) 50%, transparent);
    transition: border-color var(--dur-base) var(--ease-std),
                background var(--dur-base) var(--ease-std);
  }
  .compare > div:hover { border-color: var(--hair-strong); }
  .compare .label-mute {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 10px;
  }
  .compare .label-good {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .compare .label-good::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--sage);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--sage);
    animation: breath 3s ease-in-out infinite;
  }
  .compare .alarm {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink-faint);
    text-decoration: line-through;
    text-decoration-color: var(--ink-faint);
  }
  .compare .calm {
    font-family: var(--serif);
    font-style: italic;
    font-variation-settings: 'opsz' 20;
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
  }
  .compare .calm em {
    font-style: italic;
    color: var(--sage);
    font-weight: 400;
  }

  /* ─── Promise list ─ */
  .promises {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
  }
  .promises li {
    padding: 18px 0;
    border-top: 1px solid var(--hair);
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 14px;
    align-items: start;
    transition: background var(--dur-base) var(--ease-std);
  }
  .promises li:last-child { border-bottom: 1px solid var(--hair); }
  .promises li:hover {
    background: color-mix(in oklch, var(--sage) 4%, transparent);
  }
  .promises .tick {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: var(--sage);
    flex-shrink: 0;
  }
  .promises .text {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 20;
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
  }
  .promises .text em { font-style: italic; color: var(--sage); }
  .promises .text strong { font-weight: 400; color: var(--warn); }

  /* ─── CTA ─ */
  .cta-row {
    margin-top: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .cta {
    --mx: 0;
    --my: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-deep) 100%);
    color: var(--bg);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-decoration: none;
    box-shadow:
      0 14px 34px -16px color-mix(in oklch, var(--sage) 90%, transparent),
      inset 0 1px 0 0 color-mix(in oklch, white 20%, transparent);
    transition:
      transform var(--dur-base) var(--ease-decel),
      box-shadow var(--dur-base) var(--ease-decel),
      translate var(--dur-base) var(--ease-decel);
    will-change: transform;
    position: relative;
  }
  .cta:hover {
    transform: translateY(-1px);
    box-shadow:
      0 18px 44px -16px color-mix(in oklch, var(--sage) 90%, transparent),
      inset 0 1px 0 0 color-mix(in oklch, white 25%, transparent);
    opacity: 1;
    translate: calc(var(--mx, 0) * 4px) calc(var(--my, 0) * 4px);
  }
  .cta-meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }

  /* ─── Section reveal (JS-driven, graceful fallback shows immediately) ─ */
  .reveal {
    opacity: 1;
    transform: none;
  }
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity var(--dur-page) var(--ease-decel),
      transform var(--dur-page) var(--ease-decel);
  }
  .js .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }
  .js .reveal[data-delay="1"] { transition-delay: 80ms; }
  .js .reveal[data-delay="2"] { transition-delay: 160ms; }
  .js .reveal[data-delay="3"] { transition-delay: 240ms; }
  .js .reveal[data-delay="4"] { transition-delay: 320ms; }

  /* @starting-style for first paint of hero (modern only) */
  .hero .greet,
  .hero .lede,
  .hero .eyebrow,
  .hero .orb-wrap {
    @starting-style {
      opacity: 0;
      transform: translateY(16px);
    }
    transition:
      opacity 1100ms var(--ease-decel),
      transform 1100ms var(--ease-decel);
  }
  .hero .lede     { transition-delay: 200ms; }
  .hero .greet    { transition-delay: 100ms; }
  .hero .orb-wrap { transition-delay: 0ms; }
  .hero .scroll-cue {
    @starting-style { opacity: 0; }
    transition: opacity 1400ms var(--ease-decel);
    transition-delay: 800ms;
  }

  /* ─── Footer ─ */
  footer {
    margin-top: 40px;
    padding: 44px var(--edge) 56px;
    border-top: 1px solid var(--hair);
    text-align: center;
  }
  footer .row {
    display: inline-flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }
  footer .row a {
    color: var(--ink-dim);
    text-decoration: none;
  }
  footer .row a:hover { color: var(--sage); opacity: 1; }
  footer .row .current { color: var(--ink); }
  footer .copy {
    margin-top: 22px;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--ink-faint);
  }
  footer .copy em {
    font-style: italic;
    color: var(--sage);
    font-family: var(--serif);
    font-variation-settings: 'opsz' 14;
  }
}

/* ════════════════════════════════════════════════ @layer motion ─ */
@layer motion {
  @keyframes breath {
    0%, 100% { transform: scale(1);    opacity: 0.85; }
    50%      { transform: scale(1.35); opacity: 1;    }
  }
  @keyframes orbBreath {
    0%, 100% { transform: scale(1);    }
    50%      { transform: scale(1.06); }
  }
  @keyframes glowBreath {
    0%, 100% { transform: scale(1);    opacity: 0.55; }
    50%      { transform: scale(1.10); opacity: 0.75; }
  }
  @keyframes ring {
    0%, 100% { transform: scale(1);    opacity: 0.60; }
    50%      { transform: scale(1.12); opacity: 0.25; }
  }
  @keyframes nodePulse {
    0%, 100% { transform: scale(1);    opacity: 0.90; }
    50%      { transform: scale(1.35); opacity: 1;    }
  }
  @keyframes float {
    0%, 100% { transform: translate(0, 0);       opacity: 0.25; }
    50%      { transform: translate(8px, -12px); opacity: 0.85; }
  }
  @keyframes twinkle {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 0.85; }
  }
  @keyframes pulldown {
    0%       { transform: scaleY(0); transform-origin: top;    opacity: 0.6; }
    50%      { transform: scaleY(1); transform-origin: top;    opacity: 1;   }
    51%      { transform: scaleY(1); transform-origin: bottom; }
    100%     { transform: scaleY(0); transform-origin: bottom; opacity: 0.6; }
  }
  @keyframes drawPath { to { stroke-dashoffset: 0; } }
  @keyframes fadeIn   { to { opacity: 1; } }

  /* Scroll progress bar (pure CSS scroll-driven) */
  @supports (animation-timeline: scroll()) {
    .nav .progress {
      animation: scrollProgress linear both;
      animation-timeline: scroll(root);
    }
  }
  @keyframes scrollProgress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }

  /* View Transitions */
  @view-transition { navigation: auto; }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 380ms;
    animation-timing-function: var(--ease-decel);
  }
  ::view-transition-old(root) {
    animation-name: vt-fade-out;
  }
  ::view-transition-new(root) {
    animation-name: vt-fade-in;
  }
  @keyframes vt-fade-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-fade-in  { from { opacity: 0; transform: translateY(6px); } }
}

/* ═════════════════════════════════════════════ @layer utilities ─ */
@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
  }
  .mt-7  { margin-top: 28px; }
  .center { text-align: center; }
}

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

/* ════════════════════════════════════════════════════════════════════
   LEGAL DOCS (privacy.html, terms.html) — bilingual long-form
   ════════════════════════════════════════════════════════════════════ */
@layer components {
  .legal {
    max-width: 720px;
    margin-inline: auto;
    padding: 132px var(--edge) 80px;
  }
  .legal .doc-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }
  .legal .doc-eyebrow::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--sage);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sage);
    animation: breath 3s ease-in-out infinite;
  }
  .legal h1 {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 96;
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.026em;
    color: var(--ink);
    margin-bottom: 24px;
    text-wrap: balance;
  }
  .legal h1 em {
    font-style: italic;
    color: var(--sage);
    font-variation-settings: 'opsz' 56;
  }
  .legal h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: 'opsz' 36;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.018em;
    color: var(--ink);
    margin: 56px 0 16px;
    padding-top: 32px;
    border-top: 1px solid var(--hair);
  }
  .legal h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: 'opsz' 24;
    font-size: 1.15rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 28px 0 10px;
  }
  .legal h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sage);
    margin: 24px 0 8px;
  }
  .legal p {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-dim);
    margin: 14px 0;
    text-wrap: pretty;
  }
  .legal p strong { font-weight: 600; color: var(--ink); }
  .legal a { color: var(--sage); text-underline-offset: 3px; }
  .legal ul, .legal ol {
    margin: 14px 0 14px 0;
    padding-left: 22px;
  }
  .legal ul li,
  .legal ol li {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-dim);
    margin: 6px 0;
    list-style: revert;
  }
  .legal hr {
    border: none;
    border-top: 1px solid var(--hair);
    margin: 48px 0;
  }
  .legal blockquote {
    margin: 22px 0;
    padding: 4px 22px;
    border-left: 2px solid var(--sage);
    color: var(--ink-dim);
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.65;
    font-variation-settings: 'opsz' 20;
  }
  .legal blockquote strong { font-style: normal; color: var(--ink); font-weight: 400; }
  .legal table {
    border-collapse: collapse;
    width: 100%;
    margin: 22px 0;
    font-size: 14px;
    font-family: var(--sans);
  }
  .legal th, .legal td {
    border-bottom: 1px solid var(--hair);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    color: var(--ink-dim);
  }
  .legal th {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--sage);
    font-weight: 500;
    border-bottom-color: var(--hair-strong);
  }
  .legal .ph {
    color: var(--warn);
    background: color-mix(in oklch, var(--warn) 12%, transparent);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 12px;
    white-space: nowrap;
  }
  .legal .banner {
    margin: 0 0 36px;
    padding: 16px 20px;
    background: color-mix(in oklch, var(--warn) 10%, transparent);
    border: 1px solid color-mix(in oklch, var(--warn) 25%, transparent);
    border-left-width: 3px;
    border-radius: 12px;
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-dim);
  }
  .legal .banner strong { color: var(--warn); font-weight: 500; }
  .legal .section-divider {
    margin: 72px 0 32px;
    text-align: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--sage);
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .legal .section-divider::before,
  .legal .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hair);
  }
}

/* ════════════════════════════════════════════════════════════════════
   RICHNESS LAYER — Phone mockup, live elements, interactivity
   ════════════════════════════════════════════════════════════════════ */

@property --reveal { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --tw-i   { syntax: '<integer>';    inherits: false; initial-value: 0; }

@layer components {

  /* ═══ Showcase section (split: phone + text) ═══ */
  .showcase {
    max-width: 1100px;
    margin-inline: auto;
    padding: 96px var(--edge);
    container-type: inline-size;
  }
  .showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: center;
  }
  @container (min-width: 760px) {
    .showcase-grid {
      grid-template-columns: minmax(280px, 1fr) minmax(0, 1.1fr);
      gap: 72px;
    }
    .showcase-grid.reverse {
      grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr);
    }
    .showcase-grid.reverse .showcase-phone-wrap { order: 2; }
  }
  .showcase-phone-wrap {
    display: flex;
    justify-content: center;
    perspective: 1400px;
  }
  .showcase-text { max-width: 460px; }
  .showcase-text .h2 { max-width: 16ch; }
  .showcase-text .prose { max-width: 38ch; }

  /* ═══ Phone mockup ═══ */
  .phone {
    --phone-w: 304px;
    width: var(--phone-w);
    aspect-ratio: 9 / 19.5;
    position: relative;
    border-radius: 42px;
    padding: 9px;
    background:
      linear-gradient(180deg, #1c1c1f 0%, #08080a 100%);
    box-shadow:
      0 80px 120px -40px rgba(0, 0, 0, 0.45),
      0 30px 60px -30px rgba(0, 0, 0, 0.25),
      inset 0 0 0 1.5px rgba(255, 255, 255, 0.06),
      inset 0 1px 0 0 rgba(255, 255, 255, 0.14);
    isolation: isolate;
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform 800ms var(--ease-decel);
    will-change: transform;
  }
  .phone:hover { transform: rotateY(0deg) rotateX(0deg) translateY(-4px); }
  .phone::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 38px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 30%, transparent 70%, rgba(255,255,255,0.03) 100%);
    pointer-events: none;
    z-index: 50;
  }
  .phone .screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 34px;
    overflow: hidden;
    background: #0E1512;
    color: #EFE9DC;
    isolation: isolate;
  }
  .phone .notch {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 86px;
    height: 22px;
    background: #000;
    border-radius: 16px;
    z-index: 30;
  }
  .phone .status {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 20;
    padding: 13px 22px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #EFE9DC;
    letter-spacing: -0.02em;
  }
  .phone .status .right { display: inline-flex; gap: 5px; align-items: center; }
  .phone .status svg { width: 12px; height: 12px; }
  .phone .home-bar {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    border-radius: 4px;
    background: rgba(239, 233, 220, 0.75);
    z-index: 30;
  }

  /* Inside phone: living background */
  .phone .p-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
      radial-gradient(ellipse 400px 300px at 30% 22%, rgba(141,215,179,0.18) 0%, transparent 60%),
      radial-gradient(ellipse 350px 250px at 75% 80%, rgba(216,148,64,0.12) 0%, transparent 60%),
      #0E1512;
  }
  .phone .p-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
  }
  .phone .p-star {
    position: absolute;
    width: 1.5px; height: 1.5px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255,255,255,0.7);
    animation: twinkle 5s ease-in-out infinite;
  }
  .phone .p-star:nth-child(1) { top: 22%; left: 18%; animation-delay: 0s; }
  .phone .p-star:nth-child(2) { top: 14%; left: 64%; animation-delay: 1.3s; }
  .phone .p-star:nth-child(3) { top: 38%; left: 88%; animation-delay: 2.6s; }
  .phone .p-star:nth-child(4) { top: 72%; left: 12%; animation-delay: 1.8s; }
  .phone .p-star:nth-child(5) { top: 66%; left: 78%; animation-delay: 0.6s; }

  .phone .content {
    position: relative;
    z-index: 10;
    padding: 42px 18px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    overflow: hidden;
  }
  .phone .p-eyebrow {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(239,233,220, 0.72);
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .phone .p-eyebrow::before {
    content: '';
    width: 5px; height: 5px;
    background: #8DD7B3;
    border-radius: 50%;
    box-shadow: 0 0 6px #8DD7B3;
    animation: breath 3s ease-in-out infinite;
  }
  .phone .p-greet {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 96;
    font-size: 24px;
    line-height: 1.04;
    letter-spacing: -0.030em;
    color: #EFE9DC;
  }
  .phone .p-greet em {
    font-style: italic;
    font-variation-settings: 'opsz' 56;
    color: #8DD7B3;
  }
  .phone .p-sub {
    font-family: var(--sans);
    font-size: 10px;
    line-height: 1.5;
    color: rgba(239,233,220, 0.72);
  }
  .phone .p-sub b { color: #EFE9DC; font-weight: 500; }

  /* Orb card inside phone */
  .phone .p-orb-card {
    padding: 11px 12px 10px;
    background:
      radial-gradient(ellipse at 82% 18%, rgba(141,215,179,0.18) 0%, transparent 60%),
      rgba(239, 233, 220, 0.04);
    border: 1px solid rgba(239, 233, 220, 0.10);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 1fr 40px;
    gap: 10px;
    align-items: center;
  }
  .phone .p-orb-l { min-width: 0; }
  .phone .p-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8DD7B3;
    margin-bottom: 6px;
  }
  .phone .p-pill .clock {
    font-variant-numeric: tabular-nums;
    color: #EFE9DC;
    padding: 1.5px 5px;
    border: 1px solid rgba(141, 215, 179, 0.25);
    border-radius: 4px;
    letter-spacing: 0.06em;
  }
  .phone .p-orb-text {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 32;
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: -0.012em;
    color: #EFE9DC;
  }
  .phone .p-orb-text em {
    font-style: italic;
    color: #8DD7B3;
    font-variation-settings: 'opsz' 24;
  }
  .phone .p-mini-orb {
    width: 40px; height: 40px;
    position: relative;
  }
  .phone .p-mini-orb svg { width: 100%; height: 100%; overflow: visible; }
  .phone .p-mini-orb .core { transform-origin: center; animation: orbBreath 4.5s ease-in-out infinite; }
  .phone .p-mini-orb .ring { transform-origin: center; animation: ring 4.5s ease-in-out infinite; }
  .phone .p-next {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(239, 233, 220, 0.08);
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 9px;
    align-items: center;
  }
  .phone .p-next .next-time {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    color: #EFE9DC;
  }
  .phone .p-next .next-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #E8B872;
    box-shadow: 0 0 6px rgba(232, 184, 114, 0.7);
  }
  .phone .p-next .next-name {
    font-family: var(--sans);
    font-size: 10.5px;
    color: #EFE9DC;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .phone .p-next .next-name span {
    font-family: var(--serif);
    font-style: italic;
    color: rgba(239,233,220, 0.65);
    font-weight: 300;
    font-size: 10px;
    margin-left: 4px;
  }
  .phone .p-next .next-arr {
    color: #8DD7B3;
    font-size: 12px;
  }

  /* Mini river inside phone */
  .phone .p-river {
    margin: 6px -18px 0;
    position: relative;
  }
  .phone .p-river svg { width: 100%; height: auto; display: block; }
  .phone .p-river .past   { stroke: rgba(239,233,220, 0.4); }
  .phone .p-river .future { stroke: #8DD7B3; }
  .phone .p-river .nd     { fill: rgba(239,233,220, 0.5); }
  .phone .p-river .nn     {
    fill: #8DD7B3;
    transform-origin: center;
    transform-box: fill-box;
    animation: nodePulse 2.4s ease-in-out infinite;
  }
  .phone .p-river .ns     { fill: none; stroke: #8DD7B3; stroke-width: 1.2; }
  .phone .p-river .nl     { fill: none; stroke: rgba(239,233,220, 0.4); stroke-width: 1.2; }
  .phone .p-river .ax     { fill: rgba(239,233,220, 0.4); font-family: var(--mono); font-size: 7px; letter-spacing: 0.12em; }
  .phone .p-river .now-r  { fill: #8DD7B3; }
  .phone .p-river .now-t  { fill: #0E1512; font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: 0.16em; }
  .phone .p-river .p-river-now {
    fill: #8DD7B3;
    font-family: var(--mono);
    font-size: 7px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  /* Tab bar at bottom of phone */
  .phone .p-tabbar {
    position: absolute;
    left: 14px; right: 14px;
    bottom: 18px;
    z-index: 20;
    height: 46px;
    padding: 0 12px;
    border-radius: 100px;
    background: rgba(14, 21, 18, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(239, 233, 220, 0.10);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
  }
  .phone .p-tabbar svg {
    width: 17px; height: 17px;
    color: rgba(239, 233, 220, 0.42);
  }
  .phone .p-tabbar .active { color: #8DD7B3; }
  .phone .p-tabbar .scan-fab {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8DD7B3 0%, #3D7A63 100%);
    display: flex; align-items: center; justify-content: center;
    color: #0E1512;
    box-shadow: 0 6px 18px -4px rgba(141, 215, 179, 0.55);
  }
  .phone .p-tabbar .scan-fab svg { width: 18px; height: 18px; color: inherit; }

  /* ═══ Typewriter (word-by-word reveal) ═══ */
  .typewriter { display: block; }
  .typewriter .tw-w {
    display: inline-block;
    opacity: 1;
  }
  .js .typewriter .tw-w {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(2px);
    transition:
      opacity 380ms var(--ease-decel),
      transform 380ms var(--ease-decel),
      filter 380ms var(--ease-decel);
    transition-delay: calc(var(--tw-i, 0) * 55ms);
  }
  .js .typewriter.start .tw-w {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  .typewriter .tw-cursor {
    display: inline-block;
    width: 1.5px;
    height: 1em;
    background: var(--sage);
    margin-left: 4px;
    vertical-align: -0.18em;
    opacity: 0;
  }
  .js .typewriter.start .tw-cursor {
    opacity: 1;
    animation: blink 1.05s steps(2, end) infinite;
    animation-delay: 1.4s;
  }

  /* ═══ Animated counter ═══ */
  .counter {
    display: inline-flex;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
  }
  .counter-num {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 144;
    font-size: clamp(3rem, 8vw, 5.4rem);
    line-height: 1;
    letter-spacing: -0.034em;
    color: var(--ink);
  }
  .counter-suf {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 72;
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    color: var(--ink-faint);
    margin-left: 2px;
  }

  /* ═══ Family dot ripple ═══ */
  .person {
    position: relative;
    cursor: default;
  }
  .person .dot {
    transition: transform 320ms var(--ease-decel);
    position: relative;
  }
  .person:hover .dot { transform: scale(1.12); }
  .person .ripple {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0;
    pointer-events: none;
  }
  .person.you   .ripple { color: var(--sage); }
  .person.mom   .ripple { color: var(--amber); }
  .person.dad   .ripple { color: var(--rose); }
  .person.child .ripple { color: var(--plum); }
  .person:hover .ripple { animation: ripple 900ms var(--ease-decel) infinite; }

  /* ═══ Stats strip section ═══ */
  .stats {
    max-width: var(--max-wide);
    margin-inline: auto;
    padding: 96px var(--edge) 80px;
    text-align: center;
  }
  .stats .eyebrow { justify-content: center; margin-bottom: 32px; }
  .stats .h2 {
    text-align: center;
    margin-inline: auto;
    margin-bottom: 56px;
  }
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 24px;
    container-type: inline-size;
  }
  @container (min-width: 620px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
  }
  @media (min-width: 760px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
  }
  .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .stat .num {
    font-family: var(--serif);
    font-weight: 300;
    font-variation-settings: 'opsz' 96;
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.030em;
    color: var(--sage);
    font-variant-numeric: tabular-nums;
  }
  .stat .num em {
    font-style: italic;
    font-variation-settings: 'opsz' 56;
    color: var(--sage);
  }
  .stat .label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ink-faint);
    max-width: 14ch;
  }

  /* ═══ AI-quote upgrade with adherence chip ═══ */
  .adherence-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 12px;
    background: var(--sage-soft);
    border: 1px solid color-mix(in oklch, var(--sage) 22%, transparent);
    border-radius: 100px;
    margin-left: 12px;
  }
  .adherence-chip .num {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: 'opsz' 24;
    font-size: 14px;
    color: var(--sage);
    font-variant-numeric: tabular-nums;
  }
  .adherence-chip .label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--ink-dim);
  }
}

@layer motion {
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
  }
  @keyframes ripple {
    0%   { transform: translateX(-50%) scale(0.8); opacity: 0.7; }
    100% { transform: translateX(-50%) scale(2.4); opacity: 0;   }
  }
}

@layer utilities {
  .mt-9 { margin-top: 44px; }
}

/* ════════════════════════════════════════════════════════════════════
   RIVER UPGRADE — interactive, animated, instrumented
   ════════════════════════════════════════════════════════════════════ */
@layer components {
  .river-vis {
    position: relative;
    touch-action: none;
  }
  .river-vis svg {
    cursor: crosshair;
    overflow: visible;
  }

  /* River strokes — thicker, glowing future */
  .river-vis .past {
    stroke: var(--ink-dim);
    opacity: 0.45;
  }
  .river-vis .future {
    stroke: var(--sage);
    filter: drop-shadow(0 0 6px color-mix(in oklch, var(--sage) 50%, transparent));
  }

  /* NOW halo (breathing glow ring around NOW node) */
  .river-vis .now-halo {
    fill: var(--sage);
    opacity: 0.18;
    transform-origin: center;
    transform-box: fill-box;
    animation: nowHalo 2.4s ease-in-out infinite;
  }

  /* Interactive dose nodes */
  .river-vis .dose {
    cursor: pointer;
  }
  .river-vis .dose .hit {
    fill: transparent;
    pointer-events: all;
  }
  .river-vis .dose .label {
    transition: opacity 220ms var(--ease-std);
  }
  .river-vis .dose:hover circle:not(.hit) {
    filter: drop-shadow(0 0 6px color-mix(in oklch, var(--sage) 70%, transparent));
  }
  .river-vis .dose.is-active circle:not(.hit) {
    transform: scale(1.25);
    transform-origin: center;
    transform-box: fill-box;
    transition: transform 220ms var(--ease-decel);
  }

  /* Person dot accent on nodes */
  .river-vis .person-bar {
    pointer-events: none;
  }
  .river-vis .person-bar.you   { fill: var(--sage); }
  .river-vis .person-bar.mom   { fill: var(--amber); }
  .river-vis .person-bar.dad   { fill: var(--rose); }
  .river-vis .person-bar.child { fill: var(--plum); }

  /* Drifting particles inside the future river — pure CSS offset-path */
  .river-vis .particles {
    pointer-events: none;
  }
  .river-vis .particle {
    fill: var(--sage);
    opacity: 0.6;
    offset-rotate: 0deg;
    animation: drift 11s linear infinite;
  }
  .river-vis .particle.amber { fill: var(--amber); }
  .river-vis .particle.rose  { fill: var(--rose); }
  .river-vis .particle.plum  { fill: var(--plum); }
  .river-vis .particle:nth-child(1) { animation-delay: 0s;    animation-duration: 11s; }
  .river-vis .particle:nth-child(2) { animation-delay: -1.8s; animation-duration: 12s; }
  .river-vis .particle:nth-child(3) { animation-delay: -3.6s; animation-duration: 10s; }
  .river-vis .particle:nth-child(4) { animation-delay: -5.4s; animation-duration: 13s; }
  .river-vis .particle:nth-child(5) { animation-delay: -7.2s; animation-duration: 11s; }
  .river-vis .particle:nth-child(6) { animation-delay: -9.0s; animation-duration: 12s; }

  /* Cursor time scrubber */
  .river-vis .cursor-time {
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms var(--ease-std);
  }
  .river-vis.has-cursor .cursor-time { opacity: 1; }
  .river-vis .cursor-line {
    stroke: var(--ink-dim);
    stroke-width: 1;
    stroke-dasharray: 2 3;
    opacity: 0.5;
  }
  .river-vis .cursor-label {
    fill: var(--ink);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
  }
  .river-vis .cursor-bg {
    fill: var(--bg);
    stroke: var(--hair-strong);
    stroke-width: 1;
  }

  /* Tooltip card (HTML positioned over SVG) */
  .river-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--bg);
    border: 1px solid var(--hair-strong);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow:
      0 18px 40px -16px color-mix(in oklch, var(--ink) 55%, transparent),
      0 6px 14px -8px color-mix(in oklch, var(--ink) 35%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: color-mix(in oklch, var(--bg) 85%, transparent);
    opacity: 0;
    transform: translate(-50%, calc(-100% - 14px)) translateY(6px);
    transition:
      opacity 220ms var(--ease-decel),
      transform 220ms var(--ease-decel);
    z-index: 30;
    min-width: 140px;
    max-width: 220px;
  }
  .river-tooltip.show {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 14px)) translateY(0);
  }
  .river-tooltip .tt-time {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .river-tooltip .tt-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
  }
  .river-tooltip .tt-dot.you   { background: var(--sage);  color: var(--sage); }
  .river-tooltip .tt-dot.mom   { background: var(--amber); color: var(--amber); }
  .river-tooltip .tt-dot.dad   { background: var(--rose);  color: var(--rose); }
  .river-tooltip .tt-dot.child { background: var(--plum);  color: var(--plum); }
  .river-tooltip .tt-med {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: 'opsz' 24;
    font-size: 16px;
    color: var(--ink);
    line-height: 1.2;
  }
  .river-tooltip .tt-med em {
    font-style: italic;
    color: var(--sage);
    font-variation-settings: 'opsz' 18;
  }
  .river-tooltip .tt-meta {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 6px;
  }
  .river-tooltip::after {
    content: '';
    position: absolute;
    left: 50%; bottom: -6px;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: inherit;
    border-right: 1px solid var(--hair-strong);
    border-bottom: 1px solid var(--hair-strong);
  }
}

@layer motion {
  @keyframes nowHalo {
    0%, 100% { transform: scale(1);   opacity: 0.18; }
    50%      { transform: scale(1.55); opacity: 0.42; }
  }
  @keyframes drift {
    from { offset-distance: 0%;   opacity: 0; }
    8%   { opacity: 0.85; }
    92%  { opacity: 0.85; }
    to   { offset-distance: 100%; opacity: 0; }
  }
}


