/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --white: #ffffff;
    --black: #0a0a0a;
    --accent-blue: #3E4F42;
    --border-size: 20px;
    --radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

/* =========================================
   2. UTILITIES & OVERLAYS
   ========================================= */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04;
    pointer-events: none;
    z-index: 99;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    font-family: 'Manrope', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: #333;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    animation: load 1.5s ease-in-out forwards;
}

@keyframes load {
    100% {
        width: 100%;
    }
}

/* =========================================
   3. UI COMPONENTS (BUTTONS & TABS)
   ========================================= */
/* --- Menu Button --- */
.menu-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2600; /* Ensured above nav overlay */
    background-color: var(--white);
    color: var(--black);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Antonio', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.burger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.burger-icon div {
    width: 100%;
    height: 2px;
    background-color: var(--black);
    transition: width 0.3s ease;
}

.menu-btn:hover .burger-icon div:nth-child(1) {
    width: 70%;
}

.menu-btn:hover .burger-icon div:nth-child(2) {
    width: 100%;
}

/* --- Floating Action Button (FAB) --- */
.fab-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-blue);
    color: var(--black);
    height: 60px;
    width: auto;
    padding: 0 2rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.fab-btn.minimized {
    padding: 0;
    width: 60px;
    justify-content: center;
    gap: 0;
}

.fab-btn.minimized .btn-label-container {
    max-width: 0;
    opacity: 0;
}

.icon-plus {
    font-size: 1.5rem;
    font-weight: 400;
    white-space: nowrap;
}

.btn-label-container {
    overflow: hidden;
    max-width: 200px;
    transition: max-width 0.5s ease, opacity 0.3s ease;
}

.btn-label {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* --- Logo Tab --- */
.logo-tab {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--white);
    padding: 1.5rem 1.5rem 1rem 2rem;
    display: flex;
    align-items: center;
    transition: background-color 0.1s ease, padding 0.4s ease;
}

.logo-tab::after {
    content: '';
    position: absolute;
    top: 0;
    right: -25px;
    width: 50px;
    height: 100%;
    background-color: var(--white);
    transform: skewX(-20deg);
    transform-origin: top left;
    border-bottom-right-radius: 4px;
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.logo-tab.scrolled-past {
    background-color: transparent;
    pointer-events: none;
}

.logo-tab.scrolled-past::after {
    opacity: 0;
    transform: skewX(-20deg) translateX(-20px);
}

.logo-text {
    position: relative;
    z-index: 20;
    font-family: 'Antonio', sans-serif;
    font-weight: 800;
    font-size: 3.5rem;
    letter-spacing: -2px;
    color: var(--black);
    transform: skewX(-10deg);
    line-height: 0.8;
}

/* =========================================
   4. LAYOUT STRUCTURES
   ========================================= */
.smooth-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
    z-index: 1;
}

.content-layer {
    position: relative;
    z-index: 10;
    background-color: var(--white);
}

/* =========================================
   5. SECTIONS: HERO
   ========================================= */
.hero-container {
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-frame {
    height: 100%;
    width: 100%;
    padding: var(--border-size);
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius);
    border-top-left-radius: 0;
    overflow: hidden;
    background-color: #111;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.hero-title {
    position: relative;
    z-index: 2;
    font-family: 'Antonio', sans-serif;
    font-size: 18vw;
    line-height: 0.85;
    color: var(--white);
    text-transform: uppercase;
    text-align: center;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s infinite;
}

.scroll-hint::after {
    content: '';
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
    margin-top: -5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* =========================================
   6. SECTIONS: SPLIT LAYOUT (Intro)
   ========================================= */
.split-layout {
    height: 100vh;
    width: 100%;
    position: relative;
    background-color: var(--white);
    display: flex;
    align-items: center;
    padding: 0 4rem;
    overflow: hidden;
}

/* Grid BG */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
}

.split-text-side {
    flex: 1;
    position: relative;
    z-index: 2;
    padding-right: 2rem;
}

.chapter-label {
    display: block;
    font-family: 'Antonio', sans-serif;
    color: var(--accent-blue);
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.split-title {
    font-family: 'Antonio', sans-serif;
    font-size: 10vw;
    line-height: 0.9;
    color: var(--black);
    text-transform: uppercase;
    margin-left: -5px;
}

.split-img-side {
    flex: 0.8;
    height: 80vh;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.portrait-frame {
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: #eee;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.portrait-frame:hover img {
    transform: scale(1.05);
}

/* --- Mobile Fix for Split Layout --- */
@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
        padding: 4rem 2rem 2rem;
        height: auto;
    }

    .split-text-side {
        width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .split-img-side {
        width: 100%;
        height: 50vh;
        justify-content: center;
    }

    .split-title {
        font-size: 15vw;
    }
}

/* =========================================
   7. SECTIONS: ABOUT
   ========================================= */
.about-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--white);
    padding: 100px 4vw;
    color: var(--black);
    overflow: hidden;
}

.grid-bg-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.about-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

.about-divider {
    width: 100%;
    height: 1px;
    background-color: #000;
    margin-bottom: 4rem;
}

.about-layout {
    display: flex;
    gap: 4rem;
}

.about-label {
    flex: 0 0 200px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.about-label::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: black;
    border-radius: 50%;
    margin-top: 6px;
}

.about-content {
    flex: 1;
}

.about-headline {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem;
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 4rem;
    max-width: 900px;
}

.about-split {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.about-portrait {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
    position: relative;
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-body {
    flex: 1;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Mobile Fix for About Section --- */
@media (max-width: 900px) {
    .about-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .about-label {
        flex: none;
        width: 100%;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
    }

    .about-split {
        flex-direction: column;
        gap: 2rem;
    }

    .about-portrait {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .about-headline {
        font-size: 1.8rem;
    }
}

/* =========================================
   8. SECTIONS: STATS
   ========================================= */
.stats-section {
    position: relative;
    width: 100%;
    background-color: var(--white);
    padding: 100px 4vw;
    color: var(--black);
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.info-card,
.stats-card,
.sidebar-col {
    background-color: #f9f9f9;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header,
.sidebar-col .info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: black;
    border-radius: 50%;
}

/* Column 1: Profile */
.driver-photo-frame {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
    background-color: #e0e0e0;
}

.driver-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-block {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: auto;
}

.info-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.5rem;
}

.info-value {
    font-family: 'Antonio', sans-serif;
    font-size: 2rem;
    text-transform: uppercase;
    line-height: 1;
    color: var(--black);
}

/* Column 2: Metrics */
.stat-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
}

.stat-item:first-child {
    padding-top: 0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
}

.stat-number {
    font-family: 'Antonio', sans-serif;
    font-size: 3.5rem;
    line-height: 1;
    margin-top: 5px;
    color: var(--black);
}

.stat-text {
    font-family: 'Antonio', sans-serif;
    font-size: 1.8rem;
    line-height: 1.1;
    margin-top: 5px;
    text-transform: uppercase;
    color: var(--black);
}

/* Column 3: Hardware */
.gear-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2rem;
}

.brand-name {
    font-family: 'Antonio', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--black);
}

.helmet-block {
    margin-bottom: auto;
}

.setup-img {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 0.5rem;
    background-color: #e0e0e0;
}

.setup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.setup-nav {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: black;
    color: white;
    border-color: black;
}

.big-number {
    margin-top: 2rem;
    font-family: 'Antonio', sans-serif;
    font-size: 7rem;
    font-style: italic;
    font-weight: 900;
    -webkit-text-stroke: 2px var(--black);
    color: transparent;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.1));
    line-height: 0.8;
}

/* --- Mobile Fix for Stats --- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   9. SECTIONS: TRANSITION ZONE (ULTIMATE FIX)
   ========================================= */
.transition-zone {
    position: relative;
    width: 100%;
    
    
    height: 400vh; 
    
    background-color: var(--black);
    z-index: 10;
    overflow: hidden; 
}

.sticky-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* 1. BACKGROUND IMAGE */
.impact-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}
.impact-bg img {
    width: 100%; height: 100%; object-fit: cover;
}
.impact-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); 
}

