/* 
 * REVOLUTIONARY DESIGN SYSTEM v2.0
 * Cutting-edge CSS architecture with advanced visual effects
 * Built for the future of web experiences
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Space+Grotesk:wght@300..700&display=swap');

:root {
    /* === REVOLUTIONARY COLOR SYSTEM === */
    --quantum-primary: hsl(240 100% 67%);
    --quantum-secondary: hsl(280 89% 74%);
    --quantum-accent: hsl(320 89% 69%);
    --quantum-success: hsl(142 76% 36%);
    --quantum-warning: hsl(38 92% 50%);
    --quantum-error: hsl(0 84% 60%);
    
    /* Dynamic Color Variables (Updated via JS) */
    --dynamic-hue: 240;
    --dynamic-sat: 100%;
    --dynamic-light: 67%;
    --color-primary: hsl(var(--dynamic-hue) var(--dynamic-sat) var(--dynamic-light));
    
    /* === ADVANCED GEOMETRY SYSTEM === */
    --golden-ratio: 1.618;
    --phi: calc(var(--golden-ratio));
    --inverse-phi: calc(1 / var(--golden-ratio));
    
    /* Fibonacci-based spacing */
    --space-xs: calc(0.25rem * var(--phi));
    --space-sm: calc(0.5rem * var(--phi));
    --space-md: calc(1rem * var(--phi));
    --space-lg: calc(1.5rem * var(--phi));
    --space-xl: calc(2rem * var(--phi));
    --space-2xl: calc(3rem * var(--phi));
    --space-3xl: calc(4rem * var(--phi));
    
    /* === REVOLUTIONARY TYPOGRAPHY === */
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'SF Mono', Consolas, monospace;
    
    /* Modular scale typography */
    --text-xs: calc(0.75rem * var(--inverse-phi));
    --text-sm: calc(0.875rem * var(--inverse-phi));
    --text-base: 1rem;
    --text-lg: calc(1.125rem * var(--phi));
    --text-xl: calc(1.25rem * var(--phi));
    --text-2xl: calc(1.5rem * var(--phi));
    --text-3xl: calc(1.875rem * var(--phi));
    --text-4xl: calc(2.25rem * var(--phi));
    --text-5xl: calc(3rem * var(--phi));
    --text-6xl: calc(4rem * var(--phi));
    
    /* === ADVANCED SHADOW SYSTEM === */
    --shadow-quantum: 
        0 1px 3px -1px hsl(var(--dynamic-hue) var(--dynamic-sat) var(--dynamic-light) / 0.1),
        0 2px 8px -2px hsl(var(--dynamic-hue) var(--dynamic-sat) var(--dynamic-light) / 0.1),
        0 4px 16px -4px hsl(var(--dynamic-hue) var(--dynamic-sat) var(--dynamic-light) / 0.1);
    
    --shadow-neural:
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 4px 8px -2px rgba(0, 0, 0, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.1),
        0 16px 32px -8px rgba(0, 0, 0, 0.1);
    
    --shadow-dimensional:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.14),
        0 16px 32px rgba(0, 0, 0, 0.16);
    
    /* === REVOLUTIONARY GRADIENTS === */
    --gradient-neural: 
        radial-gradient(circle at 20% 10%, hsl(240 100% 70% / 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 90%, hsl(280 100% 70% / 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, hsl(320 100% 70% / 0.2) 0%, transparent 50%),
        linear-gradient(135deg, hsl(240 100% 67%) 0%, hsl(280 89% 74%) 50%, hsl(320 89% 69%) 100%);
    
    --gradient-quantum:
        conic-gradient(from 180deg at 50% 50%, 
            hsl(240 100% 67%) 0deg,
            hsl(260 100% 70%) 72deg,
            hsl(280 89% 74%) 144deg,
            hsl(300 89% 72%) 216deg,
            hsl(320 89% 69%) 288deg,
            hsl(240 100% 67%) 360deg);
    
    --gradient-holographic:
        linear-gradient(45deg, 
            hsl(240 100% 67% / 0.8) 0%,
            hsl(280 89% 74% / 0.6) 25%,
            hsl(320 89% 69% / 0.8) 50%,
            hsl(280 89% 74% / 0.6) 75%,
            hsl(240 100% 67% / 0.8) 100%);
    
    /* === ADVANCED MATERIAL SYSTEM === */
    --glass-ultra: hsla(0, 0%, 100%, 0.07);
    --glass-strong: hsla(0, 0%, 100%, 0.12);
    --glass-medium: hsla(0, 0%, 100%, 0.18);
    --glass-light: hsla(0, 0%, 100%, 0.25);
    
    --blur-quantum: blur(24px);
    --blur-neural: blur(40px);
    --blur-dimensional: blur(60px);
    
    /* === REVOLUTIONARY ANIMATION SYSTEM === */
    --ease-neural: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-quantum: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-dimensional: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --duration-instant: 50ms;
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-ultra: 800ms;
    
    /* === CONTAINER QUERIES SYSTEM === */
    --container-xs: 20rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-xl: 36rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    
    /* === ADVANCED BORDER SYSTEM === */
    --border-quantum: 1px solid hsl(var(--dynamic-hue) var(--dynamic-sat) var(--dynamic-light) / 0.2);
    --border-neural: 1px solid rgba(255, 255, 255, 0.1);
    --border-dimensional: 2px solid rgba(255, 255, 255, 0.05);
    
    --radius-quantum: calc(0.5rem * var(--phi));
    --radius-neural: calc(0.75rem * var(--phi));
    --radius-dimensional: calc(1rem * var(--phi));
    --radius-infinite: 9999px;
}

/* === REVOLUTIONARY RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 1.5vw, 18px);
    scroll-behavior: smooth;
    scroll-padding-top: var(--space-xl);
}

/* Revolutionary body with advanced visual systems */
body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: var(--phi);
    color: white;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    
    /* Advanced text rendering */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    
    /* Hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Revolutionary background system with multiple layers */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background: var(--gradient-neural);
    animation: neural-pulse 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--gradient-quantum);
    opacity: 0.6;
    animation: quantum-flow 30s linear infinite;
    mix-blend-mode: overlay;
}

