/*
 * Animations Stylesheet — Maxvidel Theme
 *
 * Custom CSS animations and transitions used throughout the theme.
 * Includes:
 *   - Site header box-shadow transition (sticky scroll state)
 *   - Mobile nav panel slide-in transition
 *   - Desktop dropdown fade-in keyframe
 *   - .header--scrolled transition
 *   - Reduced motion: all animations/transitions disabled
 *
 * All animations respect the prefers-reduced-motion media query.
 *
 * Depends on: style.css, main.css, components.css, responsive.css
 *
 * @package Maxvidel
 * @since 1.0.0
 */

/* ========================================
   HEADER — sticky shadow transition
   ======================================== */

.site-header {
    transition:
        box-shadow var(--transition-normal);
}

.site-header.header--scrolled {
    box-shadow: var(--shadow-md);
}

/* ========================================
   MOBILE NAV — slide-in from right
   ======================================== */

.nav__mobile {
    transition: right var(--transition-normal);
}

.nav__overlay {
    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal);
}

/* ========================================
   DESKTOP DROPDOWN — fade + drop-in
   ======================================== */

@keyframes maxvidel-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav__menu > li:hover > .sub-menu,
.nav__menu > li:focus-within > .sub-menu {
    animation: maxvidel-dropdown-in 0.2s ease forwards;
}

/* ========================================
   REDUCED MOTION — Global override
   Users who prefer reduced motion get
   instant transitions on everything.
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
