/* ============================================================================
   KOLORZ — Color your emotions.
   Editorial · paper-white · scroll-driven atmosphere · liquid-glass pill nav
   Type: Jost (display, labels) · Fraunces (italic display, magazine accents)
         DM Sans (body, captions)
   ========================================================================== */

:root {
  /* Paper & ink */
  --paper:        #FAF8F4;
  --paper-warm:   #F5F0E8;
  --paper-edge:   #EFE9DF;
  --ink:          #1A1820;
  --ink-soft:     #3E3A47;
  --ink-mute:     #7A7484;
  --ink-faint:    #B8B2BF;
  --rule:         rgba(26, 24, 32, 0.10);
  --rule-soft:    rgba(26, 24, 32, 0.06);

  /* Emotion palette */
  --c-clarity:     #E8DCC4;
  --c-radiance:    #F4B95A;
  --c-passion:     #E0425F;
  --c-warmth:      #F08A4B;
  --c-melancholy:  #5B7BA8;
  --c-serenity:    #7FB8B8;
  --c-flow:        #4FA890;
  --c-nostalgia:   #A084B8;
  --c-mystique:    #6B4E8E;

  /* Day moments */
  --c-morning:    #F2C9A1;
  --c-afternoon:  #F4B95A;
  --c-evening:    #C76B7F;
  --c-night:      #3D3A6B;

  /* Type */
  --font-display: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --max:         1180px;
  --max-narrow:   860px;

  /* Scroll-driven variables, default 0 */
  --scroll: 0;
  --hero-progress: 0;
  --moments-progress: 0;
}

/* ────────────  Reset  ──────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
em { font-style: italic; }
::selection { background: rgba(160, 132, 184, 0.28); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--c-mystique);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================================
   ATMOSPHERE — fixed background that drifts and tints with scroll.
   Six color washes positioned vertically; their opacity peaks at different
   scroll depths so the page feels like it changes mood as you read.
   ========================================================================== */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, #FFFAEF 0%, transparent 60%),
    var(--paper);
}
.wash {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0;
  mix-blend-mode: multiply;
  will-change: transform, opacity;
  transition: opacity 600ms linear;
}

/* Each wash gets a target opacity computed from --scroll, peaking at a
   specific depth via |scroll - peak| distance. Implemented with custom props
   and the abs() fallback via clamp() math. */

