/* QBoosts component motion. The seasonal artwork, colour and layout stay intact.
   Entrances are a progressive enhancement; content never depends on JavaScript. */
:root {
    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --ease-premium: cubic-bezier(.16, 1, .3, 1);   /* scroll entrances: quick start, long settle */
    --motion-press: 140ms;
    --motion-control: 180ms;
    --motion-panel: 220ms;
}

html.motion-ready body.v2 [data-motion-reveal],
html body [data-motion-reveal],
html body [data-reveal],
html body .reveal,
html body .why2-mascot[data-reveal],
html body .why2-list [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
}
html body.home-v2 .v2-hero .v2-container > * { animation: none; }

/* Scroll entrances (storefront-motion.js). .motion-on is set only when JS runs and motion is
   allowed, so without it nothing is ever hidden. Waiting items are invisible until they rise in. */
html.motion-on body .motion-pending { opacity: 0; }
html.keyboard-input body .motion-pending { opacity: 1; }

/* Home dividers draw out from the centre, then the diamond pops in */
html.motion-on body.home-v2 #main > .v2-section.motion-divider-wait::before {
    transition: transform 1.2s var(--ease-premium);
}
html.motion-on body.home-v2 #main > .v2-section.motion-divider-wait::after {
    transition: transform .7s var(--ease-premium) .5s, opacity .3s ease .5s;
}
html.motion-on body.home-v2 #main > .v2-section.motion-divider-wait:not(.is-inview)::before {
    transform: translateX(-50%) scaleX(0);
}
html.motion-on body.home-v2 #main > .v2-section.motion-divider-wait:not(.is-inview)::after {
    transform: translate(-50%, -50%) rotate(45deg) scale(0); opacity: 0;
}

/* Short press feedback, a small arrow move, and stable labels. */
html body :is(.v2-btn, .nav-cta, .nav-cur, .nav-login, .mm-cta,
    .tc-buy-btn, .bcalc-pick-btn, .buy-now-btn, #mob-buy-btn, .co-btn-submit, .dp-btn) {
    transition: transform var(--motion-press) var(--ease-out),
        background-color var(--motion-control) ease,
        color var(--motion-control) ease, opacity var(--motion-control) ease;
}
html body :is(.v2-btn, .nav-cta, .nav-login, .bcalc-pick-btn, .buy-now-btn,
    #mob-buy-btn, .co-btn-submit, .dp-btn):active:not(:disabled) {
    transform: scale(.98);
    transition-duration: var(--motion-press);
}
html body :is(.category-btn, .faq-tab, .variant-option, .dc-btn, .qty-btn,
    .co-qty-btn, .bcalc-stepper button) {
    transition: transform var(--motion-press) var(--ease-out),
        background-color var(--motion-control) ease,
        border-color var(--motion-control) ease, color var(--motion-control) ease;
}
html body .category-btn:active,
html body .tc-buy-btn:active {
    transform: scale(.98) !important;
    transition-duration: var(--motion-press) !important;
}
html body :is(.v2-btn, .v2-link, .nav-cta, .bcalc-pick-btn, .tc-buy-btn) i {
    transition: transform var(--motion-control) var(--ease-out);
}

/* Cards move as one object, with no 3D tilt or animated shadow. */
html body.v2 .new-product-card {
    transition: transform var(--motion-control) var(--ease-out),
        border-color var(--motion-control) ease, background-color var(--motion-control) ease;
}
html body.v2 .new-product-card:active {
    transform: scale(.985) !important;
    transition-duration: var(--motion-press) !important;
}
html body :is(.v2-search, .hero-search-box) {
    transition: border-color var(--motion-control) ease, background-color var(--motion-control) ease;
}

/* The moving navigation highlight uses translation, rather than animated layout. */
html body #nav-backdrop {
    left: 0;
    top: 0;
    transition: transform 200ms var(--ease-out), opacity 160ms ease;
}
html body .nav-container {
    will-change: auto;
    animation-duration: 450ms;
    transition: transform 240ms var(--ease-out), opacity var(--motion-control) ease,
        background-color var(--motion-control) ease;
}
html body #currency-drop {
    transform-origin: right top;
    transition: opacity var(--motion-control) var(--ease-out),
        transform var(--motion-control) var(--ease-out), visibility 0s linear var(--motion-control);
}
html body #currency-drop.open {
    transition: opacity var(--motion-control) var(--ease-out),
        transform var(--motion-control) var(--ease-out), visibility 0s linear;
}

