/* V4 video components: videoCard and scrollVideo (src/lib/components.js), behaviour in js/video.js. */

/* ---------- Video card ---------- */
.vcard { position: relative; margin: 0; perspective: 1000px; }
.vcard__frame {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(28, 25, 23, 0.45);
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.2s var(--ease-out);
}
.vcard__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.vcard__play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: 0 12px 30px -8px rgba(240, 85, 26, 0.6);
  transition: transform 0.2s var(--ease-out);
}
.vcard__play[hidden] { display: none; }
.vcard__play svg { width: 30px; height: 30px; margin-left: 4px; fill: currentColor; }
.vcard__play:hover { transform: scale(1.07); }
.vcard__play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.vcard + .media__caption, .vcard .media__caption { text-align: center; }

/* ---------- Scroll-linked scrubber ---------- */
.svideo__pin { aspect-ratio: var(--svideo-ratio, 16 / 9); overflow: hidden; border-radius: var(--r-lg); background: var(--ink); }
.svideo video { display: block; width: 100%; height: 100%; object-fit: cover; }
.svideo.is-scrub { height: var(--svideo-len, 300vh); }
.svideo.is-scrub .svideo__pin { position: sticky; top: 0; height: 100vh; height: 100svh; aspect-ratio: auto; }

@media (prefers-reduced-motion: reduce) {
  .vcard__frame, .vcard__play { transition: none; transform: none; }
}
