/* ============================================================
   SonarWin — design tokens
   Tema oscuro por defecto (cinematográfico), claro equivalente.
   ============================================================ */

:root {
  /* tipografía */
  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* escala */
  --step--1: 0.8125rem;
  --step-0:  0.9375rem;
  --step-1:  1.0625rem;
  --step-2:  1.375rem;
  --step-3:  1.875rem;
  --step-4:  2.75rem;
  --step-5:  4.5rem;

  /* radios y espaciado */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;
  --gap: 20px;
  --pad: 22px;
  --shell: 1120px;

  /* movimiento */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .28s;

  /* semáforo (igual en ambos temas, ajustado) */
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

/* ---------- OSCURO (por defecto) ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg:          #070b14;
  --bg-deep:     #04070d;
  --surface:     rgba(255, 255, 255, .045);
  --surface-2:   rgba(255, 255, 255, .075);
  --surface-3:   rgba(255, 255, 255, .11);
  --border:      rgba(255, 255, 255, .085);
  --border-soft: rgba(255, 255, 255, .045);

  --text:        #e9eff8;
  --text-dim:    #93a1b6;
  --text-faint:  #64748b;

  --accent:      #22d3ee;
  --accent-2:    #0ea5a4;
  --accent-soft: rgba(34, 211, 238, .14);
  --accent-glow: rgba(34, 211, 238, .38);
  --accent-ink:  #03181d;

  --shadow:      0 24px 70px -30px rgba(0, 0, 0, .95);
  --glow:        0 0 0 1px rgba(34, 211, 238, .16), 0 0 48px -12px rgba(34, 211, 238, .30);

  --gauge-track: rgba(255, 255, 255, .07);
  --scrim:       rgba(3, 6, 12, .72);
}

/* ---------- CLARO ---------- */
[data-theme="light"] {
  color-scheme: light;

  --bg:          #f4f7fb;
  --bg-deep:     #e9eef6;
  --surface:     #ffffff;
  --surface-2:   #f7f9fc;
  --surface-3:   #eef2f8;
  --border:      #dde4ee;
  --border-soft: #e9eef5;

  --text:        #0c1623;
  --text-dim:    #55637a;
  --text-faint:  #8794a8;

  --accent:      #0ea5a4;
  --accent-2:    #0d8f8e;
  --accent-soft: rgba(14, 165, 164, .12);
  --accent-glow: rgba(14, 165, 164, .28);
  --accent-ink:  #ffffff;

  --shadow:      0 20px 50px -28px rgba(15, 33, 56, .35);
  --glow:        0 0 0 1px rgba(14, 165, 164, .16), 0 18px 40px -24px rgba(14, 165, 164, .45);

  --gauge-track: rgba(12, 22, 35, .09);
  --scrim:       rgba(255, 255, 255, .7);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: .001s; }
}