/* Dynamic particle system backdrop */
.quantum-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particles-drift 60s linear infinite;
}

/* Advanced container system */
.quantum-container {
    container-type: inline-size;
    container-name: main;
    max-width: min(90vw, 1400px);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    position: relative;
    z-index: 1;
}

/* Revolutionary animations */
@keyframes neural-pulse {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.8; transform: scale(1.02) rotate(0.5deg); }
    50% { opacity: 0.9; transform: scale(0.98) rotate(-0.5deg); }
    75% { opacity: 0.85; transform: scale(1.01) rotate(0.3deg); }
}

@keyframes quantum-flow {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    75% { transform: rotate(270deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes particles-drift {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-10px) translateY(-20px); }
    50% { transform: translateX(10px) translateY(-40px); }
    75% { transform: translateX(-5px) translateY(-60px); }
    100% { transform: translateX(0) translateY(-80px); }
}

/* === REVOLUTIONARY HEADER SYSTEM === */
.quantum-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
    padding: var(--space-2xl) 0;
    
    /* Advanced container queries */
    container-type: inline-size;
    container-name: header;
}

.quantum-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-holographic);
    opacity: 0.1;
    border-radius: var(--radius-dimensional);
    backdrop-filter: var(--blur-quantum);
    animation: holographic-shift 8s ease-in-out infinite;
}

/* Revolutionary title with advanced typography */
.neural-title {
    font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 2;
    
    /* Advanced background effects */
    background: var(--gradient-quantum);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-wave 4s ease-in-out infinite;
    
    /* Advanced text effects */
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
    
    /* 3D transform effects */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.neural-title:hover {
    transform: rotateX(5deg) rotateY(-2deg) translateZ(20px);
    transition: transform var(--duration-slow) var(--ease-neural);
}

/* Each letter gets individual animation */
.neural-title .letter {
    display: inline-block;
    animation: letter-float 3s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
    transform-origin: center;
}

/* Revolutionary subtitle system */
.quantum-subtitle {
    font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-xl);
    position: relative;
    
    /* Advanced typography effects */
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    
    /* Animated gradient text */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.9) 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 3s ease-in-out infinite;
}

/* Advanced container system */
.dimensional-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) 0;
    position: relative;
}

/* Revolutionary animations */
@keyframes holographic-shift {
    0%, 100% { 
        background-position: 0% 50%;
        transform: scale(1) rotate(0deg);
        opacity: 0.1;
    }
    25% { 
        background-position: 100% 50%;
        transform: scale(1.02) rotate(1deg);
        opacity: 0.15;
    }
    50% { 
        background-position: 200% 50%;
        transform: scale(0.98) rotate(-1deg);
        opacity: 0.08;
    }
    75% { 
        background-position: 300% 50%;
        transform: scale(1.01) rotate(0.5deg);
        opacity: 0.12;
    }
}

