/* Milo landing: design tokens pulled straight from Theme.swift */
:root {
  --paper: #FBF9F4;
  --paper-warm: #F7F2E8;
  --paper-deep: #F2EADA;
  --ink: #0A0A0A;
  --ink-2: rgba(10, 10, 10, 0.62);
  --ink-3: rgba(10, 10, 10, 0.42);
  --ink-4: rgba(10, 10, 10, 0.18);
  --hair: rgba(10, 10, 10, 0.08);

  --primary: #F2995F;           /* Theme.primary */
  --primary-pressed: #E08550;
  --primary-wash: rgba(242, 153, 95, 0.10);

  --secondary: #7370D9;         /* Theme.secondary */
  --secondary-tint: #F2F0FF;
  --cursor: #8C80D9;
  --helper: #807594;

  --success: #339F61;
  --celebration: #4D99F2;
  --shimmer-blue: rgba(77, 153, 242, 0.45);

  --macro-p: #E0A847;
  --macro-c: #E0598C;
  --macro-f: #9A6BD1;

  --workout: #7370D9;
  --wellness: #4080C7;

  --radius-pill: 28px;
  --radius-card: 16px;
  --radius-chip: 10px;

  --shadow-soft:
    0 1px 1.5px rgba(0,0,0,0.035),
    0 4px 10px rgba(0,0,0,0.045);
  --shadow-strong:
    0 2px 2px rgba(0,0,0,0.07),
    0 6px 14px rgba(0,0,0,0.10);
  --shadow-lift:
    0 1px 2px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.08),
    0 24px 60px rgba(115, 112, 217, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-serif: "Fraunces", "Instrument Serif", "Times New Roman", serif;
  --font-rounded: "Inter", -apple-system, ui-rounded, "SF Pro Rounded", sans-serif;
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
html {
  /* horizontal clip lives on html so body stays as the natural scroll
     container and IntersectionObserver works normally. */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

::selection { background: var(--secondary-tint); color: var(--ink); }

/* ---------- Ambient paper grain (subtle) ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(115,112,217,0.035), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(242,153,95,0.04), transparent 45%);
  z-index: 0;
}

main { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 16px; height: 1.5px;
  background: var(--secondary);
  opacity: 0.7;
}
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
  font-size: clamp(40px, 5.2vw, 72px);
  text-wrap: balance;
  margin-bottom: 0.35em; /* keep italic descenders clear of the lede */
}
.display em {
  font-style: italic;
  color: var(--primary);
  position: relative;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1.05;
  text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--primary); }
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 54ch;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s, background 0.25s;
  white-space: nowrap;
  will-change: transform;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow:
    0 1px 1.5px rgba(0,0,0,0.08),
    0 8px 18px rgba(242, 153, 95, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  background: var(--primary-pressed);
  transform: translateY(-1px);
  box-shadow:
    0 1px 1.5px rgba(0,0,0,0.08),
    0 14px 28px rgba(242, 153, 95, 0.36),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  color: var(--ink);
  background: rgba(10,10,10,0.03);
  border: 1px solid var(--hair);
}
.btn-ghost:hover { background: rgba(10,10,10,0.05); }

.btn svg { width: 16px; height: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(251, 249, 244, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.scrolled {
  border-bottom-color: var(--hair);
  background: rgba(251, 249, 244, 0.85);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-brand .brand-monkey {
  width: 34px; height: 34px;
  object-fit: contain;
  transform-origin: 60% 80%;
  animation: brand-monkey-sway 6s ease-in-out infinite;
}
.nav-brand .brand-monkey-sm { width: 26px; height: 26px; }
@keyframes brand-monkey-sway {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-1px); }
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---------- Layout ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 720px; margin: 0 auto; }
  .hero-phone-wrap { justify-self: center; margin: 0 auto; }
  .hero-ctas { justify-content: center; }
  .hero-signals { justify-content: center; }
  .eyebrow { justify-content: center; }
  .hero-eyebrow-row { margin-left: auto; margin-right: auto; }
}

