/* Matteflux video backgrounds — v1.0
   One layer (.mf-bg) that fills its parent: poster image, video, overlay.
   Put it as the first child of any element with position: relative. */

.mf-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0a0b0e; /* matches the first frame, shown before anything loads */
}
.mf-section--hero   { min-height: 100svh; }
.mf-section--footer { min-height: clamp(360px, 33.34vw, 720px); }

@media (max-width: 767px) {
  .mf-section--footer { min-height: min(125vw, 100svh); } /* 4:5 */
}

.mf-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mf-bg__poster,
.mf-bg__poster img,
.mf-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mf-position, 50% 50%);
}

.mf-bg__video {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.mf-bg.is-playing .mf-bg__video { opacity: 1; }

.mf-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgb(8 8 9 / var(--mf-overlay, 0.2));
}

/* Visitors who ask for less motion get the still poster only. */
@media (prefers-reduced-motion: reduce) {
  .mf-bg__video { display: none; }
}