@keyframes gradient-wave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes letter-float {
    0%, 100% { transform: translateY(0) rotateZ(0deg); }
    25% { transform: translateY(-3px) rotateZ(1deg); }
    50% { transform: translateY(0) rotateZ(0deg); }
    75% { transform: translateY(-1px) rotateZ(-0.5deg); }
}

@keyframes text-shimmer {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

/* === REVOLUTIONARY CATEGORY GRID SYSTEM === */
.neural-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: var(--space-xl);
    width: 100%;
    max-width: 1600px;
    padding: var(--space-lg);
    position: relative;
    
    /* Advanced container queries */
    container-type: inline-size;
    container-name: grid;
}

/* Grid background with neural network pattern */
.neural-grid::before {
    content: '';
    position: absolute;
    inset: -50px;
    background-image: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-pulse 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Revolutionary quantum cards */
.quantum-card {
    /* Advanced positioning and transforms */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    padding: var(--space-xl);
    
    /* Revolutionary materials */
    background: var(--glass-ultra);
    backdrop-filter: var(--blur-quantum);
    border: var(--border-neural);
    border-radius: var(--radius-dimensional);
    
    /* Advanced shadows and depth */
    box-shadow: var(--shadow-dimensional);
    
    /* Interaction and animation system */
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-neural);
    transform-style: preserve-3d;
    perspective: 1000px;
    
    /* Hardware acceleration */
    will-change: transform, filter, backdrop-filter;
    transform: translateZ(0);
    
    /* Animation entrance */
    animation: quantum-emerge 1.2s var(--ease-dimensional) both;
    animation-delay: calc(var(--card-index, 0) * 0.15s);
}

/* Advanced card layers and depth */
.quantum-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-holographic);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-neural);
    pointer-events: none;
    z-index: -1;
}

.quantum-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--gradient-quantum);
    opacity: 0;
    padding: 1px;
    mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    mask-composite: xor;
    transition: opacity var(--duration-normal) var(--ease-neural);
    pointer-events: none;
    z-index: -2;
}

/* Revolutionary hover states */
.quantum-card:hover {
    transform: 
        translateY(-20px) 
        translateZ(40px) 
        rotateX(8deg) 
        rotateY(-3deg) 
        scale(1.05);
    
    box-shadow: 
        var(--shadow-dimensional),
        0 40px 80px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(255, 255, 255, 0.1);
    
    backdrop-filter: var(--blur-neural);
    border-color: rgba(255, 255, 255, 0.4);
}

.quantum-card:hover::before {
    opacity: 0.1;
}

.quantum-card:hover::after {
    opacity: 1;
}

/* Active state with quantum feedback */
.quantum-card:active {
    transform: 
        translateY(-15px) 
        translateZ(20px) 
        rotateX(4deg) 
        rotateY(-1deg) 
        scale(1.02);
    
    transition-duration: var(--duration-fast);
}

/* Focus state for accessibility */
.quantum-card:focus-visible {
    outline: none;
    box-shadow: 
        var(--shadow-dimensional),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
}

/* Revolutionary animations */
@keyframes grid-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes quantum-emerge {
    0% {
        opacity: 0;
        transform: translateY(60px) translateZ(-100px) rotateX(20deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(20px) translateZ(-50px) rotateX(10deg);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateZ(0) rotateX(0deg);
        filter: blur(0);
    }
}

/* === REVOLUTIONARY CARD CONTENT SYSTEM === */

/* Quantum icon system with advanced 3D effects */
.quantum-icon {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    position: relative;
    
    /* Advanced 3D transforms */
    transform-style: preserve-3d;
    perspective: 500px;
    
    /* Advanced shadows and glow */
    filter: 
        drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
    
    /* Animation on hover */
    transition: all var(--duration-normal) var(--ease-neural);
}

.quantum-icon::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: var(--gradient-quantum);
    opacity: 0;
    filter: blur(20px);
    transition: opacity var(--duration-normal) var(--ease-neural);
    z-index: -1;
}

.quantum-card:hover .quantum-icon {
    transform: rotateY(10deg) rotateX(-5deg) translateZ(20px) scale(1.1);
}

.quantum-card:hover .quantum-icon::before {
    opacity: 0.3;
}

/* Revolutionary typography system */
.neural-title {
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-md);
    text-align: center;
    position: relative;
    
    /* Advanced text effects */
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
    
    /* Dynamic gradient text */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.8) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Letter spacing for readability */
    letter-spacing: 0.02em;
    
    /* Smooth transitions */
    transition: all var(--duration-normal) var(--ease-neural);
}

.quantum-card:hover .neural-title {
    transform: translateZ(10px);
    text-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 255, 255, 0.2);
}

