/* motion.css — the site's motion policy, in one place.
 *
 * THIS SITE DOES NOT BRANCH ON prefers-reduced-motion.
 *
 * Every animation plays at full length for everyone. There are no
 * `@media (prefers-reduced-motion: reduce)` blocks left anywhere in
 * public/assets/css that WITHHOLD motion, and no matchMedia check for it in
 * public/assets/js — those helpers now return a constant false.
 *
 * Why: Windows reports that query for its ordinary "animation effects"
 * checkbox, which people untick for perceived speed rather than because motion
 * makes them unwell. It was matching a large share of this site's visitors and
 * silently withholding motion that had been deliberately designed. Removed as a
 * client decision.
 *
 * The trade-off is real and worth stating plainly: visitors who genuinely need
 * reduced motion no longer have a way to ask for it. If that is ever revisited,
 * `git log` has the removed blocks — they went in a single commit rather than
 * being scattered.
 *
 * WHY THIS FILE STILL CONTAINS THE MEDIA QUERY
 *
 * Removing our own blocks is not enough. Two vendored stylesheets carry their
 * own, and they load before ours:
 *
 *   animate.min.css   kills .animate__animated outright with !important
 *   bootstrap.min.css turns off form-control transitions, and gates
 *                     `scroll-behavior: smooth` behind no-preference
 *
 * So the only way to reach "always full motion" is to match their media query
 * and undo it. Everything below exists to CANCEL vendor behaviour, never to
 * withhold motion — which is why it does not contradict the policy above.
 *
 * Loaded from components/layout/default.blade.php AFTER the vendor sheets and
 * after the locale sheet. Order matters: move it earlier and the vendor rules
 * win again.
 *
 * Do not reintroduce a reduced-motion branch in one file only. Either the whole
 * site honours the preference again, or none of it does.
 */

@media (prefers-reduced-motion: reduce) {

    /* animate.css sets `animation-duration: 1ms !important` here, so matching
       its specificity is not enough — the override has to be !important too.
       The values are animate.css's own defaults, restored rather than invented,
       so anything that sets --animate-duration per element still works. */
    .animate__animated {
        animation-duration: var(--animate-duration, 1s) !important;
        transition-duration: var(--animate-duration, 1s) !important;
        animation-iteration-count: var(--animate-repeat, 1) !important;
    }

    /* Bootstrap blanks transitions on form controls and a few components. This
       hands them back the durations its own no-preference path uses. */
    .form-control,
    .form-control::file-selector-button,
    .form-select,
    .form-check-input,
    .form-range::-webkit-slider-thumb,
    .form-range::-moz-range-thumb,
    .btn,
    .fade,
    .collapsing,
    .accordion-button,
    .accordion-button::after,
    .carousel-item,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators [data-bs-target],
    .carousel-caption,
    .spinner-border,
    .spinner-grow,
    .progress-bar,
    .progress-bar-animated,
    .offcanvas,
    .modal.fade .modal-dialog,
    .toast,
    .nav-link,
    .navbar-toggler,
    .page-link,
    .list-group-item-action,
    .dropdown-toggle::after {
        transition-duration: .15s;
        transition-timing-function: ease-in-out;
    }

    .spinner-border,
    .spinner-grow,
    .progress-bar-animated {
        animation-duration: unset;
    }
}

/* Bootstrap only turns this on under `(prefers-reduced-motion: no-preference)`,
   which is exactly the branch this site does not want. Set unconditionally so
   in-page anchor links glide the same way for everyone. */
:root {
    scroll-behavior: smooth;
}
