/* DESIGN SYSTEM & VARIABLES */
:root {
    --bg-primary: #000000; /* Solid black matching the engine image background */
    --bg-secondary: #020204;
    --accent-cyan: #00d35c; /* Corporate Green matching the logo */
    --accent-cyan-rgb: 0, 211, 92;
    --accent-amber: #ffaa00;
    --accent-amber-rgb: 255, 170, 0;
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --text-muted: #475569;
    --glass-bg: rgba(6, 6, 12, 0.7);
    --glass-border: rgba(255, 255, 255, 0.04);
    --glass-shadow: rgba(0, 0, 0, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* RESET & BASE STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden;
    position: relative;
}

/* BACKGROUND LAYERS */
.bg-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000; /* Pure black matches the graphic background */
    z-index: 1;
    pointer-events: none;
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 211, 92, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 211, 92, 0.016) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    z-index: 2;
    pointer-events: none;
    animation: gridBreathRest 4.5s infinite ease-in-out;
    transition: opacity 0.5s;
}

@keyframes gridBreathRest {
    0% { opacity: 0.35; }
    16.7% { opacity: 0.65; }
    33.3% { opacity: 0.25; }
    100% { opacity: 0.35; } /* stays paused for 3 seconds */
}

body.accelerating .bg-grid {
    animation: gridBreathFast 1.2s infinite ease-in-out;
}

@keyframes gridBreathFast {
    0% { opacity: 0.45; }
    20% { opacity: 0.85; }
    42% { opacity: 0.35; }
    60% { opacity: 0.45; }
    100% { opacity: 0.45; } /* stays paused for 0.5 seconds */
}

/* CENTRAL SCENE CONTAINERS */
.scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
    padding: 20px;
}

/* THE ENGINE HEART */
.engine-interaction-wrapper {
    position: relative;
    width: 80vh;
    height: 80vh;
    max-width: 600px;
    max-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: engineRumble 0.16s infinite linear;
}

.engine-interaction-wrapper:has(.pulse-fast) {
    animation: engineRumble 0.08s infinite linear;
}

.engine-interaction-wrapper:hover {
    transform: scale(1.02);
}

@keyframes engineRumble {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-0.4px, 0.4px) rotate(-0.06deg); }
    50% { transform: translate(0.4px, -0.4px) rotate(0.06deg); }
    75% { transform: translate(-0.4px, -0.4px) rotate(-0.06deg); }
}

/* Image scaling and styling */
.engine-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 24px;
    z-index: 5;
    user-select: none;
    -webkit-user-drag: none;
    mix-blend-mode: screen; /* Integrates graphic background with website vignette */
    filter: hue-rotate(-55deg) contrast(1.65) brightness(0.82) drop-shadow(0 0 15px rgba(var(--accent-cyan-rgb), 0.15));
    transition: filter 0.3s ease;
}

.engine-interaction-wrapper:hover .engine-image {
    filter: hue-rotate(-55deg) contrast(1.65) brightness(0.88) drop-shadow(0 0 25px rgba(var(--accent-cyan-rgb), 0.35));
}

/* GLOW AURA BEHIND THE ENGINE (Only flares up during active beat, invisible during pause) */
.engine-glow {
    position: absolute;
    width: 140vw;
    height: 140vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(var(--accent-cyan-rgb), 0.16) 0%, rgba(var(--accent-amber-rgb), 0.04) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    animation: ambientGlowRest 4.5s infinite ease-in-out;
}

@keyframes ambientGlowRest {
    0% { opacity: 0; }
    16.7% { opacity: 0.95; } /* bright flash during beat */
    33.3% { opacity: 0; }
    100% { opacity: 0; } /* completely dark during 3s pause */
}

body.accelerating .engine-glow {
    animation: ambientGlowFast 1.2s infinite ease-in-out;
}

@keyframes ambientGlowFast {
    0% { opacity: 0; }
    20% { opacity: 1.0; }
    45% { opacity: 0; }
    100% { opacity: 0; }
}

