/* ============================================
   DEMANDBASE FOUNDATIONS - STYLESHEET
   ============================================
   A modular, maintainable CSS architecture
   using custom properties for theming.
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Colors - Light Mode */
  /* Primary brand color: #0D1846 */
  --color-navy: #0D1846;
  --color-navy-light: #1a2654;
  --color-indigo: #2563eb;
  --color-indigo-light: #3b82f6;
  --color-indigo-lighter: #93c5fd;
  --color-indigo-glow: rgba(37, 99, 235, 0.4);
  --color-accent: #06b6d4;
  --color-accent-light: #22d3ee;
  
  --color-emerald: #10b981;
  --color-emerald-light: #d1fae5;
  --color-amber: #f59e0b;
  --color-amber-light: #fef3c7;
  --color-red: #ef4444;
  --color-red-light: #fee2e2;
  
  /* Neutrals */
  --color-slate-900: #0D1846;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  --color-white: #ffffff;
  
  /* Ring colors for wheel */
  --color-center: #0D1846;
  --color-middle-ring: #2563eb;
  --color-outer-ring: #3b82f6;
  
  /* Semantic Colors */
  --color-text: var(--color-slate-700);
  --color-text-muted: var(--color-slate-500);
  --color-text-heading: var(--color-slate-900);
  --color-surface: var(--color-white);
  --color-surface-alt: var(--color-slate-50);
  --color-border: var(--color-slate-200);
  --color-border-light: var(--color-slate-100);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Spacing */
  --space-px: 1px;
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 40px var(--color-indigo-glow);
  
  /* Transitions */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  
  /* Z-Index Scale */
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-modal-backdrop: 199;
  --z-modal: 200;
  --z-tooltip: 250;
  --z-toast: 300;
  --z-loader: 9999;
  
  /* Layout */
  --header-height: 72px;
  --container-max: 1280px;
  --sidebar-width: 380px;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-text: var(--color-slate-300);
  --color-text-muted: var(--color-slate-400);
  --color-text-heading: var(--color-white);
  --color-surface: var(--color-slate-900);
  --color-surface-alt: var(--color-slate-800);
  --color-border: var(--color-slate-700);
  --color-border-light: var(--color-slate-800);
  
  --color-indigo-glow: rgba(99, 102, 241, 0.5);
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  overflow-x: hidden;
  transition: background-color var(--duration-base) var(--ease-in-out),
              color var(--duration-base) var(--ease-in-out);
}

body.no-scroll {
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
}

h1 {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-5xl));
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  letter-spacing: -0.02em;
}

h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  max-width: 65ch;
}

a {
  color: var(--color-indigo);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

a:hover {
  color: var(--color-navy);
}

[data-theme="dark"] a:hover {
  color: var(--color-indigo-lighter);
}

button {
  font-family: inherit;
  cursor: pointer;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-indigo);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-indigo);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-400);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--color-slate-600);
}

/* ============================================
   3. UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-24) 0;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-indigo);
  color: white;
  border-radius: var(--radius-md);
  z-index: var(--z-loader);
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   4. BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: var(--leading-none);
  text-decoration: none;
  border-radius: var(--radius-lg);
  border: none;
  transition: all var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-indigo), var(--color-navy));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--color-indigo-lighter);
  color: var(--color-indigo);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: var(--space-2);
}

.btn-ghost:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

/* ============================================
   5. LOADING SCREEN
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--color-surface);
  z-index: var(--z-loader);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--duration-slow) var(--ease-out),
              visibility var(--duration-slow) var(--ease-out);
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.loader-ring {
  width: 60px;
  height: 60px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-indigo);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   6. TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideInRight var(--duration-base) var(--ease-out);
  max-width: 360px;
}

.toast.toast-exit {
  animation: slideOutRight var(--duration-base) var(--ease-in) forwards;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--color-emerald); }
.toast-error .toast-icon { color: var(--color-red); }
.toast-info .toast-icon { color: var(--color-indigo); }

.toast-message {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: var(--space-1);
  cursor: pointer;
  transition: color var(--duration-fast);
}

.toast-close:hover {
  color: var(--color-text);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ============================================
   7. HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--duration-base) var(--ease-in-out);
}

[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.85);
}

.header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-heading);
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
}

.logo:hover {
  color: var(--color-text-heading);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-navy));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-md);
}

/* Navigation */
.nav-links {
  display: flex;
  gap: var(--space-1);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.nav-links a:hover {
  color: var(--color-indigo);
  background: var(--color-surface-alt);
}

.nav-links a.active {
  color: var(--color-indigo);
  background: rgba(67, 56, 202, 0.08);
}

.badge {
  display: inline-flex;
  padding: 2px var(--space-2);
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  color: white;
  font-size: 0.625rem;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-left: var(--space-2);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
}

.theme-toggle:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border-color: var(--color-border);
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Header Progress */
.header-progress {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: var(--color-border);
}

.progress-ring-fill {
  stroke: var(--color-indigo);
  transition: stroke-dashoffset var(--duration-slow) var(--ease-out);
}

.header-progress .progress-text {
  position: absolute;
  font-size: 0.625rem;
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll Progress */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-indigo);
  width: 0%;
  transition: width 50ms linear;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface);
  z-index: calc(var(--z-sticky) - 1);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-base) var(--ease-in-out);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-nav-links {
  list-style: none;
  flex: 1;
}

