/* ============================================================
   Thomas Bosshart — Typography tokens
   Direction C « Technical » (décision 2026-07-04) :
   Space Grotesk carries display + UI chrome (its geometry is the
   brand voice) ; Hanken Grotesk carries long-form body text ;
   JetBrains Mono carries code, tags, numbers. Body 14px / 1.66,
   capped to a ~68ch measure.
   ============================================================ */

:root {
  /* ---- Families ---- */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
                  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-ui:      var(--font-display);
  --font-body:    "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system,
                  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans:    var(--font-body); /* legacy alias */
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono",
                  Menlo, Consolas, monospace;

  /* ---- Weights ---- */
  --fw-regular: 400;  /* @kind font */
  --fw-medium:  500;  /* @kind font */
  --fw-semibold:600;  /* @kind font */
  --fw-bold:    700;  /* @kind font */

  /* ---- Type scale (1.25-ish, tuned by hand; rem @ 16px root) ---- */
  --text-2xs: 0.6875rem;  /* 11px — labels, code chrome */
  --text-xs:  0.75rem;    /* 12px — captions, meta, table head */
  --text-sm:  0.8125rem;  /* 13px — secondary UI, TOC */
  --text-base:0.875rem;   /* 14px — body (reading size) */
  --text-md:  1rem;       /* 16px — lead-in body, large UI */
  --text-lg:  1.125rem;   /* 18px — h4 / large label */
  --text-xl:  1.3125rem;  /* 21px — h3 */
  --text-2xl: 1.5625rem;  /* 25px — h2 */
  --text-3xl: 1.9375rem;  /* 31px — h1 / page title */
  --text-4xl: 2.4375rem;  /* 39px — hero / display */

  /* ---- Code size ---- */
  --text-code:        0.8125rem;  /* 13px block code */
  --text-code-inline: 0.875em;    /* relative to surrounding text */

  /* ---- Line heights ---- */
  --leading-none:    1;
  --leading-tight:   1.12;  /* display / big headings */
  --leading-heading: 1.25;  /* sub headings */
  --leading-snug:    1.45;  /* UI, dense lists */
  --leading-body:    1.66;  /* long-form reading (the comfort) */
  --leading-code:    1.65;

  /* ---- Letter spacing ---- */
  --tracking-tighter: -0.018em; /* large display */
  --tracking-tight:   -0.01em;  /* headings (Space Grotesk needs little) */
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-caps:    0.07em;   /* uppercase eyebrows / table head */

  /* ---- Reading measure ---- */
  --measure:        68ch;  /* ~65–75 chars */
  --measure-narrow: 56ch;
  --measure-wide:   78ch;
}
