/* receiptready.ca: the public website (not the app; the app is app.receiptready.ca, in web/).
   Same brand as the app: periwinkle mark, indigo for buttons, warm paper background,
   DM Serif Display for headlines and the wordmark, Inter for everything else. */

@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Serif Display";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dm-serif-display-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Serif Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dm-serif-display-latin-italic.woff2") format("woff2");
}

:root {
  /* Brand palette (docs/brand.md) */
  --periwinkle: #8394ff;   /* the icon's square, pop-up messages */
  --periwinkle-soft: #e9ecff;
  --rr-ink: #5a6be8;       /* the RR on the receipt */
  --indigo: #3e54d3;       /* buttons and links */
  --indigo-press: #2f43b8;
  --midnight: #10133a;     /* deep text on periwinkle, the dark band */
  --paper: #f6f5f1;        /* page background */
  --white: #ffffff;
  --ink: #16181d;
  --dim: #5f636c;
  --line: #e4e1da;
  --green: #0a7d55;
  --green-soft: #e2f3ec;
  --amber-soft: #fdf0dc;
  --amber: #b4610a;

  --bg: var(--paper);
  --card: var(--white);
  --text: var(--ink);
  --text-dim: var(--dim);
  --border: var(--line);
  --accent: var(--indigo);
  --on-accent: #fff;
  --band: var(--midnight);

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1120px;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.04), 0 8px 30px rgba(16, 18, 24, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --card: #16191e;
    --text: #f1f2f4;
    --text-dim: #9aa0aa;
    --border: #272b33;
    --accent: var(--periwinkle);
    --on-accent: #0d0f12;
    --band: #131637;
    --periwinkle-soft: rgba(131, 148, 255, 0.14);
    --green-soft: rgba(10, 125, 85, 0.2);
    --amber-soft: rgba(180, 97, 10, 0.2);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.serif { font-family: var(--serif); letter-spacing: -0.01em; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}

/* ---- Wordmark (the lockup: receipt mark + "Receipt Ready" in DM Serif) ---- */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.lockup svg { width: 22px; height: auto; flex: none; }
.lockup span { font-family: var(--serif); font-size: 25px; line-height: 1; letter-spacing: -0.01em; }

/* ---- Top bar ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.top nav { display: flex; align-items: center; gap: 28px; }
.top nav a.link { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.top nav a.link:hover { color: var(--accent); }
@media (max-width: 760px) { .top nav a.link { display: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--indigo-press); }
@media (prefers-color-scheme: dark) { .btn:hover { background: #6d80f6; } }
.btn:active { transform: scale(0.98); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn.ghost:hover { background: var(--card); }
.btn.on-band { background: var(--white); color: var(--midnight); }
.btn.on-band:hover { background: var(--periwinkle-soft); }

/* ---- Hero ---- */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(46px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; color: var(--rr-ink); }
@media (prefers-color-scheme: dark) { .hero h1 em { color: var(--periwinkle); } }
.hero .lede { margin-top: 22px; font-size: 20px; color: var(--text-dim); max-width: 34ch; }
.hero .ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .fine { margin-top: 16px; font-size: 14px; color: var(--text-dim); }
.hero .fine b { color: var(--text); font-weight: 600; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% -10% 6% 6%;
  background: var(--periwinkle); border-radius: 40px; transform: rotate(-4deg);
}
.phone {
  position: relative; width: min(320px, 78vw);
  border-radius: 46px; padding: 10px; background: #0d0f12;
  box-shadow: 0 30px 60px rgba(16, 19, 58, 0.28);
}
.phone img { border-radius: 37px; width: 100%; height: auto; }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--card); color: var(--text); border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.25;
}
.float-chip b { display: block; font-weight: 600; }
.float-chip small { color: var(--text-dim); font-size: 13px; }
.float-chip .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.chip-a { left: -6%; top: 22%; }
.chip-a .dot { background: var(--green-soft); color: var(--green); }
.chip-b { right: -4%; bottom: 16%; }
.chip-b .dot { background: var(--periwinkle-soft); color: var(--accent); }
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero-art::before { inset: 10% 4% 4% 4%; }
  .chip-a { left: 0; }
  .chip-b { right: 0; }
}

