.hero {
    height: max(800px, 50vh);
    width: 100%;
    position: relative;
    /* overflow: hidden;  <-- REMOVED to allow elements to overlap next section */
    /* Removed padding-top so it goes UNDER the fixed nav */
    /* background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000 100%); */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    /* Ensure it overlaps the following sections */
}

.hero-scene {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    transform: scale(0.6);
}

/* Base style for Wrappers */
.layer-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Base centering */
    transition: transform 0.1s ease-out;
    /* For JS Parallax */
    pointer-events: none;
    max-width: none;
}

.layer-wrapper img {
    display: block;
    max-width: none;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
    /* Will Change for performance */
    will-change: transform;
}

/* Organic Delays */
.layer-1 .floating {
    animation-delay: 0s;
}

.layer-2 .floating {
    animation-delay: 2s;
}

.layer-3-center .floating {
    animation-delay: 1s;
    animation-duration: 7s;
}

.layer-4 .floating {
    animation-delay: 3s;
}

.layer-5 .floating {
    animation-delay: 1.5s;
}

.layer-6 .floating {
    animation-delay: 4s;
}

/* Slow float for background clouds */
.layer-0 .floating {
    animation-duration: 10s;
    animation-delay: 0s;
}

/* Layer Specific Styles (Applied to Wrapper now) */

/* Layer 0: Nuages */
.layer-0 {
    z-index: 0;
    opacity: 0.8;
    margin-top: -220px;
    /* Reset to center base relative to wrapper default */
    top: 50%;
    left: 50%;
    /* No weird left margin/offset needed, just let the wrapper center it */
    margin-left: 0;
}

/* Layer 1: Joystick */
.layer-1 {
    z-index: 1;
    margin-left: -350px;
    margin-top: -200px;
}

/* Layer 3: CENTER ANCHOR */
.layer-3-center {
    z-index: 10;
}

/* Layer 2: Martien */
.layer-2 {
    z-index: 2;
    margin-left: 360px;
    margin-top: -170px;
}

/* Layer 4: Platform */
.layer-4 {
    z-index: 3;
    margin-top: 300px;
    margin-left: -160px;
}

/* Layer 5: Platform2 */
.layer-5 {
    z-index: 2;
    margin-top: 300px;
    margin-left: 320px;
}

/* Layer 6: joypad */
.layer-6 {
    z-index: 11;
    margin-top: 260px;
}

/* Layer 7: studio zarbix */
.layer-7 {
    z-index: 4;
    margin-top: 370px;
}

/* Responsive Scaling using Container Transform */
@media (max-width: 1400px) {
    .hero {
        height: 80vh;
    }

    .hero-scene {
        transform: scale(0.5);
    }
}


/* Responsive Scaling using Container Transform */
@media (min-width: 2000px) {
    .hero {
        height: 900px;
    }

    .hero-scene {
        transform: scale(0.8);
    }
}

/* Responsive Scaling using Container Transform */
@media (max-width: 1400px) {
    .hero {
        height: 50vh;
    }

    .hero-scene {
        transform: scale(0.5);
    }
}

@media (max-width: 768px) {
    .hero {
        height: 30vh;
    }

    .hero-scene {
        transform: scale(0.45);
    }
}

@media (max-width: 480px) {
    .hero {
        height: 40vh;
    }

    .hero-scene {
        transform: scale(0.3);
    }

}


@media (max-height: 800px) {
    .hero {
        height: min(50vh, 800px);
    }
}