/*
 * Turns off page-wide smooth scrolling.
 *
 * `cloudcard.min.css` sets `html { scroll-behavior: smooth }` in its base reset,
 * and `public-signature-v1.css` sets it again. Both are vendored and never
 * hand-edited, so the correction lives here and is loaded after them.
 *
 * ## What it was doing
 *
 * The landing page is 18,105px tall on a 375px-wide viewport. With smooth
 * scrolling on `html`, *every* programmatic scroll animates across that whole
 * distance — a nav link to `#features`, the browser restoring your position on
 * back, a reload landing mid-page. Measured on the built app: a `scrollTo` to
 * y=8898 read 0, 0, 0, 102, 102, then 8898 — a second and a half of the page
 * flying through every section on its own, which on a phone reads as the page
 * scrolling by itself.
 *
 * Next warns about this rule for the same reason (it breaks scroll restoration
 * between navigations), and `scripts/beta-ui.mjs` had that warning in its
 * ignore list — so the suite was suppressing the one console message that named
 * the bug. That entry is now scoped to say so.
 *
 * ## Anchors still animate
 *
 * `app.js`'s `setupSmoothAnchors()` intercepts every `a[href^="#"]` and calls
 * `scrollIntoView({ behavior: reducedMotion ? 'auto' : 'smooth' })` itself. That
 * is the better mechanism: it applies to the one gesture where gliding is
 * wanted, and it already honours `prefers-reduced-motion`, which the CSS
 * property does not.
 *
 * So this removes the animation from everything *except* a deliberate click on
 * an in-page link.
 */

html {
  scroll-behavior: auto;
}

/*
 * Belt and braces for people who ask the OS not to animate: if the rule above is
 * ever lost to a stylesheet-order change, this still holds.
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