.hero-eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  background: white;
  border: 1px solid var(--hair);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--ink-2);
}
.hero-eyebrow-pill {
  padding: 4px 10px;
  background: var(--secondary-tint);
  color: var(--secondary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 { margin: 0 0 32px; }
.hero .lede { margin-bottom: 36px; }

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-signals {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
}
.hero-signals > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-signals svg { width: 14px; height: 14px; color: var(--secondary); }

/* floating mascot on hero */
.hero-mascot {
  position: absolute;
  right: -60px;
  top: -20px;
  width: 180px;
  opacity: 0.5;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
  filter: saturate(1.05);
  z-index: 0;
}
@media (max-width: 960px) { .hero-mascot { display: none; } }

/* small mascot inside hero eyebrow pill */
.eyebrow-mascot {
  width: 28px; height: 28px;
  object-fit: contain;
  margin-right: 2px;
  animation: breath 3.6s ease-in-out infinite;
}

/* sidekick mascot that peeks next to the phone */
.hero-mascot-sidekick {
  position: absolute;
  right: -70px;
  bottom: -30px;
  width: 150px;
  object-fit: contain;
  pointer-events: none;
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 16px 28px rgba(115,112,217,0.25));
  z-index: 2;
}
@media (max-width: 1080px) { .hero-mascot-sidekick { right: -40px; width: 120px; } }
@media (max-width: 760px) { .hero-mascot-sidekick { display: none; } }

/* ---------- Phone mock ---------- */
.hero-phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-shadow-glow {
  position: absolute;
  inset: auto 0 -40px 0;
  height: 80px;
  background: radial-gradient(ellipse at center, rgba(115,112,217,0.25), transparent 70%);
  filter: blur(24px);
  z-index: 0;
  animation: breath 4s ease-in-out infinite;
}

.phone {
  position: relative;
  width: 340px;
  height: 700px;
  background: #0A0A0A;
  border-radius: 56px;
  padding: 10px;
  box-shadow:
    0 0 0 1.5px #1a1a1a,
    0 2px 3px rgba(0,0,0,0.06),
    0 30px 60px rgba(115,112,217,0.18),
    0 60px 120px rgba(0,0,0,0.15);
  z-index: 1;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border-radius: 46px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #0A0A0A;
  border-radius: 20px;
  z-index: 30;
}

/* status bar */
.status-bar {
  height: 50px;
  padding: 14px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  z-index: 5;
}
.status-bar .right { display: flex; gap: 5px; align-items: center; }
.status-bar .right svg { width: 16px; height: 11px; }

/* journal top bar: leading [wordmark+mascot], center [date pill], trailing [stats pill] */
.journal-topbar {
  padding: 8px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.brand-word {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mascot {
  width: 28px;
  height: 28px;
  object-fit: contain;
  animation: breath 3.4s ease-in-out infinite;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  background: white;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}
.date-pill svg { width: 10px; height: 10px; color: var(--ink-3); }
.stats-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px;
  background: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.stats-pill .flame {
  color: var(--primary);
  animation: breath 2.4s ease-in-out infinite;
  display: inline-flex;
}
.stats-pill svg { width: 13px; height: 13px; }
.stats-pill .num { font-variant-numeric: tabular-nums; }

/* canvas */
.journal-canvas {
  flex: 1;
  padding: 16px 22px 10px;
  position: relative;
  overflow: hidden;
}
.canvas-date-label {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
}
.entry-row.visible { opacity: 1; transform: translateY(0); }
.entry-row .text { flex: 1; }
.entry-row .text .cursor {
  display: inline-block;
  width: 2px; height: 16px;
  background: var(--cursor);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1s steps(2) infinite;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, width 0.3s;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.chip-thinking {
  background: rgba(115,112,217,0.08);
  color: rgba(115,112,217,0.8);
}
.chip-thinking::after { /* shimmer sweep */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(115,112,217,0.4) 50%, transparent 60%);
  transform: translateX(-110%);
  animation: shimmer 1.6s linear infinite;
}
.chip-resolved {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.chip-resolved .dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.chip-resolved.food .dot { background: var(--success); }
.chip-resolved.workout .dot { background: var(--workout); }
.chip-resolved.wellness .dot { background: var(--wellness); }
.chip-resolved.medium .dot { background: var(--primary); }

.chip-resolved.sparkling::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, var(--shimmer-blue) 50%, transparent 60%);
  transform: translateX(-110%);
  animation: shimmer 0.9s linear forwards;
}

.sparkle {
  color: var(--celebration);
  display: inline-flex;
}
.sparkle svg { width: 10px; height: 10px; }

.helper-line {
  font-size: 12px;
  color: var(--helper);
  margin-top: -2px;
  margin-bottom: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}
.helper-line.visible { opacity: 1; }
.helper-line::before { content: "+ "; color: var(--secondary); }

/* journal bottom bar: totals pill on left, small action circles on right */
.journal-bottom {
  padding: 10px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.totals-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: white;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: transform 0.3s;
  flex-shrink: 1;
  min-width: 0;
}
.totals-pill.pulsing { transform: scale(1.03); }
.totals-pill .kcal { display: inline-flex; align-items: center; gap: 4px; }
.totals-pill .kcal-flame { width: 13px; height: 13px; color: var(--primary); }
.totals-pill .kcal .big { font-family: var(--font-rounded); font-size: 14px; font-weight: 700; }
.totals-pill .macro {
  display: inline-flex; align-items: center; gap: 2px; font-size: 11px;
  padding-left: 8px;
  border-left: 1px solid rgba(10,10,10,0.08);
}
.totals-pill .macro:first-of-type { padding-left: 0; border-left: none; }
.totals-pill .macro-p { color: var(--macro-p); }
.totals-pill .macro-c { color: var(--macro-c); }
.totals-pill .macro-f { color: var(--macro-f); }
.totals-pill .macro span { color: var(--ink); font-weight: 700; }

.bottom-circles {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.action-circle-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: white;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}
.action-circle-sm svg { width: 14px; height: 14px; }
.action-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-strong);
  animation: breath 3.2s ease-in-out infinite;
}
.action-circle svg { width: 18px; height: 18px; }

/* ---------- Phone overlays: entry sheet + Milo noticed ---------- */
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(.2,.8,.2,1);
  z-index: 20;
  border-radius: 46px;
}
.sheet-scrim.visible { opacity: 1; }

.entry-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: white;
  border-radius: 22px 22px 0 0;
  padding: 14px 20px 24px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.14);
  transform: translateY(104%);
  transition: transform 0.42s cubic-bezier(.2,.8,.2,1);
  z-index: 25;
  max-height: 72%;
  overflow: hidden;
}
.entry-sheet.open { transform: translateY(0); }
.sheet-grabber {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(10,10,10,0.18);
  margin: 0 auto 14px;
}
.sheet-title {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
}
.sheet-kcal {
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sheet-conf {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}
.sheet-conf .conf-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.sheet-macros {
  display: flex; gap: 14px;
  margin: 12px 0 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.sheet-macros span span { font-weight: 700; color: var(--ink); }
.sheet-macros .macro-p { color: var(--macro-p); }
.sheet-macros .macro-c { color: var(--macro-c); }
.sheet-macros .macro-f { color: var(--macro-f); }
.sheet-section-label {
  margin-top: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.sheet-sources {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink);
}
.sheet-sources li {
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 8px;
}
.sheet-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--primary-wash);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}