.mobile-nav-links li {
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-nav-links a {
  display: block;
  padding: var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--color-text);
}

.mobile-menu-footer {
  padding-top: var(--space-6);
}

.mobile-menu-footer .btn {
  width: 100%;
}

/* ============================================
   8. HERO SECTION
   ============================================ */
.hero {
  padding-top: calc(var(--header-height) + var(--space-16));
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero-bg-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  top: 0;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--color-indigo-glow) 0%, transparent 70%);
  opacity: 0.3;
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--color-border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

[data-theme="dark"] .hero-gradient {
  opacity: 0.2;
}

[data-theme="dark"] .hero-grid-pattern {
  opacity: 0.15;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--color-indigo);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-cta-group {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero-point {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  opacity: 0;
  transform: translateX(-20px);
}

.hero-point.animated {
  animation: slideInLeft var(--duration-slow) var(--ease-out) forwards;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-point-icon {
  width: 24px;
  height: 24px;
  background: rgba(67, 56, 202, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-point-icon svg {
  width: 14px;
  height: 14px;
  color: var(--color-indigo);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-wheel-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out);
}

.hero-wheel-container:hover {
  transform: scale(1.02);
}

.hero-wheel-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, var(--color-indigo-glow) 0%, transparent 70%);
  opacity: 0.4;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

.hero-wheel {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 40px rgba(67, 56, 202, 0.2));
}

.hero-ring {
  transition: all var(--duration-base) var(--ease-out);
}

.hero-wheel-container:hover .hero-ring-outer {
  transform: rotate(5deg);
  transform-origin: center;
}

.hero-wheel-container:hover .hero-ring-middle {
  transform: rotate(-3deg);
  transform-origin: center;
}

.pulse-ring {
  animation: pulseRing 3s ease-in-out infinite;
  transform-origin: center;
}

.pulse-ring-delayed {
  animation-delay: 0.5s;
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.hero-wheel-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
  transform: 
    rotate(var(--angle)) 
    translateX(var(--distance)) 
    rotate(calc(-1 * var(--angle)));
  transform-origin: 0 0;
}

/* ============================================
   9. STATS BAR
   ============================================ */
.stats-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-8) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.stat-item:hover {
  background: var(--color-surface-alt);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: rgba(67, 56, 202, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-indigo);
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-indigo);
  line-height: var(--leading-none);
  margin-bottom: var(--space-1);
}

.stat-unit {
  font-size: var(--text-lg);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
}

/* ============================================
   10. FOUNDATIONS MAP SECTION
   ============================================ */
.foundations-section {
  background: var(--color-surface);
}

.section-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.section-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-indigo-glow) 0%, transparent 70%);
  opacity: 0.15;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* Map Container */
.map-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 700px;
  padding: var(--space-8) 0;
}

/* Segment Tooltip */
.segment-tooltip {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--duration-fast) var(--ease-out);
  z-index: var(--z-tooltip);
  max-width: 200px;
}

.segment-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-ring {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-indigo);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.tooltip-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-heading);
  margin-bottom: var(--space-1);
}

.tooltip-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Foundations Wheel */
.foundations-wheel {
  width: 100%;
  max-width: 650px;
  height: auto;
}

.wheel-segment {
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  outline: none;
}

.wheel-segment path {
  transition: all var(--duration-base) var(--ease-out);
}

