/**
 * Hero Section - Video Projection
 * Ken Burns background + 3D cubes + hover effects
 */

.section-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
    z-index: 0;
}

/* Particles appear above hero content */
#global-particles {
    z-index: 1 !important;
}

/* ============================================
   MORPHING BACKGROUND WITH KEN BURNS
   ============================================ */
.hero-bg {
    display: none; /* Background removed */
}

.hero-bg__image {
    position: absolute;
    inset: -80px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: imageMorph 40s ease-in-out infinite;
}

/* Stagger each image's animation */
.hero-bg__image--0 {
    animation-delay: 0s;
}
.hero-bg__image--1 {
    animation-delay: 8s;
}
.hero-bg__image--2 {
    animation-delay: 16s;
}
.hero-bg__image--3 {
    animation-delay: 24s;
}
.hero-bg__image--4 {
    animation-delay: 32s;
}

@keyframes imageMorph {
    0% {
        opacity: 0;
        transform: scale(1.05) translate(0, 0);
    }
    5% {
        opacity: 1;
    }
    20% {
        opacity: 1;
        transform: scale(1.15) translate(-20px, -10px);
    }
    25% {
        opacity: 0;
        transform: scale(1.2) translate(-30px, -15px);
    }
    100% {
        opacity: 0;
        transform: scale(1.05) translate(0, 0);
    }
}

.hero-bg__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.7) 40%,
            rgba(0, 0, 0, 0.85) 70%,
            rgba(0, 0, 0, 0.95) 100%
        );
}

/* ============================================
   LOADER
   ============================================ */
.hero-loader {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hero-loader__bar {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { transform: scaleX(0); opacity: 0; }
    50% { transform: scaleX(1); opacity: 1; }
}

/* ============================================
   CONTENT
   ============================================ */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    pointer-events: none;
}

.hero-content > * {
    pointer-events: auto;
}

.hero-title {
    margin: 0 0 1.5rem;
    max-width: 600px;
}

.hero-title__line {
    display: block;
    font-family: 'Fira Sans', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.hero-description {
    max-width: 500px;
    margin: 0 0 2rem;
    font-family: 'Fira Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.hero-content__bottom {
    margin-top: 1rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    background: #fff;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.hero-cta svg {
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translateX(5px);
}

/* ============================================
   3D CANVAS
   ============================================ */
.hero-canvas {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 40%;
    z-index: 2;
    width: 60%;
    height: 100%;
    pointer-events: auto;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll span {
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        padding: 3rem;
    }

    .hero-canvas {
        left: 35%;
        width: 65%;
    }

    .hero-content__top {
        top: 3rem;
        left: 3rem;
        right: 3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-links {
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .hero-canvas {
        left: 25%;
        width: 75%;
        opacity: 0.6;
    }

    .hero-content {
        padding: 2.5rem;
    }

    .hero-title__line {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }
}

@media (max-width: 768px) {
    .section-hero {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }

    .hero-canvas {
        left: 0;
        width: 100%;
        opacity: 0.4;
    }

    .hero-content {
        padding: 1.5rem;
        justify-content: flex-end;
        padding-bottom: 6rem;
    }

    .hero-content__top {
        top: 2rem;
        left: 1.5rem;
        right: 1.5rem;
    }

    .hero-title {
        max-width: 100%;
    }

    .hero-title__line {
        font-size: clamp(2.25rem, 11vw, 3.5rem);
    }

    .hero-description {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .hero-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-link {
        font-size: 0.75rem;
    }

    .hero-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }

    .hero-scroll {
        bottom: 1.5rem;
    }

    .hero-scroll span {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
        padding-bottom: 5rem;
    }

    .hero-title__line {
        font-size: clamp(2rem, 13vw, 3rem);
    }

    .hero-description {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        padding: 0.75rem 1.25rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .hero-bg__image {
        animation: none;
        opacity: 0;
    }

    .hero-bg__image--0 {
        opacity: 1;
    }

    .hero-loader__bar {
        animation: none;
    }

    .hero-scroll {
        animation: none;
    }
}
