/* core.css - Global Design System for Political DNA
   Version 3.0 - Fluid scaling for mobile to ultrawide displays
*/

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Primary Palette */
    --primary: #1e3a5f;
    --primary-dark: #0f1f33;
    --primary-light: #2d4f7f;
    
    /* Accent Colors */
    --accent-red: #e63946;
    --accent-green: #06ffa5;
    --accent-yellow: #ffd60a;
    --accent-purple: #8b5cf6;
    
    /* Neutrals - refined for better contrast */
    --dark: #0a0e1a;
    --dark-blue: #141824;
    --gray-900: #1a1f2e;
    --gray-800: #2a3142;
    --gray-700: #3d4556;
    --gray-600: #6b7280;
    --gray-500: #9ca3af;
    --gray-400: #b8c0cc;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    
    /* Surface colors for layering */
    --surface-0: var(--dark);
    --surface-1: rgba(30, 58, 95, 0.2);
    --surface-2: rgba(30, 58, 95, 0.4);
    --surface-glass: rgba(255, 255, 255, 0.03);
    
    /* Border colors */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(6, 255, 165, 0.3);
    
    /* Glow effects */
    --glow-green: rgba(6, 255, 165, 0.4);
    --glow-red: rgba(230, 57, 70, 0.3);
    --glow-purple: rgba(139, 92, 246, 0.3);
    
    /* DNA Gradient - simplified */
    --dna-gradient: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-red) 100%);
    --dna-gradient-reverse: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-green) 100%);
    
    /* Semantic Colors */
    --success: var(--accent-green);
    --warning: var(--accent-yellow);
    --error: var(--accent-red);
    --info: var(--accent-purple);
    
    /* Typography - Outfit as primary display font */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    
    /* ============================================
       FLUID FONT SIZES
       Uses clamp(MIN, PREFERRED, MAX) for smooth scaling
       ============================================ */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.925rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
    --text-xl: clamp(1.15rem, 1rem + 0.75vw, 1.6rem);
    --text-2xl: clamp(1.35rem, 1.1rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.6rem, 1.25rem + 1.75vw, 2.75rem);
    --text-4xl: clamp(1.9rem, 1.4rem + 2.5vw, 3.5rem);
    --text-5xl: clamp(2.25rem, 1.5rem + 3.75vw, 4.5rem);
    --text-6xl: clamp(2.75rem, 1.75rem + 5vw, 6rem);
    
    /* Hero / Display - extra large for impact */
    --text-hero: clamp(2.5rem, 1.5rem + 5vw, 7rem);
    --text-display: clamp(3rem, 2rem + 6vw, 9rem);
    
    /* ============================================
       FIXED SPACING SCALE (for precise control)
       ============================================ */
    --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 */
    
    /* ============================================
       FLUID SPACING (scales with viewport)
       ============================================ */
    --space-fluid-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
    --space-fluid-sm: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
    --space-fluid-md: clamp(1rem, 0.75rem + 1.25vw, 2rem);
    --space-fluid-lg: clamp(1.5rem, 1rem + 2.5vw, 4rem);
    --space-fluid-xl: clamp(2rem, 1.5rem + 3vw, 5rem);
    --space-fluid-2xl: clamp(3rem, 2rem + 4vw, 7rem);
    --space-fluid-3xl: clamp(4rem, 2.5rem + 6vw, 10rem);
    
    /* Section-specific fluid spacing */
    --section-padding-y: clamp(3rem, 2rem + 5vw, 8rem);
    --section-gap: clamp(2rem, 1.5rem + 3vw, 5rem);
    --hero-padding: clamp(2rem, 1rem + 6vw, 8rem);
    
    /* ============================================
       CONTAINER WIDTHS (stepped by breakpoint)
       ============================================ */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
    --container-3xl: 1600px;
    --container-4xl: 1800px;
    --container-5xl: 2200px;
    
    /* Border Radius - slightly fluid */
    --radius-sm: clamp(0.3rem, 0.25rem + 0.125vw, 0.4rem);
    --radius-md: clamp(0.4rem, 0.35rem + 0.15vw, 0.6rem);
    --radius-lg: clamp(0.6rem, 0.5rem + 0.25vw, 1rem);
    --radius-xl: clamp(0.8rem, 0.6rem + 0.4vw, 1.5rem);
    --radius-2xl: clamp(1rem, 0.75rem + 0.5vw, 2rem);
    --radius-full: 9999px;
    
    /* Shadows - more dramatic for dark theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-2xl: 0 25px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--glow-green);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-notification: 500;
    --z-tooltip: 600;
    --z-max: 9999;
    
    /* Touch Target Minimum */
    --touch-target: 44px;
    
    /* Nav height for scroll offset */
    --nav-height: 64px;
}


