/* === Back to Top: estilos === */
.back-to-top {
  position: fixed;
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  outline: none;
  justify-content: center;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  /* Apariencia */
  background: color-mix(in oklab, #7396a5 85%, transparent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(115,150,165,.25);

  /* Oculto por defecto */
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity .25s ease,
    transform .25s ease,
    background-color .2s ease;
}

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

.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.back-to-top:hover {
  background: color-mix(in oklab, #7396a5 70%, transparent);
}

/* Modo claro/oscuro opcional */
@media (prefers-color-scheme: light) {
  .back-to-top {
    background: color-mix(in oklab, #7396a5 85%, transparent);
  }
}

/* Respeta usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