/* ---- Sections ---- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin-top: 10px; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.015em; }
.section-head p { margin-top: 14px; color: var(--text-dim); font-size: 18px; }
@media (max-width: 760px) { section { padding: 64px 0; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.step .num { font-family: var(--serif); font-size: 22px; color: var(--accent); }
.step h3 { margin-top: 6px; font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
.step p { margin-top: 8px; color: var(--text-dim); font-size: 16px; }
.step .art { margin-top: 22px; flex: 1; display: flex; align-items: flex-end; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Step art: small drawn panels, not screenshots */
.mini { width: 100%; background: var(--bg); border-radius: 16px; padding: 16px; font-size: 13px; }
.mini .row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
.mini .row:last-child { border-bottom: 0; }
.mini .k { color: var(--text-dim); }
.mini .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.mail { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.mail:last-child { margin-bottom: 0; }
.mail .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); flex: none; }
.mail .ico.cam { background: var(--periwinkle-soft); color: var(--accent); }
.mail b { display: block; font-weight: 600; font-size: 13px; }
.mail small { color: var(--text-dim); font-size: 12px; }
.sheet { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); font-size: 12px; font-variant-numeric: tabular-nums; background: var(--card); }
.sheet .tabs { display: flex; gap: 2px; background: var(--bg); padding: 6px 6px 0; }
.sheet .tabs span { padding: 5px 10px; border-radius: 8px 8px 0 0; color: var(--text-dim); }
.sheet .tabs span.on { background: var(--card); color: var(--text); font-weight: 600; }
.sheet .r { display: grid; grid-template-columns: 44px 1fr 86px; border-top: 1px solid var(--border); }
.sheet .r > * { padding: 6px 8px; }
.sheet .r .ln { color: var(--text-dim); }
.sheet .r .amt { text-align: right; }
.sheet .r .amt.in { background: #fff6c8; color: #3a3200; }
@media (prefers-color-scheme: dark) { .sheet .r .amt.in { background: #3a3511; color: #fff3b0; } }
.sheet .r.total { font-weight: 700; }
.sheet .fx { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--green); padding: 6px 8px; border-top: 1px solid var(--border); }

/* Video */
.video-sec { padding-top: 24px; }
.video {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 9;
  background: radial-gradient(120% 140% at 20% 10%, #a3b0ff 0%, var(--periwinkle) 45%, #5a6be8 100%);
  display: grid; place-items: center; color: var(--midnight);
}
.video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .placeholder { text-align: center; padding: 24px; }
.video .play {
  width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 12px 30px rgba(16, 19, 58, 0.25);
}
.video .placeholder b { display: block; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 38px); font-weight: 400; }
.video .placeholder small { font-size: 15px; opacity: 0.8; }
@media (max-width: 600px) { .video { aspect-ratio: 4 / 5; border-radius: 22px; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.feature .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--periwinkle-soft); color: var(--accent); }
.feature h3 { margin-top: 14px; font-size: 18px; font-weight: 650; letter-spacing: -0.005em; }
.feature p { margin-top: 6px; color: var(--text-dim); font-size: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Privacy band */
.band { background: var(--band); color: #eef0ff; border-radius: 36px; margin: 0 12px; }
.band .eyebrow { color: var(--periwinkle); }
.band .section-head p { color: rgba(238, 240, 255, 0.72); }
.promises { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promise { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 24px; }
.promise h3 { font-size: 18px; font-weight: 650; color: #fff; }
.promise p { margin-top: 8px; color: rgba(238, 240, 255, 0.74); font-size: 16px; }
.promise .soon { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--periwinkle); color: var(--midnight); vertical-align: 2px; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } .band { border-radius: 26px; margin: 0 8px; } }

/* Beta */
.beta .card {
  background: var(--periwinkle); color: var(--midnight); border-radius: 32px;
  padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.beta h2 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.06; }
.beta p { margin-top: 12px; font-size: 18px; max-width: 46ch; color: rgba(16, 19, 58, 0.82); }
.beta .ctas { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.beta .btn { background: var(--midnight); color: #fff; }
.beta .btn:hover { background: #1d2160; }
.beta .btn.ghost { background: transparent; color: var(--midnight); box-shadow: inset 0 0 0 1.5px rgba(16, 19, 58, 0.35); }
.beta .btn.ghost:hover { background: rgba(255, 255, 255, 0.25); }
@media (max-width: 760px) { .beta .card { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--text-dim); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--text-dim); }

/* Footer */
footer { padding: 48px 0 56px; border-top: 1px solid var(--border); margin-top: 32px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer p { color: var(--text-dim); font-size: 14px; }
footer nav { display: flex; gap: 22px; font-size: 14px; }
footer nav a { color: var(--text-dim); text-decoration: none; }
footer nav a:hover { color: var(--text); }

/* ======================================================================
   The scroll story: text steps on the left, a phone that stays put on the
   right and changes screen as each step reaches the middle of the window.
   On a phone the device sits at the top and the words scroll up under it.
   ====================================================================== */
.story { padding-bottom: 40px; }
.story-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
.story-steps { padding-bottom: 20vh; }
.story-step {
  min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
  max-width: 440px; opacity: 0.28; transition: opacity 0.35s ease;
}
.story-step.on { opacity: 1; }
.story-step .num { font-family: var(--serif); font-size: 22px; color: var(--accent); }
.story-step h3 { margin-top: 6px; font-family: var(--serif); font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.01em; }
.story-step p { margin-top: 14px; font-size: 18px; color: var(--text-dim); }
.story-step p b { color: var(--text); font-weight: 600; }
.story-step .note { font-size: 15px; margin-top: 10px; }
.try {
  align-self: flex-start; margin-top: 22px; border: 0; cursor: pointer;
  background: var(--periwinkle-soft); color: var(--accent); font: 600 15px/1 var(--sans);
  padding: 12px 16px; border-radius: 999px;
}

.story-stage { position: relative; }
.stage-inner {
  position: sticky; top: 68px; height: calc(100vh - 68px); min-height: 620px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.device {
  position: relative; z-index: 2; width: 292px; height: 600px; flex: none;
  border-radius: 48px; padding: 10px; background: #0d0f12;
  box-shadow: 0 0 0 1.5px #2b2f38 inset, 0 40px 80px rgba(16, 19, 58, 0.28);
  transform: translateX(var(--dx, 0px)) scale(calc(var(--s, 1) * var(--k, 1)));
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
/* At "Kept safe" the phone steps aside so the lines have room */
.story.store .device { --dx: -130px; }
.device::before { /* the camera notch */
  content: ""; position: absolute; top: 20px; left: 50%; width: 82px; height: 22px;
  transform: translateX(-50%); background: #0d0f12; border-radius: 999px; z-index: 5;
}
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 38px;
  background: #f6f5f1; color: #16181d; font-size: 13px; line-height: 1.35;
}
.scr {
  position: absolute; inset: 0; padding: 52px 16px 20px; display: flex; flex-direction: column;
  opacity: 0; transform: translateX(24px); pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.scr.on { opacity: 1; transform: none; pointer-events: auto; }
.scr.past { transform: translateX(-24px); }

/* Dots under the phone */
.story-dots { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); position: relative; z-index: 2; }
.story-dots button {
  border: 0; background: transparent; color: var(--text-dim); cursor: pointer;
  font: 600 13px/1 var(--sans); padding: 9px 12px; border-radius: 999px;
}
.story-dots button.on { background: var(--accent); color: var(--on-accent); }

/* Shared bits inside the phone */
.app-bar { display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; text-align: center; margin-bottom: 12px; }
.app-bar b { font-size: 15px; }
.app-bar .back { font-size: 24px; line-height: 1; color: #3e54d3; text-align: left; }
.paper {
  background: #fff; color: #222; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px; line-height: 1.5; padding: 14px 12px 18px;
  clip-path: polygon(0 0,100% 0,100% calc(100% - 6px),94% 100%,88% calc(100% - 6px),82% 100%,76% calc(100% - 6px),70% 100%,64% calc(100% - 6px),58% 100%,52% calc(100% - 6px),46% 100%,40% calc(100% - 6px),34% 100%,28% calc(100% - 6px),22% 100%,16% calc(100% - 6px),10% 100%,4% calc(100% - 6px),0 100%);
}
.paper p { margin: 0; }
.p-store { text-align: center; font-weight: 700; letter-spacing: 0.06em; font-size: 11px; }
.p-sub { text-align: center; color: #777; margin-bottom: 6px !important; }
.p-line { display: flex; justify-content: space-between; }
.p-line.sub { border-top: 1px dashed #bbb; margin-top: 4px !important; padding-top: 4px; }
.p-line.tot { font-weight: 700; font-size: 11px; }

/* 0: camera */
.scr-cam { background: #111; color: #fff; padding-top: 50px; }
.cam-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; padding: 0 4px; }
.viewfinder { position: relative; flex: 1; display: grid; place-items: center; margin: 14px 0; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #4b4436, #26231d 70%); overflow: hidden; }
.viewfinder .paper { width: 74%; transform: rotate(-3deg); box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid #8394ff; }
.corner.tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner.tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner.bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner.br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scr-cam.on .corner { animation: lock 1.6s ease-in-out infinite alternate; }
@keyframes lock { to { transform: scale(0.88); } }
.shutter { align-self: center; width: 66px; height: 66px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.1s; }
.shutter:active span { transform: scale(0.86); }
.scr-cam.on .shutter { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(131,148,255,0.7); } 50% { box-shadow: 0 0 0 12px rgba(131,148,255,0); } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.4s ease-out; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }

/* 1: reading */
.thumb { position: relative; height: 112px; border-radius: 14px; overflow: hidden; background: #e9e6df; display: grid; place-items: center; }
.thumb .mini-paper { width: 62%; transform: rotate(-2deg); font-size: 8px; padding: 8px 10px 12px; }
.scanline { position: absolute; left: 0; right: 0; height: 36px; top: -36px; background: linear-gradient(180deg, rgba(131,148,255,0), rgba(131,148,255,0.55)); border-bottom: 2px solid #8394ff; }
.scr-read.on .scanline { animation: scan 1.3s ease-in-out 2; }
@keyframes scan { to { top: 112px; } }
.fields { margin-top: 12px; background: #fff; border-radius: 16px; padding: 4px 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.f { padding: 9px 0; border-bottom: 1px solid #ece9e2; }
.f:last-child { border-bottom: 0; }
.f span { display: block; font-size: 11px; color: #6b6f78; }
.f b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.f.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.scr-read .f { opacity: 0; transform: translateY(6px); }
.scr-read.on .f { animation: fieldIn 0.4s ease forwards; }
.scr-read.on .f:nth-child(1) { animation-delay: 0.9s; }
.scr-read.on .f:nth-child(2) { animation-delay: 1.15s; }
.scr-read.on .f:nth-child(3) { animation-delay: 1.4s; }
.scr-read.on .f:nth-child(4) { animation-delay: 1.75s; }
.scr-read.on .f:nth-child(5) { animation-delay: 2s; }
@keyframes fieldIn { to { opacity: 1; transform: none; } }
.save { margin-top: auto; border: 0; border-radius: 999px; height: 46px; background: #3e54d3; color: #fff; font: 600 15px/1 var(--sans); cursor: pointer; }

/* 2: email */
.bell { position: relative; font-size: 15px; }
.bell i { position: absolute; top: 0; right: 0; width: 8px; height: 8px; border-radius: 50%; background: #c8372d; }
.addr { text-align: center; color: #6b6f78; font-size: 12px; margin-bottom: 14px; }
.addr b { color: #3e54d3; }
.mails { display: flex; flex-direction: column; gap: 8px; }
.m { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); opacity: 0; transform: translateY(-14px); }
.m b { display: block; font-size: 13.5px; }
.m small { color: #6b6f78; font-size: 11.5px; }
.mi { width: 30px; height: 30px; border-radius: 9px; background: #fdf0dc; color: #b4610a; display: grid; place-items: center; flex: none; }
.scr-mail.on .m { animation: drop 0.45s cubic-bezier(.2,.8,.2,1) forwards; }
.scr-mail.on .m:nth-child(1) { animation-delay: 0.25s; }
.scr-mail.on .m:nth-child(2) { animation-delay: 0.85s; }
.scr-mail.on .m:nth-child(3) { animation-delay: 1.45s; }
@keyframes drop { to { opacity: 1; transform: none; } }
.review { margin-top: auto; border: 0; border-radius: 999px; height: 46px; background: #8394ff; color: #10133a; font: 600 15px/1 var(--sans); cursor: pointer; }

/* 3: saved */
.scr-saved { align-items: center; justify-content: center; text-align: center; background: #f6f5f1; }
.saved-badge { width: 76px; height: 76px; border-radius: 50%; background: #e2f3ec; color: #0a7d55; display: grid; place-items: center; transform: scale(0.6); }
.scr-saved.on .saved-badge { animation: pop 0.5s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes pop { to { transform: scale(1); } }
.saved-t { margin-top: 14px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.saved-s { margin-top: 6px; color: #6b6f78; font-size: 13px; }
.saved-where { margin-top: 22px; background: #fff; border-radius: 14px; padding: 6px 14px; text-align: left; width: 100%; }
.saved-where p { padding: 9px 0; border-bottom: 1px solid #ece9e2; font-weight: 600; }
.saved-where p:last-child { border-bottom: 0; }
.ok { color: #0a7d55; margin-right: 6px; }

/* 4: workbook */
.scr-sheet { padding-left: 10px; padding-right: 10px; }
.fx-bar { font-family: ui-monospace, Menlo, monospace; font-size: 9px; color: #0a7d55; background: #fff; border-radius: 8px; padding: 7px 8px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-bar span { color: #6b6f78; font-style: italic; margin-right: 6px; }
.wb { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e4e1da; font-variant-numeric: tabular-nums; }
.wb-tabs { display: flex; gap: 2px; background: #ecebe6; padding: 5px 5px 0; font-size: 10px; }
.wb-tabs span { padding: 4px 7px; border-radius: 6px 6px 0 0; color: #6b6f78; white-space: nowrap; }
.wb-tabs span.on { background: #fff; color: #16181d; font-weight: 700; }
.wb-r { display: grid; grid-template-columns: 38px 1fr 74px; border-top: 1px solid #ece9e2; font-size: 11px; }
.wb-r span { padding: 6px 6px; }
.wb-r span:first-child { color: #6b6f78; }
.wb-r span:last-child { text-align: right; }
.wb-r.head { font-weight: 700; background: #f6f5f1; }
.wb-r.hl span { background: #eceefc; }
.scr-sheet.on .wb-r.hl span { animation: hl 1.4s ease 0.4s 2; }
@keyframes hl { 50% { background: #c9d0ff; } }
.wb-r.tot { font-weight: 800; }
.wb-r.tot span:last-child { color: #0a7d55; }
.wb-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
.pill { background: #3e54d3; color: #fff; border-radius: 999px; padding: 13px; font-weight: 600; font-size: 14px; }
.pill.ghost { background: transparent; color: #6b6f78; font-weight: 500; font-size: 12px; padding: 0; }

/* Where files go: nodes beside the phone, joined by lines */
.wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.wires path { fill: none; stroke: var(--periwinkle); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 8; }
.wires path.soon { stroke: var(--border); }
.wires path.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.wires circle { fill: var(--periwinkle); }
.node {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px 10px 10px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.25; white-space: nowrap;
  opacity: 0; transform: scale(0.9); transition: opacity 0.4s ease, transform 0.4s ease;
}
.node b { display: block; font-weight: 650; }
.node small { color: var(--text-dim); font-size: 12.5px; }
.node .flag { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--periwinkle-soft); color: var(--accent); flex: none; }
.node-ca .flag { background: var(--green-soft); color: var(--green); }
.node.soon { border-style: dashed; }
.node.soon .flag { background: var(--bg); color: var(--text-dim); }
.story.store .node { opacity: 1; transform: none; }
.story.store .node:nth-of-type(2) { transition-delay: 0.5s; }
.story.store .node:nth-of-type(3) { transition-delay: 0.9s; }
.story.store .node:nth-of-type(4) { transition-delay: 1.1s; }
/* All four sit to the right of the phone once it has stepped aside */
.node { right: 0; }
.node-ca { top: 17%; }
.node-gd { top: 35%; }
.node-db { top: 53%; }
.node-od { top: 71%; }

/* Phone and small tablet: the device on top (smaller), words scroll under it */
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-stage { order: -1; position: sticky; top: 68px; z-index: 4; height: 0; }
  .stage-inner { position: relative; top: 0; height: 60svh; min-height: 0; background: var(--bg); justify-content: flex-start; padding-top: 6px; gap: 10px; }
  .stage-inner::after { content: ""; position: absolute; left: -20px; right: -20px; bottom: -28px; height: 28px; background: linear-gradient(var(--bg), transparent); }
  .device { --s: 0.72; transform-origin: top center; margin-bottom: calc(600px * (var(--s) * var(--k, 1) - 1)); transition: transform 0.6s cubic-bezier(.2,.8,.2,1), margin 0.6s cubic-bezier(.2,.8,.2,1); }
  .story.store .device { --dx: -24vw; --k: 0.86; }
  .story-steps { padding-top: calc(60svh + 10px); padding-bottom: 30svh; }
  .story-step { min-height: 52svh; justify-content: flex-start; padding-top: 4svh; max-width: none; }
  .story-step h3 { font-size: 30px; }
  .story-step p { font-size: 17px; }
  .node { font-size: 12px; padding: 7px 10px 7px 7px; border-radius: 12px; gap: 7px; }
  .node small { font-size: 11px; }
  .node .flag { width: 26px; height: 26px; border-radius: 8px; }
  .node .flag svg { width: 14px; height: 14px; }
  .node-ca { top: 4%; }
  .node-gd { top: 21%; }
  .node-db { top: 38%; }
  .node-od { top: 55%; }
}

@media (prefers-reduced-motion: reduce) {
  .scr, .node, .story-step { transition: none; }
  .scr-read .f, .m, .saved-badge { opacity: 1; transform: none; animation: none !important; }
  .scanline, .corner, .shutter { animation: none !important; }
}
.wires { opacity: 0; transition: opacity 0.3s ease; }
.story.store .wires { opacity: 1; }

/* ======================================================================
   Floating section menu: where you are, how much is left, and a tap to jump.
   Computer: dots down the right edge with labels (all labels show on hover).
   Phone: a small pill at the bottom; tap it for the list.
   ====================================================================== */
.sidenav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; gap: 0; padding: 14px 10px 14px 14px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
}
.sn-track { position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--border); border-radius: 2px; }
.sn-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--accent); border-radius: 2px; }
.sn-list { list-style: none; margin: 0; padding: 0; position: relative; }
.sn-list a {
  display: flex; align-items: center; gap: 12px; padding: 6px 4px; text-decoration: none;
  color: var(--text-dim); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.sn-list a i { width: 10px; height: 10px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--border); flex: none; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; }
.sn-list a.done i { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sn-list a.on { color: var(--text); }
.sn-list a.on i { background: var(--accent); box-shadow: 0 0 0 4px var(--periwinkle-soft), 0 0 0 2px var(--accent); transform: scale(1.15); }
.sn-list a:hover { color: var(--accent); }
.sn-list .sub a { padding: 3px 4px 3px 6px; gap: 16px; font-size: 12px; font-weight: 500; }
.sn-list .sub a i { width: 6px; height: 6px; box-shadow: 0 0 0 1.5px var(--border); }
.sn-list .sub a.on i { background: var(--accent); box-shadow: none; transform: none; }
.sn-list .sub a.on { color: var(--accent); font-weight: 650; }
/* Labels tuck away to just the dots until hovered, unless there's room */
.sidenav .sn-list .lbl { max-width: 0; overflow: hidden; opacity: 0; transition: max-width 0.25s ease, opacity 0.2s ease; }
.sidenav .sn-list a.on .lbl, .sidenav:hover .sn-list .lbl, .sidenav:focus-within .sn-list .lbl { max-width: 160px; opacity: 1; }
.sidenav .sn-list .sub { display: none; }
.sidenav:hover .sn-list .sub, .sidenav:focus-within .sn-list .sub, .sidenav.in-story .sn-list .sub { display: block; }
.sidenav:not(:hover):not(:focus-within) .sn-list .sub a:not(.on) .lbl { max-width: 0; opacity: 0; }
@media (min-width: 1500px) { .sidenav .sn-list .lbl { max-width: 160px; opacity: 1; } }

.sn-pill, .sn-sheet { display: none; }
@media (max-width: 900px) {
  .sidenav { display: none; }
  .sn-pill {
    position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
    display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
    border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
    background: color-mix(in srgb, var(--card) 86%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    color: var(--text); font: 600 14px/1 var(--sans); white-space: nowrap; box-shadow: 0 8px 26px rgba(16, 18, 24, 0.16);
  }
  .sn-pill-count { color: var(--text-dim); font-weight: 500; font-variant-numeric: tabular-nums; }
  .sn-pill::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--border) var(--p, 0%)); }
  .sn-sheet:not([hidden]) {
    display: block; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 54px); z-index: 30;
    width: min(320px, calc(100vw - 32px)); padding: 10px 14px;
    background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 16px 40px rgba(16, 18, 24, 0.2);
  }
  .sn-sheet .sn-list a { padding: 10px 4px; font-size: 15px; }
  .sn-sheet .sn-list .sub a { padding: 6px 4px 6px 7px; font-size: 14px; }
}

/* ---- Waitlist form (in the periwinkle beta card) ---- */
.beta .small { font-size: 15px; margin-top: 16px; }
.beta .small a { color: var(--midnight); font-weight: 600; }
.waitlist { display: grid; gap: 8px; min-width: 0; width: min(100%, 380px); }
.waitlist fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.wl-label { font-size: 13px; font-weight: 600; color: rgba(16, 19, 58, 0.8); padding: 0; margin-top: 4px; }
.waitlist input[type="email"], .waitlist select {
  width: 100%; height: 48px; border-radius: 14px; border: 1.5px solid rgba(16, 19, 58, 0.18);
  background: #fff; color: #16181d; font: 500 16px/1 var(--sans); padding: 0 14px; color-scheme: light;
}
.waitlist input:focus-visible, .waitlist select:focus-visible, .seg input:focus-visible + label { outline: 3px solid var(--midnight); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.4); margin-top: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px 6px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--midnight); }
.seg input:checked + label { background: #fff; box-shadow: 0 1px 3px rgba(16, 19, 58, 0.15); }
.waitlist .btn { margin-top: 8px; width: 100%; }
.waitlist .btn:disabled { opacity: 0.6; cursor: default; }
.beta .wl-status { margin-top: 4px; min-height: 1.3em; font-size: 15px; font-weight: 600; }
.wl-status[data-kind="error"] { color: #8a1c14; }
.wl-status[data-kind="ok"] { color: var(--midnight); }
.beta .wl-fine { margin-top: 0; font-size: 13px; color: rgba(16, 19, 58, 0.7); }
.waitlist.done input, .waitlist.done select, .waitlist.done fieldset, .waitlist.done .btn, .waitlist.done .wl-label { display: none; }
.beta .card { align-items: start; }

/* ---------- Why it pays ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; }
.value .v-num { font-family: var(--serif); font-size: 30px; color: var(--accent); line-height: 1; }
.value h3 { margin-top: 14px; font-size: 20px; font-weight: 650; letter-spacing: -0.005em; }
.value p { margin-top: 8px; color: var(--text-dim); font-size: 16px; }
.value .v-num + h3 { margin-top: 12px; }
.source { margin-top: 18px; max-width: 760px; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.source a, .sources a { color: var(--accent); }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

/* ---------- Our story ---------- */
.story-text { max-width: 680px; margin: 0 auto; }
.story-text h2 { margin: 10px 0 22px; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.015em; }
.story-text > p { font-size: 18.5px; line-height: 1.65; margin-top: 16px; }
.story-text > p:first-of-type { margin-top: 0; }
.story-text sup a { color: var(--accent); text-decoration: none; font-weight: 600; padding: 0 1px; }
.story-text .sign { font-family: var(--serif); font-size: 24px; margin-top: 26px; }
.sources { margin-top: 28px; padding: 18px 0 0 18px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.sources li + li { margin-top: 6px; }