/* ============================================
   BASE STYLES
   ============================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

/* Scale base font on larger screens */
@media (min-width: 1920px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 18px;
    }
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-300);
    background: var(--dark);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}


/* ============================================
   TYPOGRAPHY - Fluid Scaling
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: var(--space-4);
}

h1 { 
    font-size: var(--text-5xl);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 { 
    font-size: var(--text-4xl);
    letter-spacing: -0.025em;
}

h3 { 
    font-size: var(--text-2xl);
}

h4 { 
    font-size: var(--text-xl);
}

h5 { 
    font-size: var(--text-lg);
}

h6 { 
    font-size: var(--text-base);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-4);
    color: var(--gray-400);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: 700;
    color: var(--gray-200);
}

small {
    font-size: var(--text-sm);
}


/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--white);
}

a:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}


/* ============================================
   CONTAINER SYSTEM - Responsive Scaling
   ============================================ */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-fluid-md);
    padding-right: var(--space-fluid-md);
}

/* Mobile first - full width */
@media (max-width: 639px) {
    .container {
        max-width: 100%;
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}

/* Small tablets */
@media (min-width: 640px) {
    .container {
        max-width: var(--container-sm);
    }
}

/* Tablets */
@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
    }
}

/* Small laptops */
@media (min-width: 1024px) {
    .container {
        max-width: var(--container-lg);
    }
}

/* Laptops / Desktops */
@media (min-width: 1280px) {
    .container {
        max-width: var(--container-xl);
    }
}

/* Large desktops (1440p) */
@media (min-width: 1536px) {
    .container {
        max-width: var(--container-2xl);
    }
}

/* Full HD monitors */
@media (min-width: 1920px) {
    .container {
        max-width: var(--container-3xl);
    }
}

/* QHD monitors */
@media (min-width: 2048px) {
    .container {
        max-width: var(--container-4xl);
    }
}

/* 4K / Ultrawide monitors */
@media (min-width: 2560px) {
    .container {
        max-width: var(--container-5xl);
    }
}

/* Super Ultrawide */
@media (min-width: 3440px) {
    .container {
        max-width: 2800px;
    }
}


/* ============================================
   CONTAINER VARIANTS
   ============================================ */

/* Narrow container for text-heavy content (articles, about pages) */
.container-narrow {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-fluid-md);
    padding-right: var(--space-fluid-md);
    max-width: clamp(320px, 90vw, 720px);
}

@media (min-width: 1920px) {
    .container-narrow {
        max-width: 800px;
    }
}

@media (min-width: 2560px) {
    .container-narrow {
        max-width: 900px;
    }
}

/* Wide container for grids and galleries */
.container-wide {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-fluid-md);
    padding-right: var(--space-fluid-md);
    max-width: clamp(320px, 95vw, 1400px);
}

@media (min-width: 1920px) {
    .container-wide {
        max-width: 1800px;
    }
}

@media (min-width: 2560px) {
    .container-wide {
        max-width: 2400px;
    }
}

/* Full-bleed container (edge to edge with padding) */
.container-full {
    width: 100%;
    padding-left: var(--space-fluid-lg);
    padding-right: var(--space-fluid-lg);
}


/* ============================================
   BUTTONS
   ============================================ */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    gap: var(--space-2);
    min-height: var(--touch-target);
    text-align: center;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

/* Button Variants */
.btn-primary {
    background: var(--dna-gradient);
    color: var(--dark);
    font-weight: 700;
    box-shadow: var(--shadow-lg), 0 0 30px var(--glow-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 50px var(--glow-green);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface-1);
    color: var(--white);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
}

.btn-outline:hover {
    background: var(--accent-green);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-400);
    border: none;
}

.btn-ghost:hover {
    color: var(--white);
    background: var(--surface-glass);
}

/* Button Sizes - Fluid */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--space-fluid-sm) var(--space-fluid-lg);
    font-size: var(--text-lg);
    min-height: 56px;
}

.btn-full {
    width: 100%;
}


/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: var(--dna-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   CARDS - Fluid Padding
   ============================================ */
.card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-fluid-lg);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-fluid-sm);
}

.card-text {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--gray-400);
}


/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    background: var(--surface-1);
    color: var(--gray-400);
    border: 1px solid var(--border-subtle);
}

.badge-green {
    background: rgba(6, 255, 165, 0.1);
    color: var(--accent-green);
    border-color: var(--border-accent);
}

.badge-red {
    background: rgba(230, 57, 70, 0.1);
    color: var(--accent-red);
    border-color: rgba(230, 57, 70, 0.3);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    border-color: var(--glow-purple);
}


/* ============================================
   DIVIDERS
   ============================================ */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-6) 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: var(--border-subtle);
}


/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    border-top-color: var(--accent-green);
    animation: spin 0.8s linear infinite;
}

