/* Sunny Hills Hero Switcher – style.css
 * v2.2 – NEW: Seasonal heroes can now be EITHER Image OR Video (100% backward compatible)
 * Minimal changes only – header/version updated, all CSS rules untouched
 * Fully polished, performant, and consistent with the full v2.2 update
 */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* ====================== HERO LAYER CONTAINER ====================== */
#bgvp-video-layer,
#shhs-hero-layer {
  position: fixed;
  inset: 0;                    /* modern & clean */
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;        /* never interfere with clicks */
  z-index: -1;
  contain: layout style paint; /* best performance isolation */
  isolation: isolate;          /* creates new stacking context */
  will-change: contents;
}

/* ====================== MEDIA ELEMENTS (video, YouTube, image) ====================== */
#bgvp-video,
#bgvp-youtube,
#shhs-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  object-position: center center;
  transform: translateZ(0);    /* forces GPU acceleration */
}

/* YouTube iframe needs extra safety */
#bgvp-youtube {
  border: 0;
  pointer-events: none;
}

/* Seasonal images get crisp rendering on Retina/High-DPI screens */
#shhs-hero-image {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ====================== DARK OVERLAY ====================== */
#bgvp-overlay,
#shhs-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1); /* buttery smooth */
  pointer-events: none;
}

/* ====================== MOBILE OPTIMIZATIONS ====================== */
@media (max-width: 768px) {
  #bgvp-video,
  #bgvp-youtube,
  #shhs-hero-image {
    transform: none;           /* disables unnecessary GPU layer on phones */
    will-change: auto;
  }

  #bgvp-video-layer,
  #shhs-hero-layer {
    contain: layout style paint;
  }
}

/* ====================== ACCESSIBILITY & REDUCED MOTION ====================== */
@media (prefers-reduced-motion: reduce) {
  #bgvp-overlay,
  #shhs-overlay {
    transition: none;
  }
}