/**
 * MOVIXIT Performance + Motion Layer — 6.9.1
 *
 * Goals:
 * - compositor-friendly scroll reveals using transform/opacity only
 * - IntersectionObserver instead of per-scroll getBoundingClientRect loops
 * - browser-native content skipping for long pages
 * - no permanent will-change memory cost
 * - reduced-motion and no-JS safe defaults
 */

:root {
    --mvx-reveal-distance: 28px;
    --mvx-reveal-duration: 620ms;
    --mvx-reveal-ease: cubic-bezier(.22, 1, .36, 1);
    --mvx-reveal-stagger: 55ms;
}

/* Keep off-screen sections cheap to render without removing their content from the DOM. */
body.mvx-performance-ready main > section,
body.mvx-performance-ready .site-main > section,
body.mvx-performance-ready .mgm-homepage > section,
body.mvx-performance-ready .vi-homepage > section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 680px;
}

/* Reveal states are activated only after JS has initialized, so a blocked/failed
 * script never leaves important page content invisible. */
body.mvx-motion-ready .mgm-scroll-reveal,
body.mvx-motion-ready .vi-scroll-reveal,
body.mvx-motion-ready .mvx-auto-reveal {
    opacity: 0;
    transform: translate3d(0, var(--mvx-reveal-distance), 0);
    transition:
        opacity var(--mvx-reveal-duration) var(--mvx-reveal-ease),
        transform var(--mvx-reveal-duration) var(--mvx-reveal-ease);
    will-change: auto;
}

body.mvx-motion-ready .mgm-scroll-reveal.mgm-visible,
body.mvx-motion-ready .vi-scroll-reveal.vi-visible,
body.mvx-motion-ready .mvx-auto-reveal.mvx-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Cards reveal in a controlled cascade without creating a large animation queue. */
body.mvx-motion-ready .mvx-stagger > .mvx-auto-reveal {
    transition-delay: var(--mvx-reveal-delay, 0ms);
}

/* Avoid a permanent GPU layer on every card. */
body.mvx-motion-ready .mgm-scroll-reveal:not(.mgm-visible),
body.mvx-motion-ready .vi-scroll-reveal:not(.vi-visible),
body.mvx-motion-ready .mvx-auto-reveal:not(.mvx-revealed) {
    backface-visibility: hidden;
}

/* Subtle interaction polish: only animate properties that stay on the compositor. */
.mvx-motion-ready .mgm-card,
.mvx-motion-ready .mgm-gmi-card,
.mvx-motion-ready .mgm-step-card,
.mvx-motion-ready .mgm-testimonial-card,
.mvx-motion-ready .mvx-travel-service-card,
.mvx-motion-ready .feature-card,
.mvx-motion-ready .movixit-plan-card-v5 {
    transition-property: transform, box-shadow, border-color;
    transition-duration: 220ms;
    transition-timing-function: ease;
}

@media (hover:hover) and (pointer:fine) {
    .mgm-card:hover,
    .mgm-gmi-card:hover,
    .mgm-step-card:hover,
    .mgm-testimonial-card:hover,
    .mvx-travel-service-card:hover,
    .feature-card:hover,
    .movixit-plan-card-v5:hover {
        transform: translate3d(0, -3px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.mvx-motion-ready .mgm-scroll-reveal,
    body.mvx-motion-ready .vi-scroll-reveal,
    body.mvx-motion-ready .mvx-auto-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .mgm-card,
    .mgm-gmi-card,
    .mgm-step-card,
    .mgm-testimonial-card,
    .mvx-travel-service-card,
    .feature-card,
    .movixit-plan-card-v5 {
        transition: none !important;
        transform: none !important;
    }
}
