/* A&B Productions — global scroll reveal (paired with ab-motion.js) */
html.ab-motion .ab-reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--ab-delay, 0ms);
    will-change: opacity, transform;
}

html.ab-motion .ab-reveal.ab-in {
    opacity: 1;
    transform: none;
}

/* Once revealed, release the compositor hint */
html.ab-motion .ab-reveal.ab-in {
    will-change: auto;
}

/* Slow drift on hero backgrounds (Elementor renders the bg on the section itself) */
html.ab-motion .ab-hero {
    overflow: hidden;
}

html.ab-motion .ab-hero::before {
    content: "";
    position: absolute;
    inset: -4%;
    background: inherit;
    background-size: cover;
    background-position: center;
    animation: ab-slow-pan 26s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

html.ab-motion .ab-hero > .elementor-container,
html.ab-motion .ab-hero > .elementor-background-overlay {
    position: relative;
    z-index: 1;
}

@keyframes ab-slow-pan {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.06) translate3d(-1%, -1%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.ab-motion .ab-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html.ab-motion .ab-hero::before {
        animation: none;
    }
}

/* Site header (Elementor header template with the ab-header class): overlays the hero, turns solid on scroll */
.elementor-location-header .ab-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
}

body.admin-bar .elementor-location-header .ab-header {
    top: 32px;
}

html.ab-scrolled .elementor-location-header .ab-header {
    background-image: none !important;
    background-color: rgba(20, 18, 16, 0.94) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}

@media (max-width: 782px) {
    body.admin-bar .elementor-location-header .ab-header {
        top: 46px;
    }
}
