/*
 * moneyinbox.app: the public site (homepage, privacy policy, terms).
 *
 * Same tokens as the app's v2 design system (mobile/src/theme/colors.ts):
 * light grey canvas, white cards, near-black text, one deep blue accent.
 * System fonts only, so the site makes no third-party requests at all.
 */

:root {
  --canvas: #f5f6f8;
  --card: #ffffff;
  --text: #0b0d12;
  --text-2: #5b6270;
  --text-3: #8a909c;
  --line: #e4e6eb;
  --accent: #1e4fd8;
  --accent-pressed: #1840b0;
  --accent-tint: #e8eefd;
  --green: #15803d;
  --green-tint: #e7f6ec;
  --amber: #b45309;
  --amber-tint: #fef3e2;
  --red: #d92d20;
  --red-tint: #fdecea;
  --violet: #7c3aed;
  --violet-tint: #f1ebfe;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1aa;
    --text-3: #8a8a93;
    --line: #2c2c2e;
    --accent: #4c7dff;
    --accent-pressed: #3a6af0;
    --accent-tint: rgba(76, 125, 255, 0.18);
    --green: #4ade80;
    --green-tint: rgba(74, 222, 128, 0.18);
    --amber: #fbbf24;
    --amber-tint: rgba(251, 191, 36, 0.18);
    --red: #ff6b5e;
    --red-tint: rgba(255, 107, 94, 0.18);
    --violet: #a78bfa;
    --violet-tint: rgba(167, 139, 250, 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-pressed); }

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

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand:hover { color: var(--accent); }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Homepage */
.hero { padding: 48px 0 56px; text-align: center; }
.hero svg { width: 200px; height: 160px; margin: 0 auto 24px; display: block; }
.hero h1 { margin: 0 auto 16px; max-width: 640px; font-size: clamp(32px, 6vw, 48px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
.hero p { margin: 0 auto; max-width: 560px; color: var(--text-2); font-size: 19px; }
.pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 500; }
.pill svg { width: 16px; height: 16px; margin: 0; color: var(--accent); }

.section { padding: 32px 0; }
.section h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.section > .wrap > p.lead { margin: 0 0 24px; color: var(--text-2); max-width: 640px; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.3; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; }
.icon.blue { background: var(--accent-tint); color: var(--accent); }
.icon.green { background: var(--green-tint); color: var(--green); }
.icon.amber { background: var(--amber-tint); color: var(--amber); }
.icon.red { background: var(--red-tint); color: var(--red); }
.icon.violet { background: var(--violet-tint); color: var(--violet); }

.list-card { background: var(--card); border-radius: var(--radius); padding: 4px 20px; }
.list-card ul { list-style: none; margin: 0; padding: 0; }
.list-card li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.list-card li:first-child { border-top: 0; }
.list-card li strong { display: block; color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 2px; }

/* Legal pages */
.doc { padding: 24px 0 48px; }
.doc h1 { margin: 0 0 4px; font-size: clamp(30px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.03em; }
.doc .meta { margin: 0 0 32px; color: var(--text-3); font-size: 15px; }
.doc article { background: var(--card); border-radius: var(--radius); padding: 8px 24px 24px; }
.doc h2 { margin: 32px 0 8px; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.doc h3 { margin: 24px 0 6px; font-size: 17px; }
.doc p, .doc li { color: var(--text); font-size: 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .callout { margin: 24px 0 0; padding: 16px; border-radius: 10px; background: var(--accent-tint); font-size: 16px; }
.doc .callout p { margin: 0; }
.doc .callout p + p { margin-top: 8px; }
.toc { margin: 0 0 8px; padding: 16px 0 0; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 240px; }
.toc li { font-size: 15px; margin: 4px 0; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
th { color: var(--text-2); font-weight: 600; }

/* Unfilled details. Every one must be replaced before the site goes live. */
.todo { background: #fde047; color: #0b0d12; padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* Footer */
.site-footer { padding: 32px 0 48px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 24px 0 40px; }
  .hero p { font-size: 17px; }
  .doc article { padding: 4px 16px 20px; }
  .site-nav { gap: 14px; }
}
