/* Phase 10: Hero section background media (image + video + overlay) */

/* Media container — fills the entire hero section */
.cl-hero__bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Full-bleed background image */
.cl-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Full-bleed background video (desktop) */
.cl-hero__bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video poster / mobile fallback image */
.cl-hero__bg-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* hidden on desktop, shown on mobile via media query */
  object-position: center;
}

/* Overlay for contrast (colour + opacity set via inline style) */
.cl-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Ensure hero content sits above media and overlay */
.cl-hero__bg-media ~ *,
.cl-hero__overlay ~ * {
  position: relative;
  z-index: 10;
}

/* Ensure the section itself is a positioning context */
.cl-hero--bg-image,
.cl-hero--bg-video {
  position: relative;
}

/* ── Mobile video fallback ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hide video on mobile — prevents autoplay and download */
  .cl-hero__bg-video {
    display: none;
  }
  /* Show poster image instead */
  .cl-hero__bg-poster {
    display: block;
  }
}

@media (min-width: 769px) {
  /* Explicitly hide poster on desktop */
  .cl-hero__bg-poster {
    display: none;
  }
}