.wash--peach {
  /* peak at 0.05 */
  background: radial-gradient(circle, #FBD9B0 0%, transparent 60%);
  top: -20%; left: -10%;
  opacity: clamp(0, calc(0.55 - 6 * (var(--scroll) - 0.05) * (var(--scroll) - 0.05)), 0.55);
  transform: translate3d(calc(var(--scroll) *  4vw), calc(var(--scroll) *  6vh), 0);
}
.wash--rose {
  /* peak at 0.22 */
  background: radial-gradient(circle, #F6C8D0 0%, transparent 60%);
  top: -10%; right: -15%;
  opacity: clamp(0, calc(0.50 - 6 * (var(--scroll) - 0.22) * (var(--scroll) - 0.22)), 0.50);
  transform: translate3d(calc(var(--scroll) * -6vw), calc(var(--scroll) *  4vh), 0);
}
.wash--lilac {
  /* peak at 0.40 */
  background: radial-gradient(circle, #DCC8E8 0%, transparent 60%);
  top: 10%; left: 30%;
  opacity: clamp(0, calc(0.55 - 6 * (var(--scroll) - 0.40) * (var(--scroll) - 0.40)), 0.55);
  transform: translate3d(calc(var(--scroll) *  3vw), calc(var(--scroll) * -8vh), 0);
}
.wash--mint {
  /* peak at 0.58 */
  background: radial-gradient(circle, #C7E6D6 0%, transparent 60%);
  bottom: -15%; left: -10%;
  opacity: clamp(0, calc(0.55 - 6 * (var(--scroll) - 0.58) * (var(--scroll) - 0.58)), 0.55);
  transform: translate3d(calc(var(--scroll) *  6vw), calc(var(--scroll) * -4vh), 0);
}
.wash--blue {
  /* peak at 0.75 */
  background: radial-gradient(circle, #C8D6EC 0%, transparent 60%);
  bottom: -25%; right: -10%;
  opacity: clamp(0, calc(0.55 - 6 * (var(--scroll) - 0.75) * (var(--scroll) - 0.75)), 0.55);
  transform: translate3d(calc(var(--scroll) * -4vw), calc(var(--scroll) * -6vh), 0);
}
.wash--gold {
  /* peak at 0.95 */
  background: radial-gradient(circle, #F8E4B8 0%, transparent 60%);
  bottom: -20%; right: 15%;
  opacity: clamp(0, calc(0.55 - 6 * (var(--scroll) - 0.95) * (var(--scroll) - 0.95)), 0.55);
  transform: translate3d(calc(var(--scroll) *  2vw), calc(var(--scroll) * -3vh), 0);
}

/* Subtle paper grain on top of the washes */
.paper {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: 0.7;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ============================================================================
   LIQUID-GLASS PILL NAV — centered, floating, always on top
   ========================================================================== */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  width: 504px;
  padding: 0 6px 0 22px;
  border-radius: 999px;

  /* Liquid glass */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.28));
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(26,24,32,0.04) inset,
    0 10px 28px 0 rgba(26,24,32,0.10),
    0 4px 10px 0 rgba(26,24,32,0.05);

  max-width: calc(100vw - 24px);
}
.nav__links { flex: 1; justify-content: center; }
.nav__cta { margin-left: auto; }
.nav::before {
  /* highlight band — the "liquid" shine */
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 38%);
  pointer-events: none;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.nav__brand img { display: block; height: 22px; width: auto; }
.foot__brand img { display: block; height: 28px; width: auto; margin-bottom: 4px; }
.brand-mark {
  display: inline-flex;
  gap: 3px;
}
.brand-mark__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: block;
}
.brand-mark__dot--1 { background: var(--c-radiance);  box-shadow: 0 0 8px rgba(244,185,90,0.55); }
.brand-mark__dot--2 { background: var(--c-passion);   box-shadow: 0 0 8px rgba(224,66,95,0.50); }
.brand-mark__dot--3 { background: var(--c-mystique);  box-shadow: 0 0 8px rgba(107,78,142,0.50); }

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.20em;
  color: var(--ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}
.nav__links a { transition: color 200ms; }
.nav__links a:hover { color: var(--ink); }
.nav__sep { color: var(--ink-faint); user-select: none; }

/* Two circular icon buttons replacing the old "download" CTA */
.nav__downloads {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms var(--ease-out), box-shadow 200ms;
}
.nav__icon img {
  width: 18px;
  height: 18px;
  /* Force monochrome white inside the dark circle for visual consistency */
  filter: brightness(0) invert(1);
}
.nav__icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(26, 24, 32, 0.35);
}

@media (max-width: 720px) {
  /* Pill spans most of the viewport so the header has presence,
     but capped so it doesn't run edge-to-edge on larger phones / tablets. */
  .nav { padding: 5px 5px 5px 14px; gap: 8px; width: min(92vw, 460px); }
  .nav__links { display: none; }
  .nav__downloads { margin-left: auto; }
  .brand-word { font-size: 13px; letter-spacing: 0.18em; }
  .nav__icon { width: 36px; height: 36px; }
  .nav__icon img { width: 16px; height: 16px; }
}

/* ============================================================================
   SHARED EDITORIAL ELEMENTS
   ========================================================================== */

.folio {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 72px;
  font-family: var(--font-display);
}
.folio__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}
.folio__rule {
  flex: 0 0 100px;
  height: 1.5px;
  background: var(--ink);
}
.folio__label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--ink);
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 6.8vw, 96px);
  line-height: 1.05;
  letter-spacing: normal;
  margin: 0 0 24px;
  color: var(--ink);
  text-transform: lowercase;
}
.display span,
.display em {
  display: block;
}
.display em {
  font-style: normal;
  font-weight: 900;
}
/* Two-line headline rule: first line muted at 56%, second solid */
.display__muted { color: rgba(26, 24, 32, 0.56); }
.display__solid { color: var(--ink); font-style: normal; }
.display.center { text-align: center; }

.lede {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 18px;
}
.lede.center { margin-left: auto; margin-right: auto; text-align: center; max-width: 60ch; }
.lede em { font-family: var(--font-serif); font-style: italic; color: var(--ink); }

.lede--drop::first-letter,
.dropcap {
  font-family: var(--font-serif);
  font-weight: 400;
}
.dropcap {
  display: block;
  float: left;
  font-size: 4.6em;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--ink);
}

.pull-quote {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--ink);
  text-align: center;
  margin: 32px auto 0;
  max-width: 28ch;
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.section-head {
  text-align: center;
  max-width: var(--max-narrow);
  margin: 0 auto 64px;
  padding: 0 clamp(20px, 4vw, 48px);
}
/* Keep each display line on a single row inside section heads */
.section-head .display__muted,
.section-head .display__solid {
  white-space: nowrap;
}

/* ============================================================================
   FLOATING VISUALS — scattered emotional images that drift on scroll
   Each .float positions itself absolutely inside its section.
   --depth controls parallax intensity (0 = pinned, 1 = page-height drift)
   --rot is the static rotation
   ========================================================================== */
.mirror, .cards, .moments, .story, .closing { position: relative; overflow: hidden; }

.float {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform:
    translate3d(0, calc(var(--scroll, 0) * -100vh * var(--depth, 0)), 0)
    rotate(var(--rot, 0deg));
  animation: floatBob 9s ease-in-out infinite;
}
@keyframes floatBob {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.05); }
}
.float img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 50px rgba(26,24,32,0.18));
}

