.np-hero-slider {
  position: relative;
}

.np-hero-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.np-hero-slider__track::-webkit-scrollbar { display: none; }

.np-hero-slider__track > * {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.np-hero-slider__controls {
  /* Covers the first screen of the slide only (the slide can be taller). */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(100svh, 67.5rem);
  z-index: 3;
  pointer-events: none;
}

/* On wide screens the content is taller than the 1080px cap: follow the real
   height of the slide so the dots stay at its bottom. */
@media (min-width: 100rem) { .np-hero-slider__controls { height: 100%; } }

.np-hero-slider__controls > * { pointer-events: auto; }

.np-hero-slider__btn--prev,
.np-hero-slider__btn--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.np-hero-slider__btn--prev { left: 1rem; }
.np-hero-slider__btn--next { right: 1rem; }

.np-hero-slider__nav {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Pill background: the controls can sit over the light mockup. */
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--np-color-border);
  border-radius: 999px;
  background: var(--np-color-bg);
}

.np-hero-slider__btn {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--np-color-ink-soft);
  border-radius: 50%;
  background: var(--np-color-bg);
  color: var(--np-color-ink);
  font: inherit;
  z-index: 3;
  cursor: pointer;
}

.np-hero-slider__btn:hover { border-color: var(--np-color-ink); }

.np-hero-slider__btn:focus-visible,
.np-hero-slider__dot:focus-visible {
  outline: 2px solid var(--np-color-accent, currentColor);
  outline-offset: 2px;
}

.np-hero-slider__dots {
  display: flex;
  gap: 0.25rem;
}

.np-hero-slider__dot {
  /* 24px hit area, small visible dot. */
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.np-hero-slider__dot::before {
  content: '';
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  border: 1px solid var(--np-color-ink-soft);
  background: transparent;
}

.np-hero-slider__dot[aria-current='true']::before {
  background: var(--np-color-ink);
  border-color: var(--np-color-ink);
}

@media (prefers-reduced-motion: no-preference) {
  .np-hero-slider__track { scroll-behavior: smooth; }
}

/* Focus ring inside the scroll area instead of around the whole hero. */
.np-hero-slider__track:focus-visible {
  outline: 2px solid var(--np-color-accent, currentColor);
  outline-offset: -4px;
}
