/* SpendLens marketing site — design tokens mirror the app's AppTokens (app_theme.dart). */
:root {
  --accent: #1F6F5C;
  --accent-light: #2E9077;
  --accent-ink: #10443A;
  --ink: #0E1726;
  --ink-muted: #5A6478;
  --surface: #FAFAF8;
  --card: #FFFFFF;
  --border: #E7E9E4;
  --positive: #1F7A4D;
  --negative: #B3261E;
  --warning: #9A6700;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --maxw: 1140px;
  --shadow: 0 1px 2px rgba(14,23,38,.04), 0 8px 24px rgba(14,23,38,.06);
  --shadow-lg: 0 20px 48px rgba(14,23,38,.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--surface);
  line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-muted); }
.center { text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* Skip link + a11y */
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease; min-height: 48px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--negative); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,250,248,.86);
  backdrop-filter: saturate(150%) blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.nav-links a:hover { background: rgba(31,111,92,.08); color: var(--accent); text-decoration: none; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }

/* Hero */
.hero { padding: 84px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { font-size: 1.2rem; color: var(--ink-muted); max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-muted); font-size: .9rem; }
.trust-row span { display: inline-flex; gap: 6px; align-items: center; }

/* Phone mockup (CSS/SVG, no external images) */
.mock { justify-self: center; }
.phone { width: 280px; height: 570px; border-radius: 40px; background: #0E1726; padding: 12px;
  box-shadow: var(--shadow-lg); position: relative; }
.phone::after { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #0E1726; border-radius: 0 0 14px 14px; }
.screen { width: 100%; height: 100%; border-radius: 30px; background: var(--surface); overflow: hidden; padding: 18px 14px; }
.screen .greeting { font-weight: 700; font-size: .95rem; margin-top: 8px; }
.screen .balance-card { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff;
  border-radius: var(--radius-lg); padding: 16px; margin: 12px 0; }
.screen .balance-card .lbl { font-size: .7rem; opacity: .85; }
.screen .balance-card .amt { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.mini-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.mono { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .62rem; font-weight: 800; flex: none; }
.mini-card .t { font-size: .78rem; font-weight: 600; } .mini-card .s { font-size: .66rem; color: var(--ink-muted); }
.mini-card .amt { margin-left: auto; font-weight: 700; font-size: .8rem; }
.amt.debit { color: var(--negative); } .amt.credit { color: var(--positive); }

/* Cards / grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card .icon { width: 44px; height: 44px; border-radius: var(--radius-md); background: rgba(31,111,92,.12); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px; font-size: 1.3rem; }
.card.security .icon { background: rgba(31,111,92,.12); }

.section-head { max-width: 60ch; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--ink-muted); font-size: 1.08rem; }

/* Banded sections */
.band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-ink { background: var(--ink); color: #fff; }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .muted, .band-ink p { color: #C4CAD6; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { counter-increment: step; background: var(--accent); color: #fff; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; flex: none; }
.step .n::before { content: counter(step); }

/* Download / QR */
.download { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.badge-play { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff; border-radius: 12px;
  padding: 10px 18px; min-height: 56px; }
.badge-play .g { font-size: 1.6rem; } .badge-play small { display: block; font-size: .62rem; opacity: .85; letter-spacing: .08em; text-transform: uppercase; }
.badge-play b { font-size: 1.15rem; font-weight: 600; }
.qr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; text-align: center; width: 190px; }
.qr .box { width: 158px; height: 158px; border-radius: var(--radius-md); background: repeating-linear-gradient(45deg, #F0F1EE, #F0F1EE 8px, #fff 8px, #fff 16px);
  display: grid; place-items: center; color: var(--ink-muted); font-size: .72rem; padding: 10px; border: 1px dashed var(--border); }
.qr img { width: 158px; height: 158px; }
.qr .cap { font-size: .74rem; color: var(--ink-muted); margin-top: 8px; }

/* Bank chips (reuse canonical registry brand monograms conceptually) */
.banks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bankchip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px 6px 6px; font-size: .85rem; font-weight: 600; }
.bankchip .m { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: .58rem; font-weight: 800; }

/* Legal / prose */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .4em; }
.legal-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-muted); font-size: .9rem; margin-bottom: 8px; }
.callout { border-left: 3px solid var(--accent); background: rgba(31,111,92,.06); padding: 14px 18px; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 18px 0; }
.callout.warn { border-color: var(--warning); background: rgba(154,103,0,.07); }

/* FAQ */
details.faq { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 18px; margin-bottom: 12px; }
details.faq > summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; }
details.faq[open] > summary::after { content: "−"; }
details.faq p { padding-bottom: 14px; margin: 0; color: var(--ink-muted); }

/* Forms */
.form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-md); font: inherit; font-size: .95rem; background: var(--surface); }
.field input:focus, .field textarea:focus { border-color: var(--accent); background: #fff; outline: none; }
.field .hint { font-size: .8rem; color: var(--ink-muted); margin-top: 4px; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-md); font-size: .92rem; display: none; }
.form-status.ok { display: block; background: rgba(31,122,77,.1); color: var(--positive); }
.form-status.err { display: block; background: rgba(179,38,30,.08); color: var(--negative); }

/* Footer */
.site-footer { background: var(--ink); color: #C4CAD6; padding: 56px 0 28px; margin-top: 24px; }
.site-footer a { color: #C4CAD6; } .site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; } .footer-grid li { margin-bottom: 9px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; }
.footer-brand { color: #fff; font-weight: 800; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero .lead { max-width: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .download { grid-template-columns: 1fr; }
  .nav-links { position: fixed; inset: 66px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px; display: none; }
  .nav-links.open { display: flex; } .nav-links a { padding: 12px; } .nav-cta { margin: 8px 0 0; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  section { padding: 52px 0; } .hero { padding: 48px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }
