/* ==========================================================================
   GV TRADING - SCROLL-DRIVEN INTERACTIVE TIMELINE (V6 STYLE)
   ========================================================================== */

/* Design Tokens & CSS Variables (Exact Logo Palette) */
:root {
    --color-bg-light: #FFFFFF; /* Pure white backdrop */
    --color-bg-media: #FFFFFF; 
    
    --color-text-primary: #4A5056; /* Logo Deep Slate Gray */
    --color-text-secondary: #8A9096; /* Logo Muted Tint */
    --color-text-muted: #8A9096; /* Logo Muted Tint */
    --color-accent: #E30613; /* Logo Vibrant Red */
    --color-border: rgba(74, 80, 86, 0.08); /* Minimalist gray separator */
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-quick: 0.2s ease;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-primary);
    overflow-x: hidden;
    overflow-y: scroll;
    height: auto; /* Natural content-driven scroll height */
    width: 100vw;
    
    /* Premium visual optimization: Hide default global scrollbars but allow scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Timeline Split Layout Container */
.timeline-stub-container {
    display: flex;
    width: 100vw;
    height: auto; /* Height driven by scrolling narrative track */
    position: relative;
}

/* ==========================================================================
   LEFT TERMINAL - STICKY MEDIA STATION (50vw)
   ========================================================================== */
.media-station {
    position: sticky;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--color-bg-media);
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--color-border);
    z-index: 10;
    padding: 4rem;
}

.media-container {
    width: 90%;
    height: 85%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    will-change: transform;
}

.media-asset {
    position: absolute;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    /* Sophisticated hardware-accelerated crossfade transitions */
    transition: 
        opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
        transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.media-asset.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1.05); /* Margined scale to avoid edge gaps on panning */
    z-index: 5;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 80%);
    pointer-events: none;
    z-index: 3;
}

/* ==========================================================================
   RIGHT TERMINAL - SCROLLABLE TIMELINE TRACK (50vw)
   ========================================================================== */
.scroll-track {
    width: 50vw;
    height: auto; /* Expand naturally with scroll content */
    position: relative;
    padding: 4.5rem 5rem;
    display: block; /* Normal block flow to stack components */
    overflow-x: hidden;
    background-color: var(--color-bg-light);
    z-index: 20;
}

/* Floating Sticky Header inside Right Column flow */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.logo-container {
    display: flex;
    align-items: center;
}

.brand-logo {
    max-height: 45px; /* Increased by 12% for premium desktop presence */
    width: auto;
    display: block;
    object-fit: contain;
}

/* Massive Semi-Hidden Kinetic Typography */
.huge-back-letter {
    position: absolute;
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: calc(8rem + 4vw);
    color: rgba(74, 80, 86, 0.02); /* Faint gray tint from logo colors */
    pointer-events: none;
    z-index: 1;
    user-select: none;
    line-height: 0.8;
    letter-spacing: -0.05em;
}

.letter-import {
    top: 22vh;
    right: -2vw;
}

.letter-export {
    bottom: 30vh;
    right: -3vw;
}

/* ==========================================================================
   VERTICAL TIMELINE GRID & TRACKS
   ========================================================================== */
.timeline-wrapper {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 15vh; /* Reduced bottom padding for cohesive visual transition */
    margin-top: 1rem;
    margin-bottom: 0;
    z-index: 10;
}

/* Structural 1.5px vertical timeline line */
.timeline-line {
    position: absolute;
    left: 0px;
    top: 1.5rem;
    bottom: 2rem;
    width: 1.5px;
    background-color: var(--color-border);
    z-index: 1;
}

/* Dynamic timeline filler line */
.timeline-line-fill {
    position: absolute;
    left: 0px;
    top: 1.5rem;
    width: 1.5px;
    height: 0%; /* Animates on scroll */
    background-color: var(--color-accent);
    z-index: 2;
    transition: height 0.1s ease-out;
}

/* Step narrative containers */
.timeline-section {
    position: relative;
    margin-bottom: 9vh;
    display: flex;
    align-items: flex-start;
    opacity: 0.20; /* Default step opacity V6 */
    transform: scale(0.98);
    transform-origin: left center;
    transition: 
        opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
        transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 5;
}

.timeline-section:last-child {
    margin-bottom: 2rem;
}

/* Dynamic highlighting weights */
.timeline-section.active {
    opacity: 1.0;
    transform: scale(1.02);
}

/* Geometric Bullets on path */
.timeline-node {
    position: absolute;
    left: -2px; /* Center on vertical 1.5px line */
    top: 0.9rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-text-secondary);
    border: 1px solid var(--color-bg-light);
    transform: translateX(-50%);
    transition: 
        background-color 0.4s ease, 
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
        box-shadow 0.4s ease;
    z-index: 10;
}

.timeline-section.active .timeline-node {
    background-color: var(--color-accent);
    transform: translateX(-50%) scale(1.6);
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.4);
}

/* Typography elements */
.section-content {
    display: flex;
    flex-direction: column;
}

.step-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.step-title {
    /* Exact spec sizing: calc(2.4rem + 1vw); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; */
    font-size: calc(2.4rem + 1vw);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    transition: color 0.5s ease;
}

.timeline-section.active .step-title {
    color: var(--color-text-primary); /* Logo Deep Slate Gray (#4A5056) */
}

.step-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    max-width: 500px;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
/* ==========================================================================
   PREMIUM ENTERPRISE FOOTER SIGNATURE
   ========================================================================== */
.panel-footer {
    border-top: 1px solid var(--color-border);
    padding-left: 0;
    padding-right: 40px; /* Move contact block 40px inward */
    width: 100%;
    margin-top: 4rem;
    z-index: 100;
    background-color: var(--color-bg-light);
}

.footer-meta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 32px;
    padding-bottom: 32px;
}

.footer-credit {
    user-select: none;
}

.footer-contact-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

/* Unified Premium Footer Typography (13px, uppercase, 600 weight, color #8A9096) */
.footer-credit,
.footer-contact-block,
.footer-contact-block a {
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #8A9096 !important;
    line-height: 1.6 !important;
}

/* Base Clickable Contact Links Styles (Decoupled from default blue) */
.footer-contact-block a {
    text-decoration: none !important;
    transition: all .25s ease !important;
    display: inline-block;
    cursor: pointer;
    will-change: transform, color;
    outline: none;
}

.footer-contact-block a:visited {
    color: #8A9096 !important;
}

.footer-contact-block a:hover {
    color: #E30613 !important; /* Vibrant Logo Red */
    transform: translateY(-2px); /* Subtle luxury lift */
}