/* 2. THE GIANT TEXT */
.impact-text-container {
    position: relative;
    z-index: 2;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.giant-scrolling-text {
    font-family: 'Antonio', sans-serif;
    font-size: 15vw;
    font-weight: 700;
    font-style: italic;
    color: var(--white);
    white-space: nowrap; 
    text-transform: uppercase;
    line-height: 0.8;
    transform: translateX(100vw); 
    will-change: transform;
}

/* 3. THE SHUTTERS (MASSIVE OVERKILL SIZING) */
.shutter-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
}

.shutter {
    position: absolute;
    /* BRUTE FORCE SIZING: 
       Make them 200% height and 120% width.
       This ensures the skew angle never exposes a corner gap 
       on any screen size (4k, Mobile, Ultra-wide).
    */
    top: -50%; 
    height: 200%; 
    width: 120%; 
    background-color: #111; 
    
    transform: skewX(-20deg);
    will-change: transform;
    
    /* Ensure borders are visible */
    box-sizing: border-box;
}

/* LEFT SHUTTER */
.left-shutter {
    /* Position it so the right edge lands roughly in the center */
    left: -55%; 
    border-right: 3px solid var(--white);
}

/* RIGHT SHUTTER */
.right-shutter {
    /* Position it so the left edge lands roughly in the center */
    right: -55%;
    border-left: 3px solid var(--white);
}

.shutter-grid {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* --- MOBILE SPECIFIC TWEAKS --- */
@media (max-width: 768px) {
    
    .shutter {
        /* Even wider on mobile to handle vertical screens */
        width: 150%; 
        left: -70%; /* Push left shutter further left */
    }
    
    .right-shutter {
        left: auto; /* Reset left property */
        right: -70%; /* Push right shutter further right */
    }

    .giant-scrolling-text {
        font-size: 8vh; /* Size based on height for mobile readability */
        white-space: normal;
        text-align: center;
        padding: 0 10px;
    }
}

/* =========================================
   10. SECTIONS: HORIZONTAL GALLERY
   ========================================= */
.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 400vh;
    background-color: var(--white);
    z-index: 5;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.horizontal-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: var(--white);
}

.horizontal-track {
    display: flex;
    gap: 5vw;
    padding-left: 5vw;
    padding-right: 10vw;
    width: max-content;
}

.gallery-card {
    position: relative;
    width: 60vh;
    height: 70vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 85%;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-meta-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.8rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.card-info {
    border-top: 1px solid #ddd;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-family: 'Antonio', sans-serif;
    font-size: 3rem;
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--black);
}

.card-details {
    text-align: right;
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-num {
    font-family: 'Antonio', sans-serif;
    font-size: 6rem;
    color: #f4f4f4;
    position: absolute;
    top: -2rem;
    right: -2rem;
    z-index: -1;
    line-height: 1;
}

/* --- Mobile Fix for Gallery --- */
@media (max-width: 768px) {
    .gallery-card {
        width: 85vw;
        height: 60vh;
    }

    .card-title {
        font-size: 2.5rem;
    }
}

/* =========================================
   11. SECTIONS: TELEMETRY (FOOTER)
   ========================================= */
.telemetry-section {
    position: relative;
    width: 100%;
    min-height: 85vh;
    background-color: #050505;
    color: var(--white);
    padding: 100px 4vw 40px;
    display: flex;
    flex-direction: column;
}

.telemetry-header {
    border-bottom: 1px solid #333;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.telemetry-title {
    font-family: 'Antonio', sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
    line-height: 1;
}

.live-indicator {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    color: #00ff00;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
    animation: blink 2s infinite;
}

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

.telemetry-grid {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    margin-bottom: 3rem;
}

.tele-card {
    flex: 1;
    position: relative;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: flex 0.4s ease, border-color 0.3s ease;
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    cursor: pointer;
}

.tele-card:hover {
    flex: 1.5;
    border-color: var(--white);
}

.tele-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: grayscale(100%) contrast(1.2);
    transition: opacity 0.4s, filter 0.4s, transform 0.6s;
    z-index: 0;
}

