/* ============================================================
   91-back-to-top — fixed bottom-right "Back to top" button,
   present on every page via sections/14-footer.html. Shown once
   the visitor has scrolled (js/sections/91-back-to-top.js); with
   no JS it is simply always visible and "#top" still works.
   On phones it sits above the fixed Call | Book Now bar.
   ============================================================ */

.back-to-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 170; /* under the mobile bar (180) and nav overlay (199) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent-strong);
  border: 1px solid var(--line-bone);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
  transition: opacity 300ms var(--ease-out), visibility 300ms, transform 300ms var(--ease-out),
    background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--accent);
  color: var(--accent-on);
  border-color: transparent;
}

html.js .back-to-top:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

/* Hidden while the mobile nav overlay is open */
body.sec-01-nav-lock .back-to-top {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 820px) {
  .back-to-top {
    bottom: calc(56px + env(safe-area-inset-bottom) + 0.85rem);
    width: 42px;
    height: 42px;
  }
}

html.reduced-motion .back-to-top {
  transition: none;
}
