/* Stampra marketing site — "Ledger" system. Tokens mirror apps/mobile/src/constants/theme.ts and /DESIGN.md */
:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --surface-alt: #edebe3;
  --ink: #111111;
  --ink-muted: #5f5d57;
  --line: #111111;
  --line-soft: #d6d3ca;
  --marker: #ffe14d;
  --stamp: #d8321e;
  --protein: #d8321e;
  --carbs: #e5b400;
  --fat: #111111;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121212; --surface: #1a1a1a; --surface-alt: #262626; --ink: #f2f0e8; --ink-muted: #a29f96;
    --line: #f2f0e8; --line-soft: #3a3a3a; --stamp: #ff5a3d; --protein: #ff5a3d; --carbs: #ffd23f; --fat: #f2f0e8;
  }
}
:root[data-theme='dark'] {
  --bg: #121212; --surface: #1a1a1a; --surface-alt: #262626; --ink: #f2f0e8; --ink-muted: #a29f96;
  --line: #f2f0e8; --line-soft: #3a3a3a; --stamp: #ff5a3d; --protein: #ff5a3d; --carbs: #ffd23f; --fat: #f2f0e8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(3.4rem, 9vw, 7rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: 1.5rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.num { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.mark { background: var(--marker); color: #111; padding: 0 0.12em; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 18px; text-decoration: none; cursor: pointer; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-marker { background: var(--marker); color: #111; border-color: var(--marker); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 15px; }

/* Masthead */
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 2px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.5rem; text-decoration: none; letter-spacing: 0.02em; }
.brand-mark { width: 26px; height: 26px; flex: none; background: var(--stamp); -webkit-mask: url(mark.svg) center / contain no-repeat; mask: url(mark.svg) center / contain no-repeat; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 32px 0 24px; } }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero-copy .lede { font-size: 1.15rem; color: var(--ink-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.kicker { display: flex; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }
.kicker::before { content: ''; width: 28px; border-top: 2px solid var(--ink); }

/* Ledger sheet mock */
.sheet { background: var(--surface); border: 1px solid var(--line); padding: 20px; font-size: 14px; max-width: 400px; margin: 0 auto; width: 100%; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.sheet-head .t { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 30px; line-height: 1; }
.stamp-row { display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.stamp { width: 104px; height: 104px; flex: none; border: 3px solid var(--stamp); padding: 3px; transform: rotate(-4deg); }
.stamp > div { border: 1px solid var(--stamp); height: 100%; padding: 8px; display: grid; place-items: center; align-content: center; color: var(--stamp); }
.stamp .big { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1; }
.stamp.ink, .stamp.ink > div { border-color: var(--ink); color: var(--ink); }
.ledger { display: grid; gap: 4px; }
.ledger .row { display: flex; align-items: baseline; gap: 6px; }
.ledger .row .lead { flex: 1; border-bottom: 1px dotted var(--line-soft); min-width: 12px; transform: translateY(-4px); }
.gauge { display: grid; gap: 4px; margin-top: 10px; }
.gauge .top { display: flex; justify-content: space-between; }
.gauge .track { height: 10px; border: 1px solid var(--line-soft); position: relative; }
.gauge .bar { height: 100%; }
.gauge .track i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--bg); }
.plate { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.plate .items { font-size: 12px; color: var(--ink-muted); }

/* Sections */
section { padding: 64px 0; }
@media (max-width: 720px) { section { padding: 44px 0; } }
.section-head { display: grid; gap: 10px; max-width: 62ch; margin-bottom: 32px; }
.section-head .label { color: var(--ink); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.grid-3 > * { padding: 22px; border-right: 1px solid var(--line); }
.grid-3 > *:nth-child(3n) { border-right: 0; }
.grid-3 > *:nth-child(n + 4) { border-top: 1px solid var(--line); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > * { border-right: 1px solid var(--line); } .grid-3 > *:nth-child(2n) { border-right: 0; } .grid-3 > *:nth-child(3n) { border-right: 1px solid var(--line); } .grid-3 > *:nth-child(n + 3) { border-top: 1px solid var(--line); } .grid-3 > *:nth-child(2n):nth-child(n) { border-right: 0; } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } .grid-3 > * { border-right: 0 !important; } .grid-3 > *:nth-child(n + 2) { border-top: 1px solid var(--line); } }
.feature { display: grid; gap: 8px; align-content: start; }
.feature .no { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.step h3 { margin-top: 6px; }

/* Pricing as a menu */
.toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); margin-bottom: 24px; }
.toggle button { border: 0; background: transparent; padding: 10px 18px; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 16px; color: var(--ink); cursor: pointer; }
.toggle button[aria-pressed='true'] { background: var(--marker); color: #111; }
.menu { border: 1px solid var(--line); background: var(--surface); }
.plan { display: grid; gap: 12px; padding: 24px; border-bottom: 1px solid var(--line); position: relative; }
.plan:last-child { border-bottom: 0; }
.plan .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan .price { font-family: var(--font-mono); font-weight: 600; font-size: 1.6rem; white-space: nowrap; }
.plan .price small { font-size: 0.8rem; color: var(--ink-muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 15px; }
.plan li { display: flex; align-items: baseline; gap: 6px; }
.plan li .lead { flex: 1; border-bottom: 1px dotted var(--line-soft); transform: translateY(-4px); min-width: 12px; }
.plan li .v { font-family: var(--font-mono); font-size: 13px; }
.plan .badge { position: absolute; top: 0; right: 0; background: var(--marker); color: #111; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; }
@media (min-width: 861px) { .menu { display: grid; grid-template-columns: repeat(3, 1fr); } .plan { border-bottom: 0; border-right: 1px solid var(--line); } .plan:last-child { border-right: 0; } }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: 0.01em; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--font-mono); }
details[open] summary::after { content: '–'; }
details p { margin-top: 10px; color: var(--ink-muted); max-width: 70ch; }

/* Band + footer */
.band { background: var(--ink); color: var(--bg); padding: 48px 24px; display: grid; gap: 14px; justify-items: start; }
.band h2 { color: var(--bg); }
.band .btn { background: var(--marker); color: #111; border-color: var(--marker); }
footer { padding: 32px 0 56px; color: var(--ink-muted); font-size: 13px; border-top: 2px solid var(--line); margin-top: 64px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
.disclaimer { max-width: 60ch; }

:focus-visible { outline: 2px solid var(--marker); outline-offset: 0; }
