/* Lenis smooth scroll rules */
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;
}

/* Background container */
.airplane-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--color-bg) !important;
    background-image:
        radial-gradient(
            circle at 70% 20%,
            color-mix(in srgb, var(--color-bg-secondary) 16%, transparent) 0%,
            transparent 38%
        ),
        linear-gradient(
            135deg,
            var(--color-bg) 0%,
            var(--color-bg) 25%,
            color-mix(in srgb, var(--color-bg) 55%, var(--color-bg-secondary)) 62%,
            var(--color-bg-deep) 100%
        ) !important;
}

/* Keep preloader visible initially until critical frames load */
.preloader {
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   GLOBAL SECTION BLENDING SYSTEM
   ========================================================================== */

/* 1. Ensure the main page wrapper never blocks the continuous fixed background */
.page-wrapper {
    background-color: transparent !important;
}

/* 2. Global masking classes for seamless blending */
.global-bg-blend-bottom {
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
}

.global-bg-blend-edges {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%) !important;
}

/* Apply bottom fade to Hero background layers globally */
.classic-hero .hero-left-gradient,
.classic-hero .hero-aircraft-wrap,
.custom-aviation::after {
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Apply top/bottom fade to CTA background layers */
.ab-journey-cta-section .ab-journey-bg-gradient,
.ab-journey-cta-section .ab-journey-overlay,
.journey-cta-section .journey-bg-gradient,
.journey-cta-section .journey-overlay {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}
