/* ── Osmo-style shutter page transition + Lenis smooth scroll ── */

/* Lenis lets JS drive scroll; disable native smooth so they don't fight. */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* Transition overlay */
.pt {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: clip;
  opacity: 0;
}
.pt__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-flow: column nowrap;
  width: 100%;
  height: 100%;
}
.pt__shutter {
  flex: 1 0 0;
  min-height: 0;
  width: 100%;
  background-color: #3D2B56; /* brand aubergine */
  /* Hidden (revealed) resting state: collapsed off the top edge */
  transform: translateY(-50%);
  clip-path: polygon(0% 0%, 100% 0%, 100% -2%, 0% -2%);
  will-change: transform, clip-path;
}

/* Pre-paint "covered" state, applied synchronously when arriving via a
   transition so the new page never flashes uncovered. */
html.pt-cover .pt { opacity: 1; }
html.pt-cover .pt__shutter {
  transform: none;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

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