/* Shared by every page under site/: fonts, reset, tokens, base type.
   Page-specific layout stays in each page's own <style>.

   ---------- Fonts ----------
   Self-hosted (fonts/): the site shouldn't send every visitor's IP to a
   third-party font CDN. Latin-subset variable files from Google Fonts — Fraunces
   carries the 500–600 weight range + optical size, Hanken Grotesk 400–600 — so
   two files cover every weight below. Fallback stacks stay in the tokens. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Tokens ----------
   Mirrors the app's semantic token set (src/theme/palette.js, DESIGN.md §3–§4):
   warm linen paper, pine brand, brass as jewelry. Light is canonical; dark
   follows the reader's OS preference with the app's dark values.
   palette.js is the SOURCE — these hexes are a hand-mirror for a static site
   (no build step); if a palette value moves, update it here too. Verified in
   sync 2026-08-19 (all 11 light + 11 dark). */
:root {
  --surface-base: #E9E3D5;
  --surface-raised: #F2EEE3;
  --surface-sunken: #DED7C5;
  --fg-primary: #262420;
  --fg-secondary: #5C5950;
  --fg-muted: #615D54;
  --line-subtle: #DAD3C2;
  --line-strong: #BEB6A2;
  --brand: #2D4A3A;      /* pine */
  --accent: #B08A3E;     /* brass fill — rules and flourishes only, never text */
  --accent-ink: #6F5420; /* deep brass — eyebrow labels, AA on paper */
  --link: #2D4A3A;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 40px; --space-3xl: 56px;
  --radius-xl: 16px;
  --measure: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-base: #1B1A17;
    --surface-raised: #262420;
    --surface-sunken: #141310;
    --fg-primary: #ECE7DA;
    --fg-secondary: #B8B2A2;
    --fg-muted: #989484;
    --line-subtle: #34302A;
    --line-strong: #4A453C;
    --brand: #5E8C5A;      /* fairway — brand lifted for dark */
    --accent: #C69E4E;     /* brass lifted for dark */
    --accent-ink: #E0BC74; /* accent text on dark */
    --link: #86B380;       /* lightened green ink, AA on the dark surfaces */
  }
}

/* ---------- Base ---------- */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans); font-weight: 400; line-height: 1.6;
  color: var(--fg-primary); background-color: var(--surface-base);
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header — paper-forward, no color band ---------- */
.page-header {
  max-width: var(--measure); width: 100%; margin: 0 auto;
  padding: var(--space-3xl) var(--space-md) var(--space-xl);
  text-align: center;
}
.eyebrow {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--accent-ink); text-transform: uppercase;
  letter-spacing: 0.14em; margin-bottom: var(--space-sm);
}
.page-header h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 2.25rem; line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.page-content {
  flex: 1; width: 100%; max-width: var(--measure);
  margin: 0 auto; padding: 0 var(--space-md) var(--space-3xl);
}

.page-footer {
  text-align: center; padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--line-subtle);
}
.page-footer p { font-size: 0.75rem; color: var(--fg-muted); }

/* ---------- Typography ---------- */
p  { font-size: 0.9375rem; margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
a  { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--fg-primary); }
.muted { font-size: 0.875rem; color: var(--fg-muted); }

@media (min-width: 640px) {
  .page-header { padding: var(--space-3xl) var(--space-lg) var(--space-2xl); }
  .page-header h1 { font-size: 2.75rem; }
  .page-content { padding: 0 var(--space-lg) var(--space-3xl); }
}