.milo-notice {
  position: absolute;
  left: 12px; right: 12px; bottom: 90px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 10px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 12px 28px rgba(115,112,217,0.18);
  border: 1px solid var(--hair);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.3s;
  z-index: 15;
}
.milo-notice.visible {
  transform: translateY(0);
  opacity: 1;
}
.milo-notice .notice-mascot {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}
.milo-notice .notice-body {
  display: flex; flex-direction: column;
  min-width: 0;
}
.milo-notice .notice-head {
  font-family: var(--font-rounded);
  font-size: 10px;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.milo-notice .notice-text {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 2px;
  text-wrap: pretty;
}

/* entry row tap flash */
.entry-row.tapped {
  background: var(--primary-wash);
  border-radius: 8px;
  transition: background 0.25s;
  padding-left: 6px; padding-right: 6px;
  margin-left: -6px; margin-right: -6px;
}

/* ---------- Section mascots (decorative) ---------- */
.section-mascot {
  position: absolute;
  width: 140px;
  opacity: 0.55;
  pointer-events: none;
  filter: saturate(1.05);
  animation: float 9s ease-in-out infinite;
  z-index: 0;
}
.section-mascot-left { left: -30px; top: 60px; }
.section-mascot-right { right: -30px; top: 80px; animation-duration: 11s; animation-direction: reverse; }
@media (max-width: 900px) { .section-mascot { display: none; } }

/* ---------- Section head ---------- */
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lede { margin: 18px auto 0; }

/* Why accurate */
.accuracy-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.card {
  background: white;
  border-radius: 22px;
  padding: 28px;
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.card h3 em { font-style: italic; color: var(--primary); }
.card p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}
.card .card-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 20px;
}
.card-col-big { grid-column: span 7; min-height: 380px; }
.card-col-small { grid-column: span 5; min-height: 380px; }
.card-col-third { grid-column: span 4; min-height: 320px; }
.card-col-half { grid-column: span 6; min-height: 340px; }
@media (max-width: 900px) {
  .accuracy-grid { grid-template-columns: 1fr; }
  .card-col-big, .card-col-small, .card-col-third, .card-col-half { grid-column: span 1; min-height: auto; }
}

/* Confidence chip viz inside card */
.card-demo {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
}
.card-demo .row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card-demo .label { color: var(--ink); }

/* Session memory ghost */
.ghost-annotation {
  font-size: 12px;
  color: var(--helper);
  padding-left: 14px;
  margin-top: -2px;
  opacity: 0;
  transform: translateY(-4px);
  animation: ghostAppear 0.6s 1s forwards ease-out;
}
@keyframes ghostAppear {
  to { opacity: 1; transform: translateY(0); }
}
.ghost-annotation::before { content: "· "; color: var(--secondary); }

/* Multi-modal dots */
.modality-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.modality {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.modality .dot { width: 7px; height: 7px; border-radius: 50%; }
.modality.food .dot { background: var(--success); }
.modality.workout .dot { background: var(--workout); }
.modality.mood .dot { background: var(--wellness); }
.modality.sleep .dot { background: var(--wellness); }

/* mini calendar viz */
.mini-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 22px;
}
.mini-cal-day {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(10,10,10,0.05);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 3px;
  gap: 2px;
  position: relative;
}
.mini-cal-day .d-dot {
  width: 4px; height: 4px; border-radius: 50%;
}
.mini-cal-day.today {
  border: 1.5px solid var(--secondary);
}

/* ---------- Comparison ---------- */
.compare-wrap {
  background: white;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-lift);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--hair);
}
.compare-grid > div {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hair);
  font-size: 14.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
}
.compare-grid .row-head { color: var(--ink-2); font-weight: 500; }
.compare-grid .col-them { background: rgba(10,10,10,0.02); color: var(--ink-2); }
.compare-grid .col-us { background: var(--primary-wash); font-weight: 600; }
.compare-header {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0;
}
.compare-header > div {
  padding: 14px 20px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.compare-header .col-us { color: var(--primary); }
.compare-header .col-them { color: var(--ink-3); }

.check, .minus {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.check { background: rgba(51, 159, 97, 0.12); color: var(--success); }
.minus { background: rgba(10,10,10,0.05); color: var(--ink-3); }

@media (max-width: 760px) {
  .compare-grid, .compare-header { grid-template-columns: 1fr; }
  .compare-header > div:not(:first-child) { padding-top: 0; }
  .compare-grid .row-head { background: var(--paper-warm); font-weight: 600; }
}

/* ---------- Flow strip (three panels) ---------- */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.flow-step {
  background: white;
  border: 1px solid var(--hair);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.flow-step .num {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--primary);
  letter-spacing: 0.1em;
}
.flow-step h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  margin: 8px 0 10px;
  letter-spacing: -0.015em;
}
.flow-step p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; margin: 0; }
.flow-visual {
  margin-top: 20px;
  padding: 14px;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--hair);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
@media (max-width: 900px) { .flow-grid { grid-template-columns: 1fr; } }

/* ---------- Waitlist ---------- */
.waitlist {
  background:
    radial-gradient(circle at 15% 20%, rgba(115,112,217,0.12), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(242,153,95,0.15), transparent 50%),
    var(--paper-warm);
  border-radius: 32px;
  padding: clamp(48px, 8vw, 100px) clamp(24px, 5vw, 80px);
  text-align: center;
  border: 1px solid var(--hair);
  position: relative;
  overflow: hidden;
}
.waitlist::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(115,112,217,0.05) 1px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.5;
  pointer-events: none;
}
.waitlist-mascot {
  width: 140px;
  margin: 0 auto 24px;
  animation: float 6s ease-in-out infinite;
}
.waitlist h2 { margin: 0 0 16px; }
.waitlist .lede { margin: 0 auto 32px; }

