/* ==========================================================================
   Hero Three.js Scroll Animation — Layout & Canvas Styles
   Dedicated CSS for the scroll-pinned image-sequence hero section
   ========================================================================== */

/* The outer container that provides the scroll distance */
#hero-scroll-container {
    position: relative;
    width: 100%;
    background-color: #000000;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* The sticky section that stays in viewport while scrolling */
.hero-sticky {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 75px;
    /* Clean breathing room below fixed header on desktop */
    padding-bottom: 20px;
    background-color: #000000;
}
/* Pure deep red ambient radial gradient (No grid lines or circles, matching About Us glow tone) */
.hero-sticky::before {
    content: '';
    position: absolute;
    left: -8%;
    bottom: -15%;
    width: clamp(480px, 58vw, 880px);
    height: clamp(440px, 55vh, 750px);
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 65%, rgba(175, 14, 28, 0.85) 0%, rgba(125, 8, 20, 0.52) 35%, rgba(70, 4, 12, 0.22) 58%, rgba(0, 0, 0, 0) 80%);
    filter: blur(55px);
    pointer-events: none;
    z-index: 1;
    animation: heroAmbientBreathe 7s ease-in-out infinite alternate;
}

/* Secondary futuristic top-right backlight aura for depth */
.hero-sticky::after {
    content: '';
    position: absolute;
    right: 5%;
    top: 5%;
    width: clamp(350px, 45vw, 650px);
    height: clamp(350px, 45vh, 600px);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(200, 16, 46, 0.16) 0%, rgba(140, 10, 30, 0.08) 45%, transparent 70%);
    filter: blur(65px);
    pointer-events: none;
    z-index: 1;
    animation: heroAuraFloat 9s ease-in-out infinite alternate;
}

@keyframes heroAmbientBreathe {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.82;
    }
    100% {
        transform: translate3d(25px, -18px, 0) scale(1.12);
        opacity: 1;
    }
}

@keyframes heroAuraFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.95);
        opacity: 0.6;
    }
    100% {
        transform: translate3d(-30px, 20px, 0) scale(1.15);
        opacity: 0.95;
    }
}

/* Hero Three.js Canvas Container */
#hero-three-container {
    position: relative;
    width: 100%;
    height: 60vh; /* Default height for smaller screens, overridden by flex on desktop if needed, or by media queries */
    z-index: 1;
    background-color: transparent;
    background-image: url('../images/banner-frames/00001.png');
    background-position: 72% center;
    background-size: contain;
    background-repeat: no-repeat;
    overflow: visible;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-visual-col {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #hero-three-container {
        height: calc(100vh - 85px); /* Clean viewport fit */
        max-height: 850px;
        overflow: visible;
    }
}

#hero-three-container canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Main Container inside hero — overlays on top of the Three.js canvas */
.hero-main-container {
    width: 100%;
    max-width: var(--container-max-width, 1440px) !important;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    padding-left: var(--container-padding-x, clamp(1.5rem, 5.5vw, 5.5rem)) !important;
    padding-right: var(--container-padding-x, clamp(1.5rem, 5.5vw, 5.5rem)) !important;
    pointer-events: none;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Interactive elements inside hero overlay remain clickable */
.hero-main-container a,
.hero-main-container button,
.hero-main-container input,
.hero-main-container [data-aos] {
    pointer-events: auto;
}

.hero-flex-row {
    min-height: calc(100vh - 100px);
    align-items: center;
}

/* Left text column */
.hero-text-col {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0 !important;
    position: relative;
    z-index: 3;
}

/* Loading indicator (hidden by request) */
.hero-frame-loader {
    display: none !important;
}

.hero-frame-loader.visible {
    display: none !important;
}

.hero-frame-loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 42, 42, 0.3);
    border-top-color: #ff2a2a;
    border-radius: 50%;
    animation: heroSpinLoader 0.7s linear infinite;
}

.hero-frame-loader-text {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.03em;
}

@keyframes heroSpinLoader {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Responsive & Mobile Stacking Layout
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .hero-sticky {
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: 55px;
        padding-bottom: 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    /* Content appears first on mobile */
    .hero-main-container {
        position: relative;
        z-index: 2;
        width: 100%;
        padding-left: 20px !important;
        padding-right: 20px !important;
        pointer-events: auto;
        order: 2;
        margin-bottom: 0;
    }

    .hero-flex-row {
        min-height: auto;
        flex-direction: column;
        align-items: center;
    }

    .hero-text-col {
        width: 100%;
        padding: 0 !important;
        text-align: center;
    }

    .hero-headline {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .hero-headline-red {
        font-size: clamp(1.75rem, 5vw, 2.4rem);
        margin-bottom: 4px;
        line-height: 1.08;
    }

    .hero-headline-white {
        font-size: clamp(1.5rem, 4.3vw, 2.1rem);
        line-height: 1.1;
    }

    .hero-subtitle-bar {
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 16px;
        font-size: 0.88rem;
    }

    .hero-btn-wrapper {
        text-align: center;
        margin-bottom: 0;
    }

    /* Animation container placed with balanced height budget on mobile/iPad */
    #hero-three-container {
        width: 100%;
        max-width: 480px;
        height: clamp(220px, 36vh, 340px);
        order: 1;
        margin: 0 auto 10px auto;
    }
}

@media (max-width: 575.98px) {
    .hero-sticky {
        padding-top: 50px;
        padding-bottom: 12px;
    }

    .hero-headline {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .hero-headline-red {
        font-size: clamp(1.45rem, 5.8vw, 1.95rem);
        margin-bottom: 3px;
    }

    .hero-headline-white {
        font-size: clamp(1.25rem, 5vw, 1.7rem);
    }

    .hero-subtitle-bar {
        margin-top: 8px;
        margin-bottom: 14px;
        font-size: 0.8rem;
    }

    #hero-three-container {
        width: 100%;
        max-width: 100%;
        height: clamp(200px, 34vh, 290px);
        margin: 0px auto 8px auto;
    }
}

/* Landscape Mobile & Short Height Viewports (prevents vertical cut-off) */
@media (max-width: 991.98px) and (orientation: landscape), (max-height: 520px) and (max-width: 991.98px) {
    .hero-sticky {
        padding-top: 50px !important;
        padding-bottom: 10px !important;
        height: 100vh !important;
        height: 100dvh !important;
    }

    .hero-flex-row {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100%;
    }

    .hero-text-col {
        width: 54% !important;
        text-align: left !important;
        order: 1 !important;
    }

    .hero-visual-col {
        width: 46% !important;
        order: 2 !important;
    }

    #hero-three-container {
        max-width: 100% !important;
        height: clamp(160px, 68vh, 260px) !important;
        margin: 0 auto !important;
    }

    .hero-headline {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }

    .hero-headline-red {
        font-size: clamp(1.2rem, 3.5vw, 1.6rem) !important;
        margin-bottom: 2px !important;
    }

    .hero-headline-white {
        font-size: clamp(1.05rem, 3vw, 1.35rem) !important;
    }

    .hero-subtitle-bar {
        justify-content: flex-start !important;
        margin-top: 6px !important;
        margin-bottom: 12px !important;
        font-size: 0.78rem !important;
    }

    .hero-btn-wrapper {
        text-align: left !important;
    }
}