/* Mobile menu: arrive near the trigger and settle without overshooting. */
html body #mobile-menu {
    transform: translate3d(0, -8px, 0) scale(.98);
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
html body #mobile-menu.open {
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear;
}
html body #mobile-menu :is(.mm-link, .mm-cta) {
    transform: translate3d(0, -4px, 0);
    transition: opacity 160ms ease, transform 180ms var(--ease-out),
        background-color 160ms ease, color 160ms ease;
    transition-delay: 0s;
}
html body #mobile-menu.open :is(.mm-link, .mm-cta) {
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}

/* The accordion is the one interaction that needs a measured height transition. */
html body.v2 .faq-item {
    transition: border-color var(--motion-control) ease, background-color var(--motion-control) ease;
}
html body.v2 .faq-answer,
html body.v2 .faq-item.active .faq-answer {
    padding-bottom: 0 !important;
    transition: height 220ms var(--ease-out), opacity 160ms ease !important;
}
html body.v2 .faq-answer > :last-child { padding-bottom: 24px; }
html body.v2 .faq-icon { transition: transform 180ms var(--ease-out), background-color 160ms ease; }
html body.v2 .faq-answer[data-faq-instant],
html body.v2 .faq-item[data-faq-instant] .faq-icon { transition: none !important; }
html body .faq-category-content { animation: faqFadeIn 240ms var(--ease-out) forwards; }

/* Product covers retain their original icon turn, headline and progress loop.
   All visible Halloween effects keep their original motion. */
html.page-hidden body :is(.hw-sky, .hw-hero, .hwf, .why2-mascot, .mb) *,
html.page-hidden body :is(.hw-sky, .hw-hero, .hwf, .why2-mascot, .mb)::before,
html.page-hidden body :is(.hw-sky, .hw-hero, .hwf, .why2-mascot, .mb) *::before {
    animation-play-state: paused !important;
}

/* Scroll budget: the fixed bar must not re-blur the page behind it every frame.
   The nearly opaque seasonal surface preserves contrast without live backdrop work. */
html body .nav-container.nav-scrolled {
    background: rgba(var(--aura-panel-rgb), .96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* Invisible sections can rest without changing any visible animation. */
html body .decoration-idle,
html body .decoration-idle *,
html body .decoration-idle::before,
html body .decoration-idle::after,
html body .decoration-idle *::before,
html body .decoration-idle *::after { animation-play-state: paused !important; }

@media (hover: hover) and (pointer: fine) {
    html body.v2 .new-product-card:hover { transform: translateY(-3px); }
    html body :is(.v2-btn, .nav-cta, .bcalc-pick-btn):hover .fa-arrow-right,
    html body .new-product-card:hover .tc-buy-btn i { transform: translateX(3px); }
}
@media (hover: none), (pointer: coarse) {
    html body.v2 .new-product-card:hover,
    html body.v2 .new-product-card:hover .pcard-img-wrap .mb,
    html body :is(.v2-btn, .nav-cta, .v2-link, .bcalc-pick-btn, .tc-buy-btn):hover i { transform: none; }
}

/* Keyboard navigation has no entrance/hover travel to wait through. */
html.keyboard-input body :is(#mobile-menu, #mobile-menu .mm-link, #mobile-menu .mm-cta,
    #currency-drop, #nav-backdrop, .faq-answer, .faq-icon) { transition: none !important; }
html.keyboard-input body .faq-category-content { animation: none; }
html.keyboard-input body :is(button, [role="button"], .v2-btn, .v2-link, .nav-cta,
    .category-btn, .new-product-card, .buy-now-btn, .bcalc-pick-btn) {
    transform: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    html body .faq-category-content { animation: none; }
    html body :is(.v2-btn, .v2-link, .nav-cta, .nav-cur, .nav-login, .tc-buy-btn,
        .bcalc-pick-btn, .buy-now-btn, #mob-buy-btn, .co-btn-submit, .dp-btn,
        .category-btn, .faq-tab, .variant-option, .dc-btn, .new-product-card),
    html body :is(.v2-btn, .v2-link, .nav-cta, .bcalc-pick-btn, .tc-buy-btn) i {
        transform: none !important;
        transition-property: background-color, border-color, color, opacity !important;
        transition-duration: 120ms !important;
    }
    html body #mobile-menu, html body #currency-drop { transform: none !important; transition: none !important; }
    html body #mobile-menu :is(.mm-link, .mm-cta) { transform: none !important; transition: none !important; }
    html body #nav-backdrop { transition: none !important; }
    html body.v2 .faq-answer, html body.v2 .faq-item.active .faq-answer { transition: none !important; }
    html body .faq-icon { transition: none !important; }
    html body .mb :is(.mb-snow, .mb-progress span, .mb-bat, .mb-tile-in) { animation: none !important; }
    html body .mb-tile { animation: none; opacity: 0; }
    html body .mb-w { animation: none; opacity: 1; transform: none; }
}
