.video-placeholder-wrapper {
  position: relative;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--hd-radius);
  background: transparent;
  cursor: pointer;
  display: block;
  overflow: hidden;
}

/* Hero solar-system canvas fills the wrapper — absolutely positioned to work
   inside grid cells. Deep-space backdrop matches the WebGL scene background so
   there is no flash before the first frame paints. */
.home_hero_visual {
  background-color: var(--hd-color-accent); /* #000d14 deep space */
}

#hero-solar-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Static poster: shown on mobile, on no-WebGL, or on module-load failure.
   Hidden by default (the live canvas renders on desktop); revealed when the
   bootstrap sets a fallback/unavailable flag on the wrapper, OR on mobile. */
.home_hero_poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.home_hero_visual[data-solar-fallback="true"] #hero-solar-canvas,
.home_hero_visual[data-solar-unavailable="true"] #hero-solar-canvas {
  display: none;
}

.home_hero_visual[data-solar-fallback="true"] .home_hero_poster,
.home_hero_visual[data-solar-unavailable="true"] .home_hero_poster {
  display: block;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 84px;
  color: white;
  opacity: 0.92;
  /* dark halo keeps the white glyph legible over both dark and light thumbnails */
  text-shadow: 0 0 20px rgba(0,0,0,0.55);
  pointer-events: none;
}

.video-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
  overscroll-behavior: contain;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
}

.video-modal video {
  width: 100%;
  border-radius: 12px;
}

.video-modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(0,0,0,0.75);
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.video-modal-bg {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .video-play-button {
    transition: none;
  }
}

@media screen and (max-width: 767px) {
  .video-placeholder-wrapper {
    aspect-ratio: 4 / 3;
    min-height: 18rem;
  }

  /* Mobile hero: the grid has no fixed 50rem min-height here, so give the visual
     an intrinsic aspect ratio. The poster shows by default (instant first paint,
     works with no JS); once the bootstrap brings the WebGL scene up it sets
     [data-solar-active] and we swap the poster for the live, interactive canvas. */
  .home_hero_visual {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
  .home_hero_visual .home_hero_poster {
    display: block;
  }
  .home_hero_visual #hero-solar-canvas {
    display: none;
  }
  .home_hero_visual[data-solar-active="true"] .home_hero_poster {
    display: none;
  }
  .home_hero_visual[data-solar-active="true"] #hero-solar-canvas {
    display: block;
  }
}

@media screen and (max-width: 479px) {
  .video-placeholder-wrapper {
    aspect-ratio: 1;
  }

  .video-play-button {
    font-size: 64px;
  }
}