.brand-subtext {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ==========================================================================
   RESPONSIVE OUTFLOW (MOBILE RESTRUCTURE)
   ========================================================================== */
/* ==========================================================================
   REBUILT MOBILE TIMELINE ARCHITECTURE (MAX-WIDTH: 768px)
   ========================================================================== */
/* ==========================================================================
   REBUILT MOBILE TIMELINE ARCHITECTURE (MAX-WIDTH: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Reset base elements for native scrolling flow */
    body {
        overflow-x: hidden !important;
        overflow-y: scroll !important;
        height: auto !important;
        width: 100vw !important;
        background-color: #FFFFFF !important;
    }
    
    .timeline-stub-container {
        display: block !important;
        height: auto !important;
        position: relative !important;
        background-color: #FFFFFF !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .scroll-track {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        background-color: transparent !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* 2. SYSTEM A: FIXED VIEWPORT LAYER */
    /* Lock Header strictly at the very top */
    .panel-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: #FFFFFF !important;
        z-index: 9999 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 20px !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(74, 80, 86, 0.08) !important;
        transform: none !important;
        backdrop-filter: none !important;
        opacity: 1 !important;
    }

    .brand-logo {
        max-height: 32px !important;
        width: auto !important;
    }

    /* Lock the Image Viewer right below the header */
    .media-station {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 28vh !important; /* Reduced image stage height */
        background: #FFFFFF !important;
        z-index: 1000 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(74, 80, 86, 0.08) !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .media-container {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    .media-asset {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-height: 90% !important;
        width: auto !important;
        object-fit: contain !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.4s ease !important;
    }

    .media-asset.active {
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 5 !important;
    }

    .media-overlay {
        display: none !important;
    }

    /* 3. SYSTEM B: NATIVE SCROLL LAYER */
    /* Mandatory offset to start below the fixed image area */
    .timeline-wrapper {
        margin-top: calc(28vh + 60px) !important; /* Spacing aligned with 28vh stage height */
        padding-top: 30px !important; /* Safety padding-top to prevent clipping */
        padding-left: 50px !important; /* Text protection offset from line */
        padding-right: 20px !important;
        padding-bottom: 40px !important;
        position: relative !important;
        display: block !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Timeline Line placement */
    .timeline-line {
        position: absolute !important;
        left: 20px !important;
        width: 2px !important;
        top: 0 !important;
        bottom: 0 !important;
        background-color: var(--color-border) !important;
        z-index: 10 !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Mandatorily hide progress line fill */
    .timeline-line-fill {
        display: none !important;
    }

    /* Step Narrative normal document flow block styles */
    .timeline-section {
        min-height: 30vh !important; /* Reduced step height for compact story flow */
        margin-bottom: 24px !important; /* Tight layout gaps */
        display: block !important;
        position: relative !important;
        opacity: 1 !important; /* Force parent element opacity to 1 */
        transform: none !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }

    .timeline-section:last-of-type {
        margin-bottom: 0 !important;
    }

    /* 4. VISUAL STATES (INACTIVE VS ACTIVE) */
    .timeline-section .section-content {
        opacity: 1 !important; /* Ensure parent content wrapper has full opacity */
        transform: none !important;
        pointer-events: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Inactive step elements get 0.25 opacity */
    .timeline-section:not(.is-active) .step-label,
    .timeline-section:not(.is-active) .step-title,
    .timeline-section:not(.is-active) .step-desc {
        opacity: 0.25 !important;
        transition: opacity 0.4s ease !important;
    }

    /* Active step elements get 1.0 opacity */
    .timeline-section.is-active .step-label,
    .timeline-section.is-active .step-title,
    .timeline-section.is-active .step-desc {
        opacity: 1 !important;
        transition: opacity 0.4s ease !important;
    }

    /* Timeline bullet node coordinates */
    .timeline-node {
        width: 12px !important;
        height: 12px !important;
        min-height: 12px !important;
        border-radius: 50% !important;
        background-color: var(--color-text-secondary) !important; /* Neutral color */
        opacity: 0.25 !important; /* Inactive bullet node opacity */
        position: absolute !important;
        left: -30px !important; /* Centered perfectly on the timeline line */
        top: 6px !important;
        transform: translateX(-50%) !important;
        transition: background-color 0.4s ease, transform 0.4s ease, opacity 0.4s ease !important;
        z-index: 11 !important;
    }

    /* Active Node Emphasis */
    .timeline-section.is-active .timeline-node {
        background-color: #E30613 !important; /* Vibrant Red */
        transform: translateX(-50%) scale(1.2) !important;
        opacity: 1 !important;
    }

    /* Mobile Typography Details */
    .step-label {
        font-size: 11px !important;
        letter-spacing: 0.1em !important;
        font-weight: 700 !important;
        color: var(--color-text-secondary) !important;
    }

    .step-title {
        font-size: 22px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
        color: var(--color-text-primary) !important;
    }

    .step-desc {
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: var(--color-text-secondary) !important;
    }

    /* Hide background elements to reduce mobile noise */
    .huge-back-letter {
        display: none !important;
    }

    /* Tight Mobile Footer Stack with generous breathing room */
    .panel-footer {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        width: 100% !important;
        display: block !important;
        padding: 24px 20px 32px 20px !important; /* Spacing: 24px top, 32px bottom */
        margin-top: 40px !important;
        border-top: 1px solid var(--color-border) !important;
        background-color: #FFFFFF !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .footer-meta {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .footer-contact-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        text-align: center !important;
        order: 1 !important; /* Stack contacts sequence on top */
        padding: 0 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    .footer-credit {
        order: 2 !important; /* Stack credit at bottom */
        margin-top: 4px !important;
    }

    .footer-contact-block a {
        transition: opacity 0.2s ease !important;
        transform: none !important; /* Disable hover lifts on mobile */
    }

    .footer-contact-block a:hover {
        color: #8A9096 !important; /* Override desktop hover color shift */
        transform: none !important;
    }

    /* Mobile Interaction (active/tap feedback) */
    .footer-contact-block a:active {
        opacity: 0.7 !important;
    }
}
