/* serifeus-sites · _kit/tokens.css
 *
 * Every value here was decided somewhere and the reason is in a doc. Do not
 * add a colour without a reason; do not change one without changing the doc.
 *
 *   palettes  -> serifeus-espantos-concept.md §3.4, serifeus-opus-cover-language.md §5
 *   type      -> serifeus-espantos-concept.md §3.5
 *   motion    -> _kit/motion.md
 */

:root {
  /* ── Espantitos · se cura ──────────────────────────────────────────────
     Cempasúchil. Warm on purpose: it is the line that resolves. Reads from
     across a room, which is the actual test — a swap-meet table in bad light. */
  --esp-ground: #DF7F1B;
  --esp-paper:  #F7E7C8;
  --esp-ink:    #141210;

  /* ── Tierra de Espantos · se hereda ────────────────────────────────────
     Verde nopal. ⚠️ Replaced a near-black #18241B that FAILED: in a one-ink
     system a ground that dark leaves nothing to print WITH — the wordmark,
     title and state name all sank into it. See out/tierra-palettes.png. */
  --tie-ground: #4F6B47;
  --tie-paper:  #EDE7D6;
  --tie-ink:    #0B0F0C;

  /* ── Sin Remedio · no se cura ──────────────────────────────────────────
     No colour at all. Broke away from the Espantos root; carries the Serifeus
     colophon only, so it can sit in the adult section without arriving from a
     children's collection. */
  --sin-ground: #E5E0D5;
  --sin-paper:  #E5E0D5;
  --sin-ink:    #100E0C;

  /* ── OPUS · el fresco ──────────────────────────────────────────────────
     Pigments that survive wet alkaline lime. The palette is set by the
     medium's chemistry, not by taste — the most Opus fact available.
     NO saturated colour. If an Opus page could sit beside an Espantitos and
     look like a louder version of it, it has failed. */
  --op-cal:     #EDE7DA;  /* the plaster itself */
  --op-ocre:    #B98A46;
  --op-tierra:  #8C3B2C;  /* red oxide */
  --op-verde:   #5A6B4E;  /* green earth */
  --op-humo:    #2A2724;  /* carbon — the only true dark */
  --op-azul:    #6E7E88;  /* scarce: lapis was ruinous. Use sparingly. */

  /* ── Type ──────────────────────────────────────────────────────────────
     ⚠️ These were Windows system fonts (Franklin Gothic / Georgia / Palatino).
     That was wrong twice: most visitors have none of them, and a cover system
     meant to deploy 576 times was not reproducible off one machine. All four
     below are OFL, vendored in _kit/vendor/fonts/ with their licence files.

     IM Fell English is a 17th-century letterpress revival — closer to the
     Posada broadsheet register than the Georgia stand-in ever was. The type
     stops being a placeholder and starts being the argument. */
  --font-sans: 'Rajdhani', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
  --font-disp: 'IM Fell English', Georgia, serif;          /* penny-press weight */
  --font-opus: 'EB Garamond', 'Palatino Linotype', Georgia, serif;  /* a text face
                                     at display size — never a display face */
  --font-read: 'Spectral', Georgia, serif;                 /* screen-first reading */
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Tabular figures are not optional anywhere a fraction appears:
     `3/6` and `11/6` must not shift the layout between book 9 and book 10. */
  --num-tabular: tabular-nums;

  /* ── Motion ────────────────────────────────────────────────────────────
     Same engine, opposite temperature. The toolbox never changes; what the
     motion is FOR does. See _kit/motion.md. */
  --ease-formation: cubic-bezier(.34, 1.56, .64, 1);   /* index: overshoot, delight */
  --ease-precision: cubic-bezier(.22, 1, .36, 1);      /* beatbound: crisp, no bounce */
  --ease-erosion:   cubic-bezier(.16, 1, .3, 1);       /* opus: long, nothing springs */

  --dur-fast:  .28s;
  --dur-base:  .6s;
  --dur-slow:  1.8s;   /* Opus only. If it feels too slow, it is probably right. */
}

/* An Opus page never uses a collection colour, and vice versa. Scoping the
   palettes stops a well-meaning edit from mixing the two registers. */
[data-floor="opus"] {
  --ground: var(--op-cal);
  --ink:    var(--op-humo);
  --font:   var(--font-opus);
  --ease:   var(--ease-erosion);
  --dur:    var(--dur-slow);
}

[data-floor="espantos"] {
  --ground: var(--esp-ground);
  --ink:    var(--esp-ink);
  --font:   var(--font-disp);
  --ease:   var(--ease-formation);
  --dur:    var(--dur-base);
}

[data-floor="beatbound"] {
  --ease: var(--ease-precision);
  --dur:  var(--dur-fast);
}

/* Non-negotiable on every property. A disabled page is not an answer —
   the content still has to mean something without the motion. */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: .01s; --dur-base: .01s; --dur-slow: .01s; }
}
