/* zoe — design tokens */

:root {
  /* Inkwell · light */
  --paper: #F7F4EE;
  --paper-2: #F1ECE1;
  --paper-3: #E9E2D2;
  --ink: #1A1816;
  --ink-2: #3D3830;
  --ink-3: #5E5747;
  --ink-4: #766C5A;       /* bumped from #8B8170 → ~5.8:1 on paper, AA at 11px */
  --ink-faint: #8B8170;   /* the older lighter stop, kept for non-text use (borders/separators) */
  --mist: #E5DFD3;
  --mist-strong: #D2CABA;

  --emerald: #14533C;
  --emerald-deep: #0F3F2D;
  --emerald-soft: #E2EBE3;
  --ochre: #B87A1F;
  --ochre-soft: #F2E5CB;
  --oxblood: #7A2A28;

  --success: #2F6B4A;
  --warning: #B87A1F;
  --error: #9A2A28;
  --info: #305A7A;

  --bg: var(--paper);
  --bg-soft: var(--paper-2);
  --bg-sunk: var(--paper-3);
  --fg: var(--ink);
  --fg-muted: var(--ink-3);
  --fg-faint: var(--ink-4);
  --hairline: var(--mist);
  --hairline-strong: var(--mist-strong);
  --primary: var(--emerald);
  --primary-deep: var(--emerald-deep);
  --primary-tint: var(--emerald-soft);
  --accent: var(--ochre);
  --accent-tint: var(--ochre-soft);
  --danger: var(--oxblood);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --r-1: 4px; --r-2: 8px; --r-3: 12px; --r-4: 16px; --r-pill: 999px;

  --shadow-sm: 0 1px 0 rgba(26,24,22,0.04), 0 0 0 1px rgba(26,24,22,0.04);
  --shadow-pop: 0 12px 40px -12px rgba(26,24,22,0.18), 0 2px 6px rgba(26,24,22,0.06);
  --ring: 0 0 0 3px rgba(20,83,60,0.18);

  --serif: "Instrument Serif", "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --easing: cubic-bezier(.2,.8,.2,1);
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 320ms;
}

[data-theme="dark"] {
  --bg: #14110E;
  --bg-soft: #1B1814;
  --bg-sunk: #221E18;
  --fg: #EFE9DC;
  --fg-muted: #B7AC97;
  --fg-faint: #8B8170;
  --hairline: #2E2920;
  --hairline-strong: #3D3830;
  --primary: #6FAE8E;
  --primary-deep: #8FC9AB;
  --primary-tint: rgba(111,174,142,0.12);
  --accent: #D58A60;
  --accent-tint: rgba(213,138,96,0.14);
  --danger: #C2615F;
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-pop: 0 16px 40px -12px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4);
  --ring: 0 0 0 3px rgba(111,174,142,0.28);
}

/* base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-base) var(--easing), color var(--t-base) var(--easing);
}
::selection { background: var(--primary-tint); color: var(--fg); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
input, textarea, select, button { font-family: inherit; color: inherit; }

/* type primitives */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; margin: 0; color: var(--fg); }
h1 { font-size: clamp(48px, 7vw, 96px); line-height: 0.98; }
h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; margin: 0 0 16px; }
h3 { font-size: 28px; line-height: 1.18; margin: 0 0 12px; }
h4 {
  font-family: var(--sans); font-weight: 600;
  font-size: 13px; letter-spacing: -0.005em; margin: 0 0 6px;
  color: var(--fg);
}
p { color: var(--fg-muted); max-width: 64ch; }
.lede { font-size: 19px; line-height: 1.55; color: var(--fg); max-width: 56ch; }
.small { font-size: 13px; color: var(--fg-faint); }
.num {
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-faint); letter-spacing: 0.04em;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-faint);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 14px; height: 1px; background: var(--fg-faint);
}

/* brand */
.brand {
  font-family: var(--serif);
  font-size: 28px; line-height: 1;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--fg);
  display: inline-flex; align-items: baseline;
}
.brand .dot {
  display: inline-block;
  width: 0.21em; height: 0.21em;
  background: var(--primary); border-radius: 999px;
  transform: translateY(-0.5em);
  margin-left: 0.04em;
  vertical-align: baseline;
}
.brand-sm { font-size: 22px; }

/* skip-to-content (accessibility) */
.skip-link {
  position: absolute; top: 8px; left: 8px;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px;
  border-radius: var(--r-2);
  font-size: 13px; font-weight: 500;
  z-index: 200;
  transform: translateY(-200%);
  transition: transform var(--t-base) var(--easing);
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--primary); outline-offset: 2px; }
[data-theme="dark"] .skip-link { background: var(--paper); color: var(--ink); }

/* responsive */
@media (max-width: 920px) {
  h1 { font-size: 56px !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