.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  background: white;
  padding: 6px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--hair);
  position: relative;
  z-index: 1;
}
.waitlist-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.waitlist-form input::placeholder { color: var(--ink-3); }
.waitlist-form button { padding: 12px 20px; }
.form-error {
  flex-basis: 100%;
  margin-top: 8px;
  font-size: 13px;
  color: #c0392b;
  text-align: left;
  padding-left: 4px;
}

.waitlist-success {
  margin-top: 18px;
  font-size: 14px;
  color: var(--success);
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s, transform 0.4s;
}
.waitlist-success.visible { opacity: 1; transform: translateY(0); }

.waitlist-signals {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--ink-3);
}
.waitlist-signals > div { display: inline-flex; align-items: center; gap: 6px; }
.waitlist-signals svg { width: 13px; height: 13px; color: var(--secondary); }

/* ---------- Principles band (Milo is / isn't) ---------- */
.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.principle-col {
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--hair);
  background: white;
  box-shadow: var(--shadow-soft);
}
.principle-col.wont { background: var(--paper); }
.principle-col h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.principle-col.wont h4 { color: var(--ink-2); }
.principle-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.principle-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.principle-list .mark {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; font-weight: 700;
  margin-top: 1px;
}
.principle-list.will .mark { background: var(--primary-wash); color: var(--primary); }
.principle-list.wont .mark { background: rgba(10,10,10,0.05); color: var(--ink-3); }
.principle-list li b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .principles-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  color: var(--ink-3);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .nav-brand { font-size: 18px; }

/* ---------- Motion primitives ---------- */
@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes shimmer {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes drift-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}

.drift { animation: drift-left 7s ease-in-out infinite; }
.breath { animation: breath 3.6s ease-in-out infinite; }

/* ---------- Floating pattern insight card (hero) ----------
   Positioned OUTSIDE the phone so it never covers the demo.
   On desktop: peeks out from the right side of the phone.
   On narrow: hidden entirely. */
.pattern-card {
  position: absolute;
  right: -170px;
  bottom: 20px;
  width: 218px;
  background: white;
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: 12px 14px 10px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 20px 44px rgba(115,112,217,0.22),
    0 40px 80px rgba(115,112,217,0.08);
  z-index: 4;
  backdrop-filter: blur(12px);
  transform: rotate(-3deg);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.pattern-card.float-tilt {
  animation: tilt-float 8s ease-in-out infinite;
}
@keyframes tilt-float {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-1.6deg) translateY(-8px); }
}
.pattern-card:hover {
  animation-play-state: paused;
  transform: rotate(0deg) translateY(-4px) scale(1.02);
}
.pattern-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pattern-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}
.pattern-eyebrow svg { width: 11px; height: 11px; }
.pattern-days {
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.pattern-days .arrow { opacity: 0.6; }
.pattern-title {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.pattern-graph {
  width: 100%;
  height: 70px;
  margin: 4px 0 8px;
}
.pattern-graph svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.graph-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw-in 2.4s cubic-bezier(.2,.8,.2,1) 0.4s forwards;
}
.graph-line-energy {
  animation-delay: 0.9s;
  stroke-dasharray: 2 3, 400;
}
.graph-area {
  opacity: 0;
  animation: fade-in 1.2s ease-out 1.6s forwards;
}
.pattern-legend {
  display: flex;
  gap: 14px;
  font-size: 10.5px;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.pattern-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 8px;
  height: 2px;
  border-radius: 1px;
}
.legend-dot.sleep { background: #4080C7; }
.legend-dot.energy {
  background: linear-gradient(90deg, var(--primary) 50%, transparent 50%);
  background-size: 4px 2px;
}
.pattern-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  font-size: 11px;
}
.pattern-corr {
  font-family: var(--font-rounded);
  font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}
.pattern-note {
  color: var(--ink-3);
}

@keyframes draw-in {
  to { stroke-dashoffset: 0; }
}
@keyframes fade-in {
  to { opacity: 1; }
}

@media (max-width: 1380px) {
  .pattern-card { right: -120px; width: 200px; bottom: 10px; }
}
@media (max-width: 1240px) {
  .pattern-card { right: -70px; width: 190px; }
}
@media (max-width: 1080px) {
  .pattern-card {
    /* on medium screens: park it BELOW the phone, centered, so it never covers the demo */
    position: relative;
    right: auto; bottom: auto;
    margin: 24px auto 0;
    transform: rotate(0deg);
    width: 260px;
  }
  .pattern-card.float-tilt { animation: none; }
}
@media (max-width: 960px) {
  .pattern-card { display: none; }
}

/* ---------- Scroll reveal (richer variants) ----------
   DISABLED: elements stay visible at baseline. We used to hide them initially
   and fade them in on scroll, but the preview iframe's scroll events were
   unreliable, leaving content permanently invisible. Static-visible is
   strictly better than intermittently-hidden. */
.reveal, .reveal-rise, .reveal-left, .reveal-right,
.reveal-stagger .stagger-child, section.reveal-section,
.reveal-text > span {
  opacity: 1;
  transform: none;
}
.reveal-text { display: inline; overflow: visible; }
.reveal.d1 { transition-delay: 80ms; }
.reveal.d2 { transition-delay: 160ms; }
.reveal.d3 { transition-delay: 240ms; }
.reveal.d4 { transition-delay: 320ms; }
.reveal.d5 { transition-delay: 400ms; }

/* rise + subtle scale for cards (disabled reveal; animation on demand) */
.reveal-rise.in { opacity: 1; transform: translateY(0) scale(1); }

/* slide from left/right for feature rows (disabled reveal) */
.reveal-left.in { opacity: 1; transform: translateX(0); }


.reveal-right.in { opacity: 1; transform: translateX(0); }

/* staggered child reveal (disabled reveal) */
.reveal-stagger.in .stagger-child { opacity: 1; transform: translateY(0); }
.reveal-stagger.in .stagger-child:nth-child(1) { transition-delay: 60ms; }
.reveal-stagger.in .stagger-child:nth-child(2) { transition-delay: 140ms; }
.reveal-stagger.in .stagger-child:nth-child(3) { transition-delay: 220ms; }
.reveal-stagger.in .stagger-child:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger.in .stagger-child:nth-child(5) { transition-delay: 380ms; }
.reveal-stagger.in .stagger-child:nth-child(6) { transition-delay: 460ms; }

/* text mask reveal (disabled) */
.reveal-text.in > span { transform: translateY(0); }

/* parallax layers (driven by IO + scroll) */
.parallax-slow { transition: transform 60ms linear; will-change: transform; }

/* section enter (disabled) */
section.reveal-section.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-rise, .reveal-left, .reveal-right,
  .reveal-stagger .stagger-child, .reveal-text > span,
  section.reveal-section {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   FLASHY UPGRADES — added for the polish pass
   ============================================================ */

/* ---------- Animated mesh gradient behind hero ---------- */
.hero-grid-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 140%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 22%, rgba(115,112,217,0.18), transparent 60%),
    radial-gradient(ellipse 50% 45% at 82% 78%, rgba(242,153,95,0.20), transparent 60%),
    radial-gradient(ellipse 40% 35% at 70% 25%, rgba(77,153,242,0.12), transparent 60%),
    radial-gradient(ellipse 45% 40% at 30% 75%, rgba(51,159,97,0.10), transparent 60%);
  filter: blur(40px);
  animation: mesh-drift 20s ease-in-out infinite;
  opacity: 0.9;
}
@keyframes mesh-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
  66% { transform: translate3d(4%, -3%, 0) scale(0.96); }
}
.hero { overflow: hidden; }
.hero .container { position: relative; z-index: 1; }