.wheel-segment:hover path,
.wheel-segment:focus path {
  filter: brightness(1.15);
}

.wheel-segment:hover,
.wheel-segment:focus {
  filter: drop-shadow(0 0 15px var(--color-indigo-glow));
}

.wheel-segment.active path {
  filter: brightness(1.2);
}

.wheel-segment.active {
  filter: drop-shadow(0 0 25px var(--color-indigo-glow));
}

.wheel-segment.dimmed {
  opacity: 0.35;
}

.wheel-text {
  pointer-events: none;
  font-size: 11px;
  font-weight: var(--font-semibold);
  fill: white;
  text-anchor: middle;
  dominant-baseline: middle;
}

.wheel-text-outer {
  font-size: 10px;
}

.center-circle {
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  outline: none;
}

.center-circle:hover,
.center-circle:focus {
  filter: drop-shadow(0 0 20px var(--color-indigo-glow)) brightness(1.1);
}

.center-text {
  pointer-events: none;
  fill: white;
  text-anchor: middle;
}

.center-subtitle {
  opacity: 0.85;
}

/* Ring Legend */
.ring-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-10);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.legend-item:hover {
  background: var(--color-surface-alt);
}

.legend-item[aria-pressed="true"] {
  background: var(--color-surface-alt);
  border-color: var(--color-border);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.center { background: var(--color-navy); }
.legend-dot.middle { background: var(--color-indigo); }
.legend-dot.outer { background: var(--color-indigo-light); }

.legend-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: var(--font-medium);
}

/* ============================================
   11. DETAIL PANEL
   ============================================ */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-in-out);
}

.panel-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--color-surface);
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-in-out);
  overflow-y: auto;
  overflow-x: hidden;
}

.detail-panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 10;
}

.panel-ring-indicator {
  display: inline-flex;
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.panel-ring-indicator.core {
  background: var(--color-indigo);
  color: white;
}

.panel-ring-indicator.signals-intelligence {
  background: var(--color-indigo-light);
  color: white;
}

.panel-ring-indicator.execution-influence {
  background: var(--color-indigo-lighter);
  color: var(--color-navy);
}

.panel-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
}

.panel-close:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.panel-content {
  padding: var(--space-8);
}

.panel-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}

.panel-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.panel-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.panel-description {
  color: var(--color-text);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  font-size: var(--text-base);
}

.panel-section {
  margin-bottom: var(--space-8);
}

.panel-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.panel-list {
  list-style: none;
}

.panel-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
}

.panel-list li:last-child {
  border-bottom: none;
}

.panel-list-icon {
  width: 20px;
  height: 20px;
  background: rgba(67, 56, 202, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.panel-list-icon svg {
  width: 12px;
  height: 12px;
  color: var(--color-indigo);
}

/* Panel Related */
.panel-related {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.panel-related-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.related-tag {
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.related-tag:hover {
  border-color: var(--color-indigo);
  color: var(--color-indigo);
}

.panel-actions {
  display: flex;
  gap: var(--space-3);
}

.panel-cta {
  flex: 1;
}

/* ============================================
   12. MODULES SECTION
   ============================================ */
.modules-section {
  background: var(--color-surface-alt);
}

/* Toolbar */
.modules-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  align-items: center;
  justify-content: space-between;
}

/* Search Box */
.search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: all var(--duration-fast);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-glow);
}

.search-clear {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: var(--space-1);
  cursor: pointer;
  transition: color var(--duration-fast);
}

.search-clear:hover {
  color: var(--color-text);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--space-2) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.filter-tab:hover {
  border-color: var(--color-indigo-lighter);
}

.filter-tab.active {
  background: var(--color-indigo);
  border-color: var(--color-indigo);
  color: white;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

/* Learning Card */
.learning-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  overflow: hidden;
}

.learning-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-indigo), var(--color-indigo-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base);
}

.learning-card:hover::before {
  transform: scaleX(1);
}

.learning-card:hover {
  border-color: var(--color-indigo-lighter);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.learning-card.hidden {
  display: none;
}

/* Featured Card */
.learning-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--color-slate-900) 0%, var(--color-navy) 100%);
  color: white;
  border: none;
}

.learning-card.featured .card-title,
.learning-card.featured .card-description {
  color: white;
}

.learning-card.featured .card-description {
  opacity: 0.85;
}

