/* Scroll-controlled homepage panels: the incoming panel covers the previous one. */
.stacking-panels {
  position: relative;
  isolation: isolate;
}

.stacking-panels > .stacking-panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

.stacking-panels > .stacking-panel--current {
  /* Let content taller than the viewport finish its natural reading pass. */
  top: var(--stack-current-sticky-top, 0px);
  z-index: 1;
  transform-origin: 50% 0;
}

.stacking-panels > .stacking-panel--products {
  width: calc(100% - 8px);
  margin: clamp(48px, 4vw, 56px) 4px 0;
  border-radius: clamp(48px, 4vw, 64px) clamp(48px, 4vw, 64px) 0 0;
  box-shadow: 0 -18px 32px -24px rgb(16 19 51 / 42%);
}

.stacking-panels > .stacking-panel--products::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 84px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #d8def0;
  pointer-events: none;
}

.stacking-panels > .stacking-panel--people {
  width: calc(100% - 8px);
  margin: clamp(48px, 4vw, 56px) 4px 0;
  background: #f8f8ff;
  border-radius: clamp(48px, 4vw, 64px) clamp(48px, 4vw, 64px) 0 0;
}

.stacking-panels > .stacking-panel--people > .wrap {
  width: min(calc(100% - 24px), 1360px);
}

.stacking-panels > .stacking-panel--people::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 84px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #d8def0;
  pointer-events: none;
}

.stacking-transition-gap {
  height: clamp(48px, 4vw, 64px);
  pointer-events: none;
}

.stacking-panels > .stacking-panel--incoming {
  z-index: 2;
  box-shadow: 0 -18px 32px -24px rgb(16 19 51 / 42%);
}

/* The statistics follow the Statutory panel directly. Keep only a short reading
   gap after the panel's content instead of the generic section-top rhythm. */
.stacking-panels + .stat-showcase {
  padding-top: clamp(24px, 3vw, 48px);
}

@media (prefers-reduced-motion: reduce) {
  .stacking-panels > .stacking-panel--current {
    will-change: auto;
  }
}
