/* Native section snapping keeps touch, wheel, keyboard, and scrollbar input. */
/* Intermediate containers must clip without becoming scroll containers. */
body.home-page {
  overflow-x: clip;
}

body.home-page .page {
  overflow: clip;
}

html.home-section-scroll {
  scroll-snap-type: y mandatory;
  scroll-padding-top: var(--home-header-height, 77px);
}

.home-section-scroll #one,
.home-section-scroll #two,
.home-section-scroll #three {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 0;
}

.home-section-scroll #two,
.home-section-scroll #three {
  min-height: calc(100svh - var(--home-header-height, 77px));
}

/* Keep the footer reachable after the final section. */
.home-section-scroll #site-footer {
  scroll-snap-align: end;
}

@media (prefers-reduced-motion: reduce) {
  html.home-section-scroll {
    scroll-behavior: auto;
    scroll-snap-type: y proximity;
  }
}

/* Prevent native snapping from competing with the eased section animation. */
html.home-section-scroll.is-section-transitioning,
html.home-section-scroll.is-media-changing {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

/* Fixed, discreet section markers; the visible dots stay smaller than the hit areas. */
body.home-page > .section-indicator {
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  width: 28px;
  transform: translateY(-50%);
  color: #ffffff;
}

body.home-page > .section-indicator[data-tone="dark"] {
  color: #191970;
}

.section-indicator a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.section-indicator a > span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

.section-indicator a[aria-current="location"] > span {
  width: 10px;
  height: 10px;
  opacity: 1;
}

body.home-page .section-indicator a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
  border-radius: 4px;
}

@media (max-width: 839px) {
  body.home-page > .section-indicator {
    right: 0;
    width: 24px;
  }

  .section-indicator a {
    width: 24px;
    height: 36px;
  }

  .section-indicator a[aria-current="location"] > span {
    width: 8px;
    height: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-indicator a > span {
    transition: none;
  }
}

/* Panel height changes must not pull the page toward an earlier snap point. */
html.home-section-scroll.is-media-changing {
  overflow-anchor: none;
}