.tele-card:hover .tele-bg {
    opacity: 0.8;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.tele-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.tele-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #ccc;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    display: block;
}

.tele-value {
    font-family: 'Antonio', sans-serif;
    font-size: 2.5rem;
    color: var(--white);
    text-transform: uppercase;
    line-height: 0.9;
    display: block;
}

.tele-sub {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tele-card:hover .tele-sub {
    opacity: 1;
    transform: translateY(0);
}

.system-footer {
    border-top: 1px solid #222;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    color: #444;
}

/* --- Mobile Fix for Telemetry --- */
@media (max-width: 768px) {
    .telemetry-grid {
        flex-direction: column;
        height: auto;
    }

    .tele-card {
        min-height: 250px;
    }
}

/* =========================================
   12. NAVIGATION OVERLAY (MENU)
   ========================================= */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #020205;
    z-index: 2500;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Top Bar */
.nav-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.nav-brand-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.5px;
}

.brand-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
}

.brand-divider {
    color: #333;
    font-weight: 300;
    font-size: 1.2rem;
}

.brand-meta {
    font-weight: 400;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Close Button */
.nav-close-x {
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-close-x:hover {
    transform: rotate(180deg);
}

.x-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: background-color 0.3s;
}

.x-line:first-child {
    transform: rotate(45deg);
}

.x-line:last-child {
    transform: rotate(-45deg);
}

.nav-close-x:hover .x-line {
    background-color: #ff3333;
}

/* Menu Grid */
.nav-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

/* Left Column */
.nav-col-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-right: 4rem;
}

.nav-widgets-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-card-sm {
    background-color: #0e0e12;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    max-width: 380px;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-card-sm:hover {
    background-color: #18181f;
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.nc-img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.nc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.nav-card-sm:hover .nc-img img {
    transform: scale(1.1);
}

.nc-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nc-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nc-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
}

.nc-arrow {
    color: #666;
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}

.nav-card-sm:hover .nc-arrow {
    color: #fff;
    transform: translateX(10px) rotate(-45deg);
}

/* Right Column (Big Text) */
.nav-col-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding-left: 8%;
    padding-bottom: 3rem;
}

.nav-big-stack {
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.nav-big-stack:hover .big-type-link {
    opacity: 0.2;
    filter: blur(3px);
}

.big-type-link {
    font-family: 'Antonio', sans-serif;
    font-size: 13vh;
    line-height: 0.85;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
}

.nav-big-stack .big-type-link:hover {
    opacity: 1;
    filter: blur(0);
    transform: translateX(30px) skewX(-10deg);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.nav-sub-row {
    margin-bottom: 3rem;
    display: flex;
    gap: 2rem;
    justify-content: flex-start;
}

.nav-sub-row a {
    color: #888;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-sub-row a:hover {
    color: #fff;
}

.nav-icons-row {
    display: flex;
    gap: 2rem;
    justify-content: flex-start;
}

.social-icon {
    color: #666;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    transition: color 0.3s, transform 0.3s;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* --- Mobile Fix for Navigation --- */
@media (max-width: 900px) {
    .nav-overlay {
        padding: 2rem;
    }

    .nav-col-right {
        padding-left: 0;
        align-items: center;
        text-align: center;
    }

    .nav-big-stack {
        align-items: center;
    }

    .nav-col-left {
        display: none;
    }

    .nav-sub-row,
    .nav-icons-row {
        justify-content: center;
    }

    .big-type-link {
        font-size: 15vw;
    }
}

/* =========================================
   14. NATIVE SCROLL OVERRIDE (CRITICAL FIX)
   ========================================= */

/* When the body has class "story-page", we disable the smooth scroll mechanics */
body.story-page {
    height: auto !important; /* Let the browser calculate height */
    overflow-y: auto !important; /* Re-enable standard scrollbar */
    overflow-x: hidden;
}

body.story-page .smooth-content {
    position: relative !important; /* Stop it from being fixed */
    transform: none !important;    /* Stop JS from moving it */
    top: auto !important;
    left: auto !important;
}

/* Ensure the preloader still covers the screen initially */
body.story-page .preloader {
    position: fixed;
}