/* Quantum description with advanced effects */
.quantum-description {
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    font-size: var(--text-sm);
    line-height: var(--phi);
    margin-bottom: var(--space-lg);
    position: relative;
    
    /* Advanced typography */
    font-weight: 300;
    letter-spacing: 0.01em;
    
    /* Subtle text shadow */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    
    /* Smooth transitions */
    transition: all var(--duration-normal) var(--ease-neural);
}

.quantum-card:hover .quantum-description {
    color: rgba(255, 255, 255, 0.9);
    transform: translateZ(5px);
}

/* Revolutionary quantum arrow system */
.quantum-arrow {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Advanced material design */
    background: var(--glass-ultra);
    backdrop-filter: var(--blur-quantum);
    border: var(--border-neural);
    border-radius: 50%;
    
    /* Initial state - hidden */
    opacity: 0;
    transform: translateX(-20px) translateZ(-20px) rotateZ(-45deg);
    
    /* Advanced transitions */
    transition: all var(--duration-slow) var(--ease-elastic);
    
    /* Quantum glow effect */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0);
}

.quantum-arrow::before {
    content: '→';
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    transition: all var(--duration-normal) var(--ease-neural);
}

.quantum-card:hover .quantum-arrow {
    opacity: 1;
    transform: translateX(0) translateZ(30px) rotateZ(0deg);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.quantum-card:hover .quantum-arrow::before {
    color: white;
    transform: translateX(2px);
}

/* Quantum ripple effect on interaction */
.quantum-card::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-neural);
    pointer-events: none;
    z-index: 10;
}

.quantum-card:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition-duration: var(--duration-fast);
}

/* Advanced progressive enhancement for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .quantum-card,
    .quantum-icon,
    .neural-title,
    .quantum-description,
    .quantum-arrow {
        transition: none;
        animation: none;
    }
    
    .quantum-card:hover {
        transform: none;
    }
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
/* === REVOLUTIONARY FOOTER SYSTEM === */
.quantum-footer {
    text-align: center;
    margin-top: var(--space-3xl);
    padding: var(--space-xl) 0;
    position: relative;
    
    /* Advanced materials */
    background: var(--glass-ultra);
    backdrop-filter: var(--blur-quantum);
    border-top: var(--border-neural);
    border-radius: var(--radius-dimensional) var(--radius-dimensional) 0 0;
    
    /* Typography */
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    font-weight: 300;
    letter-spacing: 0.02em;
    
    /* Advanced shadows */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.quantum-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 60px;
    height: 1px;
    background: var(--gradient-quantum);
    transform: translateX(-50%);
    opacity: 0.6;
}

/* === REVOLUTIONARY RESPONSIVE SYSTEM === */

/* Advanced container queries for component-based responsiveness */
@container main (max-width: 1200px) {
    .neural-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--space-lg);
    }
}

@container main (max-width: 800px) {
    .neural-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-md);
    }
    
    .quantum-card {
        min-height: 240px;
        padding: var(--space-lg);
    }
}

@container main (max-width: 500px) {
    .neural-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .quantum-card {
        min-height: 220px;
        padding: var(--space-md);
    }
}

@container header (max-width: 600px) {
    .neural-title {
        font-size: clamp(var(--text-3xl), 10vw, var(--text-4xl));
    }
    
    .quantum-subtitle {
        font-size: clamp(var(--text-base), 4vw, var(--text-lg));
    }
}

/* Traditional media queries for viewport-based changes */
@media (max-width: 1024px) {
    .quantum-container {
        padding: var(--space-md);
    }
    
    .quantum-header {
        padding: var(--space-xl) 0;
        margin-bottom: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    /* Enhanced mobile experience */
    .quantum-card:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .quantum-icon {
        height: 100px;
        font-size: clamp(var(--text-3xl), 8vw, var(--text-4xl));
    }
    
    .neural-title {
        font-size: clamp(var(--text-lg), 4vw, var(--text-xl));
    }
    
    .quantum-description {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    /* Ultra-mobile optimization */
    .quantum-container {
        padding: var(--space-sm);
    }
    
    .quantum-header {
        padding: var(--space-lg) 0;
        margin-bottom: var(--space-xl);
    }
    
    .quantum-card {
        min-height: 200px;
        padding: var(--space-md);
    }
    
    .quantum-arrow {
        width: 32px;
        height: 32px;
        top: var(--space-md);
        right: var(--space-md);
    }
    
    .quantum-arrow::before {
        font-size: var(--text-base);
    }
}

/* === REVOLUTIONARY ACCESSIBILITY SYSTEM === */
@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;
    }
    
    .quantum-particles {
        display: none;
    }
}

