/* ==========================================================================
   Design system — v1.1
   Black & white base. Three accents, each with one job, under 5% of any screen:
     teal    = navigate / you are here
     coral   = decision
     mustard = proof
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("../fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* Base — black & white */
  --paper: #FFFFFF;          /* White: page background */
  --paper-2: #F8F8F8;        /* Tertiary: alternate sections, cards, frames */
  --paper-3: #F0F0F0;
  --ink: #222222;            /* Primary: text, dark sections, buttons */
  --ink-2: #4D4D4D;          /* Reading text on white (8.4:1) */
  --ink-3: #6B6B6B;          /* Muted small text (5.3:1) */
  --secondary: #7B7B7B;      /* Large text & decorative lines only */
  --rule: #E6E6E6;           /* Hairlines */
  --rule-strong: #C4C4C4;    /* Decorative lines in drawings */
  --ghost: #F4F4F4;          /* Background letterform */

  /* Dark surfaces */
  --night: #222222;
  --night-2: #2C2C2C;
  --night-rule: #3A3A3A;
  --night-text: #FFFFFF;
  --night-text-2: #B8B8B8;

  /* Accents */
  --teal: #3F6E66;           /* navigate · 5.8:1 on white */
  --teal-on-dark: #8CC2B7;   /* teal for dark surfaces */
  --coral: #E2674A;          /* decision · decorative on light */
  --signal: #C4502F;         /* decision · text & buttons with white text (4.6:1) */
  --signal-hover: #A9401F;
  --signal-ink: #FFFFFF;
  --mustard: #E9C25A;        /* proof · highlights; text only on dark */

  /* Type */
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);      /* v1.1: one family for display and text */
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-track: -0.035em;

  --step--2: clamp(0.72rem, 0.70rem + 0.08vw, 0.77rem);
  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.42rem);
  --step-2:  clamp(1.5rem, 1.32rem + 0.8vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
  --step-4:  clamp(2.6rem, 1.7rem + 4vw, 5.2rem);
  --step-5:  clamp(3.1rem, 1.5rem + 7vw, 8.4rem);

  /* Space (8pt-based) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem; --s-10: 10rem;
  --gutter: clamp(1.25rem, 4.2vw, 3.75rem);
  --measure: 62ch;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 160ms; --dur-2: 320ms; --dur-3: 640ms;

  --radius: 4px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(34,34,34,0.04), 0 16px 36px -22px rgba(34,34,34,0.22);
  --hair: 1px solid var(--rule);
}

/* Reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }

/* Shared primitives ------------------------------------------------------ */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: var(--s-2) var(--s-4); font-size: var(--step--1); text-decoration: none;
}
.skip:focus { top: var(--s-4); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Clearly identified placeholder for facts that still need verification */
.ph {
  display: inline;
  font-family: var(--mono);
  font-size: 0.84em;
  background: rgba(196, 80, 47, 0.05);
  color: var(--signal-hover);
  outline: 1px dashed rgba(196, 80, 47, 0.6);
  outline-offset: 1px;
  padding: 0 0.3em;
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* v1.1 — emphasis inside display type is grey, not italic (Geist has no italic) */
h1 em, h2 em, .hero__title em, .cs__title em, .work__title em, .access__title em { font-style: normal; color: var(--secondary); }

[hidden] { display: none !important; }

/* Leaf theme (concept 3.0) */
html[data-theme="leaf"] {
  --signal: #2F7A4F;        /* decision / action · 5.2:1 with white text */
  --signal-hover: #2B6E47;
  --coral: #4E9A6A;         /* decorative green on light */
  --teal: #2F7A4F;          /* navigation also uses the action green */
  --teal-on-dark: #8FCB9F;
}
