/* mauveapp.sg — layout "A · Story of a day" (ported from the owner-approved Design-canvas prototype).
   Tokens are owner-locked (see BRAND-NOTES "Visual identity"). Light theme only, on purpose:
   the design hard-codes white cards, a white-on-gradient hero and a dark tally pill.
   Motion contract: every hidden "before" state lives under html.js-reveal (added by app.js),
   so with JS off, reduced motion or no IntersectionObserver everything sits in its final state. */

@font-face { font-family: Geist; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/Geist_400Regular.ttf) format("truetype"); }
@font-face { font-family: Geist; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/Geist_500Medium.ttf) format("truetype"); }
@font-face { font-family: Geist; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/Geist_600SemiBold.ttf) format("truetype"); }
@font-face { font-family: Geist; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/Geist_700Bold.ttf) format("truetype"); }
@font-face { font-family: GeistMono; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/GeistMono_500Medium.ttf) format("truetype"); }

@property --mx { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --my { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------- Tokens ---------- */
:root, .vg {
  --bg: #faf9fd; --surface: #ffffff; --tint: #f1ebfa; --border: #e5e3e9;
  --text: #1b1a1f; --mut: #6a676f; --dim: #99979e;
  --m400: #b798ee; --m500: #a07cdb; --logo: #8e5aa7; --m700: #694b96; --m100: #f3e8ff;
  --good: #269e5f; --bad: #da534f; --warn: #d79628;
  --shadow: 0 18px 44px rgba(105, 75, 150, 0.22), 0 2px 8px rgba(27, 26, 31, 0.08);
}
:root { color-scheme: light; }

/* Motion personality: calm (the brand's enter easing). --dur/--stag are unitless ms. */
:root { --ease: cubic-bezier(0.22, 1, 0.36, 1); --dur: 520; --stag: 90; --tempo: 1; --dist: 28px; --scale: 1; --rot: 0deg; --blur: 0px; --par: 0px; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  font-family: Geist, -apple-system, system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrap { max-width: 1176px; margin: 0 auto; padding: 0 48px; }
.sec { padding: 120px 0 0; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.eyebrow.acc { color: var(--m700); }
.h2 { margin: 12px 0 0; font-size: 44px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; max-width: 16em; }
.h3 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.25; }
.body { margin: 8px 0 0; color: var(--mut); font-size: 17px; line-height: 1.55; }
.mono { font-family: GeistMono, ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Honeypot: off-screen, never visible, never focusable (tabindex -1 in the markup). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--m500); outline-offset: 3px; }

/* ---------- App components (recreated from the shipped app) ---------- */
.vg { display: block; width: 100%; max-width: 400px; margin: 0 auto; container: vg / inline-size; font-family: Geist, -apple-system, system-ui, sans-serif; color: var(--text); }
.card { background: var(--surface); color: var(--text); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); color: var(--text); border-radius: 22px; padding: 18px; border: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.cap { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--mut); }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--border); }
.dot { position: relative; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rt { display: flex; flex-direction: column; min-width: 0; }
.rt b { font-size: 16.5px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.rt span { font-size: 14px; color: var(--mut); line-height: 1.35; }
.amt { margin-left: auto; font-size: 16.5px; white-space: nowrap; }
span.a { display: inline-block; }

.nt { padding: 16px 18px 18px; }
.nh { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--mut); }
.appi { width: 28px; height: 28px; border-radius: 8px; background: var(--logo); display: flex; align-items: center; justify-content: center; flex: none; }
.appi svg { width: 19px; height: 19px; }
.nt-t { margin-left: auto; font-weight: 400; letter-spacing: 0; color: var(--dim); font-size: 13px; }
.nt-m { margin-top: 12px; display: flex; align-items: baseline; gap: 12px; font-size: 19px; }
.nt-m b { font-weight: 600; letter-spacing: -0.3px; }
.nt-m .mono { margin-left: auto; }
.nt-s { margin-top: 2px; font-size: 14px; color: var(--mut); }
.nt-b { display: block; margin-top: 10px; font-size: 16px; font-weight: 600; }
.nt-l { display: block; font-size: 15px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.big { margin-top: 4px; font-size: 30px; letter-spacing: -0.5px; line-height: 1.15; }
.small { margin-top: 2px; font-size: 14px; color: var(--mut); }
.bi + .bi { margin-top: 14px; }
.bh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bh b { font-size: 15.5px; font-weight: 600; }
.bh .mono { margin-left: auto; font-size: 13px; color: var(--mut); white-space: nowrap; }
.bh .mono.bad { color: var(--bad); }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--border); }
.fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 3px; background: var(--warn); transform-origin: left center; }
.fill.over { background: var(--bad); }
.tick { position: absolute; left: 100%; top: -2px; width: 1.5px; height: 10px; background: var(--text); transform: translateX(-0.75px); }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; font-size: 16px; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.tog { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--m500); border: 0; padding: 0; flex: none; cursor: pointer; }
.tog::after { content: ''; position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }

.shot { position: relative; overflow: hidden; text-align: center; }
.shot-to { margin-top: 10px; font-size: 15px; color: var(--mut); }
.read { position: relative; display: inline-block; margin-top: 4px; font-size: 30px; letter-spacing: -0.5px; line-height: 1.2; }
.read::after { content: ''; position: absolute; inset: -4px -12px; border: 2px solid var(--m500); border-radius: 10px; }
/* Decorative scan line (empty, no content): it only shows while its keyframe plays. */
.scan { position: absolute; left: 14px; right: 14px; top: 94%; height: 2px; border-radius: 1px; background: var(--m500); box-shadow: 0 0 14px 2px rgba(160, 124, 219, 0.6); opacity: 0; }

.qa-amt { font-size: 32px; letter-spacing: -0.5px; line-height: 1.15; }
.qa-desc { margin-top: 6px; font-size: 16.5px; display: flex; align-items: center; }
.type { white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; background: var(--m500); border-radius: 1px; }

.ru-h { margin-top: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.25; }
.ru-p { margin: 8px 0 0; font-size: 15.5px; color: var(--mut); }

.mr { padding: 12px 0; }
.mr + .mr { border-top: 1px solid var(--border); }
.mr-h { display: flex; align-items: baseline; gap: 10px; }
.mr-h b { font-size: 15.5px; font-weight: 600; }
.mr-h .mono { margin-left: auto; font-size: 16px; }
.mr-s { margin-top: 2px; font-size: 13.5px; color: var(--mut); }
.sl { position: relative; height: 6px; margin: 14px 0 6px; border-radius: 3px; background: var(--border); }
.sl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 3px; background: var(--m500); transform-origin: left center; }
.sl-spent { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: var(--dim); transform: translateX(-1px); }
.sl-th { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(27, 26, 31, 0.25), 0 0 0 1px rgba(27, 26, 31, 0.06); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; font-family: inherit; font-size: 17px; font-weight: 600; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.7; cursor: progress; transform: none; }
.btn-pri { background: var(--m700); color: #fff; }
.btn-white { background: #fff; color: var(--m700); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }

/* ---------- Sticky nav ----------
   Chrome only (it repeats the hero logo + CTA). It is not rendered without JS; app.js adds
   html.js-nav whenever it runs, and the hidden-until-[data-show] default exists only under it. */
.nav-hold { display: none; position: sticky; top: 0; height: 0; z-index: 50; }
.js-nav .nav-hold { display: block; }
.nav { position: absolute; left: 0; right: 0; top: 0; height: 64px; background: rgba(250, 249, 253, 0.74); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid rgba(229, 227, 233, 0.9); }
.js-nav .nav { transform: translateY(-100%); opacity: 0; visibility: hidden; transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 420ms; }
.js-nav .nav[data-show] { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
/* Page progress along the bottom edge of the sticky nav */
.nav-prog { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--logo); transform: scaleX(var(--sp, 0)); transform-origin: left center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 36px 0 104px; background: radial-gradient(circle at calc(30% + var(--mx) * 10%) calc(28% + var(--my) * 10%), #b798ee 0%, #8e5aa7 52%, #694b96 100%); transition: --mx 900ms cubic-bezier(0.22, 1, 0.36, 1), --my 900ms cubic-bezier(0.22, 1, 0.36, 1); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 500; letter-spacing: -0.8px; color: inherit; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav .logo { color: var(--text); font-size: 20px; }
.nav .logo svg { width: 24px; height: 24px; }
.hero-in { display: flex; flex-direction: column; gap: 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.h1 { margin: 0; font-size: 56px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
.kw { display: inline-block; }
.sub { margin: 22px 0 0; font-size: 20px; line-height: 1.45; color: var(--m100); max-width: 30em; }
.beat { display: inline-block; color: #fff; font-weight: 600; white-space: nowrap; }
.join { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 480px; }
.join-in { min-height: 52px; padding: 0 18px; font-family: inherit; font-size: 17px; color: #fff; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.42); border-radius: 14px; }
.join-in::placeholder { color: rgba(255, 255, 255, 0.72); }
.beta-link { margin-top: 32px; }
/* Form error/status line. Both forms sit on the purple gradient, so white reads on either. */
.status { min-height: 1.4em; margin: 12px 0 0; max-width: 480px; font-size: 15px; font-weight: 500; line-height: 1.4; color: #fff; }
.status:empty { min-height: 0; margin: 0; }
.fine { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.8); max-width: 480px; }
.fine a, .tr p a { color: inherit; }
.ios { margin: 20px 0 0; font-size: 15px; font-weight: 500; color: #fff; }
/* Success node built by app.js after /api/early-access returns {ok:true}. */
.joined { margin-top: 32px; display: flex; align-items: center; gap: 14px; max-width: 480px; min-height: 52px; padding: 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.42); font-size: 16px; line-height: 1.4; color: #fff; }
.joined b { font-weight: 600; }
.joined svg { width: 28px; height: 28px; flex: none; }
.hero-vis { justify-self: end; width: 100%; max-width: 400px; perspective: 1000px; }
.tilt { transform: rotateY(calc(var(--mx) * 7deg)) rotateX(calc(var(--my) * -7deg)); transform-style: preserve-3d; }
.stream { position: relative; height: 340px; }
.sc { position: absolute; left: 0; right: 0; top: 0; transform: translateY(calc(var(--j) * 112px)); }
/* The 4th card is the off-stage slot of the looping stream (aria-hidden in the markup). */
.sc:nth-child(4) { opacity: 0; }

/* ---------- A · Story of a day ---------- */
.tl { position: relative; margin-top: 72px; display: flex; flex-direction: column; gap: 120px; }
.tl-line { position: absolute; left: 131px; top: 8px; bottom: 0; width: 2px; border-radius: 1px; background: var(--border); }
.tl-fill { position: absolute; inset: 0; border-radius: 1px; background: var(--logo); transform: scaleY(var(--g, 1)); transform-origin: top center; }
.tl-head { position: absolute; left: 50%; top: calc(var(--g, 1) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--logo); box-shadow: 0 0 0 5px rgba(160, 124, 219, 0.22); }
.tl-intro { margin: 16px 0 0; max-width: 34em; }
.stop { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 48px; }
.stop-time { position: relative; padding: 4px 28px 0 0; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.stop-time .mono { font-size: 22px; letter-spacing: -0.5px; transition: color 280ms cubic-bezier(0.4, 0, 0.2, 1); }
.stop-tag { font-size: 14px; color: var(--mut); }
.stop-dot { position: absolute; right: -7px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); transition: background 420ms, border-color 420ms, box-shadow 420ms, transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.stop[data-in] .stop-dot { background: var(--logo); border-color: var(--logo); box-shadow: 0 0 0 6px rgba(160, 124, 219, 0.22); }
.stop[data-cur] .stop-time .mono { color: var(--m700); }
.stop[data-cur] .stop-dot { transform: scale(1.3); }
.stop-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 56px; align-items: center; }

/* Running tally: sticks to the bottom of the screen while the timeline is on it */
.tally-hold { position: sticky; bottom: 24px; z-index: 20; display: flex; justify-content: center; margin-top: 80px; pointer-events: none; }
.tally { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px 0 16px; border-radius: 999px; background: rgba(27, 26, 31, 0.9); color: #fff; font-size: 15px; white-space: nowrap; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 32px rgba(27, 26, 31, 0.22); transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.tally-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m400); flex: none; }
.tally-n { font-weight: 600; }
.tally-t, .tally-l { color: rgba(255, 255, 255, 0.72); }
.tally-v { display: inline-block; font-weight: 500; }

/* ---------- Closing: statement, trust, FAQ, CTA, footer ---------- */
.stmt { margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; max-width: 24em; }
.stmt .acc { color: var(--m700); }
.trust { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tr { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; }
.tr svg { width: 28px; height: 28px; color: var(--logo); }
.tr h3 { margin: 18px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.3; }
.tr p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--mut); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; font-size: 17px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.pm { width: 20px; height: 20px; flex: none; color: var(--m700); transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1); }
.faq details[open] .pm { transform: rotate(45deg); }
.faq-a { margin: 0; padding: 0 40px 20px 0; font-size: 16px; line-height: 1.6; color: var(--mut); }
.cta { position: relative; overflow: hidden; border-radius: 32px; padding: 72px 64px; color: #fff; background: radial-gradient(circle at 30% 28%, #b798ee 0%, #8e5aa7 52%, #694b96 100%); }
.cta .h2 { margin-top: 0; }
.cta-sub { margin: 14px 0 0; font-size: 18px; line-height: 1.45; color: var(--m100); }
.foot { margin-top: 112px; padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 15px; color: var(--mut); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 17px; letter-spacing: -0.4px; }
.foot-brand svg { width: 20px; height: 20px; }
.foot-c { margin: 18px 0 0; color: var(--dim); font-size: 14px; }

/* ---------- Tablet and phone width ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 24px; }
  .sec { padding-top: 88px; }
  .h2 { font-size: 32px; }
  .h3 { font-size: 23px; }
  .hero { padding: 24px 0 72px; }
  .hero-in { gap: 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .h1 { font-size: 40px; }
  .sub { font-size: 18px; }
  .join { grid-template-columns: minmax(0, 1fr); }
  .hero-vis { justify-self: stretch; max-width: none; }
  .nav-in .btn-sm { padding: 0 14px; font-size: 15px; }

  .tl { gap: 72px; margin-top: 48px; }
  .tl-line { left: 6px; }
  .stop { grid-template-columns: minmax(0, 1fr); padding-left: 36px; }
  .stop-time { flex-direction: row; align-items: baseline; gap: 10px; text-align: left; padding: 0 0 16px; }
  .stop-dot { right: auto; left: -37px; top: 6px; }
  .stop-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tally { font-size: 14px; gap: 8px; padding: 0 16px 0 14px; }
  .tally-hold { bottom: 16px; margin-top: 56px; }

  .stmt { font-size: 28px; }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-a { padding-right: 0; }
  .cta { padding: 40px 24px; border-radius: 24px; }
}

/* Vignettes narrower than a desktop card (phone width): budget figures drop under the category name */
@container vg (max-width: 340px) {
  .bh { flex-wrap: wrap; row-gap: 2px; }
  .bh .mono { flex-basis: 100%; margin-left: 20px; }
  .big { font-size: 26px; }
  .nt-m { font-size: 17px; }
}

/* ---------- Motion ----------
   Hidden "before" states exist ONLY under html.js-reveal and only when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Scroll reveal */
  [data-reveal] { transition: opacity calc(var(--dur) * 1ms) var(--ease), transform calc(var(--dur) * 1.2ms) var(--ease), filter calc(var(--dur) * 1ms) var(--ease); transition-delay: calc(var(--i, 0) * var(--stag) * 1ms); }
  .js-reveal [data-reveal]:not([data-in]) { opacity: 0; transform: translate3d(0, var(--dist), 0) scale(var(--scale)) rotate(var(--rot)); filter: blur(var(--blur)); }

  /* Living vignettes: each .a plays its keyframe (--k) after --d ms once the story is in view */
  .a { --k: up; --d: 0; --t: var(--dur); --e: var(--ease); }
  .js-reveal [data-story]:not([data-in]) .a { opacity: 0; animation: none; }
  [data-story][data-in] .a { animation-name: var(--k); animation-duration: calc(var(--t) * 1ms * var(--tempo)); animation-timing-function: var(--e); animation-delay: calc(var(--d) * 1ms * var(--tempo)); animation-fill-mode: both; }

  .pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: 0; }
  [data-story][data-in] .pulse::after { animation: ring 900ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc((var(--d) + 120) * 1ms * var(--tempo)); }
  .js-reveal [data-story]:not([data-in]) .read::after { opacity: 0; }
  [data-story][data-in] .read::after { animation: pop 420ms var(--ease) both; animation-delay: calc(1450ms * var(--tempo)); }
  [data-story][data-in] .tog.a::after { animation: knob calc(var(--t) * 1ms * var(--tempo)) var(--ease) both; animation-delay: calc(var(--d) * 1ms * var(--tempo)); }
  .js-reveal .caret { animation: blink 1.05s steps(1) infinite; }

  /* Scroll-linked: parallax (calm = none), statement word highlight */
  .par { transform: translate3d(0, calc((var(--p, 0.5) - 0.5) * var(--par) * -1), 0); }
  .js-reveal .stmt .sw { opacity: clamp(0.2, calc((var(--p, 0.6) * 2.4 - 0.2 - var(--w)) * 5), 1); transition: opacity 120ms linear; }

  /* Hero: live notification stream (only while the motion engine runs) */
  .js-reveal .stream .sc { animation: stream 9s var(--ease) infinite; animation-delay: calc(var(--j) * -2.25s); }

  /* Email success */
  .joined { animation: pop 520ms var(--ease) both; }
  .joined .ck-c { stroke-dasharray: 76; animation: draw 600ms var(--ease) 120ms both; --len: 76; }
  .joined .ck-p { stroke-dasharray: 17; animation: draw 420ms var(--ease) 520ms both; --len: 17; }

  .faq details[open] .faq-a { animation: up calc(var(--dur) * 1ms) var(--ease) both; }

  /* Each stop arrives in three beats: time from the line, then copy, then its vignette */
  .stop[data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .stop-time, .stop-copy, .stop-vis { transition: opacity calc(var(--dur) * 1ms) var(--ease), transform calc(var(--dur) * 1.2ms) var(--ease), filter calc(var(--dur) * 1ms) var(--ease); }
  .stop-copy { transition-delay: calc(var(--stag) * 1ms); }
  .stop-vis { transition-delay: calc(var(--stag) * 2ms); }
  .js-reveal .stop:not([data-in]) .stop-time { opacity: 0; transform: translate3d(-20px, 0, 0); }
  .js-reveal .stop:not([data-in]) .stop-copy { opacity: 0; transform: translate3d(0, var(--dist), 0) rotate(var(--rot)); filter: blur(var(--blur)); }
  .js-reveal .stop:not([data-in]) .stop-vis { opacity: 0; transform: translate3d(0, calc(var(--dist) * 1.4), 0) scale(var(--scale)); filter: blur(var(--blur)); }
  .tl-head { animation: headpulse 2.4s ease-in-out infinite; }
  .js-reveal .tally:not([data-on]) { opacity: 0; transform: translateY(16px); }
  .tally[data-bump] .tally-v { animation: bump 460ms var(--ease); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@keyframes up { from { opacity: 0; transform: translate3d(0, calc(var(--dist) * 0.6), 0) scale(var(--scale)) rotate(var(--rot)); } }
@keyframes drop { from { opacity: 0; transform: translate3d(0, -28px, 0) scale(0.97); } }
@keyframes lift { from { opacity: 0; transform: translate3d(0, 26px, 0) scale(0.95); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes fillover {
  0% { transform: scaleX(0); background: var(--warn); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
  55% { transform: scaleX(1); background: var(--warn); }
  78% { background: var(--warn); }
  100% { transform: scaleX(1); background: var(--bad); }
}
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes scan { 0% { top: 6%; opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { top: 94%; opacity: 0; } }
@keyframes ring { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes togbg { from { background: var(--border); } }
@keyframes knob { from { transform: translateX(-18px); } }
@keyframes slide { from { left: 0; } }
@keyframes draw { from { stroke-dashoffset: var(--len); } }
@keyframes stream {
  0% { transform: translateY(-36px) scale(0.96); opacity: 0; }
  6%, 25% { transform: translateY(0); opacity: 1; }
  31%, 50% { transform: translateY(112px); opacity: 1; }
  56%, 75% { transform: translateY(224px); opacity: 1; }
  81%, 100% { transform: translateY(270px) scale(0.96); opacity: 0; }
}
@keyframes headpulse { 50% { box-shadow: 0 0 0 9px rgba(160, 124, 219, 0.12); } }
@keyframes bump { 40% { transform: scale(1.14); } }
