/* ============================================================================
   DESIGN TOKEN SYSTEM - AI Accelerator 4 All
   2026 Best Practices: Semantic naming, glassmorphism, modern CSS
   ============================================================================ */

:root {
  /* ============================================================================
     BRAND FOUNDATION
     Core brand colors - never use directly, use semantic tokens below
     ============================================================================ */
  --brand-purple-base: #9333EA;
  --brand-cyan-base: #00D5FF;
  --brand-navy-base: #141D30;
  --brand-white: #FFFFFF;
  --brand-black: #000000;

  /* ============================================================================
     SEMANTIC COLOR ROLES
     Use these throughout the application
     ============================================================================ */
  --color-primary: var(--brand-purple-base);
  --color-accent: var(--brand-cyan-base);
  --color-surface: var(--brand-navy-base);
  --color-background: #0A0E1A;
  --color-text-primary: rgba(255, 255, 255, 0.95);
  --color-text-secondary: rgba(255, 255, 255, 0.75);
  --color-text-tertiary: rgba(255, 255, 255, 0.6);

  /* State colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: var(--brand-cyan-base);

  /* ============================================================================
     GLASSMORPHISM TOKENS
     Dark glassmorphism with vibrant ambient gradients
     ============================================================================ */
  --glass-blur: 20px;
  --glass-blur-strong: 30px;
  --glass-blur-subtle: 10px;

  /* Glass backgrounds */
  --glass-bg-subtle: rgba(255, 255, 255, 0.03);
  --glass-bg-light: rgba(255, 255, 255, 0.05);
  --glass-bg-medium: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);

  /* Glass borders */
  --glass-border-subtle: rgba(255, 255, 255, 0.08);
  --glass-border-default: rgba(255, 255, 255, 0.15);
  --glass-border-strong: rgba(255, 255, 255, 0.2);

  /* Colored rims for dark mode */
  --rim-purple: rgba(147, 51, 234, 0.3);
  --rim-cyan: rgba(0, 213, 255, 0.3);
  --rim-violet: rgba(139, 92, 246, 0.3);

  /* ============================================================================
     AMBIENT GRADIENTS
     Vibrant backgrounds for glassmorphism effect
     ============================================================================ */
  --ambient-purple: radial-gradient(
    ellipse 800px 600px at 45% 125%,
    rgba(147, 51, 234, 0.15) 0%,
    transparent 50%
  );

  --ambient-cyan: radial-gradient(
    ellipse 800px 600px at 55% 125%,
    rgba(0, 213, 255, 0.12) 0%,
    transparent 50%
  );

  --ambient-violet: radial-gradient(
    ellipse 600px 800px at 50% 50%,
    rgba(139, 92, 246, 0.1) 0%,
    transparent 50%
  );

  /* ============================================================================
     DEPTH SYSTEM
     Shadows and glows for spatial hierarchy
     ============================================================================ */

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);

  --shadow-card:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 8px 15px rgba(0, 0, 0, 0.12);

  --shadow-elevated:
    0 10px 20px rgba(0, 0, 0, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.12);

  --shadow-lifted:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 30px 60px rgba(0, 0, 0, 0.15);

  /* Glows */
  --glow-primary:
    0 0 20px rgba(147, 51, 234, 0.4),
    0 0 40px rgba(147, 51, 234, 0.2);

  --glow-accent:
    0 0 20px rgba(0, 213, 255, 0.4),
    0 0 40px rgba(0, 213, 255, 0.2);

  --glow-subtle:
    0 0 10px rgba(147, 51, 234, 0.2),
    0 0 20px rgba(147, 51, 234, 0.1);

  /* ============================================================================
     TYPOGRAPHY SCALE
     Fluid typography with clamp() for responsive sizing
     ============================================================================ */
  --text-display: clamp(3rem, 6vw, 5rem);      /* 48-80px */
  --text-h1: clamp(2.5rem, 5vw, 4rem);         /* 40-64px */
  --text-h2: clamp(2rem, 4vw, 3rem);           /* 32-48px */
  --text-h3: clamp(1.5rem, 3vw, 2rem);         /* 24-32px */
  --text-h4: clamp(1.25rem, 2.5vw, 1.5rem);    /* 20-24px */
  --text-body-lg: clamp(1.125rem, 1.5vw, 1.25rem); /* 18-20px */
  --text-body: clamp(1rem, 1.25vw, 1.125rem);  /* 16-18px */
  --text-body-sm: clamp(0.875rem, 1vw, 1rem);  /* 14-16px */
  --text-caption: clamp(0.75rem, 0.875vw, 0.875rem); /* 12-14px */

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;

  /* ============================================================================
     SPACING SCALE
     Consistent spacing based on 4px grid
     ============================================================================ */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* ============================================================================
     BORDER RADIUS SCALE
     Consistent corner radii
     ============================================================================ */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-3xl: 2rem;     /* 32px */
  --radius-full: 9999px;

  /* ============================================================================
     MOTION TOKENS
     Animation durations and easing functions
     ============================================================================ */

  /* Durations */
  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;

  /* Easing functions */
  --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-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ============================================================================
     Z-INDEX SCALE
     Layering system
     ============================================================================ */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* ============================================================================
     BREAKPOINTS (for reference in JS)
     Use in media queries with @media (min-width: <value>)
     ============================================================================ */
  --bp-xs: 480px;    /* Small phones landscape */
  --bp-sm: 640px;    /* Large phones */
  --bp-md: 768px;    /* Tablets portrait */
  --bp-lg: 900px;    /* Tablets landscape */
  --bp-xl: 1024px;   /* Small laptops */
  --bp-2xl: 1280px;  /* Desktops */
  --bp-3xl: 1440px;  /* Large desktops */

  /* ============================================================================
     CONTAINER WIDTHS
     Maximum content widths
     ============================================================================ */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
}

/* ============================================================================
   GRADIENT UTILITIES
   Reusable gradient patterns
   ============================================================================ */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

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

.gradient-ambient {
  background:
    var(--ambient-purple),
    var(--ambient-cyan),
    var(--color-background);
}

/* ============================================================================
   ACCESSIBILITY UTILITIES
   ============================================================================ */

/* Respect user motion preferences */
@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;
  }
}

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

