/* Snapdiet — shared web styles.
   Mirrors the app's design system: cool porcelain surfaces, confident charcoal
   ink, Newsreader (serif display) + Hanken Grotesk (sans body), macro accents. */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-alt: #eff2f7;
  --border: #e7eaf0;
  --border-strong: #d7dce5;
  --ink: #14161b;
  --muted: #646b78;
  --faint: #99a0ad;
  --protein: #ff3b30;
  --carbs: #ffcc00;
  --fat: #007aff;
  --positive: #34c759;
  --shadow: 27, 37, 64; /* #1B2540 */
  --radius: 20px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1b1f27;
    --surface-alt: #252b36;
    --border: #2a303b;
    --border-strong: #39414f;
    --ink: #f3f5f9;
    --muted: #9aa2b1;
    --faint: #646c7b;
    --protein: #ff453a;
    --carbs: #ffd60a;
    --fat: #0a84ff;
    --positive: #30d158;
    --shadow: 0, 0, 0;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Site chrome --- */
.site-header {
  padding: 28px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.site-footer {
  margin-top: 56px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 14px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 30px -12px rgba(var(--shadow), .55);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn .store-icon { width: 20px; height: 20px; fill: currentColor; }

/* --- Legal / long-form pages --- */
.doc { padding-top: 12px; }
.doc h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 24px 0 6px;
}
.doc .updated { color: var(--faint); font-size: 14px; margin: 0 0 32px; }
.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 38px 0 10px;
}
.doc h3 { font-size: 17px; font-weight: 700; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink); font-size: 16px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 0 0 8px; }
.doc a { color: var(--fat); text-decoration: none; border-bottom: 1px solid rgba(0,122,255,.35); }
.doc a:hover { border-bottom-color: currentColor; }
.doc .lead { font-size: 18px; color: var(--muted); }
.doc strong { font-weight: 700; }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 15px;
}
