/**
 * scroll-fix.css — v3.16.1
 * ---------------------------------------------------------------------------
 * FIX A — DESKTOP MOUSE WHEEL WAS DEAD
 *   mobile-polish.css declares the mobile drawer + overlay OUTSIDE any media
 *   query:
 *       .hl-mobile-menu    { display:block !important; position:fixed; ... }
 *       .hl-mobile-overlay { display:block !important; position:fixed; inset:0 }
 *   On desktop that leaves a full-viewport fixed layer (with backdrop-filter,
 *   i.e. its own compositor layer) sitting on top of the document, and a
 *   fixed 100svh drawer that keeps an `overflow-y:auto` scroller alive. Wheel
 *   events landing on those layers scroll *them* (they have nothing to
 *   scroll) instead of the page — the page looks frozen.
 *   Below: the overlay/drawer only exist as painted layers below 901px; above
 *   that they are display:none, so the document owns every wheel event again.
 *
 * FIX B — no residual scroll lock can survive on desktop.
 *
 * FIX C — smoother scrolling on both platforms: native momentum kept intact,
 *   smooth anchor jumps, no scroll-linked layout work.
 *
 * Loads after scroll-stability.css.
 */

/* ── A. DESKTOP: NO MOBILE-ONLY FIXED LAYERS ───────────────────────────── */
@media (min-width: 901px) {
  .hl-mobile-menu,
  .hl-mobile-overlay,
  .hl-sticky-cta {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  /* Nothing but the document may own the vertical scroll on desktop. */
  html,
  body {
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100% !important;
    position: static !important;
    top: auto !important;
    touch-action: auto !important;
  }
}

/* Below 901px the drawer only becomes interactive once it is open. */
@media (max-width: 900px) {
  .hl-mobile-overlay:not(.is-open) {
    pointer-events: none !important;
    visibility: hidden !important;
  }
  .hl-mobile-menu:not(.is-open) {
    pointer-events: none !important;
  }
}

/* ── B. SCROLL LOCK ONLY WHILE AN OVERLAY IS ACTUALLY OPEN ─────────────── */
body:not(.hl-menu-open):not(.hl-modal-open):not(.hl-lightbox-open):not(.glightbox-open) {
  overflow-y: visible !important;
  position: static !important;
  touch-action: auto !important;
}

/* ── C. SMOOTHER SCROLL ────────────────────────────────────────────────── */
html {
  /* Smooth anchor / scrollTo jumps, native inertia everywhere else. */
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overscroll-behavior-y: auto;
}

body {
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Keep the compositor free during a gesture: reveal animations are
   opacity + translate only, and never run on size properties. */
.reveal-up,
.reveal-left,
.reveal-right,
.hl-fade-in-up {
  transition-property: opacity, transform !important;
  transition-duration: 0.55s !important;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Inner scrollers (drawer, lightbox, carousels) shouldn't chain their
   overscroll to the page — that is what makes scrolling feel "sticky". */
.hl-mobile-menu,
.hl-lightbox,
.hl-testimonials__slider,
[data-scroller] {
  overscroll-behavior: contain;
}

/* The 360° viewer keeps its own drag gestures but must not swallow the
   page's vertical scroll. */
.hl-360-wrapper,
.hl-360-viewer,
.pnlm-container {
  touch-action: pan-y !important;
}

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