@media (pointer: fine) and (min-width: 721px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.11;
    mix-blend-mode: soft-light;
    background-image:
      radial-gradient(circle at 1px 1px, hsl(210 15% 10% / 0.18) 1px, transparent 0);
    background-size: 3px 3px;
  }
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --mx: 0;
  --my: 0;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1) translate3d(calc(var(--mx) * 18px), calc(var(--my) * 14px), 0);
  }

  50% {
    transform: scale(1.08) translate3d(calc(var(--mx) * 18px), calc(var(--my) * 14px - 20px), 0);
  }
}

.bg__shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.5;
  transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 14px), 0);
  animation: breathe 18s ease-in-out infinite;
}

.bg__shape--a {
  top: -20vh;
  left: -15vw;
  width: min(660px, 70vw);
  height: min(660px, 70vw);
  background:
    radial-gradient(circle at 30% 30%, hsl(164 55% 78% / 0.6), transparent 60%),
    radial-gradient(circle at 70% 60%, hsl(192 55% 78% / 0.5), transparent 65%);
  animation-delay: 0s;
}

.bg__shape--b {
  top: 10vh;
  right: -15vw;
  width: min(620px, 68vw);
  height: min(620px, 68vw);
  background:
    radial-gradient(circle at 30% 30%, hsl(28 70% 84% / 0.6), transparent 62%),
    radial-gradient(circle at 70% 70%, hsl(164 55% 82% / 0.5), transparent 68%);
  opacity: 0.45;
  animation-delay: -6s;
}

.bg__shape--c {
  bottom: -30vh;
  left: 20vw;
  width: min(740px, 80vw);
  height: min(740px, 80vw);
  background:
    radial-gradient(circle at 25% 35%, hsl(192 55% 80% / 0.5), transparent 60%),
    radial-gradient(circle at 75% 60%, hsl(164 55% 78% / 0.4), transparent 66%);
  opacity: 0.4;
  animation-delay: -12s;
}

.to-top {
  position: fixed;
  right: clamp(18px, 3vw, 30px);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 58px;
  height: 54px;
  padding: 0 18px 0 14px;
  border: 1px solid hsl(210 15% 82% / 0.8);
  border-radius: 999px;
  background: hsl(0 0% 100% / 0.94);
  box-shadow: 0 18px 42px hsl(210 20% 10% / 0.16);
  color: hsl(150 15% 18%);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .01em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), box-shadow .35s var(--ease-out);
}

.to-top::after {
  content: attr(aria-label);
  color: hsl(210 10% 24%);
  font-weight: 700;
  font-size: 12px;
}

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

.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity .78s cubic-bezier(.22, 1, .36, 1),
    transform .9s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (pointer: fine) and (hover: hover) {
  .panel:hover,
  .faq__item:hover,
  .gallery__item:hover,
  .cta__inner:hover,
  .page-hero__media:hover,
  .media-card:hover {
    transform: translateY(-4px);
    border-color: hsl(210 15% 78% / 0.88);
    box-shadow: 0 22px 64px hsl(210 20% 10% / 0.14);
  }

  .gallery__item:hover img,
  .page-hero__media:hover img,
  .media-card:hover img,
  .map:hover img {
    transform: scale(1.025);
  }

  .map:hover {
    border-color: hsl(210 15% 78% / 0.88);
    box-shadow: 0 22px 64px hsl(210 20% 10% / 0.14);
  }

  .to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 52px hsl(210 20% 10% / 0.2);
  }
}

@media (pointer: fine) and (hover: hover) and (min-width: 981px) {
  .site-header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: linear-gradient(180deg, hsl(0 0% 100% / 0.68), hsl(0 0% 100% / 0.48));
  }
}

@media (max-width: 720px), (pointer: coarse) {
  .bg {
    display: none;
  }

  .to-top {
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    gap: 0;
    box-shadow: 0 10px 24px hsl(210 20% 10% / 0.14);
  }

  .to-top::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
