/* ============================================================
   MXUber motion layer — scroll reveals, ripple, micro-interactions.
   Activated by js/mx-motion.js. Loaded on every front page via
   layouts/header.blade.php. Reduced motion is always respected.
   ============================================================ */

/* Scroll reveal classes — activated by mx-motion.js */
.mx-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mx-reveal.mx-reveal-left { transform: translateX(-24px); }

.mx-reveal.mx-reveal-right { transform: translateX(24px); }

.mx-reveal.mx-reveal-scale { transform: scale(0.95); }

.mx-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .mx-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Ripple effect on CTAs */
.mx-ripple {
    position: relative;
    overflow: hidden;
}

.mx-ripple .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: mx-ripple-anim 0.6s ease-out;
    pointer-events: none;
}

@keyframes mx-ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Card hover lift */
.mx-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s ease;
}

.mx-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .mx-lift,
    .mx-zoom img { transition: none; }
    .mx-lift:hover { transform: none; }
    .mx-zoom:hover img { transform: none; }
}

/* Image hover zoom */
.mx-zoom { overflow: hidden; }

.mx-zoom img { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.mx-zoom:hover img { transform: scale(1.04); }

/* Smooth section anchor offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Focus ring for all interactive */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0A0A0A;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Focus ring must stay visible in dark mode (body.dark convention) */
body.dark a:focus-visible,
body.dark button:focus-visible,
body.dark input:focus-visible,
body.dark select:focus-visible,
body.dark textarea:focus-visible {
    outline-color: #FFFFFF;
}
