/*
 * Castlight design tokens. Shared by the app (app/) and the installer.
 * Import this file first; components use only these variables.
 * The palette comes from the icon: a dark tile with a warm lit band.
 */
:root {
  color-scheme: dark;

  /* Surfaces, darkest to lightest */
  --cl-bg: #0f1116;          /* window background */
  --cl-surface: #161920;     /* cards, panels */
  --cl-raised: #1d2129;      /* controls, hover on surface */
  --cl-line: #2a2e38;        /* borders, slider track, dark LED */
  --cl-line-strong: #3a3f4b; /* focused borders, dividers on raised */

  /* Text */
  --cl-text: #eceef3;
  --cl-text-muted: #9aa1ad;
  --cl-text-faint: #646b78;

  /* The glow: icon gradient, top (bright) to bottom (deep) */
  --cl-glow-1: #ffb347;      /* amber */
  --cl-glow-2: #ff7a3d;      /* orange, the main accent */
  --cl-glow-3: #ff4d2e;      /* red-orange */
  --cl-accent: var(--cl-glow-2);
  --cl-accent-text: #1a0d05; /* text on the glow gradient */
  --cl-gradient: linear-gradient(180deg, var(--cl-glow-1) 0%, var(--cl-glow-2) 55%, var(--cl-glow-3) 100%);
  --cl-gradient-h: linear-gradient(90deg, var(--cl-glow-3) 0%, var(--cl-glow-2) 50%, var(--cl-glow-1) 100%);

  /* Status */
  --cl-ok: #3ddc97;
  --cl-warn: var(--cl-glow-1);
  --cl-error: #ff5d6c;

  /* Glow shadows. Scale with how "lit" something is. */
  --cl-glow-sm: 0 0 12px rgb(255 122 61 / 0.35);
  --cl-glow-md: 0 0 24px rgb(255 122 61 / 0.40), 0 0 4px rgb(255 179 71 / 0.50);
  --cl-glow-lg: 0 0 48px rgb(255 122 61 / 0.45), 0 0 12px rgb(255 179 71 / 0.55);
  --cl-shadow: 0 8px 24px rgb(0 0 0 / 0.35), 0 1px 0 rgb(255 255 255 / 0.03) inset;

  /* Shape */
  --cl-radius-sm: 8px;   /* chips, small buttons */
  --cl-radius-md: 12px;  /* buttons, inputs, toggles */
  --cl-radius-lg: 16px;  /* cards */
  --cl-radius-xl: 22px;  /* hero panels, the mic preview tile */
  --cl-radius-pill: 999px;

  /* Spacing, 4 px grid */
  --cl-space-1: 4px;
  --cl-space-2: 8px;
  --cl-space-3: 12px;
  --cl-space-4: 16px;
  --cl-space-5: 24px;
  --cl-space-6: 32px;
  --cl-space-7: 48px;

  /* Type. Segoe UI Variable on Windows 11, system font elsewhere. */
  --cl-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cl-font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cl-font-mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
  --cl-text-xs: 11px;
  --cl-text-sm: 13px;
  --cl-text-md: 15px;    /* body */
  --cl-text-lg: 18px;
  --cl-text-xl: 24px;    /* screen titles */
  --cl-text-2xl: 32px;   /* installer hero */
  --cl-weight-regular: 400;
  --cl-weight-medium: 500;
  --cl-weight-bold: 650;

  /* Motion */
  --cl-ease: cubic-bezier(0.2, 0.8, 0.2, 1);          /* default: quick out, soft landing */
  --cl-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* small overshoot: toggles, checkmarks */
  --cl-dur-fast: 120ms;  /* hover, press */
  --cl-dur-base: 200ms;  /* toggles, value changes */
  --cl-dur-slow: 320ms;  /* panels, screen transitions */
  --cl-dur-glow: 600ms;  /* glow fading in or out */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --cl-dur-fast: 0ms;
    --cl-dur-base: 0ms;
    --cl-dur-slow: 0ms;
    --cl-dur-glow: 0ms;
  }
}