/* ---------- Pulse aura behind phone ---------- */
.phone-aura {
  position: absolute;
  inset: 20px;
  border-radius: 56px;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(115,112,217,0.25), rgba(242,153,95,0.25), rgba(77,153,242,0.2), rgba(115,112,217,0.25));
  filter: blur(50px);
  opacity: 0.6;
  z-index: 0;
  animation: aura-spin 14s linear infinite;
}
@keyframes aura-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Hero h1 split line reveal ---------- */
/* Use clip-path instead of overflow:hidden so italic descenders aren't cut */
.display .split-line {
  display: block;
  line-height: 1.08;
  position: relative;
  padding: 0.08em 0.1em 0.24em;
  margin: -0.08em -0.1em -0.24em;
  /* No clip-path — GSAP clearProps ensures no residual transform */
}
.display .split-line .split-inner {
  /* starts below the cliped top, slides up into view */
}
.display .split-inner {
  display: inline-block;
  /* Motion.js owns the entrance with GSAP. If GSAP fails to load, the
     no-js fallback below will simply reveal immediately. */
  will-change: transform;
}
/* Fallback: if motion.js / GSAP never adds the loaded class, force visible
   after a short delay so the hero copy is never stuck invisible. */
html:not(.motion-loaded) .display .split-inner {
  animation: split-fallback 0.9s cubic-bezier(.2,.9,.2,1) 1.8s both;
}
@keyframes split-fallback {
  from { opacity: 0; transform: translateY(40%); }
  to   { opacity: 1; transform: translateY(0); }
}
.display .split-line.in .split-inner {
  transform: translateY(0) skewY(0);
  opacity: 1;
}
.display .split-line:nth-child(1) .split-inner { transition-delay: 80ms; }
.display .split-line:nth-child(2) .split-inner { transition-delay: 260ms; }

/* ---------- Output wheel (rolling italic outputs) ---------- */
.output-wheel {
  display: inline-flex;
  align-items: baseline;
  height: 1.1em;
  overflow: hidden;
  vertical-align: baseline;
  position: relative;
  padding-right: 0.2em;
  max-width: min(100%, 760px);
}
.output-wheel::after {
  /* subtle fade mask on the right edge so long items don't crowd */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wheel-track {
  display: flex;
  flex-direction: column;
  animation: wheel-roll 11s cubic-bezier(.7,.05,.3,1) infinite;
}
.wheel-item {
  display: block;
  height: 1.1em;
  line-height: 1.08;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--secondary);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
@keyframes wheel-roll {
  0%,  12%  { transform: translateY(0); }
  16%, 28%  { transform: translateY(-1.1em); }
  32%, 44%  { transform: translateY(-2.2em); }
  48%, 60%  { transform: translateY(-3.3em); }
  64%, 76%  { transform: translateY(-4.4em); }
  80%, 92%  { transform: translateY(-5.5em); }
  100%      { transform: translateY(-6.6em); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-track { animation: none; }
}

/* underline flourish on em — only on direct em children of split-inner,
   NOT on wheel-items (which have varying widths and would show stub underlines).
   Use :not() to skip ems inside .output-wheel. */
.display .split-inner > em::after,
.display em:not(.wheel-item)::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0.02em;
  height: 0.09em;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(242,153,95,0.3) 100%);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(.2,.8,.2,1) 0.9s;
}
.display em.wheel-item::after { display: none !important; }
.display .split-line.in .split-inner > em::after,
.display .split-line.in em:not(.wheel-item)::after { transform: scaleX(1); }

