/* ==========================================================================
   tokens.css — fonts, color themes, scale. Every other sheet reads from here.
   Add a theme: copy a [data-theme] block, then add its name to THEMES in
   js/theme.js. Nothing else needs to change.
   ========================================================================== */

@font-face {
  font-family: "Departure Mono";
  src: url("../fonts/departure-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* type ------------------------------------------------------------------ */
  --font-pixel: "Departure Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.5rem, 1.1rem + 2vw, 2rem);
  --step-name: clamp(2rem, 0.6rem + 9vw, 6.5rem);

  /* space ----------------------------------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;

  --measure: 68ch;
  --page: 76rem;
  --rule: 1px;

  /* color — tokyo night (default) ----------------------------------------- */
  --bg: #1a1b26;
  --bg-sunk: #16161e;
  --bg-raise: #1f2335;
  --border: #292e42;
  --border-hi: #3b4261;
  --fg: #c0caf5;
  --fg-dim: #9aa5ce;
  --fg-mute: #565f89;
  --accent: #7dcfff;
  --accent-2: #7aa2f7;
  --ok: #9ece6a;
  --warn: #e0af68;
  --info: #7aa2f7;
  --danger: #f7768e;
  --glitch-a: #bb9af7;
  --glitch-b: #7dcfff;
  --selection: #33467c;
  color-scheme: dark;
}

[data-theme="gruvbox"] {
  --bg: #1d2021;
  --bg-sunk: #141617;
  --bg-raise: #282828;
  --border: #3c3836;
  --border-hi: #504945;
  --fg: #ebdbb2;
  --fg-dim: #d5c4a1;
  --fg-mute: #928374;
  --accent: #8ec07c;
  --accent-2: #83a598;
  --ok: #b8bb26;
  --warn: #fabd2f;
  --info: #83a598;
  --danger: #fb4934;
  --glitch-a: #fe8019;
  --glitch-b: #d3869b;
  --selection: #504945;
  color-scheme: dark;
}

[data-theme="catppuccin"] {
  --bg: #1e1e2e;
  --bg-sunk: #181825;
  --bg-raise: #313244;
  --border: #45475a;
  --border-hi: #585b70;
  --fg: #cdd6f4;
  --fg-dim: #bac2de;
  --fg-mute: #7f849c;
  --accent: #94e2d5;
  --accent-2: #89b4fa;
  --ok: #a6e3a1;
  --warn: #f9e2af;
  --info: #89b4fa;
  --danger: #f38ba8;
  --glitch-a: #cba6f7;
  --glitch-b: #f5c2e7;
  --selection: #45475a;
  color-scheme: dark;
}

/* single-phosphor amber terminal */
[data-theme="phosphor"] {
  --bg: #100b02;
  --bg-sunk: #080500;
  --bg-raise: #1d1405;
  --border: #3a2a08;
  --border-hi: #543d0c;
  --fg: #ffb000;
  --fg-dim: #d59200;
  --fg-mute: #8a5e00;
  --accent: #ffd080;
  --accent-2: #ffb000;
  --ok: #ffb000;
  --warn: #ff8a00;
  --info: #ffc94d;
  --danger: #ff5f3d;
  --glitch-a: #ffd080;
  --glitch-b: #ff8a00;
  --selection: #543d0c;
  color-scheme: dark;
}

[data-theme="paper"] {
  --bg: #faf8f3;
  --bg-sunk: #efece3;
  --bg-raise: #ffffff;
  --border: #d8d3c6;
  --border-hi: #b5ae9c;
  --fg: #1c1b19;
  --fg-dim: #46433c;
  --fg-mute: #6f6b62;
  --accent: #00627a;
  --accent-2: #1b3a8c;
  --ok: #1d6b2c;
  --warn: #8a5a00;
  --info: #1b3a8c;
  --danger: #a51b1b;
  --glitch-a: #1b3a8c;
  --glitch-b: #00627a;
  --selection: #cfe3ea;
  color-scheme: light;
}
