:root {
    --primary: #00D4FF;
    --secondary: #FFFFFF;
    --accent: #0A192F;
    --bg: #050A14;
    --gradient: linear-gradient(135deg, #0A192F 0%, #00D4FF 100%);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* --- GLOBAL OVERRIDES --- */
body.is-immersive {
    background: #050A14 !important;
    overflow-x: hidden !important;
    /* Override main site variables for dark theme */
    --text-main: #FFFFFF;
    --text-muted: rgba(255,255,255,0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
}

/* Fix standard header in immersive mode */
body.is-immersive .header-main {
    background: transparent;
}
body.is-immersive .header-main.scrolled {
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(20px);
}
body.is-immersive .nav-link, 
body.is-immersive .logo {
    color: #FFFFFF !important;
}
body.is-immersive .mega-menu {
    background: #0A192F;
    border-color: rgba(255,255,255,0.1);
}
body.is-immersive .mega-menu-link {
    color: rgba(255,255,255,0.8);
}


/* Force transparency and hide legacy content when immersive mode is active */
body.is-immersive section:not(.immersive-section), 
body.is-immersive .hero, 
body.is-immersive .overview, 
body.is-immersive .solutions-section, 
body.is-immersive .horizontal-wrapper, 
body.is-immersive .ir-portal, 
body.is-immersive .footer-main,
body.is-immersive #main-content, 
body.is-immersive .main-wrapper, 
body.is-immersive .site-content {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Reveal legacy content smoothly when immersive journey ends */
body:not(.is-immersive) section:not(.immersive-section), 
body:not(.is-immersive) .hero, 
body:not(.is-immersive) .overview, 
body:not(.is-immersive) .solutions-section, 
body:not(.is-immersive) .horizontal-wrapper, 
body:not(.is-immersive) .ir-portal, 
body:not(.is-immersive) .footer-main {
    opacity: 1;
    pointer-events: auto;
}

/* Hide original hero images during immersive journey */
body.is-immersive .hero-bg, 
body.is-immersive .hero-overlay {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.immersive-body {
    position: relative;
    z-index: 10;
    background: transparent !important;
    color: var(--secondary) !important;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    /* Maintain height but hide when not active */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.is-immersive .immersive-body {
    opacity: 1;
    pointer-events: auto;
}

.space-font { font-family: 'Space Grotesk', sans-serif; }

/* --- UI OVERLAY --- */
.immersive-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}
.immersive-nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    pointer-events: auto;
    text-decoration: none;
}
.immersive-nav .nav-links {
    display: flex;
    gap: 40px;
    pointer-events: auto;
}
.immersive-nav .nav-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    transition: 0.3s;
}
.immersive-nav .nav-links a:hover { opacity: 1; color: var(--primary); }

/* --- SCROLL CONTENT --- */
.immersive-main { position: relative; width: 100%; }
.immersive-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 10%;
    overflow: hidden;
}

/* --- WEBGL CONTAINER --- */
.webgl-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: 0;
    pointer-events: none;
    background: #050A14;
    display: none !important; /* Hidden by default */
}

body.is-immersive .webgl-container {
    display: block !important;
}

body {
    background: #050A14 !important;
    overflow-x: hidden !important;
}

/* Ensure the canvas fills the container */
.webgl-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* --- SECTION SPECIFIC --- */
.hero-content { text-align: center; }
.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 0.9;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -2px;
}
.hero-title span { color: var(--primary); }

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}
.stat-item h2 { color: var(--primary); margin-bottom: 5px; }
.stat-item p { text-transform: uppercase; letter-spacing: 2px; font-size: 0.7rem; opacity: 0.6; }

/* Horizontal Scroll */
.horizontal-scroll-container {
    display: flex;
    width: 300%;
    height: 100vh;
}
.horizontal-panel {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
}

/* Terminal UI */
.terminal-container {
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 10px;
    border: 1px solid var(--primary);
    overflow: hidden;
    font-family: 'Space Grotesk', monospace;
}
.terminal-header {
    background: #111;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-body { padding: 30px; }
.terminal-input {
    background: transparent;
    border: none;
    color: var(--primary);
    width: 100%;
    outline: none;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Utils */
.btn-futuristic {
    padding: 15px 40px;
    background: var(--primary);
    color: var(--bg);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    border-radius: 5px;
    display: inline-block;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}
.btn-futuristic:hover {
    box-shadow: 0 0 30px var(--primary);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
}
.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--secondary);
    border-radius: 15px;
    position: relative;
}
.wheel {
    width: 2px;
    height: 8px;
    background: var(--secondary);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-anim 1.5s infinite;
}
@keyframes scroll-anim {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

@media (max-width: 768px) {
    .immersive-nav .nav-links { display: none; }
    .hero-title { font-size: 4rem; }
    .stats-grid { grid-template-columns: 1fr; }
}
