/* ============================================================
   ALGOVESTA THEME TOKENS v1.0
   Light: v7-light-horizon | Dark: v1-obsidian-premium
   ============================================================ */

/* ── LIGHT THEME (default) ── */
:root {
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 98%;
  --secondary-foreground: 215 25% 27%;
  --muted: 210 40% 98%;
  --muted-foreground: 215 16% 47%;
  --accent: 217 91% 60%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 217 91% 60%;
  --radius: 0.75rem;

  /* Extended tokens */
  --bg-secondary: 210 40% 98%;
  --text-tertiary: 215 16% 47%;
  --accent-subtle: rgba(37,99,235,0.06);
  --accent-ring: rgba(37,99,235,0.15);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px hsl(214 32% 91%);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px hsl(214 22% 83%);
  --gradient-start: #2563eb;
  --gradient-end: #3b82f6;
  --nav-bg: rgba(255,255,255,0.85);
  --nav-border: rgba(0,0,0,0.08);
  --nav-blur: 20px;
}

/* ── DARK THEME ── */
html.dark {
  --background: 0 0% 0%;
  --foreground: 0 0% 98%;
  --card: 0 0% 4%;
  --card-foreground: 0 0% 98%;
  --popover: 0 0% 4%;
  --popover-foreground: 0 0% 98%;
  --primary: 263 70% 50%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 7%;
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 7%;
  --muted-foreground: 240 4% 46%;
  --accent: 263 70% 50%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 63% 31%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 10%;
  --input: 0 0% 10%;
  --ring: 263 70% 50%;
  --radius: 1rem;

  /* Extended tokens */
  --bg-secondary: 0 0% 4%;
  --text-tertiary: 240 4% 46%;
  --accent-subtle: rgba(124,58,237,0.15);
  --accent-ring: rgba(124,58,237,0.25);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-card-hover: 0 8px 24px rgba(124,58,237,0.2);
  --gradient-start: #7c3aed;
  --gradient-end: #2563eb;
  --nav-bg: rgba(0,0,0,0.8);
  --nav-border: rgba(255,255,255,0.05);
  --nav-blur: 16px;
}

/* ── UTILITY CLASSES ── */

/* Gradient accent text */
.gradient-accent {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Accent glow (dark only) */
html.dark .accent-glow {
  box-shadow: 0 0 30px rgba(124,58,237,0.15);
}

/* Card shadow */
.theme-card {
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}
.theme-card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Nav blur */
.nav-blur {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  -webkit-backdrop-filter: saturate(180%) blur(var(--nav-blur));
  backdrop-filter: saturate(180%) blur(var(--nav-blur));
}

/* Smooth theme transition */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}