/* ACTIVE HEARTBEAT ANIMATIONS (Pulse glows & filters, no size warping) */
/* rest phase: a slow, breathing pulse of implicit machinery agitation. 4.5s duration. */
.pulse-active {
    animation: engineGlowRest 4.5s infinite ease-in-out;
}

/* clicked/activated phase: sutil accelerated brightness pulse under power. 1.2s duration. */
.pulse-fast {
    animation: engineGlowFast 1.2s infinite ease-in-out;
}

@keyframes engineGlowRest {
    0% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.68) drop-shadow(0 0 0 transparent);
    }
    16.7% {
        filter: hue-rotate(-55deg) contrast(1.85) brightness(1.02) drop-shadow(0 0 35px rgba(0, 211, 92, 0.65));
    }
    33.3% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.62) drop-shadow(0 0 0 transparent);
    }
    100% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.68) drop-shadow(0 0 0 transparent); /* dark & shadowless during 3s pause */
    }
}

@keyframes engineGlowFast {
    0% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.7) drop-shadow(0 0 0 transparent);
    }
    20% {
        filter: hue-rotate(-55deg) contrast(1.88) brightness(1.08) drop-shadow(0 0 45px rgba(0, 211, 92, 0.75));
    }
    42% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.65) drop-shadow(0 0 0 transparent);
    }
    100% {
        filter: hue-rotate(-55deg) contrast(1.6) brightness(0.7) drop-shadow(0 0 0 transparent);
    }
}

/* TECH HUD CORNERS EFFECT (Breaks the circular sphere feel, visible only during beat) */
.hud-corners {
    position: absolute;
    width: 102%;
    height: 102%;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: transform 0.5s;
    animation: hudCornersRest 4.5s infinite ease-in-out;
}

.engine-interaction-wrapper:hover .hud-corners {
    transform: scale(1.01);
}

body.accelerating .hud-corners {
    animation: hudCornersFast 1.2s infinite ease-in-out;
}

@keyframes hudCornersRest {
    0% { opacity: 0; }
    16.7% { opacity: 0.55; } /* flashes green with the beat */
    33.3% { opacity: 0; }
    100% { opacity: 0; } /* completely hidden during 3s pause */
}

@keyframes hudCornersFast {
    0% { opacity: 0; }
    20% { opacity: 0.8; }
    42% { opacity: 0; }
    100% { opacity: 0; }
}

.corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(var(--accent-cyan-rgb), 0.45);
    transition: border-color 0.3s;
}

.engine-interaction-wrapper:hover .corner {
    border-color: rgba(var(--accent-cyan-rgb), 0.85);
}

.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* WINGS OF AMPLITUDE & VERTICAL VECTORS (Full Screen HUD Integration) */
.wings-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4; /* Behind the engine, in front of grid */
    display: flex;
    align-items: center;
}

/* Horizontal Tech Lines */
.wing-line {
    position: absolute;
    top: 50%;
    width: 50%;
    height: 1px;
    transform: translateY(-50%);
}

.left-wing {
    left: 0;
    background: linear-gradient(to right, rgba(0, 211, 92, 0) 0%, rgba(0, 211, 92, 0.1) 30%, rgba(0, 211, 92, 0.5) 85%, rgba(0, 211, 92, 0.9) 100%);
    box-shadow: 0 0 6px rgba(0, 211, 92, 0.2);
}

.right-wing {
    right: 0;
    background: linear-gradient(to left, rgba(0, 211, 92, 0) 0%, rgba(0, 211, 92, 0.1) 30%, rgba(0, 211, 92, 0.5) 85%, rgba(0, 211, 92, 0.9) 100%);
    box-shadow: 0 0 6px rgba(0, 211, 92, 0.2);
}

/* Secondary technical parallel lines */
.left-wing::after, .right-wing::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    opacity: 0.15;
}

