/* Design tokens.

   One ground colour and one ink colour: warm black paper stock, beige ink.
   Everything else is that ink at a lower opacity, so the palette can never
   drift out of key. `--ink-rgb` is the channel triplet the canvas reads, so
   CSS and the particle renderer share a single source of truth. */

:root {
  color-scheme: dark;

  /* ground */
  --ground: #0a0908;
  --ground-raised: rgba(233, 220, 196, 0.032);
  --ground-raised-2: rgba(233, 220, 196, 0.055);

  /* ink */
  --ink-rgb: 233, 220, 196;
  --ink: rgb(var(--ink-rgb));
  --ink-dim: rgba(var(--ink-rgb), 0.66);
  --ink-faint: rgba(var(--ink-rgb), 0.4);
  --ink-ghost: rgba(var(--ink-rgb), 0.22);

  /* rules */
  --rule: rgba(var(--ink-rgb), 0.12);
  --rule-strong: rgba(var(--ink-rgb), 0.26);

  /* The one warm accent, used sparingly. Kept as a triplet for the same reason
     as the ink: the wave renderer reads it back to colour rarefaction. */
  --accent-rgb: 210, 154, 92;
  --accent: rgb(var(--accent-rgb));

  /* type
     One face, monospaced, for the whole page. The serif this replaced was
     handsome and read as a monograph; a fixed pitch reads as a terminal
     buffer, which is both more honest about what the page is and a good deal
     less solemn. Everything downstream — the caret, the `//` on the section
     titles, the bracketed chips — only works because the grid is fixed. */
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo,
    Consolas, 'Liberation Mono', monospace;

  /* Monospace runs optically larger and much wider than the serif at the same
     nominal size, so the whole scale comes down a notch and the measure comes
     in with it. `ch` is a real unit here: on a fixed pitch it is exactly the
     column count. */
  --step--2: clamp(0.64rem, 0.62rem + 0.1vw, 0.7rem);
  --step--1: clamp(0.74rem, 0.71rem + 0.14vw, 0.81rem);
  --step-0: clamp(0.86rem, 0.83rem + 0.18vw, 0.94rem);
  --step-1: clamp(0.98rem, 0.91rem + 0.3vw, 1.1rem);
  --step-2: clamp(1.15rem, 1rem + 0.7vw, 1.6rem);
  --step-3: clamp(1.5rem, 1.15rem + 1.7vw, 2.4rem);

  /* the name; deliberately its own scale. A fixed pitch sets 13 columns of
     "Daniel Peppe_" at 0.6em each, so the cap here is what keeps it inside
     the content box rather than a guess. */
  --step-name: clamp(1.85rem, 0.7rem + 5.1vw, 4.5rem);

  /* rhythm */
  --measure: 58ch;
  --gap: clamp(0.9rem, 0.6rem + 1.1vw, 1.4rem);
  --page-pad: clamp(1.25rem, 0.6rem + 3.2vw, 4rem);
  --rhythm: clamp(2.5rem, 1.6rem + 3.6vw, 5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
