/* Standalone pagination layer. The original site's visual styles stay separate.
 * Contract: main[data-fullpage] > .fp-page[data-page] > .fp-scroll.
 * Define --header-height on :root to match the fixed site header.
 * Without JavaScript / .fp-ready, the document remains a normal flowing page.
 */
[data-fullpage].fp-ready {
  --fp-index: 0;
  --fp-duration: 650ms;
  position: fixed;
  inset: var(--header-height, 84px) 0 auto;
  width: 100%;
  height: calc(100vh - var(--header-height, 84px));
  height: calc(100dvh - var(--header-height, 84px));
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
  isolation: isolate;
}

[data-fullpage].fp-ready > [data-page] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  transform: translate3d(0, calc((var(--fp-page-index) - var(--fp-index)) * 100%), 0);
  transition: transform var(--fp-duration) cubic-bezier(.65, 0, .25, 1);
  contain: layout paint;
  pointer-events: none;
}

[data-fullpage].fp-ready > [data-page].fp-active {
  pointer-events: auto;
}

[data-fullpage].fp-ready .fp-scroll {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #b7a16b #10271f;
}

/* Script focus moves the reading position, without drawing a box round a page.
 * Links, buttons, and form fields retain the original site's focus indicators.
 */
[data-fullpage].fp-ready .fp-scroll:focus { outline: none; }

[data-fullpage].fp-ready.fp-resizing > [data-page] {
  transition-duration: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  [data-fullpage].fp-ready > [data-page] { transition-duration: 0ms; }
  [data-fullpage].fp-ready .fp-scroll { scroll-behavior: auto; }
}