.left-wing::after {
    top: 15px;
    background: linear-gradient(to right, rgba(0, 211, 92, 0) 15%, rgba(0, 211, 92, 0.3) 70%, rgba(0, 211, 92, 0.6) 100%);
}

.right-wing::after {
    top: 15px;
    background: linear-gradient(to left, rgba(0, 211, 92, 0) 15%, rgba(0, 211, 92, 0.3) 70%, rgba(0, 211, 92, 0.6) 100%);
}

/* Vertical Technical Axes */
.vertical-vector {
    position: absolute;
    left: 50%;
    width: 1px;
    height: 50%;
    transform: translateX(-50%);
}

.top-vector {
    top: 0;
    background: linear-gradient(to top, rgba(0, 211, 92, 0.9) 0%, rgba(0, 211, 92, 0.5) 20%, rgba(0, 211, 92, 0.1) 70%, rgba(0, 211, 92, 0) 100%);
    box-shadow: 0 0 6px rgba(0, 211, 92, 0.15);
}

.bottom-vector {
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 211, 92, 0.9) 0%, rgba(0, 211, 92, 0.5) 20%, rgba(0, 211, 92, 0.1) 70%, rgba(0, 211, 92, 0) 100%);
    box-shadow: 0 0 6px rgba(0, 211, 92, 0.15);
}

/* Secondary technical parallel lines for vertical axis */
.top-vector::after, .bottom-vector::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    opacity: 0.15;
}

.top-vector::after {
    left: 15px;
    background: linear-gradient(to top, rgba(0, 211, 92, 0.6) 0%, rgba(0, 211, 92, 0.3) 70%, rgba(0, 211, 92, 0) 100%);
}

.bottom-vector::after {
    left: 15px;
    background: linear-gradient(to bottom, rgba(0, 211, 92, 0.6) 0%, rgba(0, 211, 92, 0.3) 70%, rgba(0, 211, 92, 0) 100%);
}

/* Traveling Data/Cargo Dots (Horizontal and Vertical) */
.wing-dot, .vector-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 4px var(--accent-cyan);
}

.wing-dot {
    top: -1px;
}

.vector-dot {
    left: -1px;
}

/* Fast Data Flow Animations */
.left-wing .dot-1 { animation: travelLeft 5s infinite linear; }
.left-wing .dot-2 { animation: travelLeft 5s infinite linear; animation-delay: 1.8s; }
.left-wing .dot-3 { animation: travelLeft 5s infinite linear; animation-delay: 3.5s; }

.right-wing .dot-1 { animation: travelRight 5s infinite linear; }
.right-wing .dot-2 { animation: travelRight 5s infinite linear; animation-delay: 1.8s; }
.right-wing .dot-3 { animation: travelRight 5s infinite linear; animation-delay: 3.5s; }

.top-vector .dot-1 { animation: travelUp 5s infinite linear; }
.top-vector .dot-2 { animation: travelUp 5s infinite linear; animation-delay: 2.5s; }

.bottom-vector .dot-1 { animation: travelDown 5s infinite linear; }
.bottom-vector .dot-2 { animation: travelDown 5s infinite linear; animation-delay: 2.5s; }

@keyframes travelLeft {
    0% {
        right: 180px;
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 0.95;
        transform: scale(1.0);
    }
    90% {
        opacity: 0.95;
    }
    100% {
        right: 100%;
        opacity: 0;
    }
}

