/* whimzi.live
   Tokens lifted from src/theme/tokens.ts so the site and the app are one thing.
   The app is a quiet private room, not a stage: motion here is purposeful and
   sparse, and every animation is off under reduce-motion. */

:root {
  --paper: #FBFAF8;
  --surface: #FFFFFF;
  --sunk: #F4F1EC;
  --ink: #1A1917;
  --ink-muted: #635E58;
  --ink-faint: #78726A;
  --accent: #BF4D2C;
  --accent-soft: #F8E9E3;
  --sage: #4A6B45;
  --sage-soft: #E9EFE7;
  --plum: #7A3F63;
  --plum-soft: #F2E7EE;
  --indigo: #46578A;
  --indigo-soft: #E7EAF2;
  --ochre: #8A6220;
  --ochre-soft: #F5EDDD;
  --hairline: #E9E5DF;
  --shadow: 0 6px 22px rgba(26,25,23,0.07);
  --shadow-lift: 0 22px 60px rgba(26,25,23,0.18);
  --bezel: #1A1917;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141311;
    --surface: #1E1C1A;
    --sunk: #191715;
    --ink: #F5F2ED;
    --ink-muted: #A8A29A;
    --ink-faint: #8F8880;
    --accent: #E4744F;
    --accent-soft: #34231B;
    --sage: #93B38C;
    --sage-soft: #1F2A1E;
    --plum: #CE92B5;
    --plum-soft: #2C1E27;
    --indigo: #98AAD8;
    --indigo-soft: #1E2231;
    --ochre: #D6AC63;
    --ochre-soft: #2B2417;
    --hairline: #2E2B27;
    --shadow: 0 6px 22px rgba(0,0,0,0.35);
    --shadow-lift: 0 22px 60px rgba(0,0,0,0.6);
    --bezel: #3A352F;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 740px; }

h1 { font-size: clamp(40px, 6.2vw, 66px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.03; text-wrap: balance; }
h2 { font-size: clamp(27px, 3.5vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.13; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
p { color: var(--ink-muted); font-size: 16.5px; }
.lead { font-size: clamp(17px, 1.9vw, 20px); max-width: 46ch; line-height: 1.55; }
.small { font-size: 13.5px; color: var(--ink-faint); }
.eyebrow { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head p { margin-top: 12px; }
.section { padding: 84px 0; }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.nav.stuck { border-bottom-color: var(--hairline); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand b { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.nav-links { display: none; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }


.menu-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--ink); border-radius: 12px;
}
.menu-btn:hover { background: var(--sunk); }
.menu-btn span { display: block; width: 19px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .22s ease, opacity .18s ease; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; width: 19px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .22s ease; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
/* Placed after the base rules so it actually wins. */
@media (min-width: 820px) { .nav-links { display: flex; } .menu-btn { display: none; } }

/* The sheet slides down from the bar, the way the app's own side menu slides in. */
.sheet { display: none; border-top: 1px solid var(--hairline); background: var(--paper); }
.sheet.open { display: block; }
.sheet a { display: block; padding: 15px 0; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--hairline); }
.sheet a:last-child { border-bottom: 0; }
@media (min-width: 820px) { .sheet { display: none !important; } }

/* ---------- buttons ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 0 30px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16.5px;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.cta:active { transform: translateY(0) scale(.99); }
.cta.sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.cta.quiet { background: transparent; color: var(--ink-muted); box-shadow: none; font-weight: 600; }
.cta.quiet:hover { color: var(--ink); transform: none; box-shadow: none; }

/* ---------- the device ---------- */
.device {
  position: relative; width: min(272px, 74vw);
  border-radius: 44px; padding: 10px; background: var(--bezel);
  box-shadow: var(--shadow-lift);
}
.device img { border-radius: 35px; }
.stage { position: relative; display: flex; justify-content: center; }
.stage::before {
  content: ''; position: absolute; inset: -6% -10% 6%;
  background: radial-gradient(58% 48% at 50% 40%, var(--accent-soft), transparent 72%);
  z-index: 0;
}
.stage .device { z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .stage .device { animation: float 9s ease-in-out infinite; }
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- hero ---------- */
.hero { display: grid; gap: 48px; align-items: center; padding: 36px 0 82px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr .95fr; gap: 56px; padding: 60px 0 112px; } }
.hero-copy .eyebrow { margin-bottom: 16px; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .cta { margin-top: 30px; }
.hero-note { margin-top: 15px; }

/* ---------- the two ways an answer travels ---------- */
.ways { display: grid; gap: 18px; }
@media (min-width: 840px) { .ways { grid-template-columns: 1fr 1fr; gap: 22px; } }
.way { border-radius: 28px; padding: 26px 24px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.way.one { background: var(--plum-soft); }
.way.two { background: var(--accent-soft); }
.way .tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 99px; margin-bottom: 12px; }
.way.one .tag { color: var(--plum); background: color-mix(in srgb, var(--plum) 13%, transparent); }
.way.two .tag { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.way h3 { font-size: 21px; letter-spacing: -0.02em; margin-bottom: 8px; }
.way > p { font-size: 15.5px; }
.way .verdict { margin-top: 16px; font-size: 14.5px; font-weight: 700; color: var(--ink); }

/* The diagram: two people, and what happens between them.
   Panel one delivers. Panel two holds, waits, and only then resolves --
   the pause is the honest part, so it is written into the timeline. */
.dia { position: relative; height: 138px; margin: 22px 0 4px; margin-top: auto; }
.node {
  position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px;
  border-radius: 99px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: #fff;
}
.node.you { left: 4px; background: var(--indigo); }
.node.them { right: 4px; background: var(--sage); }
.node small { position: absolute; top: 52px; font-size: 11px; font-weight: 700; color: var(--ink-faint); width: 60px; text-align: center; left: -7px; }
.track { position: absolute; top: 50%; left: 56px; right: 56px; height: 2px; margin-top: -1px; background: var(--hairline); border-radius: 2px; }
.pip {
  position: absolute; top: 50%; margin-top: -11px; left: 56px;
  width: 22px; height: 22px; border-radius: 7px; box-shadow: var(--shadow);
}
.way.one .pip { background: var(--plum); }
.way.two .pip { background: var(--accent); }
.pip.back { background: var(--sage) !important; }
.seal {
  position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0;
}
.seal svg { width: 19px; height: 19px; color: var(--accent); }
.burst {
  position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 99px; border: 2px solid var(--accent); opacity: 0;
}
.dia .note {
  position: absolute; left: 0; right: 0; bottom: -4px; text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--ink-faint); opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .way.one .pip { animation: send 6s ease-in-out infinite; }
  .way.one .note.a { animation: noteA 6s ease-in-out infinite; }
  .way.two .pip.out { animation: toMiddle 9s ease-in-out infinite; }
  .way.two .pip.back { animation: toMiddleBack 9s ease-in-out infinite; }
  .way.two .seal { animation: sealed 9s ease-in-out infinite; }
  .way.two .burst { animation: burst 9s ease-out infinite; }
  .way.two .note.b { animation: noteB 9s ease-in-out infinite; }
  .way.two .note.c { animation: noteC 9s ease-in-out infinite; }
}

/* These animate `left`, not a percentage transform: a percentage translate
   resolves against the 22px pip itself, not against the track it crosses. */

/* One way: it simply goes, all the way. */
@keyframes send {
  0%, 8%    { left: 56px; opacity: 0; }
  16%       { left: 56px; opacity: 1; }
  52%       { left: calc(100% - 78px); opacity: 1; }
  60%, 100% { left: calc(100% - 78px); opacity: 0; }
}
@keyframes noteA { 0%,50% { opacity: 0; } 58%, 88% { opacity: 1; } 96%,100% { opacity: 0; } }

/* Mutual: yours goes as far as the middle and stops there, and is sealed. */
@keyframes toMiddle {
  0%, 4%    { left: 56px; opacity: 0; }
  12%       { left: 56px; opacity: 1; }
  28%, 72%  { left: calc(50% - 25px); opacity: 1; }
  80%, 100% { left: calc(50% - 25px); opacity: 0; }
}
/* Theirs arrives only much later. That pause is the honest part. */
@keyframes toMiddleBack {
  0%, 52%   { left: calc(100% - 78px); opacity: 0; }
  58%       { left: calc(100% - 78px); opacity: 1; }
  72%, 74%  { left: calc(50% + 3px); opacity: 1; }
  80%, 100% { left: calc(50% + 3px); opacity: 0; }
}
@keyframes sealed { 0%,26% { opacity: 0; } 32%, 66% { opacity: 1; } 73%, 100% { opacity: 0; } }
@keyframes burst {
  0%, 74%   { transform: scale(.7); opacity: 0; }
  80%       { opacity: .6; }
  96%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes noteB { 0%,32% { opacity: 0; } 38%, 64% { opacity: 1; } 70%,100% { opacity: 0; } }
@keyframes noteC { 0%,76% { opacity: 0; } 82%, 97% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- screenshot strip ---------- */
.strip { display: grid; gap: 26px; align-items: center; }
@media (min-width: 900px) { .strip { grid-template-columns: 1fr 1fr; gap: 60px; } .strip.flip .strip-media { order: -1; } }
.strip-media { display: flex; justify-content: center; }

/* ---------- rules ---------- */
.rules .section-head, .rules ul { max-width: 700px; }
.rules ul { list-style: none; margin-top: 26px; }
.rules li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--hairline); color: var(--ink-muted); font-size: 16.5px; }
.rules li:first-of-type { border-top: 0; }
.tick { color: var(--sage); flex: none; width: 20px; height: 20px; margin-top: 2px; }

/* ---------- closing + footer ---------- */
.closing { padding: 88px 0 96px; text-align: center; }
.closing p { margin: 16px auto 0; }
.closing .cta { margin-top: 30px; }
footer { border-top: 1px solid var(--hairline); padding: 34px 0 60px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { color: var(--ink-faint); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.foot a:hover { color: var(--ink); }

/* ---------- store badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 56px; padding: 0 22px; border-radius: 15px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease; box-shadow: var(--shadow);
}
.badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.badge svg { width: 24px; height: 24px; flex: none; }
.badge span { display: block; line-height: 1.15; text-align: left; }
.badge span i { display: block; font-style: normal; font-size: 10.5px; font-weight: 600; opacity: .75; }
.badge span b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- /install ---------- */
.install { min-height: calc(100vh - 68px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 60px; text-align: center; }
.install .mark { width: 74px; height: 74px; border-radius: 21px; margin: 0 auto 16px; }
.install h1 { font-size: clamp(31px, 6.4vw, 46px); margin-bottom: 16px; }
.install .lead { margin: 0 auto; }
.install .badges { margin-top: 32px; }
.trying { display: grid; place-items: center; min-height: 118px; margin-top: 32px; }
.trying[hidden], .stores[hidden] { display: none; }
.stores { min-height: 118px; margin-top: 32px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); opacity: .3; }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: blink 1.1s ease-in-out infinite; }
  .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.promises { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 38px; }
.promises span { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); background: var(--surface); box-shadow: var(--shadow); border-radius: 99px; padding: 8px 15px; }

/* ---------- prose (privacy) ---------- */
.prose { padding: 40px 0 80px; }
.prose h1 { margin-bottom: 10px; }
.prose h2 { font-size: clamp(21px, 2.4vw, 26px); margin: 44px 0 12px; }
.prose h3 { margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-muted); font-size: 16.5px; }
.prose p.eyebrow { color: var(--accent); font-size: 13.5px; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0 22px; }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--ink); font-weight: 700; }
.callout { background: var(--sunk); border-radius: 20px; padding: 22px 24px; margin: 22px 0; }
.callout p { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rise.in, html:not(.js) .rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* ---------- the tour ---------- */
.tour { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tour .device video { border-radius: 35px; display: block; width: 100%; height: auto; background: var(--sunk); }

/* Fixed height so the layout never jumps as the line changes. */
.cap {
  min-height: 62px; max-width: 34ch; text-align: center;
  font-size: 15.5px; font-weight: 600; color: var(--ink);
  transition: opacity .35s ease;
}
.cap.out { opacity: 0; }

.chapters { display: flex; gap: 7px; }
.chapters button {
  width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.chapters i { display: block; width: 7px; height: 7px; border-radius: 99px; background: var(--hairline); transition: background .25s ease, transform .25s ease; }
.chapters button[aria-current="true"] i { background: var(--accent); transform: scale(1.35); }
.chapters button:hover i { background: var(--ink-faint); }

.replay {
  display: none; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer; color: var(--ink-muted);
  font: 600 14px inherit; padding: 8px;
}
.replay.show { display: inline-flex; }
.replay svg { width: 17px; height: 17px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