@media (prefers-contrast: high) {
    .quantum-card {
        border: 2px solid rgba(255, 255, 255, 0.8);
        background: rgba(0, 0, 0, 0.8);
    }
    
    .neural-title,
    .quantum-description {
        color: white;
        text-shadow: none;
    }
}

@media (prefers-color-scheme: light) {
    /* Future light mode support */
    :root {
        --glass-ultra: hsla(0, 0%, 0%, 0.07);
        --glass-strong: hsla(0, 0%, 0%, 0.12);
    }
}

/* Advanced print styles */
@media print {
    .quantum-particles,
    body::before,
    body::after {
        display: none;
    }
    
    .quantum-card {
        break-inside: avoid;
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
}

/* High resolution display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .quantum-icon {
        filter: 
            drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.1))
            contrast(1.1)
            brightness(1.05);
    }
}

/* === REVOLUTIONARY UTILITY SYSTEM === */
.quantum-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;
}

.quantum-skip-link {
    position: absolute;
    top: -60px;
    left: var(--space-md);
    background: var(--quantum-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    border-radius: var(--radius-quantum);
    z-index: 9999;
    font-weight: 500;
    transition: all var(--duration-normal) var(--ease-neural);
    box-shadow: var(--shadow-quantum);
}

.quantum-skip-link:focus {
    top: var(--space-md);
    transform: translateY(0);
}

/* Revolutionary loading states */
.quantum-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.quantum-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-quantum);
    border-radius: inherit;
    opacity: 0.1;
    animation: quantum-pulse 1.5s ease-in-out infinite;
}

@keyframes quantum-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* ====================
   KIOSK THEME OVERRIDES
   ==================== */

/* Base: neutral, high-contrast, motion-light */
body.kiosk {
    background: #f5f7fb;
    color: #0f172a;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Remove quantum layers */
body.kiosk::before,
body.kiosk::after,
.quantum-particles { display: none !important; }

/* Container spacing */
body.kiosk .quantum-container {
    max-width: 1200px;
    padding: 2rem 1.25rem;
}

/* Header: clear hierarchy */
body.kiosk .quantum-header {
    margin-bottom: 1.5rem;
    padding: 0;
}
body.kiosk .neural-title { /* main heading */
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: initial;
    color: #0f172a;
    text-shadow: none;
    animation: none;
}
body.kiosk .quantum-subtitle {
    font-size: clamp(1.125rem, 2.2vw, 1.25rem);
    color: #334155;
    background: none;
    -webkit-text-fill-color: initial;
    animation: none;
}

/* Grid: generous spacing, simple */
body.kiosk .neural-grid {
    gap: 1rem;
    padding: 0;
}

/* Cards: large hit areas, high contrast, simple hover */
body.kiosk .quantum-card {
    min-height: 200px;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transform: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.kiosk .quantum-card:hover,
body.kiosk .quantum-card:focus-visible {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Icon and text: readable */
body.kiosk .quantum-icon {
    font-size: 2rem;
    height: auto;
    margin-bottom: .5rem;
    transform: none;
}
body.kiosk .neural-title { /* card title */
    font-size: 1.25rem;
    color: #0f172a;
}
body.kiosk .quantum-description {
    font-size: 1rem;
    color: #475569;
}

/* Arrow affordance: simple chevron */
body.kiosk .quantum-arrow {
    position: absolute;
    top: .75rem; right: .75rem;
    width: 36px; height: 36px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    opacity: 1; transform: none; box-shadow: none;
}
body.kiosk .quantum-arrow::before { content: '›'; color: #0f172a; font-size: 20px; }

/* Skip link: visible on focus */
body.kiosk .quantum-skip-link {
    background: #0f172a; color: #fff;
}

/* Footer: light, legible */
body.kiosk .quantum-footer {
    background: #ffffff;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    box-shadow: none;
}

/* Buttons (shared) */
.kiosk .btn,
body.kiosk .back-button,
body.kiosk .nav-button {
    font-size: 1.125rem;
    line-height: 1.25rem;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
}
body.kiosk .nav-button { min-width: 160px; }

/* Reduced motion by default for kiosk */
body.kiosk * { transition-duration: .15s; animation: none !important; }

/* Questionnaire specific helpers */
body.kiosk .questionnaire-container { padding-top: 1rem; }
body.kiosk .question h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: #0f172a; }
body.kiosk .question p { color: #334155; }
body.kiosk .option { font-size: 1.0625rem; }
body.kiosk .progress-bar { background: #e2e8f0; }
body.kiosk .progress-fill { background: linear-gradient(90deg,#0ea5e9,#0369a1); }