@keyframes travelRight {
    0% {
        left: 180px;
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 0.95;
        transform: scale(1.0);
    }
    90% {
        opacity: 0.95;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes travelUp {
    0% {
        bottom: 180px;
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 0.95;
        transform: scale(1.0);
    }
    90% {
        opacity: 0.95;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

@keyframes travelDown {
    0% {
        top: 180px;
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 0.95;
        transform: scale(1.0);
    }
    90% {
        opacity: 0.95;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* HUD Labels along the wings */
.wing-label {
    position: absolute;
    font-size: 0.58rem;
    font-family: var(--font-heading);
    color: rgba(var(--accent-cyan-rgb), 0.28);
    letter-spacing: 2px;
    bottom: 8px;
    font-weight: 500;
}

.left-wing .wing-label {
    right: 40px;
}

.right-wing .wing-label {
    left: 40px;
}

/* HUD STATUS PANEL */
.hud-status {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 15, 32, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-sub);
    z-index: 6;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hud-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: blinkDot 1s infinite alternate;
}

body.accelerating .hud-status .hud-dot {
    background-color: var(--accent-amber);
    box-shadow: 0 0 12px var(--accent-amber);
}

body.accelerating .wing-line, body.accelerating .vertical-vector {
    box-shadow: 0 0 10px rgba(0, 211, 92, 0.35);
}

body.accelerating .wing-dot, body.accelerating .vector-dot {
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 6px var(--accent-cyan);
}

@keyframes blinkDot {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* INTRO HEADLINE OVERLAY */
.intro-headline {
    margin-top: 30px;
    text-align: center;
    z-index: 6;
    pointer-events: none;
}

.intro-headline h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 14px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    margin-left: 14px; /* compensate letter spacing offset */
}

.intro-headline .subtitle {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-sub);
    letter-spacing: 4px;
}

/* DELAYED FADE-IN ELEMENTS */
.hidden-element {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.8s cubic-bezier(0.25, 1, 0.5, 1), transform 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}

header.hidden-element {
    transform: translateY(-20px);
}

footer.hidden-element {
    transform: translateY(20px);
}

.visible-element {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* GLASS HEADER */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 211, 92, 0.25));
    transition: transform 0.3s ease, filter 0.3s;
}

.logo-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 12px rgba(0, 211, 92, 0.45));
}

.logo-subtitle {
    font-size: 0.58rem;
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    letter-spacing: 1.5px;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.85;
    transition: color 0.3s ease, opacity 0.3s ease;
    text-align: center;
}

.logo:hover .logo-subtitle {
    color: var(--text-main);
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-item {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    letter-spacing: 3px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 10px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-item:hover, .nav-item.active-nav {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.nav-item:hover::after, .nav-item.active-nav::after {
    width: 100%;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background 0.3s, border 0.3s, box-shadow 0.3s, transform 0.2s;
}

.btn-glass:hover {
    background: rgba(var(--accent-cyan-rgb), 0.07);
    border-color: rgba(var(--accent-cyan-rgb), 0.4);
    box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.15);
    transform: translateY(-1px);
}

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

/* GLASS FOOTER */
.glass-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-sub);
}

.footer-left span {
    font-weight: 400;
}

.footer-stats {
    display: flex;
    gap: 40px;
}

.footer-stat {
    display: flex;
    gap: 8px;
}

.footer-stat .label {
    color: var(--text-muted);
}

.footer-stat .value {
    color: var(--text-main);
    font-weight: 500;
}

.footer-stat .value.active-glow {
    color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(var(--accent-cyan-rgb), 0.5);
}

.footer-right .footer-domain {
    color: var(--text-sub);
    letter-spacing: 2px;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    text-decoration: none;
}

.footer-right .footer-domain:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.45);
}

/* INTERACTIVE HUD PANEL (SLIDES IN) */
.interactive-panel {
    position: fixed;
    right: -450px;
    top: 90px;
    bottom: 70px;
    width: 400px;
    background: rgba(6, 10, 24, 0.75);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    z-index: 90;
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    padding: 35px 30px;
    overflow-y: auto;
}

.interactive-panel.panel-open {
    right: 30px;
    box-shadow: 0 0 30px rgba(var(--accent-cyan-rgb), 0.08), 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Close Button */
.panel-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
    padding: 10px; /* Increase touch target size for mobile/tablet a11y */
}

.panel-close svg {
    stroke: var(--text-main);
    stroke-width: 2;
    stroke-linecap: round;
}

.panel-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Tab Panels Content */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

