/* ==========================================================================
   CUPI · design tokens
   The ONLY place raw colour / size values live. Pages use var(--…) only.
   Status per block:  LOCKED = from docs/01-decisions.md
                      PROPOSAL = starting point, confirmed later (tints in Phase 3, type in Phase 2)
   Scales generated by scripts/colour.py (OKLab mixing, hue held constant).
   ========================================================================== */

/* ---------- Fonts (placeholder: Inter until Goutham locks the pairing) ----------
   Static instances made by scripts/static-fonts.py from the Google Fonts variable
   file (system/fonts/src). Static files embed in PDFs as real TrueType; variable
   files come out as Type 3, which is poor for print. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-400-italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: block; }

:root {
  /* ---------- Brand colours · LOCKED (exactly the logo, nothing else) ---------- */
  --cupi-blue:   #012FB2;  /* primary, leads everything */
  --cupi-orange: #FC9725;  /* highlight/fill/accent. Never text on white or cream */
  --cupi-yellow: #FDBE25;  /* small accents only. Never text on light backgrounds */
  --cupi-cream:  #FCF2D9;  /* background / paper */
  --cupi-black:  #000000;  /* text, line work */
  --cupi-white:  #FFFFFF;  /* background, reversed logo */

  /* ---------- Blue scale · PROPOSAL (brand blue = 700) ----------
     Contrast notes: 50–200 are backgrounds (black or blue text on them).
     400 is non-text only (3.49 on white). 800/900 take white text.          */
  --blue-50:  #EFF3FC;
  --blue-100: #D9E3F7;
  --blue-200: #AFC4ED;
  --blue-400: #6388D6;
  --blue-700: var(--cupi-blue);
  --blue-800: #001F7F;
  --blue-900: #000F4D;

  /* ---------- Orange / yellow light tints · PROPOSAL (no dark shades, by rule) ----------
     Backgrounds and highlights only. Text on them: black (or blue).          */
  --orange-50:  #FFF3E9;
  --orange-100: #FFE3CA;
  --orange-200: #FFCDA0;
  --orange-500: var(--cupi-orange);
  --yellow-50:  #FFF6E5;
  --yellow-100: #FFE9C1;
  --yellow-500: var(--cupi-yellow);

  /* ---------- Cool neutral grey · PROPOSAL (brand-blue hue, very low chroma) ----------
     700 = secondary text (7.72 on white, 6.93 on cream).
     500 = captions at large sizes / UI only (3.96 on white, fails body AA).
     50–300 = dividers, rules, fills.                                          */
  --grey-50:  #F5F7F9;
  --grey-100: #EBEDF1;
  --grey-200: #D8DBE0;
  --grey-300: #BABEC4;
  --grey-500: #7C8088;
  --grey-700: #4F535B;
  --grey-900: #1B1F27;

  /* ---------- Semantic roles · LOCKED at G1 (white paper; cream is a block colour) ---------- */
  --paper:        var(--cupi-white);
  --ink:          var(--cupi-black);
  --ink-muted:    var(--grey-700);
  --rule:         var(--grey-300);
  --accent:       var(--cupi-blue);

  /* ---------- Typography · placeholder ---------- */
  --font-display: "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  /* Names shown on the type pages (27–29). Each font option file overrides these. */
  --font-option: "Placeholder";
  --pf-name: "Inter"; --pf-line: "Placeholder until CUPI picks a pairing."; --pf-by: "Rasmus Andersson";
  --sf-name: "Inter"; --sf-line: "Placeholder until CUPI picks a pairing."; --sf-by: "Rasmus Andersson";
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Type scale · titles big, all running text 16px (Goutham, 2 Dec 2026) */
  --type-display: 160px;
  --type-h1:      96px;
  --type-h2:      64px;
  --type-h3:      40px;
  --type-lead:    20px;
  --type-body:    20px;
  --type-small:   20px;
  --type-micro:   20px;
  --leading-tight: 1.0;
  --leading-snug:  1.15;
  --leading-body:  1.4;

  /* ---------- Spacing · LOCKED at G1 (nothing off-scale) ---------- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;
  --space-9: 192px;
  --baseline: 8px;

  /* ---------- Page format & grid · LOCKED (canvas from the brief, grid at G1) ---------- */
  --page-w: 1920px;
  --page-h: 1080px;
  --margin: var(--space-7);      /* 96 */
  --columns: 12;
  --gutter: var(--space-3);      /* 24 */
  --band-h: var(--space-6);      /* 64: running header / footer */
  --col: calc((var(--page-w) - 2 * var(--margin) - (var(--columns) - 1) * var(--gutter)) / var(--columns));

  /* ---------- Page system · LOCKED at G1 (2 Dec 2026, "Loud") ----------
     Big moments are sized here; all running text is --type-body (20 px).     */
  --type-cover:   248px;   /* cover title */
  --type-title:   128px;   /* page titles and opener section names */
  --type-numeral: 880px;   /* opener section numeral, orange on blue */
  --peek-cover:   640px;   /* Shiba icon peeking in on the cover */
  --peek-opener:  400px;   /* Shiba icon peeking in on openers */

  /* Tracking for big type. Tuned per font: a font option file may override these. */
  --track-title:   -0.045em;
  --track-cover:   -0.055em;
  --track-numeral: -0.07em;
  --track-ghost:   -0.05em;
}
