/* ZNSI design tokens. Every site loads this first, then base.css.
   Dark ink is the brand; the "paper" surface is for long reading. */

@font-face {
  font-family: "Inter Tight";
  src: url(/brand/fonts/inter-tight-latin-wght-normal.woff2?v=3c88d46b7d91) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(/brand/fonts/jetbrains-mono-latin-wght-normal.woff2?v=3c88d46b7d91) format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette */
  --ink: #0b0b0c;
  --ink-1: #111113;
  --ink-2: #17171a;
  --ink-3: #212126;
  --bone: #ede8df;
  --bone-2: #b8b2a7;
  --bone-3: #8f897f;
  --vermilion: #e5341d;
  --vermilion-hi: #ff5a3c;
  --vermilion-lo: #8f1f10;
  --vermilion-deep: #b42814; /* accent text on paper */
  --jade: #6fbf8e;
  --amber: #e8a33d;
  --cobalt: #7d97d8;

  /* Semantic: these are what components use */
  --bg: var(--ink);
  --bg-raised: var(--ink-1);
  --bg-sunken: #070708;
  --fg: var(--bone);
  --fg-2: var(--bone-2);
  --fg-3: var(--bone-3);
  --accent: var(--vermilion);
  --accent-fg: var(--ink); /* text on an accent fill */
  --rule: rgb(237 232 223 / 0.11);
  --rule-2: rgb(237 232 223 / 0.22);
  --grid-line: rgb(237 232 223 / 0.045);
  --ok: var(--jade);
  --warn: var(--amber);
  --bad: var(--vermilion);
  --maint: var(--cobalt);

  /* Type */
  --font-sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-jp: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --step--2: 0.6875rem;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 4.25rem);
  --step-5: clamp(2.75rem, 1.6rem + 5.4vw, 6.75rem);
  --step-6: clamp(3.25rem, 1.4rem + 8.6vw, 9.5rem);
  --tracking-caps: 0.14em;
  --tracking-display: -0.035em;

  /* Space and layout */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4.5rem, 3rem + 6vw, 8rem);
  --container: 1240px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 60px;
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
  --dur-1: 120ms;
  --dur-2: 260ms;
  --dur-3: 700ms;

  color-scheme: dark;
}

/* Bone "paper" for charters, papers, long releases. Put the class on <body>
   or on any section. */
.paper {
  --bg: var(--bone);
  --bg-raised: #f5f1ea;
  --bg-sunken: #e2dcd1;
  --fg: var(--ink);
  --fg-2: #47433d;
  --fg-3: #6a655c;
  --accent: var(--vermilion-deep);
  --accent-fg: var(--bone);
  --rule: rgb(11 11 12 / 0.13);
  --rule-2: rgb(11 11 12 / 0.28);
  --grid-line: rgb(11 11 12 / 0.05);
  color-scheme: light;
  background-color: var(--bg);
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
  }
}
