/* ==========================================================================
   FIXED BOTTOM FROSTED-GLASS PILL NAVIGATION DOCK (Alpha Tango Reference)
   ========================================================================== */

.dock {
  position: fixed;
  left: 50%;
  bottom: clamp(1.25rem, 3.5dvh, 2.5rem);
  z-index: 100;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100vw - 1.5rem), 344px);
  height: 62px;
  padding-inline: 18px;

  /* Dark semi-transparent frosted glass with subtle top specular sheen */
  background: linear-gradient(
    180deg,
    rgba(38, 38, 38, 0.56) 0%,
    rgba(12, 12, 12, 0.64) 100%
  );
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.48);

  /* Strict clipping so cursor light never leaks outside the rounded pill */
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

/* Native CSS Scrollspy activates automatically once multiple sections have real vertical height */
.dock.dock--scrollspy-native {
  scroll-target-group: auto;
}

/* Stage 4: Navigation pill dock rises last out of blur, releasing filter cleanly for frosted glass */
@media (prefers-reduced-motion: no-preference) {
  .dock {
    animation: dock-enter 0.8s var(--ease-brutalist) 1.55s both;
  }
}

@keyframes dock-enter {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-50%, 26px);
  }
  99% {
    opacity: 1;
    filter: blur(0px);
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate(-50%, 0);
  }
}

/* Neutral monochromatic cursor-tracking light clipped strictly inside the pill */
.dock__spotlight {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.14) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale3d(0.4, 0.4, 1);
  transition: opacity 0.35s var(--ease-standard);
  will-change: transform, opacity;
}

.dock__spotlight.is-active {
  opacity: 1;
}

.dock__list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  height: 100%;
  list-style: none;
}

.dock__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Clean borderless, backgroundless neutral light-colored links */
.dock__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-block-size: 44px;
  height: 100%;
  padding: 0 0.5rem 2px;
  background: transparent;
  border: none;
  border-radius: 9999px;
  color: rgba(235, 235, 235, 0.88);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    opacity 0.5s var(--ease-standard),
    color 0.35s var(--ease-standard);
}

.dock__link:hover {
  opacity: 0.5;
}

.dock__link:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: -4px;
}

/* Active link: pure bright neutral text (no blue fill or border; only the dot below is #0047FF) */
.dock__link:is(:target-current, .target-current) {
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 500;
}

.dock__link:is(:target-current, .target-current):hover {
  opacity: 0.72;
}

/* Small circular #0047FF dot — the ONLY blue element in the entire navigation dock */
.dock__indicator {
  position: absolute;
  left: 0;
  bottom: 13px;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.45s var(--ease-brutalist),
    opacity 0.3s var(--ease-standard);
  will-change: transform;
}

.dock__indicator.is-visible {
  opacity: 1;
}

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

  .dock__indicator,
  .dock__link {
    transition: none;
  }
}

@media (pointer: coarse) {
  .dock__spotlight {
    display: none;
  }
}

@media (max-width: 480px) {
  .dock {
    width: min(calc(100vw - 1.5rem), 336px);
    height: 60px;
    padding-inline: 14px;
    bottom: 1.25rem;
  }

  .dock__link {
    font-size: 0.84rem;
    padding: 0 0.25rem 2px;
  }

  .dock__indicator {
    bottom: 12px;
  }
}