/* ---------- Magnetic button hover ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: -1;
}
.btn-primary:hover::before { opacity: 1; }

/* ---------- Marquee ticker ---------- */
.marquee-section {
  padding: 28px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
  overflow: hidden;
  position: relative;
}
.marquee-section::before, .marquee-section::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee-section::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.marquee-section::after  { right: 0; background: linear-gradient(-90deg, var(--paper), transparent); }
.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  animation: marquee-scroll 36s linear infinite;
  padding-right: 36px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-style: italic;
}
.marquee-track .dot-sep {
  color: var(--primary);
  font-style: normal;
  font-size: 0.6em;
  vertical-align: middle;
}
.marquee-track span:not(.dot-sep) {
  transition: color 0.3s;
}
.marquee-track span:not(.dot-sep):hover { color: var(--secondary); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Scroll-scrubbed graph draw ---------- */
/* Override: don't auto-animate the lines on load; let JS drive it */
.pattern-card .graph-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: none;
  transition: stroke-dashoffset 0.4s linear;
}
.pattern-card .graph-line.draw-in {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.4s cubic-bezier(.2,.8,.2,1);
}
.pattern-card .graph-line-energy.draw-in {
  transition-delay: 0.5s;
}
.pattern-card .graph-area {
  opacity: 0;
  transition: opacity 1.2s ease-out 1.2s;
}
.pattern-card .graph-area.draw-in { opacity: 1; }

/* ---------- Cards: shine on hover + tilt ---------- */
.card {
  transform-style: preserve-3d;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(115,112,217,0.10), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  border-radius: inherit;
}
.card:hover::before { opacity: 1; }

/* ---------- Flow steps: number chip jumps on reveal ---------- */
.flow-step .num {
  position: relative;
  display: inline-block;
}
.flow-step.stagger-child { position: relative; overflow: hidden; }
.flow-step.stagger-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 40%,
    rgba(115,112,217,0.12) 50%,
    transparent 60%);
  transform: translateX(-120%);
  pointer-events: none;
}
.reveal-stagger.in .flow-step.stagger-child:nth-child(1)::after {
  animation: card-shine 1.4s cubic-bezier(.2,.8,.2,1) 0.4s;
}
.reveal-stagger.in .flow-step.stagger-child:nth-child(2)::after {
  animation: card-shine 1.4s cubic-bezier(.2,.8,.2,1) 0.7s;
}
.reveal-stagger.in .flow-step.stagger-child:nth-child(3)::after {
  animation: card-shine 1.4s cubic-bezier(.2,.8,.2,1) 1.0s;
}
@keyframes card-shine {
  to { transform: translateX(120%); }
}

/* ---------- Compare grid: row-by-row check pulse on reveal ---------- */
.compare-grid .check,
.compare-grid .minus {
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(.2, 1.6, .4, 1);
}
.compare-wrap.in .compare-grid .check,
.compare-wrap.in .compare-grid .minus {
  transform: scale(1);
}
.compare-wrap.in .compare-grid > .col-us:nth-of-type(2n-1) .check { transition-delay: 0.1s; }
.compare-wrap.in .compare-grid > .col-us:nth-of-type(4n-1) .check { transition-delay: 0.2s; }

/* actual staggered delays via direct nth-child */
.compare-grid > div {
  transition: background 0.3s;
}
.compare-grid > .col-us { position: relative; }
.compare-grid > .col-us::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-wash);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
  z-index: 0;
}
.compare-wrap.in .compare-grid > .col-us::before { transform: scaleX(1); }
.compare-wrap.in .compare-grid > .col-us:nth-child(3n)::before { transition-delay: 0.2s; }
.compare-wrap.in .compare-grid > .col-us:nth-child(6n)::before { transition-delay: 0.3s; }
.compare-wrap.in .compare-grid > .col-us:nth-child(9n)::before { transition-delay: 0.4s; }
.compare-grid > .col-us > * { position: relative; z-index: 1; }

/* ---------- Phone: subtle tilt on scroll ---------- */
.phone {
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.hero-phone-wrap:hover .phone {
  transform: perspective(1400px) rotateY(0deg) rotateX(0deg);
}
@media (max-width: 960px) {
  .phone {
    transform: none;
  }
  .hero-phone-wrap:hover .phone { transform: none; }
}

/* ---------- Section heads: serif emphasis with draw underline ---------- */
.section-head .h2 em {
  position: relative;
  display: inline-block;
}
.section-head .h2 em::before {
  content: "";
  position: absolute;
  left: -4px; right: -4px;
  bottom: -0.02em;
  height: 0.12em;
  background: var(--primary-wash);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1) 0.4s;
  border-radius: 4px;
}
.section-head.in .h2 em::before { transform: scaleX(1); }

/* ---------- Principle lists: slide-in marks ---------- */
.principle-list li {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s, transform 0.6s;
}
.principle-col.in .principle-list li {
  opacity: 1;
  transform: translateX(0);
}
.principle-col.in .principle-list li:nth-child(1) { transition-delay: 0.1s; }
.principle-col.in .principle-list li:nth-child(2) { transition-delay: 0.2s; }
.principle-col.in .principle-list li:nth-child(3) { transition-delay: 0.3s; }
.principle-col.in .principle-list li:nth-child(4) { transition-delay: 0.4s; }

/* ---------- Waitlist: big radial pulse ---------- */
.waitlist::after {
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  left: 50%; top: 50%;
  margin: -300px 0 0 -300px;
  border-radius: 50%;
  border: 1.5px solid rgba(115,112,217,0.15);
  pointer-events: none;
  animation: radial-pulse 4s ease-out infinite;
}
@keyframes radial-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Cursor-following glow on any data-cursor-glow element ---------- */
[data-cursor-glow] {
  position: relative;
}
[data-cursor-glow]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--mx, 50%) var(--my, 50%),
    rgba(115,112,217,0.08), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}
[data-cursor-glow]:hover::after { opacity: 1; }

/* ---------- Entry chip on flow-visual: breathing when resolved ---------- */
.flow-visual .chip-resolved {
  animation: breath 3s ease-in-out infinite;
}