.learning-card.featured .card-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.learning-card.featured .card-duration {
  color: rgba(255, 255, 255, 0.7);
}

.learning-card.featured .card-link {
  color: var(--color-indigo-lighter);
}

.learning-card.featured .card-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.learning-card.featured .card-progress {
  background: rgba(255, 255, 255, 0.2);
}

.learning-card.featured .card-progress-bar {
  background: var(--color-emerald);
}

.featured-badge {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-4);
  background: var(--color-emerald);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
}

.card-completed-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 28px;
  height: 28px;
  background: var(--color-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card-tag {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
}

.card-tag.concept {
  background: rgba(67, 56, 202, 0.1);
  color: var(--color-indigo);
}

.card-tag.activation {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.card-duration {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.card-duration svg {
  width: 14px;
  height: 14px;
}

.card-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text-heading);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

.card-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-indigo);
  background: none;
  border: none;
  cursor: pointer;
  transition: gap var(--duration-fast);
}

.learning-card:hover .card-link {
  gap: var(--space-2);
}

.card-progress {
  width: 60px;
  height: 4px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.card-progress-bar {
  height: 100%;
  background: var(--color-indigo);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow);
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--color-text-muted);
}

.no-results svg {
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.no-results h3 {
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* ============================================
   13. HOW TO USE SECTION
   ============================================ */
.how-to-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
}

.how-to-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.how-to-card {
  position: relative;
  text-align: center;
  padding: var(--space-10);
  background: var(--color-surface-alt);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-base);
}

.how-to-card:hover {
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.how-to-number {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: white;
}

.how-to-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  background: rgba(67, 56, 202, 0.1);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-to-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-indigo);
}

.how-to-card h3 {
  margin-bottom: var(--space-3);
}

.how-to-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 280px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ============================================
   14. MANTRA SECTION
   ============================================ */
.mantra-section {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-indigo) 100%);
  padding: var(--space-20) 0;
  text-align: center;
  color: white;
}

.mantra-quote {
  max-width: 700px;
  margin: 0 auto;
}

.quote-mark {
  font-size: var(--text-5xl);
  line-height: 0;
  opacity: 0.5;
  vertical-align: text-top;
}

.mantra-text {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  margin: 0;
}

/* ============================================
   15. COURSE MODAL
   ============================================ */
.course-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base);
}

.course-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.course-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.course-modal-content {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 95vh;
  max-height: 950px;
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--duration-slow) var(--ease-out);
}

.course-modal[aria-hidden="false"] .course-modal-content {
  transform: scale(1) translateY(0);
}

.course-modal-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-fast);
  box-shadow: var(--shadow-md);
}

.course-modal-close:hover {
  background: var(--color-surface-alt);
  transform: rotate(90deg);
}

.course-modal-close svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

/* Course Layout */
.course-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  height: 100%;
  overflow: hidden;
}

.course-main {
  padding: var(--space-10);
  overflow-y: auto;
}

.course-sidebar {
  background: var(--color-surface-alt);
  border-left: 1px solid var(--color-border-light);
  padding: var(--space-8) var(--space-6);
  overflow-y: auto;
}

/* Course Header */
.course-header {
  margin-bottom: var(--space-8);
}

.course-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.course-breadcrumb a {
  color: var(--color-indigo);
  cursor: pointer;
}

.course-breadcrumb span {
  color: var(--color-text-muted);
}

.course-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-4);
  background: rgba(67, 56, 202, 0.1);
  color: var(--color-indigo);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.course-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.course-meta-item svg {
  width: 18px;
  height: 18px;
}

/* Video Player */
.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--color-slate-900), var(--color-navy));
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
  cursor: pointer;
}

.video-player-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-player-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast);
}

.video-player:hover .video-player-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.play-button {
  width: 96px;
  height: 96px;
  background: white;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.video-player:hover .play-button {
  transform: scale(1.1);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.2), var(--shadow-xl);
}

.play-button svg {
  width: 40px;
  height: 40px;
  color: var(--color-indigo);
  margin-left: 4px;
}

.play-button .pause-icon {
  margin-left: 0;
}

.video-info {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
}

.video-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.video-duration {
  font-size: var(--text-sm);
  opacity: 0.7;
}

/* Video Controls */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.video-progress {
  margin-bottom: var(--space-2);
}

.video-progress-track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.video-progress-bar {
  height: 100%;
  background: var(--color-indigo);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.1s linear;
}

