.smooth-scroll-stack {
  position: relative;
  isolation: isolate;
}

.smooth-scroll__panel {
  position: relative;
  z-index: calc(var(--panel-index, 0) + 1);
  display: flex;
  min-height: auto;
  height: auto;
  flex-direction: column;
  justify-content: center;
}

.smooth-scroll__panel:not(:first-child) {
  overflow: visible;
}

@media (min-width: 1024px) {
  .smooth-scroll__panel {
    position: sticky;
    top: 0;
    min-height: 100vh;
  }

  .smooth-scroll__panel:not(:first-child) {
    overflow: hidden;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    box-shadow: 0 -8px 32px rgb(30 30 30 / 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smooth-scroll__panel {
    position: relative;
    min-height: auto;
  }

  .smooth-scroll__panel:not(:first-child) {
    border-radius: 0;
    box-shadow: none;
  }
}
