/**
 * Blueva Design System - Design Tokens
 * Professional Neotech Design System
 * 
 * This file contains all design tokens including colors, spacing, typography,
 * and theming variables. It's framework-agnostic and can be used across
 * different implementations (HTML/CSS, React, Vue, PHP templates, etc.)
 */

:root {
  /* ========================================
     COLOR PALETTE - NEOTECH PROFESSIONAL
     ======================================== */
  
  /* Primary Brand Colors */
  --color-brand-cyan: #06b6d4;
  --color-brand-blue: #3b82f6;
  --color-brand-dark-blue: #1d4ed8;
  
  /* Neutral Colors - Dark Theme Base */
  --color-neutral-900: #0a0a0a;
  --color-neutral-800: #1a1a1a;
  --color-neutral-700: #2a2a2a;
  --color-neutral-600: #3a3a3a;
  --color-neutral-500: #5a5a5a;
  --color-neutral-400: #7a7a7a;
  --color-neutral-300: #9a9a9a;
  --color-neutral-200: #c0c0c0;
  --color-neutral-100: #e0e0e0;
  --color-neutral-50: #f5f5f5;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-dark: #059669;
  --color-warning: #f59e0b;
  --color-warning-dark: #d97706;
  --color-error: #ef4444;
  --color-error-dark: #dc2626;
  --color-info: #3b82f6;
  --color-info-dark: #2563eb;
  
  /* Status Colors */
  --color-featured: #fbbf24;
  --color-featured-dark: #f59e0b;
  --color-free: #10b981;
  --color-legacy: #6b7280;
  --color-coming-soon: #9ca3af;
  
  /* ========================================
     THEME VARIABLES - DARK (DEFAULT)
     ======================================== */
  
  --theme-bg-primary: #000000;
  --theme-bg-secondary: rgba(15, 23, 42, 0.8);
  --theme-bg-tertiary: rgba(30, 41, 59, 0.6);
  --theme-bg-elevated: rgba(15, 23, 42, 0.95);
  
  --theme-text-primary: #ffffff;
  --theme-text-secondary: rgba(255, 255, 255, 0.8);
  --theme-text-tertiary: rgba(255, 255, 255, 0.6);
  --theme-text-muted: rgba(255, 255, 255, 0.4);
  
  --theme-border-subtle: rgba(59, 130, 246, 0.2);
  --theme-border-medium: rgba(59, 130, 246, 0.3);
  --theme-border-strong: rgba(59, 130, 246, 0.5);
  
  --theme-accent-primary: var(--color-brand-cyan);
  --theme-accent-secondary: var(--color-brand-blue);
  
  --theme-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --theme-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --theme-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
  
  /* Glassmorphism */
  --theme-glass-bg: rgba(15, 23, 42, 0.7);
  --theme-glass-border: rgba(148, 163, 184, 0.2);
  --theme-glass-blur: 18px;
  
  /* ========================================
     SPACING SYSTEM - 8px BASE
     ======================================== */
  
  --space-0: 0;
  --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 */
  
  /* ========================================
     TYPOGRAPHY SYSTEM
     ======================================== */
  
  /* Font Families */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Fira Code", "Courier New", monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* ========================================
     LAYOUT & CONTAINERS
     ======================================== */
  
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  
  --navbar-height: 64px;
  --navbar-height-compact: 56px;
  
  /* ========================================
     BORDER RADIUS
     ======================================== */
  
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.25rem;   /* 20px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;
  
  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  --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);
  
  /* ========================================
     Z-INDEX LAYERS
     ======================================== */
  
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal-backdrop: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
  --z-navbar: 9999;
  
  /* ========================================
     GRADIENTS
     ======================================== */
  
  --gradient-brand: linear-gradient(135deg, var(--color-brand-cyan) 0%, var(--color-brand-blue) 50%, var(--color-brand-dark-blue) 100%);
  --gradient-brand-alt: linear-gradient(135deg, var(--color-brand-blue) 0%, var(--color-brand-cyan) 50%, var(--color-brand-dark-blue) 100%);
  --gradient-success: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
  --gradient-warning: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
  
  /* ========================================
     BLUR & EFFECTS
     ======================================== */
  
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 16px;
  --blur-xl: 24px;
}

/* ========================================
   LIGHT THEME
   ======================================== */

[data-theme="light"] {
  --theme-bg-primary: #ffffff;
  --theme-bg-secondary: rgba(248, 250, 252, 0.95);
  --theme-bg-tertiary: rgba(241, 245, 249, 0.9);
  --theme-bg-elevated: rgba(255, 255, 255, 0.98);
  
  --theme-text-primary: #0f172a;
  --theme-text-secondary: rgba(15, 23, 42, 0.8);
  --theme-text-tertiary: rgba(15, 23, 42, 0.6);
  --theme-text-muted: rgba(15, 23, 42, 0.4);
  
  --theme-border-subtle: rgba(59, 130, 246, 0.15);
  --theme-border-medium: rgba(59, 130, 246, 0.25);
  --theme-border-strong: rgba(59, 130, 246, 0.4);
  
  --theme-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --theme-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --theme-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  
  --theme-glass-bg: rgba(255, 255, 255, 0.8);
  --theme-glass-border: rgba(148, 163, 184, 0.3);
  --theme-glass-blur: 16px;
}

/* ========================================
   AUTO THEME (Respects system preference)
   ======================================== */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --theme-bg-primary: #ffffff;
    --theme-bg-secondary: rgba(248, 250, 252, 0.95);
    --theme-bg-tertiary: rgba(241, 245, 249, 0.9);
    --theme-bg-elevated: rgba(255, 255, 255, 0.98);
    
    --theme-text-primary: #0f172a;
    --theme-text-secondary: rgba(15, 23, 42, 0.8);
    --theme-text-tertiary: rgba(15, 23, 42, 0.6);
    --theme-text-muted: rgba(15, 23, 42, 0.4);
    
    --theme-border-subtle: rgba(59, 130, 246, 0.15);
    --theme-border-medium: rgba(59, 130, 246, 0.25);
    --theme-border-strong: rgba(59, 130, 246, 0.4);
    
    --theme-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --theme-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --theme-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    
    --theme-glass-bg: rgba(255, 255, 255, 0.8);
    --theme-glass-border: rgba(148, 163, 184, 0.3);
    --theme-glass-blur: 16px;
  }
}

/* ========================================
   UTILITY CLASSES - BASE
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-lg {
  max-width: var(--container-2xl);
}

.text-gradient-brand {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Screen reader only */
.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;
}

/* Focus visible for accessibility */
.focus-visible:focus-visible {
  outline: 2px solid var(--theme-accent-primary);
  outline-offset: 2px;
}
