/* ============================================================
   TOKENS — single source of truth (Protocol 3)
   V4 · "Baskerville serif + client logo marks + merged credibility"
   (Zebrikitou, 2026-06-20). Continues V3 (Marco width + meta header).

   Inherits V3 wholesale. The ONLY token change is the serif family:
   the editorial accent moves from Zodiak to Libre Baskerville — a
   classical transitional serif against the contemporary Cabinet
   Grotesk. Baskerville renders optically large, so accent words are
   pulled back ~0.92em at the component layer (styles.css), not here.

   Swap the semantic layer to theme; never touch components.
   Fonts: re-point --font-sans / --font-serif in ONE place each.
   ============================================================ */

:root {
  /* --- Type families (single source of truth) --- */
  --font-sans: "Cabinet Grotesk", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  /* V4: classical Baskerville italic for the editorial accent. A true
     italic; degrades to Georgia italic (also true) if it fails to load.
     (V3 was "Zodiak","Newsreader",Georgia,serif.) */
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;

  /* --- Type scale (Marco-calibrated, ~1.25 major third, 16px base) --- */
  --fs-display-lg: clamp(2.5rem, 5.5vw, 4rem);       /* 40 → 64 */
  --fs-display:    clamp(2rem, 4.5vw, 3.0625rem);    /* 32 → 49 */
  --fs-display-sm: clamp(1.75rem, 3.2vw, 2.4375rem); /* 28 → 39 */
  --fs-h1: clamp(1.625rem, 2.4vw, 1.9375rem);        /* 26 → 31 */
  --fs-h2: clamp(1.375rem, 1.9vw, 1.5625rem);        /* 22 → 25 */
  --fs-h3: clamp(1.125rem, 1.3vw, 1.25rem);          /* 18 → 20 */
  --fs-lead: clamp(1.0625rem, 1.2vw, 1.25rem);       /* 17 → 20 */
  --fs-body: 1rem;        /* 16  — Marco reading size */
  --fs-small: 0.875rem;   /* 14  */
  --fs-caption: 0.75rem;  /* 12  — uppercase micro-label */

  --lh-display: 1.05;
  --lh-heading: 1.1;
  --lh-body: 1.6;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.08em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* --- Spacing (8pt) --- */
  --space-4: 4px;   --space-8: 8px;   --space-12: 12px; --space-16: 16px;
  --space-24: 24px; --space-32: 32px; --space-48: 48px; --space-64: 64px;
  --space-96: 96px; --space-128: 128px;
  --space-section: clamp(96px, 12vw, 160px);

  /* --- Layout (V3: near-edge Marco width, viewport-relative padding) --- */
  --container-max: 1760px;
  --gutter: 24px;
  --pad-x: clamp(20px, 6vw, 112px);
  --radius-card: 10px;
  --radius-mark: 8px;   /* V4: client logo mark slot (was the .project__chip 6px) */
  --radius-pill: 999px;
  --mark-size: 40px;    /* V4: logo mark box, up from V3's 28px chip for legibility */

  /* --- Color primitives (UNCHANGED) --- */
  --white: #FFFFFF;
  --ink: #0E0E0E;
  --grey-700: #3A3A3A;
  --grey-500: #5A5A5A;
  --grey-300: #A8A8A8;
  --grey-150: #E5E5E3;
  --grey-100: #F5F5F4;
  /* --orange (#FF5F24) retired in V2.1. Restore = re-add + repoint --accent. */
  --brand-ost: #2A438E;
  --brand-guepard: #FFCB51;
  --brand-solciety: #0E061C;
  --brand-cynoia: #13131A;

  /* --- Semantic (light default · UNCHANGED) --- */
  --bg: var(--white);
  --fg: var(--ink);
  --fg-muted: var(--grey-500);
  --surface: var(--grey-100);
  --border: var(--grey-150);
  --accent: var(--ink);
  --accent-hover: var(--grey-700);
  --accent-fg: var(--white);
  --focus: var(--accent);
}

/* Dark conversion zone — swap semantic layer only (UNCHANGED) */
.section--dark,
.site-footer {
  --bg: var(--ink);
  --fg: var(--white);
  --fg-muted: var(--grey-300);
  --surface: #161616;
  --border: #2A2A2A;
  --accent: var(--white);
  --accent-hover: var(--grey-150);
  --accent-fg: var(--ink);
  background: var(--bg);
  color: var(--fg);
}
