/* Aqua.Tech HP-09 — ordered navigation and site-wide pointer polish */
:root {
  --aqua-header-offset: 6.25rem;
}

html {
  scroll-padding-top: var(--aqua-header-offset);
}

main > section[id] {
  scroll-margin-top: var(--aqua-header-offset);
}

body > header,
body > header.is-aqua-header-scrolled {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-link {
  position: relative;
  padding-block: 0.45rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #65e2d8, #89ceff);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.36);
  opacity: 0;
  transform: scaleX(0.28);
  transition:
    opacity 220ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--aqua-primary);
}

.aqua-mobile-nav-link {
  border: 1px solid transparent;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease;
}

.aqua-mobile-nav-link.is-active {
  color: var(--aqua-primary);
  border-color: rgba(137, 206, 255, 0.18);
  background: rgba(0, 180, 255, 0.09);
}

.aqua-pointer-glow {
  --aqua-pointer-screen-x: -20rem;
  --aqua-pointer-screen-y: -20rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 14rem;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(137, 206, 255, 0.13) 0%,
    rgba(0, 180, 255, 0.055) 34%,
    transparent 70%
  );
  opacity: 0;
  transform: translate3d(
    calc(var(--aqua-pointer-screen-x) - 50%),
    calc(var(--aqua-pointer-screen-y) - 50%),
    0
  );
  transition: opacity 320ms ease;
  will-change: transform, opacity;
}

.aqua-pointer-glow.is-active {
  opacity: 0.78;
}

/* The smaller global glow replaces the old hero-only 34rem light. */
.aqua-hero-pointer-light {
  display: none;
}

@media (hover: none), (pointer: coarse), (max-width: 767px) {
  .aqua-pointer-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link::after,
  .aqua-mobile-nav-link {
    transition: none !important;
  }

  .aqua-pointer-glow {
    display: none;
  }
}
