/* MoneyBudy public site — mirrors the app design system (MoneyBudy-FE/style) */

:root {
  /* Colors — from style/colors.ts (light) */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-muted: #F3F5F4;
  --text: #141F1A;
  --text-muted: #6E7A74;
  --text-faint: #98A39D;
  --primary: #1C6B49;
  --primary-muted: #E8F5F0;
  --accent-border: #CFE8DD;
  --on-primary: #FFFFFF;
  --border: #E7EBE9;
  --danger: #B3261E;
  --warning: #8A6A12;
  --warning-muted: #FBF3DC;

  /* Tokens — from style/tokens.ts */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --stack: 20px;

  /* Type — display is serif (style/typography.ts), body is system sans */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 680px;
  --docw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512;
    --surface: #171E1A;
    --surface-muted: #1D2622;
    --text: #F2F5F3;
    --text-muted: #8E9891;
    --text-faint: #5B6660;
    --primary: #34D9A6;
    --primary-muted: #1A2E28;
    --accent-border: #2A332E;
    --on-primary: #0A1512;
    --border: #2A332E;
    --danger: #F97066;
    --warning: #E8C56B;
    --warning-muted: #3A3420;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 2px; }

img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Wordmark ---------- */
.site-header { padding: 28px 0 4px; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.wordmark .mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: #1C6B49; /* fixed brand tile — an app icon doesn't invert */
  color: #FFFFFF;
  display: grid;
  place-items: center;
}
.wordmark .mark svg { display: block; }

/* ---------- Eyebrow / labels (Type.eyebrow / Type.sectionLabel) ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-muted);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 22px;
}

/* ---------- Display type — serif ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 2.9rem);
  line-height: 1.13;
  letter-spacing: -0.005em;
  margin: 0 0 18px;
  text-wrap: balance;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 12px;
}
.lede {
  font-size: 1.13rem;
  color: var(--text-muted);
  margin: 0;
}
p { margin: 0 0 14px; }

/* ---------- Sections ---------- */
main .wrap > .hero { padding: 44px 0 8px; }
section { padding: 24px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card ul { margin: 0; padding-left: 20px; }
.card li { margin: 9px 0; }
.card li::marker { color: var(--primary); }

/* mint accent block — matches the app's tip / stat cards (primaryMuted + accentBorder) */
.callout {
  background: var(--primary-muted);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 17px 19px;
  font-size: 0.98rem;
}
.callout p:last-child { margin-bottom: 0; }

.contact a { font-weight: 600; }

/* ---------- CTA button (components/ui/PrimaryButton.tsx) ---------- */
.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 15px 22px;
  min-height: 54px;
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--primary);
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0 48px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Legal documents ---------- */
.doc { max-width: var(--docw); }
.doc .back { display: inline-block; font-size: 0.9rem; text-decoration: none; margin: 24px 0 4px; }
.doc h1 { font-size: clamp(1.7rem, 4.4vw, 2.2rem); margin: 12px 0 6px; }
.doc .updated {
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin: 0 0 28px;
}
.doc h2 { font-size: 1.28rem; margin: 34px 0 10px; }
.doc h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 20px 0 8px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 7px 0; }
.doc .fineprint {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
