/* =========================================================
   TOKENS — the design "dials"
   Every colour, font, size and spacing value lives here.
   Change a value once and it updates across the whole site.
   ========================================================= */

:root {
  /* ---------- Colours ---------- */
  --white:     #FFFFFF;  /* page background */
  --ink:       #111111;  /* text and headlines */
  --ink-muted: #5C5C5C;  /* small secondary text (6.7:1 on white, 5.7:1 on cream) */
  --cobalt:    #0F52BB;  /* links, section numbers, buttons, selected words */
  --cream:     #F7EDD3;  /* brand butter cream — use sparingly */
  --butter:    #FDFAF4;  /* very light tint of --cream (25% cream + 75% white), in reserve */
  --rule:      #E8E8E8;  /* thin dividers only, never text */

  /* ---------- Font families ----------
     The names after the first one are fallbacks: shown for a split second
     while the real font loads (font-display: swap), or if it fails. */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---------- Type sizes ----------
     clamp(smallest, preferred, largest): text grows smoothly with the
     screen width ("vw" = 1% of the window width) but never beyond the limits. */
  --text-xs:      0.75rem;                                    /* 12px  labels */
  --text-sm:      0.875rem;                                   /* 14px  small print */
  --text-base:    clamp(1rem, 0.96rem + 0.12vw, 1.0625rem);    /* 16–17px body */
  --text-lg:      clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);  /* 18–20px lead / subtitles */
  --text-xl:      clamp(1.5rem, 1.3rem + 0.8vw, 2rem);        /* 24–32px chapter titles */
  --text-2xl:     clamp(2.5rem, 1.8rem + 3.5vw, 5rem);        /* 40–80px section headlines */
  --text-display: clamp(3rem, 1.5rem + 7.5vw, 9.5rem);        /* 48–152px hero */

  /* Line height and letter spacing */
  --leading-tight: 0.95;   /* huge headlines */
  --leading-snug:  1.1;    /* other headlines */
  --leading-body:  1.55;   /* reading text */
  --tracking-display: -0.03em;
  --tracking-label:    0.08em;
  --measure: 65ch;         /* max line length for reading (~65 characters) */

  /* ---------- Spacing (8px steps) ---------- */
  --space-1: 0.5rem;  /*   8px */
  --space-2: 1rem;    /*  16px */
  --space-3: 1.5rem;  /*  24px */
  --space-4: 2rem;    /*  32px */
  --space-5: 3rem;    /*  48px */
  --space-6: 4rem;    /*  64px */
  --space-7: 6rem;    /*  96px */
  --space-8: 8rem;    /* 128px */
  --section-space: clamp(4rem, 2rem + 8vw, 10rem); /* gap between big sections */

  /* ---------- Layout ---------- */
  --max-width:  90rem;                              /* 1440px */
  --gutter:     clamp(1rem, 0.5rem + 2vw, 2.5rem);  /* page side margin: 16px on phones */
  --column-gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  --nav-height: 3.5rem;                             /* 56px sticky bar */

  /* ---------- Details ---------- */
  --radius: 2px;                    /* restrained rounding */
  --border: 1px solid var(--rule);
  --duration: 180ms;                /* hover transitions */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
