/* OnceSwipe — "Marigold Ledger". Tokens mirror docs/brand-plan.md in the app repo. */
:root {
  color-scheme: light dark;
  --bg: #FAF7F0;
  --surface: #EFE9DC;
  --text: #17140F;
  --muted: #5C564B;
  --accent: #8A5300;
  --brand: #FFC933;
  --on-brand: #17140F;
  --btn: #17140F;
  --on-btn: #FAF7F0;
  --line: #D9D1C0;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110F;
    --surface: #1E1C19;
    --text: #F6F2E9;
    --muted: #ABA497;
    --accent: #FFC933;
    --btn: #FFC933;
    --on-btn: #17140F;
    --line: #34312C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--btn); color: var(--on-btn); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 700px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.site-nav a { color: var(--text); text-decoration: none; padding: 10px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brand); }

/* Hero */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.eyebrow { display: inline-block; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 14px; padding: 3px 12px; border-radius: 999px; margin: 0 0 16px; }
.hero h1 { font-size: clamp(40px, 9vw, 68px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 900; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 24px; max-width: 32em; }
.hero-copy { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-copy .lede { margin-left: auto; margin-right: auto; }
.hero-copy .stores { justify-content: center; }
.hero > .wrap + .wrap { margin-top: 32px; }

/* Hero stage: still image first, the clip fades in on top once it plays */
.stage { position: relative; margin: 0; border-radius: 24px; overflow: hidden; background: #FFC933; aspect-ratio: 1600 / 686; box-shadow: 0 24px 60px -30px rgba(23, 20, 15, 0.45); }
.stage img, .stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-video { opacity: 0; transition: opacity 0.4s ease; }
@media (prefers-reduced-motion: reduce) { .stage-video { display: none; } }
.stage-video.on { opacity: 1; }

/* Screenshot carousel: two identical runs move left forever; the loop point is exactly one run, so it never jumps */
.shots-sec { padding-bottom: 24px; overflow: hidden; }
.marquee {
  display: flex; width: max-content; padding: 4px 0 28px;
  animation: shots-loop 64s linear infinite;
}
.rail { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.shots { display: flex; margin: 0; padding: 0; list-style: none; }
.shots li { flex: none; width: 62vw; max-width: 264px; margin-right: 20px; }
.shots img { width: 100%; border-radius: 22px; box-shadow: 0 16px 40px -24px rgba(23, 20, 15, 0.5); }
@keyframes shots-loop { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .shots[aria-hidden] { display: none; }
  .shots-sec { overflow-x: auto; scrollbar-width: none; }
  .shots-sec::-webkit-scrollbar { display: none; }
}

/* Store badges (placeholders until store URLs exist) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.store { display: flex; flex-direction: column; justify-content: center; min-width: 170px; min-height: 56px; padding: 8px 18px; border: 2px dashed var(--line); border-radius: 14px; line-height: 1.25; }
.store b { font-size: 17px; }
.store span { font-size: 13px; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); margin: 12px 0 0; }

/* Sections */
section { padding: 40px 0; }
.section-title { font-size: clamp(28px, 5vw, 38px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.section-lede { color: var(--muted); margin: 0 0 28px; max-width: 36em; }

/* Receipt */
.pay .wrap { display: grid; gap: 32px; align-items: center; }
.receipt {
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 28px 24px;
  font: 15px/1.5 var(--mono);
  max-width: 380px;
  width: 100%;
  justify-self: center;
  -webkit-mask: radial-gradient(circle 7px at 50% 0, #0000 98%, #000) 50% 0 / 20px 51% repeat-x,
                radial-gradient(circle 7px at 50% 100%, #0000 98%, #000) 50% 100% / 20px 51% repeat-x;
          mask: radial-gradient(circle 7px at 50% 0, #0000 98%, #000) 50% 0 / 20px 51% repeat-x,
                radial-gradient(circle 7px at 50% 100%, #0000 98%, #000) 50% 100% / 20px 51% repeat-x;
}
.receipt h3 { font: 700 15px/1.4 var(--mono); text-align: center; letter-spacing: 0.12em; margin: 4px 0 16px; text-transform: uppercase; }
.receipt dl { margin: 0; }
.receipt .row { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.receipt dt { flex: 1; display: flex; gap: 8px; align-items: baseline; }
.receipt dt::after { content: ""; flex: 1; border-bottom: 2px dotted var(--muted); transform: translateY(-4px); }
.receipt dd { margin: 0; font-weight: 700; flex: none; }
.receipt .total { border-top: 2px solid var(--text); margin-top: 12px; padding-top: 12px; font-weight: 700; font-size: 17px; }
.receipt .stamp { display: block; width: max-content; margin: 18px auto 4px; border: 3px solid var(--text); color: var(--text); padding: 2px 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; transform: rotate(-4deg); border-radius: 4px; }

/* Feature grid */
.features { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.feature { background: var(--surface); border-radius: 14px; padding: 22px 20px; }
.feature h3 { font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
.feature p, .feature ul { margin: 0; color: var(--muted); font-size: 16px; }
.feature ul { padding-left: 1.1em; }
.feature li + li { margin-top: 4px; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 15px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }

.privacy-band { background: var(--surface); border-radius: 20px; padding: 28px 22px; }
.privacy-band h2 { margin-top: 0; }
.privacy-band p { margin: 0 0 12px; }
.privacy-band p:last-child { margin-bottom: 0; }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: baseline; }
.steps li::before { counter-increment: s; content: counter(s); flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--text); font-weight: 800; font-size: 14px; }

/* Document pages (privacy, terms, support, your data) */
.doc { padding: 40px 0 56px; }
.doc h1 { font-size: clamp(32px, 7vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.doc h2 { font-size: 21px; line-height: 1.3; margin: 36px 0 8px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.doc .summary { background: var(--surface); border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; padding: 16px 18px; margin: 0 0 8px; }
.doc li + li { margin-top: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 16px; margin: 8px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; }
.doc .toc { font-size: 15px; }
.contact-card { background: var(--surface); border-radius: 14px; padding: 20px; margin: 16px 0 8px; }
.contact-card p { margin: 0; }
.contact-card .email { font-size: 20px; font-weight: 700; word-break: break-word; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--muted); margin-top: 24px; }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--text); display: inline-block; padding: 8px 0; }
.site-footer p { margin: 0; }

@media (min-width: 760px) {
  .hero { padding: 72px 0 48px; }
  .hero > .wrap + .wrap { margin-top: 48px; }
  .stage { border-radius: 32px; }
    .pay .wrap { grid-template-columns: 1fr 1fr; gap: 48px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  section { padding: 56px 0; }
  .privacy-band { padding: 40px; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.doc .meta.tight { margin: 8px 0 0; }
/* Narrow phones: keep the brand and all three links on one line */
@media (max-width: 420px) {
  .site-nav { flex-wrap: nowrap; gap: 0 14px; font-size: 14px; }
  .brand { font-size: 17px; gap: 8px; }
}
@media (max-width: 359px) {
  .site-nav a[href="#features"] { display: none; }
}

/* Illustrations from the app */
.art img { width: 100%; height: auto; }
.feature .art { display: block; width: 104px; margin: -6px 0 10px -6px; }
.pay .art { display: block; width: 120px; margin: 0 0 8px -8px; }
.privacy-band { display: grid; gap: 8px 32px; align-items: center; }
.privacy-band .art { width: 140px; }

/* Trophy case: the app's badge art, amounts set in each blank area like the app does */
.badges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 8px; margin: 0; padding: 0; list-style: none; }
.badges li { position: relative; container-type: inline-size; }
.badges img { width: 100%; }
.badges span { position: absolute; left: 0; right: 0; transform: translateY(-50%); text-align: center; line-height: 1.2; font-weight: 900; color: #17140F; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.01em; }
.badges .b1 { top: 51.6%; font-size: 14.77cqw; }
.badges .b2 { top: 50.0%; font-size: 17.68cqw; }
.badges .b3 { top: 40.7%; font-size: 14.56cqw; }
.badges .b4 { top: 49.1%; font-size: 18.00cqw; }
.badges .b5 { top: 63.0%; font-size: 13.36cqw; color: #FFC933; }
.badges .b6 { top: 47.0%; font-size: 14.71cqw; }
.badges .b7 { top: 68.0%; font-size: 13.75cqw; color: #FFC933; }
.badges .b8 { top: 36.7%; font-size: 9.43cqw; }
.badges .b9 { top: 47.9%; font-size: 10.22cqw; }
.badges .b10 { top: 53.5%; font-size: 23.37cqw; }
@media (min-width: 760px) {
  .badges { gap: 20px 24px; }
  .privacy-band { grid-template-columns: 180px 1fr; }
  .privacy-band .art { width: 180px; }
}
@media (max-width: 480px) {
  .badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 4%; }
  .badges li { width: 28%; }
}

/* Comparison pages (/vs) */
.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; }
.eyebrow-link { margin: 0 0 8px; font-size: 15px; }
.table-scroll { overflow-x: auto; margin: 8px 0 8px; border-radius: 14px; background: var(--surface); }
.vs-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.doc .vs-table th, .doc .vs-table td { padding: 12px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
.vs-table tbody tr:last-child th, .vs-table tbody tr:last-child td { border-bottom: 0; }
.vs-table thead th { font-size: 15px; color: var(--muted); }
.vs-table thead th:nth-child(2) { color: var(--text); }
.vs-table tbody th { font-weight: 700; width: 26%; }
.vs-table td:nth-child(2) { font-weight: 600; }
.cost-compare { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 8px 0; }
.cost-compare > div { background: var(--surface); border-radius: 14px; padding: 16px 18px; display: grid; gap: 2px; }
.cost-compare .cost-us { background: var(--brand); color: var(--on-brand); }
.cost-label { font-size: 15px; }
.cost-compare b { font-size: clamp(22px, 5vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.cost-note { font-size: 14px; opacity: 0.8; }
.store-links { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.doc .store-links li + li { margin-top: 0; }
.store-link { display: inline-grid; min-width: 170px; padding: 8px 18px; border-radius: 14px; background: var(--btn); color: var(--on-btn); text-decoration: none; line-height: 1.25; }
.store-link small { font-size: 12px; opacity: 0.85; }
.store-link b { font-size: 18px; }
.vs-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.doc .vs-list li + li { margin-top: 0; }
.vs-list a { display: grid; gap: 2px; padding: 16px 18px; border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.vs-list a:hover b { text-decoration: underline; text-decoration-color: var(--brand); }
.vs-list span { color: var(--muted); font-size: 15px; }
.footer-compare h2 { font-size: 15px; margin: 0 0 4px; color: var(--text); }
.footer-compare ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-compare a { display: inline-block; padding: 6px 0; color: var(--muted); }
@media (min-width: 760px) { .site-footer .footer-compare { grid-column: 1 / -1; } }
@media (max-width: 480px) { .cost-compare { grid-template-columns: 1fr; } }

.doc .as-of { background: var(--surface); border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: 15px; color: var(--muted); }

.store-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin: 0 10px 2px 0; }
.store-mark { width: 15px; height: 15px; flex: none; }
.store-missing { font-size: 14px; color: var(--muted); font-weight: 400; }
