/* Global Clean */
body {
    overflow-x: hidden;
    cursor: default;
    /* We might add custom cursor later */
}

.container-fluid {
    width: 94%;
    margin: 0 auto;
    max-width: 1800px;
}

/* --- COSMIC GLASS HEADER --- */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    will-change: transform, background, backdrop-filter;
}

.glass-header.scrolled {
    background: rgba(5, 5, 8, 0.85);
    /* Deep dark glass */
    padding: 1.5rem 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle cosmic rim */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
}

.desktop-nav ul {
    display: flex;
    gap: 1.8rem;
    /* Reduced spacing for tighter layout */
    align-items: center;
}

.desktop-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Space Grotesk', sans-serif;
    /* Techno/Cosmic Font */
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.3s ease;
    position: relative;
    padding: 6px 10px;
    border-radius: 6px;
    /* Remove tap highlight on all devices */
    -webkit-tap-highlight-color: transparent;
}

.desktop-nav a:hover {
    color: #fff;
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.6);
    background: rgba(45, 212, 191, 0.12);
    /* Soft teal glow background */
}

/* Cosmic Laser Underline */
.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 10px;
    right: 10px;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px #2dd4bf;
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
}

/* ============================================
   DROPDOWN MENU - Cosmic Style
   ============================================ */

.has-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.55rem;
    margin-left: 5px;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: inline-block;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: #2dd4bf;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    min-width: auto;
    width: max-content;
    padding: 6px;
    background: rgba(10, 12, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 8px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(45, 212, 191, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Top glow line */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.6), transparent);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 0.78rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    text-transform: none;
    letter-spacing: 0.3px;
    border-left: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: #fff;
    background: rgba(45, 212, 191, 0.15);
    border-left-color: #2dd4bf;
}

.dropdown-menu a::after {
    display: none !important;
}

/* Prevent underline animation on dropdown parent */
.has-dropdown>a::after {
    display: none;
}

/* Header state sync */
.glass-header .dropdown-menu {
    background: rgba(5, 5, 10, 0.85);
    border-color: rgba(45, 212, 191, 0.1);
}

.glass-header.scrolled .dropdown-menu {
    background: rgba(10, 12, 20, 0.95);
    border-color: rgba(45, 212, 191, 0.15);
}


/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


@media (max-width: 768px) {
    .desktop-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 12, 20, 0.98);
        backdrop-filter: blur(20px);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-left: 1px solid rgba(45, 212, 191, 0.2);
    }

    .desktop-nav.mobile-active {
        right: 0;
    }

    .desktop-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .desktop-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .desktop-nav ul li a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        /* Remove all tap/touch highlights */
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Completely disable hover effects on mobile */
    .desktop-nav ul li a:hover,
    .desktop-nav ul li a:active,
    .desktop-nav ul li a:focus {
        background: transparent !important;
        color: rgba(255, 255, 255, 0.85) !important;
        text-shadow: none !important;
    }

    /* Remove all pseudo-elements on mobile */
    .desktop-nav ul li a::after,
    .desktop-nav ul li a::before {
        display: none !important;
    }

    /* Dropdown in mobile */
    .has-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        background: rgba(5, 5, 10, 0.5) !important;
        border: none !important;
        border-radius: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: none !important;
        width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        backdrop-filter: none !important;
    }

    .has-dropdown .dropdown-menu::before {
        display: none;
    }

    .has-dropdown.dropdown-open .dropdown-menu {
        max-height: 400px;
    }

    .has-dropdown .dropdown-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .has-dropdown .dropdown-menu li a {
        padding: 12px 20px;
        font-size: 14px;
        border-left: none;
        background: transparent;
    }

    .has-dropdown .dropdown-menu li a:hover {
        background: rgba(45, 212, 191, 0.1);
        border-left: none;
    }

    .dropdown-arrow {
        float: right;
        transition: transform 0.3s ease;
    }

    .has-dropdown.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .mobile-toggle {
        display: flex;
    }
}

