/* The design language: warm drafting paper, rapidograph ink, hard offset shadows.
   Day is the default; night re-derives the same language on an ink ground. */
:root {
  --font-sans: "Bahnschrift", "DIN Alternate", "Archivo Narrow", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-serif: Georgia, "Times New Roman", serif;

  --text-xs: 11.5px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15.5px;
  --text-lg: 17px;
  --text-xl: clamp(34px, 5vw, 62px);
  --text-display: clamp(40px, 5vw, 72px);
  --text-closing: clamp(40px, 7vw, 92px);

  --leading-tight: 1.02;
  --leading-normal: 1.6;
  --track-label: 0.3em;
  --track-wide: 0.08em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 18px;
  --space-5: 28px;
  --space-6: 40px;
  --space-7: 66px;
  --space-8: 120px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --measure: 62ch;
  --shell-width: 1200px;
  --masthead-height: 62px;
  --transition: 0.18s;
}

:root,
[data-theme="day"] {
  --paper: #f7f1e3;
  --paper-sunk: #efe6d0;
  --surface: #fffdf6;
  --ink: #23242b;
  --ink-muted: #4c4e59;
  --ink-faint: #6a6c78;
  --screen: #12141a;
  --concrete: #e9e6de;

  --red: #e8481e;
  --yellow: #f2a71b;
  --blue: #3e7bf2;
  --purple: #9a63e8;
  --green: #27ad74;
  --slate: #5f6e78;
  --sky: #8fd9ef;
  --rule-colour: #23242b;

  --accent: var(--red);
  --rule-width: 2px;
  --rule: var(--rule-width) solid var(--ink);
  --hairline: 1.5px solid var(--paper-sunk);
  --drop: 6px 6px 0 color-mix(in srgb, var(--ink) 14%, transparent);
  --drop-sm: 4px 4px 0 color-mix(in srgb, var(--ink) 13%, transparent);
  --drop-accent: 6px 6px 0 color-mix(in srgb, var(--accent) 34%, transparent);

  /* canvas needs raw channels, not colours */
  --line-rgb: 35, 36, 43;
  --spine-rgb: 232, 72, 30;
}

[data-theme="night"] {
  --paper: #17181d;
  --paper-sunk: #101116;
  --surface: #1f2128;
  --ink: #e9e6de;
  --ink-muted: #b0aea6;
  --ink-faint: #8a8891;
  --screen: #0b0c10;
  --concrete: #23242b;

  --red: #ff6a42;
  --yellow: #f7bb45;
  --blue: #6d99f7;
  --purple: #b487f0;
  --green: #46c78d;
  --slate: #8ea0ab;
  --sky: #4f8ea3;
  --rule-colour: #e9e6de;

  --accent: var(--red);
  --hairline: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent);
  --drop: 6px 6px 0 color-mix(in srgb, #000 55%, transparent);
  --drop-sm: 4px 4px 0 color-mix(in srgb, #000 50%, transparent);
  --drop-accent: 6px 6px 0 color-mix(in srgb, var(--accent) 40%, transparent);

  --line-rgb: 233, 230, 222;
  --spine-rgb: 255, 106, 66;
}
