/* Spendly site — tokens mirror web/src/styles/app.css and src/theme/tokens.ts. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-muted: #efefeb;
  --border: #e4e4df;
  --text: #16181d;
  --text-2: #5e636e;
  --text-3: #6f747d;
  --primary: #1f6f5c;
  --primary-pressed: #185a4a;
  --primary-soft: #e1f0ea;
  --on-primary: #ffffff;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px rgb(16 24 40 / 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #17191c;
    --surface-muted: #202328;
    --border: #2a2d33;
    --text: #f2f3f5;
    --text-2: #a6abb4;
    --text-3: #8a8f98;
    --primary: #4cc2a0;
    --primary-pressed: #3aaa8a;
    --primary-soft: #16332b;
    --on-primary: #0b1f19;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-2); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
/* Grid children default to min-width:auto, letting wide content (e.g. large
   screenshots) force the track wider than the viewport. Reset it. */
.hero > *, .split > *, .shots > *, .grid > *, .proof-item { min-width: 0; }
.section { padding: 56px 32px 8px; }
.section h2 { margin: 0 0 20px; font-size: 26px; letter-spacing: -0.5px; }
.section h2.tight { margin-bottom: 4px; }
.section.narrow { max-width: 800px; }
.eyebrow {
  color: var(--primary); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 10px;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand.sm { font-size: 16px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav .btn { margin-left: 8px; }

/* Buttons — same shape as web app */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid transparent; font-weight: 600; white-space: nowrap;
}
.btn-lg { min-height: 50px; font-size: 16px; padding: 0 24px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-muted); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-light { background: #fff; color: #134a3c; }
.btn-light:hover { background: var(--primary-soft); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / 0.55); }
.btn-outline-light:hover { background: rgb(255 255 255 / 0.12); }
.cta.center { justify-content: center; }
.apk-btn { gap: 10px; }
.apk-icon { display: inline-flex; flex: none; }
.apk-icon svg { display: block; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgb(0 0 0 / 0.08); }
.final-note { margin: 14px 0 0; font-size: 13px; opacity: 0.75; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding-top: 72px; padding-bottom: 32px; position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: -64px 0 auto; height: 420px; z-index: -1;
  background:
    radial-gradient(480px 260px at 12% 20%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(520px 300px at 88% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%);
}
.hero h1 { margin: 0 0 12px; font-size: clamp(38px, 5.4vw, 58px); line-height: 1.04; letter-spacing: -1.6px; }
.lede { font-size: 18px; color: var(--text-2); margin: 0 0 24px; max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; font-weight: 500; }
.trust li::before { content: "✓ "; color: var(--primary); font-weight: 700; }
.hero-art { position: relative; display: grid; justify-items: center; }
.hero-art .phone { border-radius: 28px; border: 1px solid var(--border); box-shadow: var(--shadow); max-height: 560px; }
.chip {
  position: absolute; margin: 0; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; box-shadow: var(--shadow); white-space: nowrap;
}
.chip-a { left: 0; bottom: 64px; }
.chip-b { right: 0; top: 48px; }

/* Proof bar */
.proof {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-top: 8px; overflow: hidden;
}
.proof-item { padding: 20px; text-align: center; display: grid; gap: 2px; }
.proof-item + .proof-item { border-left: 1px solid var(--border); }
.proof-item strong { font-size: 24px; letter-spacing: -0.5px; color: var(--primary); }
.proof-item span { font-size: 13px; color: var(--text-2); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--text-2); }

/* Alternating solution rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); width: 100%; }
.split.flip .split-copy { order: 2; }
.split.flip img { order: 1; }
.ticks { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.ticks li::before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* Comparison */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.compare thead th { font-size: 13px; color: var(--text-2); background: var(--surface-muted); }
.compare thead th:nth-child(2) { color: var(--primary); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 600; }
.compare .yes { color: var(--primary); font-weight: 600; }
.compare .no { color: var(--text-3); }
.compare .maybe { color: var(--text-2); }

/* Screens */
.spread { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 16px; }
.shot { margin: 0; }
.shot.wide { grid-column: span 6; }
.shot:not(.wide) { grid-column: span 2; }
.shot img { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); width: 100%; }
.shot figcaption { color: var(--text-2); font-size: 13px; margin-top: 8px; }

/* FAQ */
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 20px; font-weight: 400; flex: none; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--text-2); }

/* Final CTA */
.final {
  background: linear-gradient(140deg, #23806a, #134a3c); color: #fff;
  border-radius: 24px; padding: 56px 32px; text-align: center;
}
.final h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.8px; }
.final p { margin: 0 0 24px; opacity: 0.85; }

/* Footer */
.footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.footer-inner .btn { margin-left: auto; }

@media (max-width: 900px) {
  .wrap, .section { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-art .phone { max-height: 480px; width: 100%; object-fit: cover; object-position: top; }
  .chip-a { left: 8px; }
  .chip-b { right: 8px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .proof-item:nth-child(4) { border-top: 1px solid var(--border); }
  .grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split.flip .split-copy, .split.flip img { order: initial; }
  .shot:not(.wide) { grid-column: span 3; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

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