/* vn-scroll.css - scroll-scrubbed frame player + lazy loops for the Next Gen Voice Notes landing.
   Uses the site's own custom properties when present (--vn-*), falls back to neutral values.
   NOTE for the page: overflow-x:hidden on html/body breaks position:sticky; use overflow-x: clip. */
.vn-scrub { position: relative; height: calc(var(--vn-scrub-vh, 380) * 1vh); margin: 0; }
.vn-scrub__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-rows: auto auto 1fr; align-items: center; justify-items: center; gap: 1rem; padding: 4.5rem 16px 1.5rem; box-sizing: border-box; overflow: hidden; }
.vn-scrub__stage { position: relative; width: min(1180px, 100%); aspect-ratio: 16 / 9; max-height: calc(100svh - 12rem); border-radius: 18px; overflow: hidden; background: var(--vn-surface, #f4f1ec); box-shadow: 0 30px 80px -30px rgba(20,20,40,.45), 0 0 0 1px rgba(20,20,40,.08); align-self: center; }
.vn-scrub__stage canvas, .vn-scrub__poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.vn-scrub__poster { transition: opacity .3s; }
.vn-scrub.is-ready .vn-scrub__poster { opacity: 0; pointer-events: none; }
.vn-scrub__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(20,20,40,.08); }
.vn-scrub__bar i { display: block; height: 100%; width: 100%; background: var(--vn-accent, #e8590c); transform: scaleX(0); transform-origin: 0 50%; }
.vn-scrub__captions { list-style: none; margin: 0; padding: 0; position: relative; width: min(900px, 100%); min-height: 5.6rem; order: -1; text-align: center; }
.vn-scrub__captions li { position: absolute; inset: 0; opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.vn-scrub__captions li.is-on { opacity: 1; transform: none; pointer-events: auto; }
.vn-scrub__captions .vn-cap-step { display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--vn-accent, #e8590c); margin-bottom: .25rem; }
.vn-scrub__captions h3 { margin: 0 0 .2rem; font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.15; color: var(--vn-ink, #1d1b2f); }
.vn-scrub__captions p { margin: 0; font-size: clamp(.95rem, 1.5vw, 1.1rem); color: var(--vn-muted, #55536a); }
.vn-scrub__dots { display: flex; gap: .5rem; justify-content: center; margin-top: .25rem; }
.vn-scrub__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(20,20,40,.18); transition: background .3s, transform .3s; }
.vn-scrub__dots i.is-on { background: var(--vn-accent, #e8590c); transform: scale(1.35); }

/* loops */
.vn-loopbox { position: relative; border-radius: 16px; overflow: hidden; background: var(--vn-surface, #f4f1ec); box-shadow: 0 24px 60px -28px rgba(20,20,40,.4), 0 0 0 1px rgba(20,20,40,.08); }
.vn-loop { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--vn-surface, #f4f1ec); }
.vn-loopbox--phone { max-width: 300px; margin-inline: auto; }
.vn-loopbox--phone .vn-loop { aspect-ratio: 9 / 19; }

/* reduced motion / save-data: a pinned stage becomes a normal stack of poster + all captions */
.vn-scrub.is-static { height: auto; }
.vn-scrub.is-static .vn-scrub__sticky { position: static; height: auto; padding-block: 2rem; overflow: visible; }
.vn-scrub.is-static .vn-scrub__stage { max-height: none; }
.vn-scrub.is-static .vn-scrub__poster { opacity: 1; }
.vn-scrub.is-static .vn-scrub__captions { min-height: 0; display: grid; gap: 1.25rem; order: 2; text-align: left; }
.vn-scrub.is-static .vn-scrub__captions li { position: static; opacity: 1; transform: none; }
.vn-scrub.is-static .vn-scrub__dots, .vn-scrub.is-static .vn-scrub__bar { display: none; }

@media (max-width: 700px) {
  .vn-scrub { height: calc(var(--vn-scrub-vh-m, 300) * 1vh); }
  .vn-scrub__sticky { padding: 4rem 12px 1rem; gap: .6rem; }
  .vn-scrub__stage { border-radius: 12px; max-height: none; }
  .vn-scrub__captions { min-height: 6.6rem; }
}
/* portrait (phone) footage */
.vn-scrub__stage.is-portrait { aspect-ratio: var(--vn-aspect, 9 / 19); width: auto; max-width: 100%; height: min(64svh, 140vw); max-height: none; }
.vn-scrub.is-static .vn-scrub__stage.is-portrait { height: auto; width: min(320px, 100%); }
@media (prefers-reduced-motion: reduce) { .vn-scrub__captions li { transition: none; } }
