@import "tailwindcss";

/* ── L'Armada design tokens — "The Ship's Bridge" (see armada/DESIGN.md) ── */
@theme {
  --color-surface: #0a0a0a;
  --color-raised: #111111;
  --color-overlay: #171717;
  --color-hairline: #ffffff1f;
  --color-ink: #e8e8ea;
  --color-ink-muted: #9a9aa0;
  --color-ink-faint: #6a6a70;

  /* brand — reserved (One Voice Rule, ≤10%): the now + brand + one primary action */
  --color-magenta: #d900ff;

  /* role families (orbits, measured register) — always paired with label + glyph */
  --color-percs: #ff8c00;
  --color-bass: #7c5cff;
  --color-melodic: #36c5f0;
  --color-tops: #2dd4bf;
  --color-atmos: #8a93a6;
  --color-vox: #ff3d7b;

  /* functional — same three used for lifecycle + agreement, so a verdict reads
     the same as a status anywhere else on the bridge (see tokens.css) */
  --color-blocked: #ff5252;
  --color-ready: #5bc091;
  --color-wip: #e0a82e;

  --font-sans: "Geist Variable", Inter, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

@layer base {
  html { color-scheme: dark; }
  body {
    margin: 0;
    background: var(--color-surface);
    color: var(--color-ink);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  /* instrument readouts: tabular so digits don't jitter as they update */
  .tnum { font-variant-numeric: tabular-nums; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Sextant range control — track fill driven by inline --fill (0–100%) ── */
.sx-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--color-ink) 0%,
    var(--color-ink) var(--fill, 0%),
    var(--color-overlay) var(--fill, 0%),
    var(--color-overlay) 100%
  );
  cursor: pointer;
  outline: none;
}
.sx-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--color-ink);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-hairline);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.sx-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--color-ink);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-hairline);
}
.sx-range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.sx-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-melodic) 60%, transparent); }
.sx-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-melodic) 60%, transparent); }
.sx-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--color-overlay); }
.sx-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--color-ink); }