/* Black-bg images — drop the black, let the luminous content float on cream */
.float--screen { mix-blend-mode: screen; }
.float--screen img { filter: none; }

/* White-bg images — drop the white, keep the dark content as a multiply tint */
.float--multiply { mix-blend-mode: multiply; }
.float--multiply img { filter: none; opacity: 0.92; }

/* Watermark variant — large, very faint, behind everything */
.float--watermark {
  transform:
    translate3d(-50%, calc(var(--scroll, 0) * -100vh * var(--depth, 0)), 0)
    rotate(var(--rot, 0deg));
}

/* Make sure section content sits above the floats */
.mirror > *:not(.float),
.cards > *:not(.float),
.moments > *:not(.float),
.story > *:not(.float),
.closing > *:not(.float) {
  position: relative;
  z-index: 1;
}

/* Hide certain floats at smaller breakpoints (mobile) so they don't crowd text */
@media (max-width: 980px) { .hide-md { display: none; } }
@media (max-width: 720px) { .hide-sm { display: none; } }


/* ============================================================================
   HERO — scroll-pinned choreography
   The .hero-stage is 200vh tall; .hero-pinned sticks to the viewport while user
   scrolls through it. JS sets --hero-progress (0→1) on :root.
     • progress 0   : title + downloads centered, 6 emotion triangles scattered
                      with rotation around the title
     • progress 1   : title pushed up, triangles converge to a horizontal row
                      below the buttons, rotations zeroed out, scaled smaller
     • progress > 1 : scroll continues normally into Mirror section
   ========================================================================== */
.hero-stage {
  position: relative;
  height: 220vh;     /* extra scroll budget feeds the choreography */
}
.hero-pinned {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  /* Title + lede + downloads block translates up as user scrolls */
  transform: translate3d(0, calc(var(--hero-progress, 0) * -120px), 0);
  z-index: 2;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 7.2vw, 90px);
  line-height: 1.05;
  letter-spacing: normal;
  margin: 0;
  color: var(--ink);
  text-transform: lowercase;
  max-width: none;
  text-wrap: balance;
}
/* Subtle gradient accent on "feel" and "color" so a quick scan reads them as a pair */
.hero__accent {
  font-style: normal;
  font-weight: 900;
  font-family: var(--font-display);
  background: linear-gradient(100deg,
    #F4B95A 0%,
    #E0425F 35%,
    #A084B8 65%,
    #5B7BA8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__lede {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0;
  text-align: center;
}

.hero__downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ─── The 6 floating emotion triangles ────────────────────────────────────
   Each carries inline custom properties via style="":
     --sx, --sy : scattered start position (px offsets from center)
     --ex, --ey : aligned-row end position  (px offsets from center)
     --srot     : start rotation in deg (rotated toward zero as progress → 1)
     --es       : end scale (start scale = 1, end scale = es) */
.h-card {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 1;
  /* lerp formula: start + (end - start) * progress */
  --p: var(--hero-progress, 0);
  --tx: calc((var(--sx, 0) + (var(--ex, 0) - var(--sx, 0)) * var(--p)) * 1px);
  --ty: calc((var(--sy, 0) + (var(--ey, 0) - var(--sy, 0)) * var(--p)) * 1px);
  --sc: calc(1 + (var(--es, 0.6) - 1) * var(--p));
  transform:
    translate(-50%, -50%)
    translate(var(--tx), var(--ty))
    rotate(calc(var(--srot, 0) * (1 - var(--p)) * 1deg))
    scale(var(--sc));
  transform-origin: center;
  will-change: transform;
}
.h-card img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}
.h-card--screen { mix-blend-mode: screen; }
.h-card--multiply { mix-blend-mode: multiply; }
.h-card--multiply img { opacity: 0.92; }

/* ─── Per-card end positions + card width
   The HTML carries only --sx/--sy/--srot inline (scatter starts).
   Everything else (end positions, width, scale) is CSS-driven so it can flex
   across breakpoints. Default = desktop horizontal row of 6 cards.            ─── */
.h-card { width: 200px; --es: 1; }
.h-card--1 { --sx: -560; --sy: -200; --ex: -525; --ey: 280; }
.h-card--2 { --sx: -220; --sy: -280; --ex: -315; --ey: 280; }
.h-card--3 { --sx:  200; --sy: -280; --ex:  105; --ey: 280; }
.h-card--4 { --sx:  560; --sy: -200; --ex:  315; --ey: 280; }
.h-card--5 { --sx: -440; --sy:  280; --ex: -105; --ey: 280; }
.h-card--6 { --sx:  480; --sy:  280; --ex:  525; --ey: 280; }

/* Narrow desktop / laptop — smaller cards, slightly tightened scatter from
   default. Same vertical scatter as desktop (sy untouched here). */