.tab-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--text-main);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-content h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.tab-content p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-sub);
    margin-bottom: 25px;
}

/* Quote Form HUD Style */
.quote-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 211, 92, 0.15); /* Green technical borders */
    border-radius: 4px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: rgba(var(--accent-cyan-rgb), 0.65);
    box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.25);
}

.btn-primary {
    background: var(--accent-cyan);
    color: #020306;
    border: none;
    border-radius: 4px;
    padding: 14px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #00ff77;
    box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.55);
    transform: translateY(-1px);
}

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

/* Tech Form Frame inside Contact Tab */
.tech-form-frame {
    position: relative;
    border: 1px solid rgba(0, 211, 92, 0.18);
    padding: 24px 20px;
    border-radius: 8px;
    background: rgba(0, 211, 92, 0.012);
    box-shadow: inset 0 0 15px rgba(0, 211, 92, 0.02), 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.tech-form-frame:hover {
    border-color: rgba(0, 211, 92, 0.35);
    background: rgba(0, 211, 92, 0.025);
    box-shadow: inset 0 0 20px rgba(0, 211, 92, 0.04), 0 0 15px rgba(0, 211, 92, 0.08), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.form-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(0, 211, 92, 0.5);
    pointer-events: none;
    transition: border-color 0.3s, transform 0.3s;
}

.tech-form-frame:hover .form-corner {
    border-color: rgba(0, 211, 92, 0.95);
    transform: scale(1.08);
}

.form-corner.top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.form-corner.top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.form-corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.form-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Contact Button Active State */
.btn-glass.active-btn {
    background: rgba(var(--accent-cyan-rgb), 0.12);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.25);
    color: var(--text-main);
}

/* Route Calculator HUD Results Styling */
.calculator-results-container {
    display: none;
    margin-top: 25px;
    animation: fadeInSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.results-frame {
    position: relative;
    border: 1px solid rgba(0, 211, 92, 0.22);
    padding: 20px 18px;
    border-radius: 8px;
    background: rgba(0, 211, 92, 0.015);
    box-shadow: inset 0 0 15px rgba(0, 211, 92, 0.02);
    margin-top: 10px;
}

@keyframes pulseFlashGreen {
    0% {
        border-color: #00ff77;
        box-shadow: 0 0 25px rgba(0, 211, 92, 0.6), inset 0 0 20px rgba(0, 211, 92, 0.3);
    }
    100% {
        border-color: rgba(0, 211, 92, 0.22);
        box-shadow: inset 0 0 15px rgba(0, 211, 92, 0.02);
    }
}

.results-frame.pulse-flash-green {
    animation: pulseFlashGreen 0.7s ease-out;
}


.results-frame h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    text-transform: uppercase;
}

.results-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 5px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.data-row .d-value {
    color: var(--text-main);
    font-weight: 500;
}

.highlight-row {
    border-top: 1px dashed rgba(0, 211, 92, 0.2);
    padding-top: 10px;
    font-weight: 700;
    align-items: center;
}

.highlight-row .d-label {
    color: var(--accent-cyan);
}

.highlight-row .d-value {
    color: var(--accent-cyan);
    font-size: 1rem;
    font-family: var(--font-heading);
    text-shadow: 0 0 8px rgba(0, 211, 92, 0.4);
}

.results-disclaimer {
    font-size: 0.62rem;
    color: var(--text-muted) !important;
    line-height: 1.3;
    margin-top: 15px;
    margin-bottom: 0 !important;
}

#btn-reservar {
    margin-top: 15px;
    width: 100%;
}

/* Honeypot field (hidden from screen/visually, accessible to bots) */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -1000 !important;
}

/* Service Card HUD Styling */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.service-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px;
    border-radius: 6px;
    transition: border-color 0.3s, background 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover {
    background: rgba(var(--accent-cyan-rgb), 0.025);
    border-color: rgba(var(--accent-cyan-rgb), 0.3);
    box-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.05);
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px dashed rgba(var(--accent-cyan-rgb), 0.2);
    padding-bottom: 8px;
    text-shadow: 0 0 6px rgba(var(--accent-cyan-rgb), 0.2);
}

