/* Shared background layers for the fixed homepage section stack */

html,
body {
    overscroll-behavior: none;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

#bg-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

#bg-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.48) 100%);
}

.bg-layer {
    position: absolute;
    inset: -3%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1.08);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.bg-layer.is-active {
    opacity: 1;
}

.full-screen-section.hero {
    z-index: 2;
}

#fixed-elements {
    position: relative;
    z-index: 2;
    isolation: isolate;
}

#fixed-elements .full-screen-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    background: transparent;
}

#fixed-elements .content-overlay {
    position: relative;
    z-index: 3;
    bottom: 0;
    padding: clamp(3.5rem, 10vh, 7rem) 0;
}

.js-sticky-ready #fixed-elements .bg-image {
    display: none;
}

#fixed-elements .col-lg-6 {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
    transform-origin: left bottom;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.testimonial-section,
footer {
    position: relative;
    z-index: 3;
}

.testimonial-section {
    height: auto;
    min-height: calc(100vh - var(--home-footer-height, 0px));
    min-height: calc(100svh - var(--home-footer-height, 0px));
    display: flex;
    align-items: center;
}

.testimonial-band {
    width: 100%;
    margin-top: 0;
}

footer {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .bg-layer {
        inset: 0;
        transform: translate3d(0, 0, 0) scale(1.02);
    }

    #fixed-elements .content-overlay {
        padding: 3.25rem 0;
    }

    #fixed-elements .col-lg-6 {
        transform: translate3d(0, 30px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-layer,
    #fixed-elements .col-lg-6 {
        transform: none !important;
    }
}