@media (max-width: 1280px) {
  .h-card { width: 150px; }
  .h-card {
    --tx: calc((var(--sx, 0) + (var(--ex, 0) - var(--sx, 0)) * var(--p)) * 0.85px);
    --ty: calc((var(--sy, 0) + (var(--ey, 0) - var(--sy, 0)) * var(--p)) * 0.85px);
  }
}

/* Tablet — true tablet range (≤980). Rewrite scatter positions per-card so
   outer cards don't fly off-screen, top row sits above the title, and bottom
   row clears the download buttons. */
@media (max-width: 980px) {
  .h-card { width: 125px; }
  /* Top row pushed wider — outer cards toward edges, inner cards out from center.
     With 0.6 mult and 125px card: outer effective ±252, inner effective ±90. */
  .h-card--1 { --sx: -420; --sy: -300; }
  .h-card--2 { --sx: -150; --sy: -380; }
  .h-card--3 { --sx:  150; --sy: -380; }
  .h-card--4 { --sx:  420; --sy: -300; }
  .h-card--5 { --sx: -280; --sy:  400; }
  .h-card--6 { --sx:  280; --sy:  400; }
  .h-card {
    --tx: calc((var(--sx, 0) + (var(--ex, 0) - var(--sx, 0)) * var(--p)) * 0.6px);
    --ty: calc((var(--sy, 0) + (var(--ey, 0) - var(--sy, 0)) * var(--p)) * 0.6px);
  }
  .hero__headline { font-size: clamp(44px, 9vw, 64px); }
}

/* Mobile — fully redefined scatter + end-state in mobile coordinates so the
   choreography frames the title on tall narrow screens.
   Scatter (start): 6 cards frame the title (above, sides, below).
   End state: clean 3 col × 2 row grid below the title/buttons. */
@media (max-width: 550px) {
  .hero-stage  { height: 170vh; }
  .hero-pinned { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .hero__inner { transform: translate3d(0, calc(var(--hero-progress, 0) * -80px), 0); }
  .h-card { width: clamp(90px, 28vw, 120px); }

  /* Store badges side-by-side at compact size, save vertical room.
     Height is fluid so they shrink on narrow phones to stay on one line. */
  .hero__downloads { flex-wrap: nowrap; gap: 8px; }
  .store-badge { height: clamp(30px, 8.5vw, 40px); flex-shrink: 1; min-width: 0; }
  .store-badge img { max-width: 100%; }

  /* Smaller H2s on mobile so they don't compete with the hero H1 */
  .display { font-size: clamp(32px, 8vw, 44px); }

  /* Scatter (start) — frames the title block */
  /* End state — 3 col × 2 row grid below buttons (pushed down for clearance) */
  .h-card--1 { --sx: -120; --sy: -240; --ex: -115; --ey: 185; }  /* tl scatter → row1 col1 */
  .h-card--2 { --sx:   60; --sy: -290; --ex:    0; --ey: 185; }  /* top scatter → row1 col2 */
  .h-card--3 { --sx:  140; --sy: -120; --ex:  115; --ey: 185; }  /* right scatter → row1 col3 */
  .h-card--4 { --sx: -140; --sy:   30; --ex: -115; --ey: 295; }  /* left scatter → row2 col1 */
  .h-card--5 { --sx:  -60; --sy:  280; --ex:    0; --ey: 295; }  /* bottom scatter → row2 col2 */
  .h-card--6 { --sx:  140; --sy:  220; --ex:  115; --ey: 295; }  /* br scatter → row2 col3 */

  /* No multiplier — values are already mobile-scale */
  .h-card {
    --tx: calc((var(--sx, 0) + (var(--ex, 0) - var(--sx, 0)) * var(--p)) * 1px);
    --ty: calc((var(--sy, 0) + (var(--ey, 0) - var(--sy, 0)) * var(--p)) * 1px);
  }
}

/* ============================================================================
   STORE BADGES — official Apple + Google SVGs, balanced visual weight
   ========================================================================== */
.store-badge {
  display: inline-block;
  height: 56px;
  transition: transform 220ms var(--ease-out), filter 220ms;
  line-height: 0;
}
.store-badge img {
  height: 100%;
  width: auto;
  display: block;
}
.store-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 18px rgba(26, 24, 32, 0.18));
}
/* Layout for .hero__downloads is defined earlier (in the HERO section) */

/* ============================================================================
   MIRROR
   ========================================================================== */
.mirror {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) clamp(20px, 4vw, 48px);
}
.mirror__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
}
.mirror__copy { max-width: 540px; }
.mirror .display__solid { white-space: nowrap; }
.mirror .lede em {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

/* ─── Mirror visual: marquee + phone ──────────────────────────────────── */
.mirror__visual {
  position: relative;
  height: clamp(440px, 60vh, 640px);
  isolation: isolate;
}

/* Horizontal marquee, masked at left & right edges */
.aura-marquee {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 28%, black 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 28%, black 92%, transparent 100%);
}
.aura-marquee__track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  padding: 0 60px;
  animation: auraMarquee 60s linear infinite;
  /* combine vertical centering with horizontal scroll */
  transform: translateY(-50%);
}
@keyframes auraMarquee {
  from { transform: translate(0, -50%); }
  /* Track contains 2 identical sets, so -50% loops seamlessly */
  to   { transform: translate(-50%, -50%); }
}
/* Slow the marquee on small screens so cards don't blur past */
@media (max-width: 720px) {
  .aura-marquee__track { animation-duration: 90s; }
}

