/* ---------------------------------------------------------------------------
   SabBot design tokens — the single source of truth.

   There is no override sheet. Every other stylesheet reads from here and none
   of them redeclare a token, so load order carries no meaning beyond grouping.
   --------------------------------------------------------------------------- */

/* Orbitron is the game's own display face (SIL OFL), extracted by
   `npm run extract:assets`. The file is a single static weight, so the
   @font-face declares 400 only -- claiming a 400..700 range would make the
   browser synthesise a smeared fake bold. It is used for the wordmark and for
   small uppercase labels, never for body copy or numbers. */
@font-face {
  font-family: "Orbitron";
  src: url("../../assets/game/fonts/orbitron-r.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ---- Surfaces -------------------------------------------------------
     Graphite with a violet cast, not pure black. Each step is a real
     elevation level: void is the window frame, base the content field,
     surface-1 panels, surface-2 controls and table headers, surface-3 the
     hovered/selected state, surface-4 popovers and modals. */
  --bg-void: #08070f;
  --bg-base: #0b0914;
  --surface-1: #121022;
  --surface-2: #191634;
  --surface-3: #221d45;
  --surface-4: #262052;

  /* Hairlines. Violet-tinted rather than grey so borders belong to the
     palette instead of reading as a separate neutral system. */
  --line-soft: rgba(150, 130, 255, 0.07);
  --line: rgba(150, 130, 255, 0.13);
  --line-loud: rgba(150, 130, 255, 0.26);

  /* ---- Text ---- */
  --text: #f4f2ff;
  --text-2: #a8a2c8;
  --text-3: #6f6a90;
  --text-disabled: #4c4866;

  /* ---- Brand ----------------------------------------------------------
     One purple scale. `wash` is the translucent fill behind selected nav
     entries and armed controls; `glow` is used sparingly and only for
     focus rings and the map reticle. */
  --primary: #7c5cff;
  --primary-hi: #9d84ff;
  --primary-lo: #5b3fd6;
  --primary-wash: rgba(124, 92, 255, 0.13);
  --primary-wash-strong: rgba(124, 92, 255, 0.22);
  --primary-glow: rgba(124, 92, 255, 0.4);

  /* ---- Semantic telemetry ---------------------------------------------
     Each colour also carries a `-wash` for filled badges and meter tracks.
     Status is never signalled by colour alone; every use is paired with a
     shape, an icon or a text label. */
  --info: #38bdf8;
  --info-wash: rgba(56, 189, 248, 0.14);
  --ok: #34d399;
  --ok-wash: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-wash: rgba(251, 191, 36, 0.14);
  --bad: #f4566b;
  --bad-wash: rgba(244, 86, 107, 0.14);

  /* Game currencies, used only where the game itself names them. */
  --gold: #ffd479;
  --platinum: #c3cfe8;

  /* ---- Depth ----------------------------------------------------------
     A tight contact shadow plus a wide ambient one. Hierarchy comes from
     these and from the surface scale -- not from glow. */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.4), 0 26px 60px rgba(0, 0, 0, 0.5);

  /* ---- Geometry ---- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 13px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* ---- Type ---- */
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;

  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-lg: 15px;
  --text-xl: 18px;
  --text-2xl: 23px;
  --text-3xl: 30px;
  --text-4xl: 38px;

  --tracking-wide: 0.06em;
  --tracking-wider: 0.14em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---- Space ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
  --space-7: 40px;

  /* ---- Density --------------------------------------------------------
     Control heights and panel padding are tokens because they are what a
     screen most often reaches for a magic number to solve. */
  --control-h-sm: 24px;
  --control-h: 30px;
  --control-h-lg: 36px;
  --row-h: 32px;
  --row-h-tight: 28px;

  --panel-pad: 16px;
  --panel-pad-tight: 12px;
  --panel-gap: 14px;
  --page-pad: 20px;

  /* ---- Motion ---------------------------------------------------------
     Short, interruptible, and only on properties that do not force layout. */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 110ms;
  --duration: 180ms;
  --duration-slow: 300ms;

  --focus-ring: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--primary);

  /* ---- Layers ---------------------------------------------------------
     Declared once so nothing has to guess a z-index. */
  --z-backdrop: -2;
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 100;
  --z-titlebar: 200;
  --z-dropdown: 400;
  --z-modal: 900;
  --z-toast: 1000;

  /* ---- Shell metrics ---- */
  --title-h: 34px;
  --nav-w: 196px;
  --nav-w-collapsed: 60px;
  --session-strip-h: 62px;
}

/* Reduced motion: every animation and transition here is decorative, so this
   removes them outright rather than shortening them. `transform: none` matters
   as much as duration -- a 0.01ms transition still snaps the element to its
   hover position, which is exactly what the setting asks us not to do. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .u-lift:hover,
  .panel--interactive:hover,
  .session-card:hover,
  .shop-card:hover,
  .hangar-item:hover {
    transform: none !important;
  }
}
