/* Vortex design tokens, shared by the builder and the panel.

   Language: spatial UI. Frosted instrument panels float over the camera feed
   and the blocks are lit cobalt tiles. Every panel carries a solid-enough
   scrim that its text passes AA over any webcam image, because the ground
   behind it is somebody's room, not a colour we chose.

   Three role colours, used identically in CSS and on the HUD canvas:
   build (azure), erase (coral), rotate (amber). Everything else is a neutral
   leaning toward the block blue. */

:root {
  color-scheme: dark;

  /* neutrals, biased toward cobalt */
  --ink-0: #05070d;
  --ink-1: #0a0f1c;
  --ink-2: #111a2e;
  --line: rgba(160, 196, 255, 0.16);
  --line-strong: rgba(160, 196, 255, 0.32);
  --text: #eaf1ff;
  --text-soft: #b4c3dd;
  --text-faint: #8193b3;

  /* glass */
  --glass: rgba(9, 14, 26, 0.74);
  --glass-strong: rgba(9, 14, 26, 0.88);
  --glass-blur: 14px;
  --edge-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  /* roles */
  --build: #5cc8ff;
  --erase: #ff6b7d;
  --rotate: #ffc15c;
  --ok: #52e3a4;

  /* block palette (mirrored in src/render/voxel-instanced.mjs) */
  --block-low: #1c46c9;
  --block-high: #4fb6ff;

  /* type: Inter Tight for words, JetBrains Mono for anything that counts */
  --sans: "Inter Tight", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --fs-xs: 0.72rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);

  /* spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 150ms;
  --t: 220ms;
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: var(--ink-1);
    --glass-strong: var(--ink-1);
    --glass-blur: 0px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(200, 220, 255, 0.5);
    --line-strong: rgba(220, 235, 255, 0.8);
    --text-soft: #dce6f7;
    --text-faint: #b9c7df;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--ink-0);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge-highlight), var(--shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  padding: 0 0.35em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: 500 var(--fs-xs) / 1.5 var(--mono);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

:focus-visible {
  outline: 2px solid var(--build);
  outline-offset: 2px;
}

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