.video-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.video-player:hover .video-progress-handle {
  opacity: 1;
}

.video-time {
  font-size: var(--text-xs);
  color: white;
  opacity: 0.8;
}

/* Course Tabs */
.course-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-8);
}

.course-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: none;
  border: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--duration-fast);
}

.course-tab:hover {
  color: var(--color-text);
}

.course-tab.active {
  color: var(--color-indigo);
  border-bottom-color: var(--color-indigo);
}

.tab-badge {
  padding: 0 var(--space-2);
  background: var(--color-indigo);
  color: white;
  font-size: 0.625rem;
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tab Panels */
.course-tab-panels {
  min-height: 300px;
}

.course-tab-panel {
  display: none;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

.course-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Course Section */
.course-section {
  margin-bottom: var(--space-10);
}

.course-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}

.course-section-title svg {
  width: 24px;
  height: 24px;
  color: var(--color-indigo);
}

/* Takeaways Grid */
.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.takeaway-card {
  padding: var(--space-6);
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-indigo);
}

.takeaway-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

.takeaway-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--leading-relaxed);
}

/* Transcript */
.transcript-content {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text);
  max-height: 400px;
  overflow-y: auto;
}

.transcript-content p {
  margin-bottom: var(--space-6);
  max-width: none;
}

.transcript-content p:last-child {
  margin-bottom: 0;
}

.transcript-highlight {
  background: var(--color-amber-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: var(--font-medium);
}

[data-theme="dark"] .transcript-highlight {
  background: rgba(245, 158, 11, 0.2);
}

/* Quiz */
.quiz-container {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.quiz-intro {
  text-align: center;
  padding: var(--space-8) 0;
}

.quiz-intro h2 {
  margin-bottom: var(--space-3);
}

.quiz-intro p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  margin-left: auto;
  margin-right: auto;
}

.quiz-progress {
  margin-bottom: var(--space-6);
}

.quiz-progress span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: block;
  margin-bottom: var(--space-2);
}

.quiz-progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--color-indigo);
  transition: width var(--duration-base);
}

.quiz-question h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.quiz-option:hover {
  border-color: var(--color-indigo-lighter);
}

.quiz-option.selected {
  border-color: var(--color-indigo);
  background: rgba(67, 56, 202, 0.05);
}

.quiz-option.correct {
  border-color: var(--color-emerald);
  background: var(--color-emerald-light);
}

.quiz-option.incorrect {
  border-color: var(--color-red);
  background: var(--color-red-light);
}

.quiz-option-marker {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.quiz-option.selected .quiz-option-marker {
  border-color: var(--color-indigo);
  background: var(--color-indigo);
  color: white;
}

.quiz-option.correct .quiz-option-marker {
  border-color: var(--color-emerald);
  background: var(--color-emerald);
  color: white;
}

.quiz-option.incorrect .quiz-option-marker {
  border-color: var(--color-red);
  background: var(--color-red);
  color: white;
}

.quiz-option-text {
  font-size: var(--text-sm);
  color: var(--color-text);
}

.quiz-feedback {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

.quiz-feedback.correct {
  background: var(--color-emerald-light);
}

.quiz-feedback.incorrect {
  background: var(--color-red-light);
}

.feedback-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-feedback.correct .feedback-icon {
  background: var(--color-emerald);
  color: white;
}

.quiz-feedback.incorrect .feedback-icon {
  background: var(--color-red);
  color: white;
}

.feedback-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: 0;
}

.quiz-next {
  margin-top: var(--space-4);
}

.quiz-results {
  text-align: center;
  padding: var(--space-8) 0;
}

.results-score {
  margin-bottom: var(--space-6);
}

.score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  color: white;
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
}

.quiz-results h2 {
  margin-bottom: var(--space-2);
}

.quiz-results > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  margin-left: auto;
  margin-right: auto;
}

.results-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* Notes */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.notes-input-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.notes-input {
  width: 100%;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  resize: vertical;
  transition: border-color var(--duration-fast);
}

.notes-input:focus {
  outline: none;
  border-color: var(--color-indigo);
}

.notes-input::placeholder {
  color: var(--color-text-muted);
}

