/*
 * Bastet Guard design tokens: the one source of truth for the extension and
 * bastetguard.com. Change a value here, then run
 *
 *     node scripts/design-sync.mjs
 *
 * which copies this file (and fonts/) to the website and writes the same
 * values into the in-page UI (src/content.js, src/anywhere.js), whose shadow
 * roots can't load stylesheets. test/design.test.js fails if anything drifts.
 * The rules for using them are in docs/design-system.md.
 */

/* Fraunces (headlines) and IBM Plex (everything else): SIL Open Font License. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;

  /* Surfaces: night blue, darkest to lightest. */
  --bg: #0b1120;
  --bg-2: #0f172a;
  --field: #0a0f1c;
  --panel: #131c33;
  --panel-2: #18233f;
  --panel-3: #1e2a4a;
  --line: #222d4a;
  --line-2: #2f3c60;
  --line-3: #46557f;

  /* Text: papyrus, strongest to faintest. */
  --text-strong: #fffaf0;
  --text: #f3ecdb;
  --text-soft: #d9d2c0;
  --text-2: #b8b19f;
  --text-3: #8a8471;

  /* Brand: gold is Bastet Guard itself (logo, wordmark, the site's main buttons). */
  --gold: #e8b04b;
  --gold-2: #f6d27a;
  --gold-ink: #1c1405;
  --gold-rgb: 232 176 75;

  /* Meaning: never decoration. green = up / on track, amber = careful,
     red = loss / over a limit, violet = locked or on a break and links,
     blue and rose are theme choices. */
  --green: #49d69a;
  --green-2: #6fe3b2;
  --green-soft: #a8efcf;
  --green-ink: #04140c;
  --green-rgb: 73 214 154;
  --amber: #f59e4b;
  --amber-soft: #f9c48f;
  --amber-ink: #1f1004;
  --amber-rgb: 245 158 75;
  --red: #f26b5e;
  --red-soft: #ffb0a6;
  --red-rgb: 242 107 94;
  --rose: #ff7a90;
  --rose-ink: #24070d;
  --violet: #b9a7ff;
  --violet-soft: #d8ceff;
  --violet-ink: #120d24;
  --violet-rgb: 185 167 255;
  --blue: #7fa6ff;
  --blue-ink: #050d1f;

  /* Type. Extension pages and the site load the fonts; the in-page UI on
     trading sites can't, so it falls back to the system stack. */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs: 11.5px;
  --text-sm: 12.5px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 26px;

  /* Shape and space. */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 99px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --shadow-pop: 0 24px 70px rgb(2 6 16 / .6);
  --shadow-rgb: 2 6 16;

  /* Motion (see docs/design-system.md: under 300 ms, ease-out to enter). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 160ms;
  --dur-fast: 150ms;
  --dur-ui: 200ms;
  --dur-panel: 260ms;
}
