/* Only a ready, decoded video owns a scroll rail. Static content is complete
   without the API, JavaScript, motion permission or a working media decoder. */
[data-scroll-video-story] {
  --p1-scroll-height: 100vh;
  --p1-scroll-travel: 130vh;
  position: relative;
}
@supports (height: 100svh) {
  [data-scroll-video-story] { --p1-scroll-height: 100svh; --p1-scroll-travel: 130svh; }
}
[data-scroll-video-mode="active"] {
  height: calc(var(--p1-scroll-height) + var(--p1-scroll-travel));
}
[data-scroll-video-mode="active"] > [data-scroll-video-sticky] {
  position: sticky;
  top: 0;
  height: var(--p1-scroll-height);
  min-height: 0;
}
.p1-media-frame > .p1-scroll-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.p1-media-frame > .p1-scroll-video[data-scroll-video-ready="true"] { opacity: 1; }
.p1-scroll-video-caption { display: none; }
[data-scroll-video-mode="active"] .p1-scroll-video-caption {
  display: grid;
  grid-template-columns: auto minmax(48px, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.p1-scroll-video-cue { color: var(--light-muted, #b9b8b2); font-size: 14px; line-height: 1.4; }
.p1-scroll-video-track { height: 2px; overflow: hidden; background: #45494a; }
[data-scroll-video-progress] { display: block; height: 100%; background: var(--accent, #c39b7e); transform: scaleX(0); transform-origin: left center; }
.p1-scroll-video-skip { min-height: 44px; white-space: nowrap; }
@media (max-width: 760px) {
  [data-scroll-video-story] { --p1-scroll-travel: 110vh; }
  @supports (height: 100svh) { [data-scroll-video-story] { --p1-scroll-travel: 110svh; } }
  [data-scroll-video-mode="active"] .p1-scroll-video-caption { gap: 12px; grid-template-columns: minmax(0, 1fr) auto; }
  .p1-scroll-video-cue { font-size: 12px; max-width: 28ch; }
  .p1-scroll-video-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  [data-scroll-video-mode="active"] { height: auto; }
  [data-scroll-video-mode="active"] > [data-scroll-video-sticky] { position: relative; height: auto; }
  [data-scroll-video-mode="active"] .p1-scroll-video-caption { display: none; }
}