/* --- HERO (3D Cosmic Star Map) --- */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Allow canvas to overflow into next section */
    overflow: visible;
    /* Updated Background */
    background-color: #050508;
    /* Ensure hero stays above nebula section's background */
    z-index: 1;
}

/* Deep Space Background Layer Removed - Handled by JS Nebula Engine */
/* .hero-section::before ... removed for optimization */

#constellation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Extended height to cover hero + services header area */
    height: calc(100vh + 500px);
    z-index: 1;
    opacity: 1;
    /* GPU Acceleration for smooth scrolling */
    will-change: transform;
    transform: translateZ(0);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* More transparent center to show stars */
    background: radial-gradient(circle at center, transparent 20%, rgba(5, 5, 8, 0.8) 90%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    /* Ensure it can be centered */
    max-width: 900px;
    margin: 0 auto;
    /* Critical for centering block inside container */
    padding: 0 var(--spacing-sm);
    padding-top: 120px;
    /* Pushed down for visual centering */
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: clamp(1.5rem, 3vw, 2.8rem);
    /* Reduced further */
    font-weight: 300;
    letter-spacing: 4px;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-subtext {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .menu-link {
        font-size: 2.5rem;
    }

    .kinetic-text {
        font-size: 3.5rem;
    }

    .kinetic-text .line.indent {
        margin-left: 0;
    }

    .menu-trigger {
        width: 60px;
        height: 60px;
        font-size: 0.7rem;
    }
}



/* --- GLOBAL SECTIONS --- */
section {
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #2dd4bf;
    /* Neon Teal */
    border: 1px solid rgba(45, 212, 191, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(45, 212, 191, 0.05);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- SCROLL CONNECTOR --- */
.scroll-connector {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    /* Initial height, grows with scroll via JS or just static */
    z-index: 10;
    pointer-events: none;
}

.connector-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--color-accent-glow));
    opacity: 0.6;
}

.connector-orb {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-accent-glow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-accent-glow);
}

/* --- 2. FUTURE CONTEXT (New Section) --- */
.future-section {
    background-color: var(--color-bg);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.section-tag-light {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1.5px;
}

.future-content h2 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    color: var(--color-text);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.future-content p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- 3. BRIDGE (Transition) --- */
.bridge-section {
    background: var(--gradient-cosmic);
    /* Dark cosmic break */
    padding: var(--spacing-lg) 0;
    color: var(--color-text-on-dark);
    text-align: center;
    position: relative;
}

.bridge-text h3 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 1px;
}

.bridge-text p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- 4. SERVICES LIST (Interactive) --- */
.services-list-section {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl) 0;
}

.section-header-left {
    text-align: left;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: var(--spacing-sm);
}

.section-header-left h2 {
    font-size: 3rem;
    color: var(--color-text);
}

.services-list {
    display: flex;
    flex-direction: column;
}

.service-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    /* Light separator */
    transition: all 0.3s ease;
}

.service-header {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) 0;
    cursor: pointer;
    position: relative;
}

.service-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text-light);
    opacity: 0.3;
    margin-right: var(--spacing-md);
    font-weight: 700;
}

.service-header h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-text);
    flex-grow: 1;
    transition: color 0.3s ease;
}

.service-toggle {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-body p {
    padding-bottom: var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 1.5rem + 20px);
    /* Align with text */
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 800px;
}

/* Interaction States */
.service-item.active .service-header h3 {
    color: var(--color-accent);
}

.service-item.active .service-number {
    color: var(--color-accent);
    opacity: 1;
}

.service-item.active .service-toggle {
    transform: rotate(45deg);
    color: var(--color-accent);
}

.service-item.active .service-body {
    max-height: 200px;
    /* Rough max height for animation */
}

/* Hover effect for non-active items */
.service-item:not(.active):hover .service-header h3 {
    color: var(--color-text-light);
}