/* ---------- Nav scroll progress bar ---------- */
.nav::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 0.08s linear;
  opacity: 0.9;
}

/* ---------- Big section heads with blurred scale-in ---------- */
.section-head.in .h2 {
  animation: zoom-sharpen 1.2s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes zoom-sharpen {
  0% {
    filter: blur(8px);
    transform: scale(0.96);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Enhanced reveal timings ---------- */
.reveal { transition-duration: 1.1s; }
.reveal-rise { transition-duration: 1.2s; }

/* =========================================================================
   MOTION.JS SUPPORT STYLES
   Pieces of CSS that motion.js reads from / writes to.
   ========================================================================= */

/* Cursor light reflection on cards — motion.js sets --mx / --my */
.card,
.flow-step {
  position: relative;
  transition: box-shadow 0.45s cubic-bezier(.2,.8,.2,1),
              border-color 0.35s ease;
}
.card::after,
.flow-step::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(115, 112, 217, 0.08),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}
.card:hover::after,
.flow-step:hover::after {
  opacity: 1;
}
.card:hover,
.flow-step:hover {
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 28px 60px rgba(115, 112, 217, 0.14),
    0 1px 0 rgba(115, 112, 217, 0.2) inset;
}
/* ensure inner content paints above the light layer */
.card > *,
.flow-step > * { position: relative; z-index: 2; }

/* Headline word shine — sweeps a gradient across an <em> once in view */
.shine-word {
  background-image: linear-gradient(
    100deg,
    currentColor 0%,
    currentColor 38%,
    rgba(255, 255, 255, 0.95) 50%,
    currentColor 62%,
    currentColor 100%
  );
  background-size: 280% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 1.6s cubic-bezier(.25, .8, .25, 1);
}
.shine-word.shine-go {
  background-position: -30% 0;
}
/* Give it a beat after the shine completes; restore solid fill so underline
   flourish etc still reads. */
.shine-word.shine-done {
  background: none;
  -webkit-text-fill-color: inherit;
}

/* Waitlist bloom — background pulse driven by motion.js via --bloom (0..1) */
#waitlist {
  --bloom: 0;
  position: relative;
  overflow: hidden;
}
#waitlist::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%) scale(calc(0.9 + var(--bloom) * 0.25));
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(242, 153, 95, calc(0.16 + var(--bloom) * 0.08)),
    transparent 70%
  );
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease;
}
.btn-primary:hover::before { opacity: 1; }

