/* =========================================================================
   TradeKit Marketing — Theme: the type, and how theming works

   The palette VALUES are shared with the app: /assets/theme/palettes.css
   (linked from base.njk before this file, passthrough-copied from the repo
   root's assets/theme/) defines every color role for the built-in Light
   and Dark plus the experiment palettes the dev style picker cycles
   through (js/style-picker.js); /assets/theme/tokens.css follows it with
   the shared Overprint tokens (the art inks --ink-1…8, --rule,
   --overprint, …). Pages use the roles and tokens by their own names, and
   styles/site.css names the two the kit leans on hardest: --paper
   (--background) and --ink (--foreground). A palette tweak lands on both
   front ends from one file, and an experimental palette previews here
   with no changes at all.

   Theme switching (shared convention with the app):
     - darkness is the `dark` class on <html>;
     - data-theme carries the palette id: "Dark" / "Light" for the built-ins
       (js/theme-toggle.js), or an experiment id while the dev style picker
       is previewing;
     - nothing stored -> follow the system preference (prefers-color-scheme),
       applied by the pre-paint script in base.njk.
   The toggle persists to localStorage under "tk-theme"; the dev picker
   persists its preview under "tk-style-preview" (which wins). Both are
   applied before first paint by an inline script in <head>.

   Typography: --font-mono / --font-display route through --preview-font /
   --preview-display-font so the dev style picker can try the app's
   font-experiment catalog on this site; unset, the licensed defaults below
   apply.
   ========================================================================= */

@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/GeistMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Review (Black + Black Italic) — Commercial Type webfont.
   License 2608-GBCODR. Files in assets/fonts/ReviewBlack/. Do not redistribute
   or use beyond the licensed domain. EULA: commercialtype.com/eula */
@font-face {
  font-family: 'Review Web';
  src: url('/assets/fonts/ReviewBlack/Review-Black-Web.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Review Web';
  src: url('/assets/fonts/ReviewBlack/Review-BlackItalic-Web.woff2') format('woff2');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Both faces resolve through a --preview-* indirection (js/style-picker.js
     sets them inline on <html>); the stacks below are the licensed defaults
     when no preview is active. */
  --font-mono: var(--preview-font, 'Geist Mono'), ui-monospace, SFMono-Regular, 'SF Mono', Menlo,
    Consolas, 'Liberation Mono', monospace;
  /* Display face for large headings (Commercial Type Review Black). Falls back
     to a system heavy sans while loading or if the webfont is unavailable. */
  --font-display: var(--preview-display-font, 'Review Web'), 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light;
}

/* The dark half. The .dark class (not an attribute) selects the dark base
   block in palettes.css — same mechanism as the app. */
:root.dark {
  color-scheme: dark;
}
