/* ==========================================================================
   SYNC — Beyond the Physical Stage
   Design tokens

   Derived from the live Galleri Trappan site (galleritrappan.org, site.css,
   24 Nov 2026). See docs/DESIGN-SYSTEM.md for the reasoning behind each value.

   One measuring system, two outputs:
   every size below is written in real print units (mm / pt) of an A4 sheet.
   The units are resolved against the nearest `.sheet` container
   (container-type: inline-size), so
     - in print, a sheet is 210 mm wide and 1 --mm is exactly 1 mm;
     - on screen, a sheet is scaled and everything scales with it, keeping
       the proportions identical to print.
   screen.css replaces --mm / --pt with fixed values for the narrow
   (phone) reading view.
   ========================================================================== */

:root {
  /* ---- Sheet ----------------------------------------------------------- */
  --sheet-w-mm: 210;                           /* A4 portrait */
  --sheet-h-mm: 297;

  --mm: calc(100cqw / var(--sheet-w-mm));      /* 1 mm on the sheet */
  --pt: calc(var(--mm) * 0.3527778);           /* 1 pt  = 0.3528 mm */

  /* ---- Grid: 10 columns, 51 baselines ---------------------------------- */
  /* 10 columns: the Galleri Trappan 1fr : 1.5fr split is exactly 4 + 6,
     its 5-poster row is 5 × 2, its stepped bars are 4 columns wide.
     Sync's 5 × 5 node array sits on the five double-columns.            */
  --margin-top:    calc(20 * var(--mm));
  --margin-bottom: calc(22 * var(--mm));
  --margin-x:      calc(15 * var(--mm));
  --gutter:        calc(5 * var(--mm));
  --col:           calc(13.5 * var(--mm));     /* (180 − 9 × 5) / 10 */
  --bl:            calc(5 * var(--mm));        /* baseline = 14.17 pt */
  /* live area 180 × 255 mm = 10 columns × 51 baselines */

  /* ---- Colour (Galleri Trappan + two signal colours from the
          Sync installation drawings) ---------------------------------- */
  --ink:       #111;
  --paper:     #fff;
  --wall:      #ecebe7;     /* GT poster wall — also the screen review ground */
  --muted:     #5c5c5c;
  --line:      #d6d6d2;
  --ink-line:  #444;        /* rules on ink pages */
  --ink-muted: #9a9a9a;     /* secondary text on ink pages */
  --signal:    #53aee5;     /* data / cabling / motion — diagrams only */
  --sensor:    #2eaa49;     /* sensor / active node — diagrams only */
  --echo:      #f2a541;     /* reflected sound — diagrams only */

  /* ---- Type families ---------------------------------------------------- */
  --din:  "D-DIN", "Helvetica Neue", Arial, sans-serif;
  --cond: "D-DIN Condensed", "Arial Narrow", sans-serif;

  /* ---- Type scale (pt on the A4 sheet) ---------------------------------
     Ratios to body follow the GT site at 1440 px:
     kicker .73 · h2 4.3 · h1 10.8 · lede 2.9 · statement 2.2            */
  --fs-micro:      calc(7    * var(--pt));   /* kickers, running heads, folios */
  --fs-mast:       calc(8    * var(--pt));   /* split masthead */
  --fs-caption:    calc(7.5  * var(--pt));   /* captions, imprint, legends */
  --fs-body:       calc(10   * var(--pt));   /* on a 14.17 pt baseline */
  --fs-facts:      calc(11   * var(--pt));   /* condensed fact lines */
  --fs-standfirst: calc(14   * var(--pt));
  --fs-statement:  calc(21   * var(--pt));   /* uppercase statement */
  --fs-lede:       calc(20   * var(--pt));   /* uppercase cover lede */
  --fs-pull:       calc(30   * var(--pt));   /* uppercase pull quote */
  --fs-h2:         calc(40   * var(--pt));   /* condensed section titles */
  --fs-num:        calc(84   * var(--pt));   /* condensed chapter numbers */
  --fs-display:    calc(86   * var(--pt));   /* cover title */

  --lh-small: calc(0.75 * var(--bl));        /* 10.6 pt for 7–7.5 pt text */

  /* ---- Tracking (from GT) ----------------------------------------------- */
  --track-kicker: .14em;
  --track-mast:   .12em;
  --track-caps:   .07em;
  --track-display: .015em;
}