/* --- 4. PROCESS (Step Flow) --- */
.process-section {
    background: linear-gradient(180deg, #050510 0%, #0a0a1a 100%);
}

.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: var(--spacing-xl);
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.step-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.step:hover .step-number {
    color: #2dd4bf;
    /* Teal highlight */
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.step p {
    font-size: 0.95rem;
    opacity: 0.6;
}

/* Connecting Line */
.step-line {
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    /* Aligns with top part of flow */
    position: relative;
}

.step-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 1px;
    background: #2dd4bf;
    animation: flowLine 3s infinite linear;
    transform: translateY(-50%);
}


/* --- 5. TECH STACK (Marquee) --- */
.tech-section {
    padding: var(--spacing-lg) 0;
    background: #050510;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-intro {
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 3px;
    opacity: 0.5;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: scroll 30s linear infinite;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    will-change: transform;
}

.marquee-content span {
    margin: 0 30px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


/* --- REFERENCES (Logo Marquee) --- */
.references-section {
    padding: var(--spacing-xl) 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.references-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.references-header .section-tag-cosmic {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: var(--spacing-md);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.references-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.references-header .text-glow {
    background: linear-gradient(135deg, #a78bfa 0%, #2dd4bf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.references-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

/* References Grid (Static - will enable marquee when more clients added) */
.references-marquee-wrapper {
    overflow: visible;
    white-space: normal;
    /* Mask disabled for static layout */
    /* mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); */
    /* -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); */
    padding: var(--spacing-md) 0;
    display: flex;
    justify-content: center;
}

.references-marquee-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    /* Animation disabled for static layout */
    /* animation: scrollReferences 40s linear infinite; */
    /* will-change: transform; */
}

/* Marquee animation - disabled until more clients added */
/*
@keyframes scrollReferences {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}
*/
.reference-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 110px;
    margin: 0 20px;
    padding: 20px;
    background: rgba(5, 5, 15, 0.5);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 4px;
    transition: all 0.4s ease;
    cursor: default;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    position: relative;
}

/* HUD Corner Lines */
.reference-logo::before,
.reference-logo::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(45, 212, 191, 0.4);
    border-style: solid;
    border-width: 0;
    transition: all 0.3s ease;
}

.reference-logo::before {
    top: -1px;
    left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
}

.reference-logo::after {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

.reference-logo:hover {
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.5);
    transform: translateY(-5px);
    box-shadow:
        0 10px 30px rgba(45, 212, 191, 0.2),
        inset 0 0 20px rgba(45, 212, 191, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reference-logo:hover::before,
.reference-logo:hover::after {
    width: 30px;
    height: 30px;
    border-color: #2dd4bf;
    filter: drop-shadow(0 0 5px rgba(45, 212, 191, 0.8));
}

.logo-placeholder {
    font-size: 2rem;
    margin-bottom: 8px;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.reference-logo:hover .logo-placeholder {
    filter: grayscale(0%) drop-shadow(0 0 8px rgba(45, 212, 191, 0.6));
    opacity: 1;
}

.logo-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.reference-logo:hover .logo-name {
    color: #2dd4bf;
    text-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

/* Logo Image Styling */
.logo-img {
    max-height: 50px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    filter: grayscale(100%) brightness(1.2);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.reference-logo:hover .logo-img {
    filter: grayscale(0%) brightness(1) drop-shadow(0 0 8px rgba(45, 212, 191, 0.4));
    opacity: 1;
}

/* Light logos need less brightness adjustment */
.logo-img.logo-light {
    filter: grayscale(100%) brightness(0.9);
}

.reference-logo:hover .logo-img.logo-light {
    filter: grayscale(0%) brightness(1) drop-shadow(0 0 8px rgba(45, 212, 191, 0.4));
}


/* Pause animation on hover */
.references-marquee-wrapper:hover .references-marquee-content {
    animation-play-state: paused;
}


/* --- 6. CTA (Cosmic Launch) --- */
.cta-section {
    position: relative;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    background: #050510;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.2), transparent 70%);
}

.cta-container {
    position: relative;
    z-index: 2;
}

.cta-container h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
}

.cta-container p {
    font-size: 1.3rem;
    opacity: 0.7;
    margin-bottom: var(--spacing-lg);
    margin-left: auto;
    margin-right: auto;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(45, 212, 191, 0.6);
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .hook-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hook-content p {
        margin: 0 auto;
    }

    .process-steps {
        flex-direction: column;
        gap: 40px;
    }

    .step-line {
        display: none;
        /* Hide horizonatal lines on mobile */
    }
}


/* --- DEEP NEBULA HEADER (Scrolled State) --- */
.glass-header.scrolled {
    background: rgba(5, 5, 12, 0.6);
    /* More transparent for glass effect */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    /* Nebula Gradient Effect - Enhanced Visibility */
    background-image:
        radial-gradient(circle at 10% 50%, rgba(124, 58, 237, 0.25), transparent 50%),
        radial-gradient(circle at 90% 50%, rgba(56, 189, 248, 0.2), transparent 50%),
        linear-gradient(180deg, rgba(5, 5, 8, 0.4), rgba(5, 5, 8, 0.7));

    background-size: 200% 100%;
    animation: nebulaPulse 8s ease-in-out infinite alternate;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes nebulaPulse {
    0% {
        background-position: 0% 50%;
        border-bottom-color: rgba(255, 255, 255, 0.03);
    }

    100% {
        background-position: 100% 50%;
        border-bottom-color: rgba(45, 212, 191, 0.1);
    }

    /* Subtle Teal rim pulse */
}

/* Ensure text contrast on scrolled nebula */
.glass-header.scrolled .logo,
.glass-header.scrolled .btn-contact {
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    /* Shadow for legibility */
}

/* Scrolled Nav Link Enhancements */
.glass-header.scrolled .desktop-nav a {
    color: rgba(255, 255, 255, 0.9);
}

.glass-header.scrolled .desktop-nav a:hover {
    color: #fff;
    text-shadow: 0 0 15px rgba(216, 180, 254, 0.6);
    /* Shift to subtle purple glow on scroll */
}

/* Scroll Indicator Removed */

/* ============================================
   NEBULA FOOTER
   ============================================ */

.nebula-footer {
    position: relative;
    padding: 80px 0 0;
    z-index: 2;
}

/* Nebula Wrapper - Shared Background for References + Footer */
.nebula-wrapper {
    position: relative;
    overflow: hidden;
}

.nebula-bg-shared {
    position: absolute;
    inset: 0;
    background: url('../images/Nebula/carina-nebula-4k.webp') center bottom / cover no-repeat;
    z-index: 0;
}

.nebula-overlay-shared {
    position: absolute;
    inset: 0;
    /* 
       Smooth transition from terminal to nebula:
       - Start with exact terminal end color (#0d0e16)
       - Very long, gradual fade to reveal nebula naturally
    */
    background: linear-gradient(180deg,
            #0d0e16 0%,
            rgba(13, 14, 22, 0.99) 2%,
            rgba(12, 13, 20, 0.97) 5%,
            rgba(11, 12, 18, 0.94) 10%,
            rgba(10, 11, 17, 0.88) 18%,
            rgba(9, 10, 16, 0.78) 28%,
            rgba(8, 9, 14, 0.65) 40%,
            rgba(7, 8, 12, 0.50) 55%,
            rgba(6, 6, 10, 0.35) 70%,
            rgba(5, 5, 8, 0.20) 85%,
            rgba(5, 5, 8, 0.10) 100%);
    z-index: 1;
}

.footer-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(5, 5, 10, 0.95) 0%,
            rgba(5, 5, 10, 0.7) 50%,
            rgba(5, 5, 10, 0.5) 100%);
    z-index: 1;
}

.footer-container {
    position: relative;
    z-index: 2;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Brand */
.footer-brand {
    max-width: 350px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
}

.footer-tagline {
    font-size: 1.1rem;
    color: #2dd4bf;
    font-weight: 500;
    margin-bottom: 15px;
    font-style: italic;
}

.footer-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

/* Footer Links */
.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #2dd4bf;
    text-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
}

/* Footer Contact */
.footer-contact li {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    font-size: 1rem;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: #2dd4bf;
    color: #2dd4bf;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(45, 212, 191, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #2dd4bf;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}