/* Hero Section - Advanced with Data Visualization */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-primary);
    overflow: hidden;
    padding-top: 80px;
    isolation: isolate;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Video Background */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) translateZ(0);
    -webkit-transform: translate(-50%, -50%) translateZ(0);
    object-fit: cover;
    z-index: 1;
    will-change: transform;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(10, 22, 40, 0.85) 0%, 
        rgba(15, 29, 52, 0.75) 50%, 
        rgba(10, 22, 40, 0.85) 100%
    );
    z-index: 2;
    pointer-events: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Tech Label at Top */
.hero-tech-label {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    font-weight: 700;
    opacity: 0.7;
    z-index: 100;
}

/* Data Grid Background Animation */
.data-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    z-index: 3;
}

.grid-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: dataFlow 3s linear infinite;
}

@keyframes dataFlow {
    0% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%); }
}

/* HUD Corner Elements */
.hud {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    pointer-events: none;
    z-index: 5;
}

.hud::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hud-1 {
    top: 120px;
    left: 50px;
    border-right: none;
    border-bottom: none;
}

.hud-1::before {
    top: -4px;
    left: -4px;
}

.hud-2 {
    top: 120px;
    right: 50px;
    border-left: none;
    border-bottom: none;
}

.hud-2::before {
    top: -4px;
    right: -4px;
}

.hud-3 {
    bottom: 120px;
    left: 50px;
    border-right: none;
    border-top: none;
}

.hud-3::before {
    bottom: -4px;
    left: -4px;
}

.hud-4 {
    bottom: 120px;
    right: 50px;
    border-left: none;
    border-top: none;
}

.hud-4::before {
    bottom: -4px;
    right: -4px;
}

/* Data Streams */
.data-stream {
    position: absolute;
    left: 0;
    width: 100%;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    opacity: 0.3;
    white-space: nowrap;
    overflow: hidden;
    animation: streamFlow 30s linear infinite;
    z-index: 4;
}

@keyframes streamFlow {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 100;
    text-align: center;
    max-width: 900px;
    padding: 0 var(--spacing-md);
}

.tech-label {
    display: inline-block;
    color: var(--accent-cyan);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
    opacity: 0.8;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-white);
}

.hero-title .highlight {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-md);
    color: var(--text-gray);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.stat-card {
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 900;
    color: var(--accent-cyan);
    display: block;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    /* CRITICAL: Force video to stay behind content on mobile */
    .hero-video-container {
        z-index: 1 !important;
    }
    
    .hero-video {
        z-index: 1 !important;
    }
    
    .hero-video-overlay {
        z-index: 2 !important;
        background: linear-gradient(135deg, 
            rgba(10, 22, 40, 0.90) 0%, 
            rgba(15, 29, 52, 0.85) 50%, 
            rgba(10, 22, 40, 0.90) 100%
        );
    }
    
    .hero-content {
        z-index: 100 !important;
        position: relative;
    }
    
    .data-grid {
        z-index: 3 !important;
    }
    
    .data-stream {
        z-index: 4 !important;
    }
    
    .hud {
        z-index: 5 !important;
    }
    
    .hud {
        width: 50px;
        height: 50px;
    }
    
    .hud-1, .hud-2 {
        top: 90px;
    }
    
    .hud-1, .hud-3 {
        left: 20px;
    }
    
    .hud-2, .hud-4 {
        right: 20px;
    }
    
    .hud-3, .hud-4 {
        bottom: 60px;
    }
    
    .data-stream {
        font-size: 0.65rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}