/* ---------- Correlation chart (accuracy big card) ---------- */
.corr-chart {
  margin-top: 18px;
  padding: 18px 18px 14px;
  background: #FFFFFF;
  border: 1px solid var(--hair);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.corr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.corr-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.corr-title .vs { color: var(--ink-3); font-style: italic; margin: 0 4px; }
.dot-legend { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.dot-legend.sleep  { background: #4080C7; }
.dot-legend.energy { background: var(--primary); }
.corr-stat { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-serif); }
.corr-stat-big {
  font-size: 24px; font-weight: 500; color: var(--secondary);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.corr-stat-sub { font-size: 11px; color: var(--ink-3); font-family: var(--font-sans); }
.corr-svg-wrap { position: relative; margin: 6px 0 12px; }
.corr-svg { width: 100%; height: 180px; display: block; }
.corr-grid line { stroke: var(--hair); stroke-width: 1; }
.corr-scrub {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.corr-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; width: 100%; height: 180px; background: transparent; cursor: ew-resize;
}
.corr-scrub::-moz-range-thumb { width: 100%; height: 180px; background: transparent; border: 0; cursor: ew-resize; }
.corr-readout {
  display: grid; grid-template-columns: auto 1fr 1fr;
  gap: 12px 20px; padding-top: 10px; border-top: 1px solid var(--hair);
}
.corr-day { display: flex; flex-direction: column; gap: 2px; }
.corr-day-label {
  font-family: var(--font-serif); font-size: 18px; color: var(--ink);
  font-weight: 500; letter-spacing: -0.01em;
}
.corr-day-sub { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.corr-metric { display: flex; flex-direction: column; gap: 2px; }
.metric-val {
  font-family: var(--font-serif); font-size: 18px; color: var(--ink);
  font-weight: 500; font-variant-numeric: tabular-nums;
}
.metric-label { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Confidence legend (confidence card) ---------- */
.conf-legend {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px 10px; font-size: 11.5px; color: var(--ink-2);
}
.conf-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 22px; height: 6px; border-radius: 999px; display: inline-block; }
.sw-hi { background: var(--success); }
.sw-md { background: var(--primary); }
.sw-lo { background: var(--ink-3); opacity: 0.5; }
.sw-logged   { background: var(--secondary); }
.sw-grace    { background: var(--hair); border: 1px dashed var(--ink-3); height: 4px; }
.sw-backfill { background: var(--primary-tint); border: 1px solid var(--primary); height: 4px; }

/* ---------- Stat strip (session memory / sources) ---------- */
.stat-strip {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid var(--hair);
}
.stat-num {
  font-family: var(--font-serif); font-size: 38px; line-height: 1;
  font-weight: 500; color: var(--secondary);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.stat-pct {
  font-family: var(--font-serif); font-size: 20px; color: var(--secondary);
  font-weight: 500; letter-spacing: -0.02em; margin-right: 4px;
}
.stat-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; flex: 1 1 160px; }

/* ---------- Coverage grid (streak-safe) ---------- */
.coverage-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-top: 14px;
}
.cov-cell {
  aspect-ratio: 1; border-radius: 5px; background: var(--hair);
  position: relative;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s;
}
.cov-cell.logged   { background: var(--secondary); }
.cov-cell.grace    { background: transparent; border: 1px dashed var(--ink-3); }
.cov-cell.backfill { background: var(--primary-tint); border: 1px solid var(--primary); }
.cov-cell:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(115, 112, 217, 0.25); z-index: 2;
}
.cov-cell[data-label]:hover::after {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: white;
  font-size: 10.5px; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; z-index: 10;
}
.coverage-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
  font-size: 11px; color: var(--ink-3);
}
.coverage-legend span { display: inline-flex; align-items: center; gap: 6px; }

@keyframes cov-in {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Motion-owned elements: suppress the legacy CSS reveal since GSAP drives */
.motion-owned.reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* Reduced-motion: ensure everything is visible regardless */
@media (prefers-reduced-motion: reduce) {
  .split-inner,
  .reveal,
  .reveal-rise,
  .reveal-stagger,
  .stagger-child,
  .card,
  .flow-step {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .phone-aura,
  .hero-grid-bg,
  .marquee-track { animation: none !important; }
}

/* ========================================================================
   MOBILE RESPONSIVE — consolidated overrides for ≤ 760px and ≤ 480px
   ======================================================================== */

/* Global: prevent horizontal scroll + shrink outsized images */
html, body { overflow-x: hidden; max-width: 100%; }
img { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  /* -------- Layout paddings -------- */
  main, section { padding-left: 20px; padding-right: 20px; }
  .container, .wrap, .inner { max-width: 100%; }

  /* -------- Nav -------- */
  nav.topnav, .topnav, header nav {
    padding: 14px 16px;
  }
  .nav-links { gap: 8px; }
  .nav-links .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .nav-brand span { font-size: 17px; }

  /* -------- Hero -------- */
  .hero { padding: 80px 20px 40px; min-height: auto; text-align: center; }
  .hero-grid { gap: 32px; grid-template-columns: 1fr !important; justify-items: center; }
  .hero-copy { width: 100%; max-width: 560px; margin: 0 auto; text-align: center; }
  .hero-phone-wrap { justify-self: center !important; margin: 0 auto; }
  .display { font-size: clamp(38px, 10vw, 54px); line-height: 1.04; text-align: center; }
  .display .split-line { display: block; text-align: center; }
  .output-wheel { max-width: 100% !important; }
  .hero-copy .lede, .hero-lede { font-size: 17px; line-height: 1.55; }
  .hero-eyebrow-row { justify-content: center; flex-wrap: wrap; gap: 10px; }
  .eyebrow-mascot { width: 40px; height: 40px; }
  .hero-eyebrow-pill { font-size: 12px; padding: 6px 12px; }
  .hero-cta-row { flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin: 24px auto 0; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }

  /* -------- Phone mock: scale down so it always fits -------- */
  .phone {
    width: min(320px, 86vw);
    height: min(660px, 176vw);
    border-radius: clamp(38px, 13vw, 56px);
    padding: 8px;
    box-shadow:
      0 0 0 1.5px #1a1a1a,
      0 20px 40px rgba(115,112,217,0.16),
      0 40px 80px rgba(0,0,0,0.12);
  }
  .phone-screen { border-radius: clamp(30px, 11vw, 46px); }
  .phone-notch { width: 30%; max-width: 110px; }

  /* -------- Section heads -------- */
  .h2 { font-size: clamp(30px, 8vw, 42px); line-height: 1.1; }
  .h3 { font-size: clamp(22px, 6vw, 28px); }
  .section-head { margin-bottom: 40px; }
  .section-head .lede { font-size: 16px; }

  /* -------- Grids: collapse to one column -------- */
  .accuracy-grid,
  .flow-grid,
  .principles-grid,
  .compare-grid,
  .compare-header,
  .stats-grid,
  .features-grid,
  .two-col,
  .three-col { grid-template-columns: 1fr !important; gap: 16px; }

  .card {
    min-height: auto !important;
    grid-column: span 1 !important;
    padding: 24px;
  }

  /* -------- Waitlist form -------- */
  .waitlist-form {
    flex-direction: column;
    gap: 10px;
    padding: 6px;
  }
  .waitlist-form input {
    width: 100%;
    font-size: 16px; /* 16px prevents iOS zoom on focus */
    padding: 14px 16px;
  }
  .waitlist-form button {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  /* -------- Touch targets: 44px minimum -------- */
  a.btn, button.btn, .btn { min-height: 44px; display: inline-flex; align-items: center; }

  /* -------- Marquee: keep speed reasonable -------- */
  .marquee-track { font-size: 14px; gap: 18px; }

  /* -------- Compare table: single column with labels -------- */
  .compare-header > div:not(:first-child) { display: none; }
  .compare-grid .row-head {
    font-weight: 600;
    padding-top: 20px;
    font-size: 15px;
    color: var(--ink);
  }

  /* -------- Flow steps -------- */
  .flow-step { padding: 24px; }
  .flow-step .num { font-size: 13px; }

  /* -------- Footer -------- */
  footer { padding: 40px 20px; text-align: center; }
  footer .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }

  /* -------- Decorative mascots: hide to reduce clutter -------- */
  .section-mascot, .hero-mascot-sidekick, .hero-mascot { display: none !important; }
  .pattern-card { display: none !important; }

  /* -------- Output wheel: tighten -------- */
  .wheel-wrap { font-size: 0.9em; }
}

@media (max-width: 480px) {
  main, section { padding-left: 16px; padding-right: 16px; }
  .display { font-size: clamp(34px, 9.5vw, 44px); }
  .h2 { font-size: clamp(26px, 7.5vw, 34px); }
  .hero-cta-row { max-width: 100%; }
  .card { padding: 20px; }
  .nav-links a:not(.btn) { display: none; }
  .nav-brand span { font-size: 16px; }
  .phone { width: min(300px, 88vw); height: min(620px, 180vw); }
}