.collaborators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.collab-badge {
    background: rgba(0, 211, 92, 0.012);
    border: 1px solid rgba(0, 211, 92, 0.1);
    color: var(--text-sub);
    padding: 10px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.collab-badge:hover {
    border-color: rgba(0, 211, 92, 0.4);
    background: rgba(0, 211, 92, 0.04);
    color: var(--text-main);
    box-shadow: 0 0 8px rgba(0, 211, 92, 0.1);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 2px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.service-card p {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-sub);
    margin-bottom: 0;
}

/* Stats Row HUD Styling */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 6px;
    text-align: center;
}

.stat-item.full-width {
    grid-column: span 2;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.2);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--text-sub);
    text-transform: uppercase;
}

/* FLOATING DIGITAL PARTICLES */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: floatParticle 9s infinite linear;
}

.particle.amber {
    background-color: var(--accent-amber);
    box-shadow: 0 0 8px var(--accent-amber);
}

@keyframes floatParticle {
    0% {
        transform: translate3d(0, 0, 0) scale(0.3);
        opacity: 0;
    }
    15% {
        opacity: 0.5;
    }
    85% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(var(--tx), var(--ty), 0) scale(1);
        opacity: 0;
    }
}

/* CUSTOM SCROLLBAR FOR DETAILS PANEL */
.interactive-panel::-webkit-scrollbar {
    width: 4px;
}

.interactive-panel::-webkit-scrollbar-track {
    background: transparent;
}

.interactive-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.interactive-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-cyan-rgb), 0.4);
}

/* Shift engine left when side panel is active (tablet landscape & desktop) */
@media (min-width: 993px) {
    body.panel-active .engine-interaction-wrapper {
        transform: translateX(-180px) scale(0.9);
    }
}

/* Mobile Navigation Toggle Button & helpers */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 110;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--accent-cyan);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-15px);
}

.menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--accent-cyan);
}

.mobile-only-link {
    display: none;
}

/* RESPONSIVE LAYOUTS */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .mobile-only-link {
        display: inline-block;
    }

    .header-actions {
        display: none; /* Hide desktop Contact button */
    }

    .glass-header {
        padding: 0 24px;
        height: 70px;
    }

    .nav-links {
        position: fixed;
        top: -100vh;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(4, 6, 15, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 99;
        transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-bottom: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    }

    .nav-links.open {
        top: 0;
    }

    .nav-item {
        font-size: 1.25rem;
        letter-spacing: 4px;
        padding: 12px;
        width: auto;
    }

    .nav-item::after {
        bottom: 5px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .scene-container {
        padding-top: 100px;
        padding-bottom: 80px;
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
    }

    .engine-interaction-wrapper {
        width: 75vw;
        height: 75vw;
        max-width: 290px;
        max-height: 290px;
        margin-top: 40px;
    }

    .logo-subtitle {
        font-size: 0.5rem;
        letter-spacing: 1px;
        margin-top: 2px;
    }

    /* Hide wings on mobile to prevent overlay issues and improve readability */
    .wings-container {
        display: none;
    }

    .intro-headline h1 {
        font-size: 1.8rem;
        letter-spacing: 8px;
    }
    
    .glass-footer {
        padding: 0 20px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        height: 70px;
        text-align: center;
    }

    .footer-stats {
        display: none; /* hide stats on mobile footer */
    }

    .interactive-panel {
        width: calc(100% - 40px);
        right: -100%;
        top: 80px;
        bottom: 80px;
        overscroll-behavior: contain; /* Prevents scroll chaining/leak to background */
    }

    .interactive-panel.panel-open {
        right: 20px;
    }

    .services-grid, .collaborators-grid {
        grid-template-columns: 1fr;
    }
}
