/* ==========================================================================
   Design tokens
   Dark only. Violet to cyan accent. Glass surfaces are defined as tokens so
   the no-blur and reduced-transparency fallbacks can swap them in one place.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Canvas ---------------------------------------------------------------- */
  --canvas: #07070b;
  --canvas-raised: #0b0b12;
  --canvas-deep: #040407;

  /* Accent ---------------------------------------------------------------- */
  --violet: #8b5cf6;
  --violet-bright: #a78bfa;
  --violet-dim: #6d3fe0;
  --cyan: #22d3ee;
  --cyan-bright: #67e8f9;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --accent-gradient-soft: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.18) 0%,
    rgba(34, 211, 238, 0.12) 100%
  );

  /* Semantic -------------------------------------------------------------- */
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.14);

  /* Text ------------------------------------------------------------------ */
  --text: #f6f6f9;
  --text-soft: #c9c9d6;
  --text-muted: #9393a8;
  --text-faint: #7f7f96;

  /* Glass ----------------------------------------------------------------- */
  --glass-1: rgba(14, 14, 22, 0.62);
  --glass-2: rgba(20, 20, 32, 0.72);
  --glass-3: rgba(28, 28, 44, 0.82);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-strong: rgba(255, 255, 255, 0.16);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glass-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0) 42%
  );

  /* Blur ------------------------------------------------------------------ */
  --blur-sm: 10px;
  --blur-md: 20px;
  --blur-lg: 34px;

  /* Radius ---------------------------------------------------------------- */
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Spacing (4px scale) --------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;

  /* Shadow ---------------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.5);
  --glow-violet: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 12px 32px rgba(109, 63, 224, 0.28);
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.22);

  /* Motion ---------------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 160ms;
  --dur-base: 240ms;
  --dur-page: 400ms;

  /* Type ------------------------------------------------------------------ */
  --font-sans: 'Inter', 'Inter Variable', system-ui, 'Segoe UI Variable Text', 'Segoe UI',
    Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Layout ---------------------------------------------------------------- */
  --shell-max: 1120px;
  --shell-narrow: 720px;
  --header-height: 68px;
}

/* ==========================================================================
   Fallbacks
   Glass is decorative. When blur is unavailable or unwanted, surfaces become
   opaque enough that text contrast never depends on what sits behind them.
   ========================================================================== */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass-1: rgba(13, 13, 20, 0.94);
    --glass-2: rgba(19, 19, 30, 0.96);
    --glass-3: rgba(27, 27, 42, 0.98);
    --blur-sm: 0px;
    --blur-md: 0px;
    --blur-lg: 0px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-1: #0d0d14;
    --glass-2: #13131e;
    --glass-3: #1b1b2a;
    --blur-sm: 0px;
    --blur-md: 0px;
    --blur-lg: 0px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-micro: 0ms;
    --dur-base: 0ms;
    --dur-page: 0ms;
  }
}

@media (prefers-contrast: more) {
  :root {
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-border-strong: rgba(255, 255, 255, 0.42);
    --text-muted: #b9b9c9;
    --text-faint: #8e8ea4;
  }
}
