/* tokens.css: every colour, type size, space, radius and motion value for Booth Notes (coastlinedj.com).
   Two themes from one set of tokens, written with light-dark(): "dusk" (light) and "late set" (dark).
   The page follows the reader's system setting until they pick one with the theme switch (html[data-theme]).
   Palette in OKLCH: a cool evening paper, deep harbour ink, one sea-glass accent, and lamp amber kept for the
   string lights and the lighthouse only. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;
  /* type: Newsreader carries reading and headlines, Bricolage Grotesque carries the interface */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --t-micro: 0.75rem;     /* 12 labels */
  --t-ui: 0.9375rem;      /* 15 controls, tables */
  --t-small: 1rem;        /* 16 captions */
  --t-body: 1.1875rem;    /* 19 reading */
  --t-dek: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-h3: 1.375rem;
  --t-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  --t-h1: clamp(2.5rem, 1.5rem + 4.2vw, 4.75rem);
  --t-model: 1.625rem;
  --lh-read: 1.58;
  --lh-ui: 1.35;
  --lh-head: 1.04;
  --track-label: 0.08em;

  /* space (4-based) and grid */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --measure: 64ch;
  --page: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  /* shape: paper is square, controls are softly cut, never pills */
  --r-1: 4px; --r-2: 8px; --r-3: 14px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 140ms; --t-mid: 240ms; --t-slow: 420ms;

  /* colour: light (dusk), dark (late set) */
  --paper: light-dark(oklch(0.975 0.006 255), oklch(0.165 0.022 258));
  --paper-2: light-dark(oklch(0.948 0.010 255), oklch(0.205 0.026 258));
  --paper-3: light-dark(oklch(0.915 0.014 255), oklch(0.245 0.028 258));
  --ink: light-dark(oklch(0.21 0.035 258), oklch(0.950 0.010 85));
  --ink-2: light-dark(oklch(0.40 0.030 258), oklch(0.775 0.020 250));
  --ink-3: light-dark(oklch(0.54 0.022 258), oklch(0.640 0.020 250));
  --rule: light-dark(oklch(0.86 0.012 255), oklch(0.315 0.026 258));
  --rule-strong: light-dark(oklch(0.24 0.035 258), oklch(0.880 0.012 85));
  --accent: light-dark(oklch(0.48 0.085 205), oklch(0.82 0.085 190));
  --accent-soft: light-dark(oklch(0.935 0.028 200), oklch(0.265 0.040 210));
  --accent-ink: light-dark(oklch(0.30 0.06 210), oklch(0.92 0.05 190));
  --lamp: light-dark(oklch(0.78 0.14 72), oklch(0.84 0.14 78));
  --btn: light-dark(oklch(0.21 0.035 258), oklch(0.950 0.010 85));
  --btn-ink: light-dark(oklch(0.985 0.004 255), oklch(0.165 0.022 258));
  --mark: light-dark(oklch(0.91 0.05 200 / 0.9), oklch(0.36 0.05 200 / 0.85));
  /* the drawings */
  --line: light-dark(oklch(0.27 0.035 258), oklch(0.86 0.015 250));
  --hair: light-dark(oklch(0.70 0.02 258), oklch(0.42 0.025 258));
  --fill: light-dark(oklch(0.990 0.004 255), oklch(0.215 0.024 258));
  --sky: light-dark(oklch(0.935 0.022 280), oklch(0.195 0.034 270));
  --screen: light-dark(oklch(0.30 0.04 250), oklch(0.13 0.02 250));
}
html[data-theme="dusk"] { color-scheme: light; }
html[data-theme="late"] { color-scheme: dark; }
