/* ==========================================================================
   Mega PURA film (views/partials/pura-film.ejs + public/js/film.js)
   Desktop: fills the first screen behind the nav, shrinks into a frame as you scroll.
   Phones: shows the whole 16:9 film so the on-screen text is never cropped.
   ========================================================================== */
.vf { position: relative; overflow: hidden; isolation: isolate; background: #050409; color: #fff; }
.vf__stage { position: relative; overflow: hidden; background: #050409; transform-origin: 50% 0; will-change: transform; }
.vf__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #050409; }
.js .vf__video::-webkit-media-controls { display: none; }
.vf__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(5 4 9 / .55) 0%, rgb(5 4 9 / 0) 22%, rgb(5 4 9 / 0) 70%, rgb(5 4 9 / .7) 100%); }

.vf__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter) clamp(16px, 3svh, 32px); }
.vf__label { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .8); }
.vf__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 0 rgb(255 77 109 / .6); animation: vfDot 2.4s ease-out infinite; }
.vf.is-paused .vf__dot { animation: none; background: rgb(255 255 255 / .5); }
@keyframes vfDot { 0% { box-shadow: 0 0 0 0 rgb(255 77 109 / .55); } 70%, 100% { box-shadow: 0 0 0 10px rgb(255 77 109 / 0); } }
.vf__ctrl { display: flex; gap: 8px; }
.vf__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .22); background: rgb(10 10 16 / .45); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .3s, border-color .3s, color .3s; }
.vf__btn:hover { background: #fff; color: #0b0b0d; border-color: #fff; }
.vf__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vf__i-play, .vf.is-paused .vf__i-pause { display: none; }
.vf.is-paused .vf__i-play { display: inline; }
.vf__i-on, .vf.is-loud .vf__i-off { display: none; }
.vf.is-loud .vf__i-on { display: inline; }
.no-js .vf__bar, .no-js .vf__cue { display: none; }

.vf__fine { margin-block: 0; padding-block: 12px 16px; font-size: 12px; color: rgb(255 255 255 / .55); }

/* Scroll cue: a thin line that drips down */
.vf__cue { position: absolute; left: 50%; bottom: clamp(16px, 3svh, 32px); z-index: 3; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; }
.vf__cue span { position: relative; display: block; width: 1px; height: 30px; overflow: hidden; background: rgb(255 255 255 / .2); }
.vf__cue span::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 12px; background: #fff; animation: vfCue 2s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes vfCue { from { transform: translateY(-12px); } to { transform: translateY(30px); } }

/* Desktop / tablet landscape: full first screen behind the nav */
@media (min-width: 900px) {
  .vf__stage { height: calc(100svh - var(--nav-h) - 50px); min-height: 440px; max-height: 1200px; }
  .vf__bar { padding-bottom: clamp(20px, 4svh, 40px); }
  .vf__label { font-size: 13px; }
  .vf.is-framed .vf__stage { border-radius: 0 0 28px 28px; }
  /* the page below no longer sits under the nav, so it needs less top space */
  .vf + span + section { padding-top: clamp(40px, 8svh, 96px) !important; }
}

/* Phones: whole 16:9 film under the nav */
@media (max-width: 899px) {
  .vf { padding-top: var(--nav-h); }
  .vf__stage { aspect-ratio: 16 / 9; margin-inline: 12px; border-radius: 18px; }
  .vf__btn--wide span { display: none; }
  .vf__btn--wide { padding: 0; width: 44px; }
  .vf__cue { display: none; }
  .vf__fine { padding-inline: 12px; }
  .vf__stage .vf__bar { position: absolute; padding: 0 10px 10px; }
  .vf__label { display: none; }
  .vf__ctrl { margin-left: auto; }
  .vf__btn { height: 38px; min-width: 38px; width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .vf__dot, .vf__cue span::after { animation: none; }
  .vf__stage { transform: none !important; }
}

/* Keep the browser's own video hover toolbar (Edge: Picture in picture / Enhance) away:
   this layer sits over the video and takes the pointer, so the video never sees a hover. */
.js .vf__shade { pointer-events: auto; z-index: 1; }
.vf__bar, .vf__cue { z-index: 3; }