.loading-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-1) 0%,
        var(--surface-2) 50%,
        var(--surface-1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation utilities */
.animate-fadeIn { animation: fadeIn 0.5s ease-out forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }


/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text colors */
.text-white { color: var(--white); }
.text-muted { color: var(--gray-500); }
.text-accent { color: var(--accent-green); }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Fixed gaps */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Fluid gaps */
.gap-fluid-sm { gap: var(--space-fluid-sm); }
.gap-fluid-md { gap: var(--space-fluid-md); }
.gap-fluid-lg { gap: var(--space-fluid-lg); }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Auto-fit grid - responsive columns */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: var(--space-fluid-lg);
}

@media (min-width: 1920px) {
    .grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    }
}

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Fixed spacing utilities */
.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

/* Fluid spacing utilities */
.mt-fluid { margin-top: var(--space-fluid-lg); }
.mb-fluid { margin-bottom: var(--space-fluid-lg); }
.my-fluid { margin-top: var(--space-fluid-lg); margin-bottom: var(--space-fluid-lg); }
.p-fluid { padding: var(--space-fluid-lg); }
.py-fluid { padding-top: var(--space-fluid-lg); padding-bottom: var(--space-fluid-lg); }
.px-fluid { padding-left: var(--space-fluid-md); padding-right: var(--space-fluid-md); }

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

.border { border: 1px solid var(--border-default); }
.border-subtle { border: 1px solid var(--border-subtle); }

/* Max-width utilities */
.max-w-prose { max-width: clamp(45ch, 60vw, 75ch); }
.max-w-narrow { max-width: 720px; }
.max-w-wide { max-width: 1400px; }


/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 639px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
    .show-desktop { display: block !important; }
}

@media (min-width: 1920px) {
    .hide-ultrawide { display: none !important; }
    .show-ultrawide { display: block !important; }
}


/* ============================================
   FOCUS STATES
   ============================================ */
:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}


/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: var(--accent-green);
    color: var(--dark);
}


/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-0);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}


/* ============================================
   REDUCED MOTION
   ============================================ */
@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;
    }
}


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

/* 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: 0;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--z-max);
    background: var(--accent-green);
    color: var(--dark);
    padding: var(--space-3) var(--space-6);
    font-weight: 700;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    left: 0;
}


/* ============================================
   SECTION STYLING - Fluid
   ============================================ */
.section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.section-lg {
    padding-top: var(--space-fluid-3xl);
    padding-bottom: var(--space-fluid-3xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--section-gap);
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-3);
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-500);
    max-width: clamp(400px, 50vw, 700px);
    margin: 0 auto;
}


/* ============================================
   HERO SECTION HELPERS
   ============================================ */
.hero {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--hero-padding);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: clamp(300px, 85vw, 700px);
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: clamp(500px, 55vw, 800px);
    }
}

@media (min-width: 1536px) {
    .hero-content {
        max-width: clamp(600px, 50vw, 900px);
    }
}

@media (min-width: 1920px) {
    .hero-content {
        max-width: clamp(700px, 45vw, 1000px);
    }
}

@media (min-width: 2560px) {
    .hero-content {
        max-width: clamp(800px, 40vw, 1200px);
    }
}

.hero-headline {
    font-size: var(--text-hero);
    line-height: 1.1;
    margin-bottom: var(--space-fluid-lg);
}

.hero-subtitle {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--gray-400);
    margin-bottom: var(--space-fluid-xl);
}


/* ============================================
   BACKGROUND DECORATIONS
   ============================================ */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* DNA helix strands - scale with viewport */
.helix-strand {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(200px, 20vw, 400px);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.strand-1 {
    left: clamp(-200px, -15vw, -50px);
}

.strand-2 {
    right: clamp(-200px, -15vw, -50px);
}

@media (min-width: 1280px) {
    .helix-strand {
        width: clamp(300px, 25vw, 500px);
        opacity: 0.4;
    }
    
    .strand-1 { left: clamp(-100px, -8vw, 0px); }
    .strand-2 { right: clamp(-100px, -8vw, 0px); }
}

@media (min-width: 1920px) {
    .helix-strand {
        width: clamp(400px, 28vw, 600px);
        opacity: 0.5;
    }
    
    .strand-1 { left: 0; }
    .strand-2 { right: 0; }
}

@media (min-width: 2560px) {
    .helix-strand {
        width: clamp(500px, 30vw, 800px);
        opacity: 0.6;
    }
}

/* Grid overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: clamp(30px, 4vw, 60px) clamp(30px, 4vw, 60px);
    pointer-events: none;
}


/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    :root {
        --text-base: 11pt;
        --text-lg: 13pt;
        --text-xl: 15pt;
        --text-2xl: 18pt;
        --text-3xl: 24pt;
        --text-4xl: 30pt;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem;
    }
    
    .hero-bg,
    .helix-strand,
    .grid-overlay {
        display: none;
    }
}