/* ROS Infinity design tokens v2 (2026-10). Canonical: ROS_WEB/css/tokens.css.
   launcher/ui/tokens.css must stay byte-identical (GAME/server/tools/check_tokens.mjs).
   Only @property and :root here: @font-face lives in each surface's fonts.css (paths differ). */

@property --p      { syntax: "<number>"; inherits: true;  initial-value: 0; }                      /* progress 0..1 */
@property --play-a { syntax: "<color>";  inherits: false; initial-value: #e01a23; }                /* PLAY fill, top */
@property --play-b { syntax: "<color>";  inherits: false; initial-value: #a20d15; }                /* PLAY fill, bottom */
@property --edge   { syntax: "<color>";  inherits: false; initial-value: rgba(255, 255, 255, .14); } /* state hairline */

:root {
  color-scheme: dark;

  /* Ink: surfaces, darkest to lightest */
  --ink-0: #050506;  --ink-1: #0a0b0d;  --ink-2: #101216;  --ink-3: #171a20;  --ink-4: #1f232b;  --ink-5: #2a2f39;

  /* Lines */
  --line-1: rgba(255, 255, 255, .08);   /* hairline dividers (decorative) */
  --line-2: rgba(255, 255, 255, .14);   /* card rings (decorative) */
  --line-ui: #646a78;                   /* control boundaries: >= 3:1 on ink-0..3 */

  /* Text */
  --text-1: #eceef2;   /* primary */
  --text-2: #b6b9c3;   /* secondary; the smallest allowed on the .72 scrim */
  --text-3: #9196a3;   /* tertiary; on ink or glass (>= .86) only, never on the scrim */
  --text-off: #5f6471; /* disabled glyphs only, always next to a readable reason */

  /* Brand */
  --ember-400: #ff4a3d;  --ember-500: #f41821;  --ember-600: #c8121a;  --ember-700: #8f0c12;
  --ember-text: #ff6a5c;                         /* red text on ink */
  --gold-300: #ffe08f;  --gold-500: #f0b54a;  --gold-600: #b8742c;  --gold-ink: #1b1305;
  --chrome: #c9c8cd;
  --tester-plate: #14110a;                        /* Beta tester badge fill */

  /* Semantic (status = icon + word, never colour alone) */
  --ok: #3ee08f;  --warn: #ff9f43;  --danger: var(--ember-text);  --info: #5ab8ff;  --diamond: #8fd3ff;

  /* Channels for rgb(var(--x) / alpha) */
  --ink-1-rgb: 10 11 13;  --ember-rgb: 244 24 33;  --gold-rgb: 240 181 74;
  --ok-rgb: 62 224 143;  --warn-rgb: 255 159 67;  --info-rgb: 90 184 255;

  /* Scrims and glass (the launcher never uses backdrop-filter) */
  --scrim-text: rgb(var(--ink-1-rgb) / .72);    /* minimum behind any text over art */
  --glass: rgb(var(--ink-1-rgb) / .86);
  --glass-strong: rgb(var(--ink-1-rgb) / .94);  /* launcher rail and action bar */
  --backdrop: rgb(5 5 6 / .72);                 /* dialog ::backdrop */

  /* Gradients */
  --grad-cta: linear-gradient(180deg, #e01a23 0%, #c8121a 50%, #a20d15 100%);   /* white >= 4.84:1 at every stop; no hover brightening */
  --grad-gold: linear-gradient(180deg, #ffe9ad 0%, #f0b54a 48%, #b8742c 100%);  /* gold-ink >= 4.88:1 */
  --grad-tester: linear-gradient(135deg, #ff6a4f 0%, #f0b54a 55%, #ffe08f 100%); /* tester ring only, never under text */
  --grad-chrome: linear-gradient(180deg, #fff 0%, #ececf0 30%, #a3a3ab 52%, #f5f5f7 68%, #b5b5bd 100%);
  --grad-live: linear-gradient(180deg, #163b27 0%, #0e2519 100%);               /* "In game" slab */
  --grad-shade-b: linear-gradient(180deg, rgb(5 5 6 / 0) 0%, rgb(5 5 6 / .92) 100%);

  /* Families */
  --font-display: "Oxanium", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-cond: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;

  /* Type scale (website defaults; launcher and admin override --fs-body) */
  --fs-display: clamp(2.75rem, 1.6rem + 3.6vw, 4.5rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 2.4vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h3: 1.375rem;  --fs-h4: 1.125rem;  --fs-lead: 1.1875rem;  --fs-body: 1.0625rem;
  --fs-small: .875rem;  --fs-label: .8125rem;  --fs-micro: .75rem;   /* 12 px floor */
  --lh-tight: 1.05;  --lh-head: 1.15;  --lh-ui: 1.35;  --lh-body: 1.6;
  --track-display: .01em;  --track-button: .12em;  --track-label: .08em;  --track-micro: .06em;  --track-tagline: .18em;

  /* Space (4 px grid) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;
  --sp-8: 32px;  --sp-10: 40px;  --sp-12: 48px;  --sp-16: 64px;  --sp-20: 80px;  --sp-24: 96px;  --sp-32: 128px;

  /* Chamfer (top-left + bottom-right cut, like the logo letters) */
  --cut-xs: 4px;  --cut-sm: 8px;  --cut-md: 12px;  --cut-lg: 18px;  --cut-xl: 26px;
  --r-pill: 999px;   /* only round things: dots, switches, live avatars */

  /* Elevation (clip-path clips box-shadow: chamfered parts use filter: drop-shadow on a wrapper) */
  --shadow-1: 0 8px 24px rgb(0 0 0 / .35);
  --shadow-2: 0 18px 48px rgb(0 0 0 / .55);
  --glow-cta: 0 10px 28px rgb(var(--ember-rgb) / .35);
  --glow-gold: 0 0 24px rgb(var(--gold-rgb) / .35);

  /* Motion (section 8) */
  --dur-1: 120ms;  --dur-2: 200ms;  --dur-3: 320ms;  --dur-4: 520ms;  --dur-5: 900ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* entrances */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);  /* moves, morphs */
  --ease-in: cubic-bezier(.4, 0, 1, 1);         /* exits */

  /* Layers (modal dialogs use the top layer) */
  --z-art: 0;  --z-content: 1;  --z-sticky: 20;  --z-nav: 100;  --z-drawer: 200;  --z-boot: 600;

  /* Layout */
  --container: 1240px;  --container-wide: 1440px;  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 72px;  --section-y: clamp(72px, 9vw, 128px);
  --focus: 2px solid var(--gold-300);

  /* Data viz (admin; 2.5) */
  --viz-1: #3987e5;  --viz-2: #d95926;  --viz-3: #199e70;  --viz-4: #c98500;
  --viz-5: #d55181;  --viz-6: #008300;  --viz-7: #9085e9;  --viz-8: #e66767;
  --viz-grid: #232733;  --viz-axis: #2f3440;

  /* Legacy aliases: old CSS keeps working during the migration; delete one release later */
  --bg: var(--ink-0);  --bg-1: var(--ink-1);  --bg-2: var(--ink-2);  --panel: var(--ink-2);  --line: var(--line-1);
  --text: var(--text-1);  --muted: var(--text-2);  --dim: var(--text-3);      /* deliberate AA fix: #6e6e7b -> #9196a3 */
  --red: var(--ember-500);  --red-hot: var(--ember-400);  --red-deep: #c90f0a;
  --gold: var(--gold-500);  --gold-hi: var(--gold-300);  --silver: var(--chrome);  --green: var(--ok);
  --grad-red: var(--grad-cta);   /* the old 135deg red put white on #ff4a3d (3.33:1) */
  --ease: var(--ease-in-out);
}
@media (max-width: 720px) { :root { --fs-body: 1rem; } }
@media (prefers-reduced-motion: reduce) { :root { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 120ms; --dur-4: 120ms; --dur-5: 120ms; } }
