/* ===================================
   CSS VARIABLES & DESIGN TOKENS
   Author: Hardik
   =================================== */

:root {
    /* ===== COLOR PALETTE ===== */
    /* Primary Colors */
    --color-primary: #7c5cff;
    --color-secondary: #00e5ff;
    --color-accent: #ff3d9a;
    
    /* Background Colors */
    --bg-primary: #07070d;
    --bg-secondary: #0d0d15;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    /* Text Colors */
    --text-primary: #f2f2ff;
    --text-secondary: #9a9ab8;
    --text-muted: #6a6a7f;
    
    /* Border & Line Colors */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(255, 255, 255, 0.2);
    
    /* RGB Values (for rgba usage) */
    --rgb-primary: 124, 92, 255;
    --rgb-secondary: 0, 229, 255;
    --rgb-accent: 255, 61, 154;
    
    /* ===== GRADIENTS ===== */
    --gradient-primary: linear-gradient(110deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
    --gradient-secondary: linear-gradient(120deg, var(--color-primary), var(--color-accent));
    --gradient-button: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    --gradient-text: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    
    /* ===== TYPOGRAPHY ===== */
    /* Font Families */
    --font-primary: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', Courier, Monaco, 'Lucida Console', monospace;
    
    /* Font Sizes */
    --fs-xs: 0.75rem;      /* 12px */
    --fs-sm: 0.875rem;     /* 14px */
    --fs-base: 1rem;       /* 16px */
    --fs-lg: 1.125rem;     /* 18px */
    --fs-xl: 1.25rem;      /* 20px */
    --fs-2xl: 1.5rem;      /* 24px */
    --fs-3xl: 1.875rem;    /* 30px */
    --fs-4xl: 2.25rem;     /* 36px */
    --fs-5xl: 3rem;        /* 48px */
    --fs-hero: clamp(3.25rem, 14vw, 7.5rem);  /* Responsive hero size */
    
    /* Font Weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    --fw-black: 900;
    
    /* Line Heights */
    --lh-tight: 1.2;
    --lh-normal: 1.6;
    --lh-relaxed: 1.8;
    
    /* Letter Spacing */
    --ls-tight: -0.05em;
    --ls-normal: 0;
    --ls-wide: 0.05em;
    --ls-wider: 0.1em;
    
    /* ===== SPACING ===== */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */
    --space-4xl: 6rem;     /* 96px */
    
    /* ===== BORDER RADIUS ===== */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.125rem;  /* 18px */
    --radius-full: 999px;
    
    /* ===== SHADOWS ===== */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(var(--rgb-primary), 0.5);
    --shadow-glow-secondary: 0 0 20px rgba(var(--rgb-secondary), 0.5);
    --shadow-glow-accent: 0 0 20px rgba(var(--rgb-accent), 0.5);
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-slower: 600ms ease;
    
    /* Timing 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-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* ===== Z-INDEX LAYERS ===== */
    --z-background: -1;
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-overlay: 30;
    --z-modal: 40;
    --z-popover: 50;
    --z-tooltip: 60;
    --z-cursor: 150;
    --z-boot: 300;
    
    /* ===== LAYOUT ===== */
    --max-width: 1200px;
    --max-width-narrow: 768px;
    --container-padding: 1.25rem;
    
    /* ===== EFFECTS ===== */
    --backdrop-blur: 12px;
    --backdrop-blur-strong: 20px;
    
    /* ===== SAFE AREAS (for mobile notches) ===== */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    
    /* ===== BREAKPOINTS (referenced in media queries) ===== */
    /* --breakpoint-sm: 640px; */
    /* --breakpoint-md: 768px; */
    /* --breakpoint-lg: 1024px; */
    /* --breakpoint-xl: 1280px; */
    
    /* ===== ANIMATION DURATIONS ===== */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
}

/* ===== THEME VARIANTS ===== */
/* Neon Theme (Default) */
[data-theme="neon"] {
    --color-primary: #7c5cff;
    --color-secondary: #00e5ff;
    --color-accent: #ff3d9a;
    --rgb-primary: 124, 92, 255;
    --rgb-secondary: 0, 229, 255;
    --rgb-accent: 255, 61, 154;
}

/* Cyberpunk Theme */
[data-theme="cyber"] {
    --color-primary: #ff2a6d;
    --color-secondary: #fcee0a;
    --color-accent: #05d9e8;
    --rgb-primary: 255, 42, 109;
    --rgb-secondary: 252, 238, 10;
    --rgb-accent: 5, 217, 232;
}

/* Matrix Theme */
[data-theme="matrix"] {
    --color-primary: #00a63e;
    --color-secondary: #39ff14;
    --color-accent: #00ffa3;
    --rgb-primary: 0, 166, 62;
    --rgb-secondary: 57, 255, 20;
    --rgb-accent: 0, 255, 163;
}

/* Sunset Theme */
[data-theme="sunset"] {
    --color-primary: #ff6b35;
    --color-secondary: #ffd166;
    --color-accent: #ff3d7f;
    --rgb-primary: 255, 107, 53;
    --rgb-secondary: 255, 209, 102;
    --rgb-accent: 255, 61, 127;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-base: 0ms;
        --transition-slow: 0ms;
        --transition-slower: 0ms;
        --duration-fast: 0ms;
        --duration-normal: 0ms;
        --duration-slow: 0ms;
        --duration-slower: 0ms;
    }
}

/* ===== DARK MODE ADJUSTMENTS ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #07070d;
        --bg-secondary: #0d0d15;
    }
}

/* ===== UTILITY CLASSES ===== */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-border {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
