/* =========================================================================
   Design tokens — the single source of truth for the visual language.
   Dark, earthy, editorial. A private research library / field manual.
   ========================================================================= */

:root {
  /* ---- Color: surfaces (warm near-black → raised charcoals) ------------ */
  --bg:            #0e0d0b;
  --bg-raised:     #15130f;
  --bg-card:       #1a1712;
  --bg-card-hover: #211d16;
  --bg-inset:      #0a0908;

  /* ---- Color: ink (bone / ivory / warm off-white) --------------------- */
  --ink:        #ece5d6;
  --ink-soft:   #bcb4a2;
  --ink-faint:  #8b8472;
  --ink-on-light: #14120e;

  /* ---- Color: accents (muted olive / earth brown / oxblood) ----------- */
  --olive:      #a9a36a;
  --olive-deep: #6f6b40;
  --earth:      #a06b48;
  --oxblood:    #8a3f34;
  --gold:       #c7ab74;

  --accent:        var(--olive);
  --accent-ink:    #14120e; /* text on accent fills */

  /* ---- Lines & dividers (hairline system) ----------------------------- */
  --line:        rgba(236, 229, 214, 0.12);
  --line-strong: rgba(236, 229, 214, 0.22);
  --line-faint:  rgba(236, 229, 214, 0.07);

  /* ---- Feedback colors ------------------------------------------------ */
  --ok:    #8fae6e;
  --warn:  #c7a85f;
  --error: #c97b67;

  /* ---- Typography ----------------------------------------------------- */
  --font-display: "Fraunces", "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  /* Fluid modular scale (min .. max) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.10rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.25vw, 2.70rem);
  --step-4:  clamp(2.20rem, 1.80rem + 2.10vw, 3.80rem);
  --step-5:  clamp(2.70rem, 2.05rem + 3.30vw, 5.20rem);

  --leading-tight: 1.07;
  --leading-snug:  1.25;
  --leading-body:  1.65;

  /* Reading measure */
  --measure: 66ch;

  /* ---- Spacing scale -------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* ---- Layout --------------------------------------------------------- */
  --container: 1180px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* ---- Radii (restrained — serious, not bubbly) ----------------------- */
  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  /* ---- Shadows (subtle on dark) --------------------------------------- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 48px -24px rgba(0, 0, 0, 0.75);

  /* ---- Motion --------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 180ms;

  /* ---- Z-index -------------------------------------------------------- */
  --z-header: 100;
}
