/**
 * Design Tokens - Bitcoin Sovereign Academy
 * 
 * Central source of truth for all design values.
 * These tokens enforce visual consistency across the platform.
 */

:root {
    /* ========================================
       COLORS
       ======================================== */
    
    /* Primary Palette */
    --color-primary: #f7931a;           /* Bitcoin Orange - use for CTAs only */
    --color-primary-hover: #ffb347;      /* Lighter orange for hover states */
    --color-primary-dark: #e67e00;       /* Darker orange for active states */
    --color-primary-alpha-10: rgba(247, 147, 26, 0.1);
    --color-primary-alpha-20: rgba(247, 147, 26, 0.2);
    --color-primary-alpha-30: rgba(247, 147, 26, 0.3);
    
    /* Background Colors */
    --color-bg-primary: #1a1a1a;         /* Main dark background */
    --color-bg-secondary: #2d2d2d;       /* Elevated surface */
    --color-bg-tertiary: #3a3a3a;        /* Further elevated */
    --color-bg-overlay: rgba(26, 26, 26, 0.95);
    
    /* Text Colors */
    --color-text-primary: #e0e0e0;       /* Main text */
    --color-text-secondary: #b3b3b3;     /* Secondary text (WCAG AA compliant) */
    --color-text-tertiary: #808080;      /* Disabled/placeholder text */
    --color-text-inverse: #1a1a1a;       /* Text on light backgrounds */
    
    /* Semantic Colors */
    --color-success: #4caf50;
    --color-success-dark: #388e3c;
    --color-warning: #ff9800;
    --color-warning-dark: #f57c00;
    --color-error: #f44336;
    --color-error-dark: #d32f2f;
    --color-info: #2196f3;
    --color-info-dark: #1976d2;
    
    /* Learning Path Colors */
    --color-path-curious: #4caf50;
    --color-path-pragmatist: #00bcd4;
    --color-path-sovereign: #e53935;
    --color-path-builder: #9c27b0;
    --color-path-principled: #ffa726;
    
    /* Border Colors */
    --color-border-subtle: rgba(255, 255, 255, 0.1);
    --color-border-default: rgba(255, 255, 255, 0.15);
    --color-border-strong: rgba(255, 255, 255, 0.3);
    --color-border-accent: var(--color-primary);
    
    /* ========================================
       SPACING
       ======================================== */
    
    /* Base spacing unit: 8px */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px - base unit */
    --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 */
    
    /* Semantic spacing */
    --space-section: var(--space-20);    /* Between major sections */
    --space-component: var(--space-12);  /* Between components */
    --space-element: var(--space-6);     /* Between related elements */
    --space-inline: var(--space-4);      /* Inline spacing */
    
    /* ========================================
       TYPOGRAPHY
       ======================================== */
    
    /* Font Families */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    --font-size-6xl: 3.75rem;   /* 60px */
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Max line length for readability */
    --text-max-width: 65ch;
    
    /* ========================================
       BORDER RADIUS
       ======================================== */
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Semantic radius (use these in components) */
    --radius-button: var(--radius-md);
    --radius-card: var(--radius-lg);
    --radius-modal: var(--radius-xl);
    --radius-input: var(--radius-md);
    
    /* ========================================
       SHADOWS
       ======================================== */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Accent shadows with orange glow */
    --shadow-accent-sm: 0 2px 8px rgba(247, 147, 26, 0.15);
    --shadow-accent-md: 0 4px 16px rgba(247, 147, 26, 0.2);
    --shadow-accent-lg: 0 8px 32px rgba(247, 147, 26, 0.25);
    
    /* ========================================
       TRANSITIONS
       ======================================== */
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ========================================
       Z-INDEX LAYERS
       ======================================== */
    
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1010;
    --z-fixed: 1020;
    --z-modal-backdrop: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-notification: 1070;
    
    /* ========================================
       BREAKPOINTS (for reference in JS)
       ======================================== */
    
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* ========================================
       CONTAINER
       ======================================== */
    
    --container-max-width: 1280px;
    --container-padding: var(--space-6);
    --container-narrow: 768px;
    --container-wide: 1536px;
}

/* ========================================
   MOTION PREFERENCES
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0.01ms;
        --transition-base: 0.01ms;
        --transition-slow: 0.01ms;
        --transition-slower: 0.01ms;
    }
}

/* ========================================
   UTILITY CLASSES (optional)
   ======================================== */

/* Use design tokens instead of one-off values */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.bg-primary { background: var(--color-bg-primary); }
.bg-secondary { background: var(--color-bg-secondary); }
.accent { color: var(--color-primary); }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-base); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-accent { box-shadow: var(--shadow-accent-md); }

/* Border radius utilities */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }
