/* ============================================
   GLOBAL STYLES - MIGRATIVE PARTNERS
   Variables, Reset, Base Styles, Animations
   ============================================ */

/* CSS Reset & Box Model */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Properties / Variables */
:root {
    /* Brand Colors */
    --bg-primary: #0A0B1A;
    --orange: #F48C06;
    --blue-light: #308EC1;
    --blue-dark: #14334C;
    --gray: #7E7E7E;
    --gray-light: #A0A0A0;
    --neon-green: #00FFAA;
    --neon-green-dark: #00CC88;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Modal specific variables */
    --background: var(--bg-primary);
    --text: var(--white);
    --text-muted: var(--gray-light);
    --border: #1F2937;
    --accent: var(--neon-green);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', 'Courier', 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: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    --text-6xl: 4rem;
    --text-7xl: 5rem;
    --text-8xl: 6rem;
    
    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;
    
    /* Line Heights */
    --leading-tight: 0.95;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    
    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.5px;
    --tracking-wider: 1px;
    --tracking-widest: 2px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index Scale */
    --z-grid: 0;
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-overlay: 30;
    --z-modal: 40;
    --z-popover: 50;
    --z-tooltip: 60;
    --z-header: 100;
    
    /* Breakpoints for JS */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Container */
    --container-max: 1400px;
    --container-padding: 5%;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--white);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

h1 { font-size: clamp(var(--text-5xl), 8vw, var(--text-8xl)); }
h2 { font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl)); }
h3 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h4 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h5 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h6 { font-size: clamp(var(--text-lg), 2vw, var(--text-2xl)); }

p {
    line-height: var(--leading-relaxed);
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--neon-green);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--neon-green-dark);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons Base */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: transparent;
    transition: var(--transition-base);
}

button:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* Section Spacing */
section {
    padding: var(--spacing-3xl) 0;
    position: relative;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.15;
    z-index: var(--z-grid);
}

.grid-bg svg {
    width: 100%;
    height: 100%;
}

/* Gradient Overlay */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, 
        rgba(0, 255, 170, 0.03) 0%, 
        transparent 50%);
    pointer-events: none;
    z-index: var(--z-base);
    animation: pulse 8s ease-in-out infinite;
}

/* Global Animations */
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.2); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 255, 170, 0.4); 
    }
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1) rotate(180deg);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient {
    background: linear-gradient(90deg, 
        var(--neon-green) 0%, 
        #00FFD4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

/* Accessibility */
.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 Styles */
:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--neon-green);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--neon-green);
    color: var(--bg-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--blue-dark);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-light);
}

/* Media Query Helpers */
@media (max-width: 768px) {
    :root {
        --container-padding: 4%;
        /* Subtle mobile typography improvements */
        --leading-tight: 1.2;
        --leading-normal: 1.4;  
        --leading-relaxed: 1.6;
        --leading-loose: 1.7;
    }
    
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Improve mobile readability while maintaining brutalist feel */
    body {
        line-height: var(--leading-normal);
        font-weight: var(--font-normal);
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: var(--leading-tight);
        letter-spacing: -0.02em;
        /* Slight text shadow for better contrast on mobile */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        /* Force white color on mobile to override gradients */
        color: var(--white) !important;
        -webkit-text-fill-color: var(--white) !important;
    }
    
    p, li {
        line-height: var(--leading-relaxed);
        color: rgba(255, 255, 255, 0.9);
        font-weight: var(--font-normal);
    }
    
    /* Better button readability on mobile */
    .cta-button, .primary-button, .mega-cta-button {
        font-weight: var(--font-bold);
        letter-spacing: 0.02em;
        text-shadow: none;
    }
}

@media (max-width: 640px) {
    :root {
        --container-padding: 5%;
    }
    
    section {
        padding: var(--spacing-xl) 0;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .grid-bg,
    .gradient-overlay,
    .no-print {
        display: none !important;
    }
}