.back-to-top {
  position: fixed;
  right: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 2.4vw, 32px);
  z-index: 30;
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green, #9a2f32);
  box-shadow: 0 12px 30px rgba(117, 36, 38, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green-dark, #752426);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(154, 47, 50, .28);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition-duration: .01ms; }
}