.notes-input-container .btn {
  align-self: flex-end;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.notes-empty {
  text-align: center;
  padding: var(--space-10) 0;
  color: var(--color-text-muted);
}

.notes-empty svg {
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.note-item {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.note-content {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  white-space: pre-wrap;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.note-delete {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--duration-fast);
}

.note-delete:hover {
  color: var(--color-red);
}

/* Sidebar Sections */
.sidebar-section {
  margin-bottom: var(--space-8);
}

.sidebar-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Lesson List */
.lesson-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.lesson-item:hover {
  background: var(--color-surface);
}

.lesson-item.active {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.lesson-status,
.lesson-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  flex-shrink: 0;
}

.lesson-number {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.lesson-item.active .lesson-number {
  background: var(--color-indigo);
  color: white;
}

.lesson-item.completed .lesson-status {
  background: var(--color-emerald);
  color: white;
}

.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-heading);
  margin-bottom: 2px;
}

.lesson-duration {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Progress Card */
.progress-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.progress-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
}

.progress-percent {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-indigo);
}

.progress-bar-large {
  height: 10px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-indigo), var(--color-indigo-light));
  border-radius: var(--radius-full);
  transition: width var(--duration-slow);
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Related Modules */
.related-modules {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.related-module {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.related-module:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.related-module-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-indigo-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.related-module-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.related-module-info {
  flex: 1;
  min-width: 0;
}

.related-module-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-heading);
}

.related-module-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   16. FOOTER
   ============================================ */
.footer {
  background: var(--color-slate-900);
  color: var(--color-slate-400);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-16);
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  color: white;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 300px;
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-slate-400);
  transition: all var(--duration-fast);
}

.social-link:hover {
  background: var(--color-indigo);
  color: white;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.footer-col h4 {
  color: white;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-2);
}

.footer-col a {
  color: var(--color-slate-400);
  font-size: var(--text-sm);
  transition: color var(--duration-fast);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--color-slate-500);
}

.footer-legal a:hover {
  color: white;
}

/* ============================================
   17. BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--duration-base);
  z-index: var(--z-dropdown);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-indigo);
  border-color: var(--color-indigo);
  color: white;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  color: inherit;
}

/* ============================================
   18. RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-visual {
    display: none;
  }
  
  .hero-points {
    align-items: center;
  }
  
  .hero-cta-group {
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .how-to-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .course-layout {
    grid-template-columns: 1fr;
  }
  
  .course-sidebar {
    border-left: none;
    border-top: 1px solid var(--color-border-light);
    max-height: 400px;
  }
  
  .course-modal-content {
    height: auto;
    max-height: 95vh;
  }
  
  .learning-card.featured {
    grid-column: span 1;
  }
  
  .takeaways-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }
  
  .nav-desktop {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .header-progress {
    display: none;
  }
  
  .hero {
    padding-top: calc(var(--header-height) + var(--space-10));
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
  
  .stat-item {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }
  
  .stat-number {
    font-size: var(--text-2xl);
  }
  
  .foundations-wheel {
    max-width: 100%;
  }
  
  .map-container {
    min-height: auto;
    padding: var(--space-4) 0;
  }
  
  .ring-legend {
    gap: var(--space-4);
  }
  
  .detail-panel {
    max-width: 100%;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .modules-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: none;
  }
  
  .filter-tabs {
    justify-content: center;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
  }
  
  .course-modal-content {
    max-height: 98vh;
    border-radius: var(--radius-lg);
  }
  
  .course-main {
    padding: var(--space-6);
  }
  
  .course-title {
    font-size: var(--text-2xl);
  }
  
  .course-meta {
    flex-wrap: wrap;
    gap: var(--space-4);
  }
  
  .video-player {
    margin-bottom: var(--space-6);
  }
  
  .play-button {
    width: 72px;
    height: 72px;
  }
  
  .play-button svg {
    width: 32px;
    height: 32px;
  }
  
  .course-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }
  
  .course-tab {
    white-space: nowrap;
  }
  
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }
  
  .toast {
    max-width: none;
  }
  
  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
  }
  
  .hero-cta-group .btn {
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .results-actions {
    flex-direction: column;
  }
}

/* ============================================
   19. PRINT STYLES
   ============================================ */
@media print {
  .header,
  .mobile-menu,
  .back-to-top,
  .toast-container,
  .loader {
    display: none !important;
  }
  
  .hero {
    padding-top: var(--space-8);
  }
  
  body {
    color: black;
    background: white;
  }
}

/* ============================================
   20. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