/* ─── Aura card — liquid glass to match the pill nav ────────────────── */
.aura-card {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  padding: 22px 22px 24px;
  border-radius: 24px;

  /* Two stacked gradients: top shine layer + translucent base */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.14));
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(26, 24, 32, 0.04) inset,
    0 16px 36px -10px rgba(26, 24, 32, 0.14),
    0 6px 14px -6px rgba(26, 24, 32, 0.08);

  transform: translateY(var(--ty, 0)) rotate(var(--rot, 0deg));
  display: flex;
  flex-direction: column;
  gap: 14px;
  user-select: none;
}
.aura-card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: normal;
  color: var(--ink);
  text-transform: lowercase;
  margin: 0;
}
.aura-card__hook {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}
/* Palette swirl — 5 circles in a row, order: A · B · Primary · C · D
   Primary (middle) is largest and sits on top of the overlap */
.aura-card__palette {
  display: flex;
  align-items: center;
  margin-top: 4px;
}
.aura-card__palette > span {
  display: block;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: -10px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(26, 24, 32, 0.10);
}
.aura-card__palette > span:first-child { margin-left: 0; }
/* Symmetric fan stacking: outer (A, D) at back, inner (B, C) middle, Primary on top */
.aura-card__palette > span:nth-child(1) { background: var(--c1, #888); z-index: 1; }    /* Palette A */
.aura-card__palette > span:nth-child(2) { background: var(--c2, #888); z-index: 2; }    /* Palette B */
.aura-card__palette > span:nth-child(4) { background: var(--c3, #888); z-index: 2; }    /* Palette C */
.aura-card__palette > span:nth-child(5) { background: var(--c4, #888); z-index: 1; }    /* Palette D, behind C */
.aura-card__primary {
  width: 48px !important;
  height: 48px !important;
  background: var(--c0, #888);
  border-width: 3px !important;
  z-index: 3;
  margin-left: -10px !important;
}

/* ─── Phone shape: simple white rounded rectangle, anchored centered-right ─── */
.phone-frame {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 320px;
  height: 600px;
  background: #FFFFFF;
  border: 10px solid rgba(0, 0, 0, 0.10);
  border-radius: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px -30px rgba(26, 24, 32, 0.18);
}
.phone-frame img {
  width: 64%;
  height: auto;
  opacity: 0.85;
}
.phone-frame__art {
  /* Vermeer is portrait-tall — let it breathe a bit larger */
  width: 70%;
  max-height: 78%;
  object-fit: contain;
}

@media (max-width: 980px) {
  .mirror__layout { grid-template-columns: 1fr; }
  .mirror__visual { height: 560px; }
  .phone-frame { width: 280px; height: 540px; }
}
@media (max-width: 720px) {
  .mirror__visual { height: 480px; }
  .phone-frame { width: 240px; height: 460px; }
  .aura-card { width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .aura-marquee__track { animation: none; }
}

/* ============================================================================
   EMOTION CARDS
   ========================================================================== */
.card-emotion {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 320ms var(--ease-out), box-shadow 320ms, border-color 320ms;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 12px 28px -14px rgba(26,24,32,0.18);
}
.card-emotion:hover {
  transform: translateY(-4px);
  border-color: rgba(26,24,32,0.18);
}
.card-emotion__swatch {
  --swatch-color: #888;
  height: 220px;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--swatch-color) 100%, white 22%) 0%, var(--swatch-color) 55%, color-mix(in srgb, var(--swatch-color) 75%, black 25%) 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px;
}
.card-emotion__swatch::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 75% 80%, rgba(255,255,255,0.30) 0%, transparent 45%),
    radial-gradient(circle at 20% 90%, rgba(0,0,0,0.18) 0%, transparent 50%);
  mix-blend-mode: overlay;
}
.card-emotion__hex {
  position: relative;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(26,24,32,0.7);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 5px 11px;
  border-radius: 999px;
}
.card-emotion__body {
  padding: 22px 24px 26px;
  background: rgba(255,255,255,0.55);
}
.card-emotion__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.card-emotion__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

/* per-emotion soft glows (lighter palette to suit white theme) */
.card-emotion--clarity     { --swatch-color: var(--c-clarity); }
.card-emotion--radiance    { --swatch-color: var(--c-radiance); }
.card-emotion--passion     { --swatch-color: var(--c-passion); }
.card-emotion--warmth      { --swatch-color: var(--c-warmth); }
.card-emotion--melancholy  { --swatch-color: var(--c-melancholy); }
.card-emotion--serenity    { --swatch-color: var(--c-serenity); }
.card-emotion--flow        { --swatch-color: var(--c-flow); }
.card-emotion--nostalgia   { --swatch-color: var(--c-nostalgia); }
.card-emotion--mystique    { --swatch-color: var(--c-mystique); }

/* ============================================================================
   CARDS GRID
   ========================================================================== */
.cards {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 140px) clamp(20px, 4vw, 48px);
}
.cards__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1100px) { .cards__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .cards__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cards__grid { grid-template-columns: 1fr; } }

/* ============================================================================
   YOUR MOMENTS — auto-cycle: 16s loop, 4 phases of 4s each. The pill morphs,
   the day strip orb travels, and a huge ambient color cloud crossfades behind
   everything in lockstep. "the day has a shape." passes by on its own.
   ========================================================================== */
.moments {
  position: relative;
  overflow: hidden;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) clamp(20px, 4vw, 48px);
}
.moments-inner {
  position: relative;
  z-index: 1;
}
.moment-stage {
  margin: 56px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Huge ambient color cloud behind everything — 4 stacked blurred radial gradients,
   centered, crossfading on the same 16s timeline as the pill. */
.moments-ambient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.moments-ambient__layer {
  position: absolute;
  width: min(110vmin, 1100px);
  height: min(110vmin, 1100px);
  border-radius: 50%;
  filter: blur(80px) saturate(1.3);
  opacity: 0;
  animation: pillCycle 16s ease-in-out infinite;
}
.moments-ambient__layer--morning   { background: radial-gradient(circle, rgba(247, 155, 17, 0.55), transparent 60%); animation-delay: 0s; }
.moments-ambient__layer--afternoon { background: radial-gradient(circle, rgba(0, 180, 125, 0.50),  transparent 60%); animation-delay: -12s; }
.moments-ambient__layer--evening   { background: radial-gradient(circle, rgba(214, 70, 21, 0.55),  transparent 60%); animation-delay: -8s; }
.moments-ambient__layer--night     { background: radial-gradient(circle, rgba(94, 27, 204, 0.55),  transparent 60%); animation-delay: -4s; }

/* The pill itself — large, centered, rounded fully */
.moment-pill {
  position: relative;
  width: clamp(320px, 48vw, 560px);
  height: clamp(120px, 12vw, 160px);
  border-radius: 999px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(26, 24, 32, 0.30),
    0 8px 20px -8px rgba(26, 24, 32, 0.15);
  isolation: isolate;
}

/* 4 stacked background gradient layers, fade-cycled */
.moment-pill__bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  animation: pillCycle 16s ease-in-out infinite;
}
.moment-pill__bg--morning   { background: linear-gradient(151deg, #F79B11 8%, #E6C506 92%); animation-delay: 0s; }
.moment-pill__bg--afternoon { background: linear-gradient(153deg, #56A545 8%, #00B47D 92%); animation-delay: -12s; }
.moment-pill__bg--evening   { background: linear-gradient(153deg, #D64615 8%, #F4A928 93%); animation-delay: -8s; }
.moment-pill__bg--night     { background: linear-gradient(180deg, #5E1BCC, #982FA0); animation-delay: -4s; }

/* 4 stacked content groups (icon + label) — same timeline */
.moment-pill__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #FFFFFF;
  opacity: 0;
  z-index: 1;
  animation: pillCycle 16s ease-in-out infinite;
}
.moment-pill__content--morning   { animation-delay: 0s; }
.moment-pill__content--afternoon { animation-delay: -12s; }
.moment-pill__content--evening   { animation-delay: -8s; }
.moment-pill__content--night     { animation-delay: -4s; }

/* The single keyframe used by bg + content + ambient layers.
   Each layer is visible 4-22% of cycle, with 4s offsets across 4 layers. */
@keyframes pillCycle {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  22%  { opacity: 1; }
  26%  { opacity: 0; }
  100% { opacity: 0; }
}

.moment-pill__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: normal;
  color: #FFFFFF;
  text-transform: lowercase;
}
.moment-icon {
  width: clamp(28px, 3vw, 44px);
  height: auto;
  flex-shrink: 0;
}


/* ─── Day strip — horizontal spectrum bar + sun/moon orb traversing ─── */
.day-strip {
  position: relative;
  width: clamp(320px, 48vw, 560px);
  margin-top: 8px;
}
.day-strip__bar {
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(to right,
    #F79B11 0%,  #E6C506 22%,
    #56A545 28%, #00B47D 48%,
    #D64615 52%, #F4A928 72%,
    #5E1BCC 78%, #982FA0 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 -1px 2px rgba(255, 255, 255, 0.30),
    0 6px 16px rgba(26, 24, 32, 0.10);
  position: relative;
}
/* The orb traverses the bar on a 16s loop. Color stays subtle pearl-white
   throughout — the dramatic color shift comes from the bar underneath and the
   ambient cloud behind. */
.day-strip__orb {
  position: absolute;
  top: 18px;                /* half of bar height (36/2) */
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FFFFFF 0%, #FFF5E0 70%);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.6),
    0 0 24px rgba(255, 230, 180, 0.5),
    0 6px 14px rgba(26, 24, 32, 0.20);
  transform: translate(-50%, -50%);
  z-index: 1;
  animation: orbTravel 16s linear infinite;
}
@keyframes orbTravel {
  0%   { left: 0%;   opacity: 0; }
  3%   { opacity: 1; }
  97%  { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* 4 labels at the centers of the 4 moment segments */
.day-strip__labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-align: center;
}
.day-strip__labels span {
  color: var(--ink-mute);
  font-weight: 500;
  text-transform: lowercase;
  animation: stripLabel 16s ease-in-out infinite;
}
.day-strip__labels span:nth-child(1) { animation-delay:   0s; }
.day-strip__labels span:nth-child(2) { animation-delay: -12s; }
.day-strip__labels span:nth-child(3) { animation-delay:  -8s; }
.day-strip__labels span:nth-child(4) { animation-delay:  -4s; }
@keyframes stripLabel {
  0%, 100% { color: var(--ink-mute); font-weight: 500; }
  4%, 22%  { color: var(--ink);      font-weight: 700; }
  26%      { color: var(--ink-mute); font-weight: 500; }
}

@media (prefers-reduced-motion: reduce) {
  .moment-pill__bg, .moment-pill__content,
  .moments-ambient__layer,
  .day-strip__orb, .day-strip__labels span {
    animation: none;
  }
  .moment-pill__bg--morning,
  .moment-pill__content--morning,
  .moments-ambient__layer--morning { opacity: 1; }
  .day-strip__orb { opacity: 1; left: 0%; }
  .day-strip__labels span:nth-child(1) { color: var(--ink); font-weight: 700; }
}

/* ============================================================================
   COLOR STORY
   ========================================================================== */
.story {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) clamp(20px, 4vw, 48px);
}
.story__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.story-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--rule);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 320ms var(--ease-out), border-color 320ms, box-shadow 320ms;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 14px 32px -16px rgba(26,24,32,0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26,24,32,0.18);
}

/* ─── Story card art — gradient backgrounds with inline SVG visualizations ─── */
.story-card__art {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.story-card__art .story-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Daily — warm dawn gradient (morning palette) for the sparkline */
.story-card__art--daily {
  background: linear-gradient(160deg, #F79B11 0%, #E6C506 100%);
}
/* Weekly — fresh midday gradient (afternoon palette) for the slot bars */
.story-card__art--weekly {
  background: linear-gradient(160deg, #56A545 0%, #00B47D 100%);
}
/* Monthly — deep evening gradient (night palette) for the heatmap */
.story-card__art--monthly {
  background: linear-gradient(180deg, #5E1BCC 0%, #982FA0 100%);
}

.story-card__body {
  padding: 24px 26px 28px;
  position: relative;
}
.story-card__index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 4px;
  display: block;
}
.story-card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: normal;
  margin: 0 0 10px;
  color: var(--ink);
  text-transform: lowercase;
}
.story-card__copy {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

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

/* ============================================================================
   CLOSING
   ========================================================================== */
.closing {
  position: relative;
  text-align: center;
  padding: clamp(96px, 11vw, 150px) clamp(20px, 4vw, 48px) clamp(80px, 9vw, 120px);
  overflow: hidden;
}
.closing__inner {
  position: relative;
  max-width: none;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.closing__headline {
  font-size: clamp(40px, 8vw, 100px);
  line-height: 1.05;
  letter-spacing: normal;
  margin: 0 0 4px;
}
.closing .display__muted,
.closing .display__solid { white-space: nowrap; }
.closing__tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--ink-soft);
  margin: 12px 0 32px;
  text-transform: lowercase;
  letter-spacing: 0.005em;
}

/* ============================================================================
   FOOTER — bold masthead on the cream canvas
   ========================================================================== */
.foot {
  position: relative;
  background: transparent;
  color: var(--ink);
  padding: clamp(56px, 7vw, 96px) clamp(20px, 4vw, 64px) clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.foot__glow { display: none; }
.foot__inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  gap: clamp(40px, 6vw, 80px);
}

/* Top row: disclaimer (left) + nav links (right) */
.foot__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
}
.foot__fine {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 13.5px;
  color: var(--ink-mute);
  margin: 0;
  max-width: 44ch;
  line-height: 1.5;
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.foot__links a { color: var(--ink-soft); transition: color 200ms; }
.foot__links a:hover { color: var(--ink); }
.foot__links .nav__sep { color: var(--ink-faint); }

/* The masthead — inline kz_logo_wordmark SVG with a brand-spectrum
   linearGradient fill defined inside the SVG. */
.foot__masthead {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
}

/* Bottom row: tag (left) + copyright (right) */
.foot__bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: clamp(24px, 3vw, 36px);
}
.foot__tag {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  text-transform: lowercase;
}
.foot__copy {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0;
  letter-spacing: normal;
  text-transform: lowercase;
}

/* Social icon row — sits between foot__tag and foot__copy. */
.foot__social {
  display: flex;
  gap: 16px;
  align-items: center;
}
.foot__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  opacity: 0.65;
  transition: opacity 200ms;
}
.foot__social a:hover { opacity: 1; }
.foot__social img {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 720px) {
  .foot { padding: clamp(40px, 8vw, 56px) 20px clamp(28px, 4vw, 36px); }
  .foot__inner { gap: clamp(28px, 5vw, 48px); }
  .foot__top, .foot__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .foot__fine   { max-width: 32ch; }
  .foot__links  { justify-content: center; }
  .foot__masthead { max-width: 85%; }
}

/* ============================================================================
   SCROLL-REVEAL — subtle fade + slight rise as elements enter the viewport.
   JS adds .is-revealed via IntersectionObserver. Skipped under reduced-motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 800ms var(--ease-out),
      transform 800ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  [data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   LEGAL PAGES (privacy.html / terms.html)
   Long-form documents. Reuses the cream paper, atmosphere washes, pill nav,
   and footer from the main shell. Adds typography tuned for reading.
   ========================================================================== */
.legal-page {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(120px, 14vw, 180px) clamp(20px, 4vw, 48px) clamp(80px, 9vw, 120px);
}
.legal-page__hero {
  margin-bottom: clamp(48px, 6vw, 80px);
}
.legal-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 24px;
  text-transform: lowercase;
}
.legal-page__eyebrow::before {
  content: '';
  display: inline-block;
  width: 60px;
  height: 1.5px;
  background: var(--ink);
}
.legal-page__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: normal;
  color: var(--ink);
  text-transform: lowercase;
  margin: 0 0 20px;
  max-width: 18ch;
}
.legal-page__meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
}
.legal-page__lead {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 28px 0 0;
}

/* Layout: TOC sidebar (desktop ≥1024px) + reading column */
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}
@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 240px minmax(0, 720px);
    gap: 80px;
    align-items: start;
  }
}

/* Table of contents */
.legal-toc {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}
@media (min-width: 1024px) {
  .legal-toc {
    position: sticky;
    top: 110px;
  }
}
.legal-toc__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.legal-toc li {
  counter-increment: toc;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.legal-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  flex: 0 0 auto;
}
.legal-toc a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 200ms;
  line-height: 1.4;
}
.legal-toc a:hover { color: var(--ink); }

/* Reading column */
.legal-prose {
  max-width: 720px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.legal-prose section {
  scroll-margin-top: 96px;
  padding-top: 8px;
}
.legal-prose section + section {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--rule);
}
.legal-prose h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: normal;
  color: var(--ink);
  text-transform: lowercase;
  margin: 0 0 24px;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.legal-prose h2::before {
  content: counter(legal-section, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mute);
  flex: 0 0 auto;
}
.legal-prose { counter-reset: legal-section; }
.legal-prose section { counter-increment: legal-section; }
.legal-prose h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  text-transform: lowercase;
  margin: 24px 0 10px;
}
.legal-prose p {
  margin: 0 0 18px;
}
.legal-prose strong {
  font-weight: 600;
  color: var(--ink);
}
.legal-prose em {
  font-style: italic;
  color: var(--ink);
}
.legal-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 200ms;
}
.legal-prose a:hover { opacity: 0.65; }
.legal-prose ul, .legal-prose ol {
  padding-left: 22px;
  margin: 0 0 22px;
}
.legal-prose li {
  margin-bottom: 8px;
}
.legal-prose li strong { color: var(--ink); }

/* TL;DR summary box (privacy.html top) */
.legal-summary {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin: 0 0 56px;
}
.legal-summary__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  color: var(--ink);
  text-transform: lowercase;
  margin: 0 0 14px;
}
.legal-summary ul {
  margin: 0;
  padding-left: 22px;
}
.legal-summary li {
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--ink-soft);
}
.legal-summary li strong { color: var(--ink); }

/* Disclaimer callout for the prominent "not therapy" block in terms */
.legal-callout {
  border-left: 3px solid var(--ink);
  padding: 16px 22px;
  margin: 24px 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 0 8px 8px 0;
}
.legal-callout p {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .wash { transition: none; }
  .hero__line--script { animation: none; background-position: 25% 50%; }
  /* freeze parallax floats at rest */
  .float { transform: rotate(var(--rot, 0deg)) !important; animation: none; }
}

/* Subtle reveal for cards */
@media (prefers-reduced-motion: no-preference) {
  .card-emotion, .moment, .story-card {
    animation: rise 700ms var(--ease-out) both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
