/* SteriBrush Video Focus V5
   Loaded after site.css.
   Fixes:
   1) Dimmed hero copy reliably returns to 100% when the visitor moves into
      the left copy region or focuses a control inside it.
   2) "Show text" restores full copy immediately.
   3) YouTube background is overscanned so the lower caption-safe zone is
      cropped out of the visible hero.
*/

.video-hero .hero-content,
.video-hero .hero-shade {
  transition:
    opacity .85s cubic-bezier(.2,.7,.2,1),
    transform .85s cubic-bezier(.2,.7,.2,1),
    background .85s cubic-bezier(.2,.7,.2,1);
}

.video-hero .hero-content {
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* Normal post-intro state: keep the copy faintly visible. */
.video-hero.video-focus .hero-content {
  opacity: .10;
  transform: translateY(8px);
  pointer-events: auto !important;
}

/* Reliable 100% reveal via JS class plus CSS hover/focus fallback. */
.video-hero.video-focus.text-active .hero-content,
.video-hero.video-focus .hero-content:hover,
.video-hero.video-focus .hero-content:focus-within {
  opacity: 1 !important;
  transform: none !important;
}

/* Restore a stronger shade while the text is intentionally being read. */
.video-hero.video-focus.text-active .hero-shade,
.video-hero.video-focus:has(.hero-content:hover) .hero-shade,
.video-hero.video-focus:has(.hero-content:focus-within) .hero-shade {
  opacity: .62;
}

.video-hero.video-focus .hero-shade {
  opacity: .15;
}

.video-hero.video-only .hero-content {
  opacity: 0 !important;
  transform: translateY(12px);
  pointer-events: none !important;
}

.video-hero.video-only .hero-shade {
  opacity: .035 !important;
}

.video-layer {
  overflow: hidden !important;
}

/*
  YouTube captions are drawn inside the cross-origin iframe and cannot be
  hidden with page CSS. The current supported YouTube API also does not expose
  a force-captions-off option. For a decorative background player we crop the
  bottom caption-safe area by overscanning the iframe.
*/
.video-layer iframe#heroVideo,
.video-layer iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 177.77777778vh !important;
  min-width: 100% !important;
  height: 56.25vw !important;
  min-height: 100% !important;
  transform: translate(-50%, -52%) scale(1.36) !important;
  transform-origin: center center !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* Native MP4 mode does not need the YouTube caption crop. */
.video-layer video#heroVideo,
.video-layer video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 0 !important;
  pointer-events: none !important;
}

.hero-floating-controls {
  position: absolute;
  z-index: 14;
  left: max(20px, calc((100vw - var(--shell)) / 2));
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.floating-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(4,24,62,.78);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.floating-hero-btn[hidden] {
  display: none !important;
}

.floating-hero-btn:hover,
.floating-hero-btn:focus-visible {
  background: rgba(11,71,160,.95);
  transform: translateY(-1px);
}

.video-hero.video-focus .scroll-cue {
  opacity: .82;
}

.video-hero.video-only .scroll-cue {
  opacity: .92;
}

.quick-question[hidden],
.price-question[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero-floating-controls {
    left: 14px;
    right: 14px;
    bottom: 16px;
  }

  .video-hero.video-focus .hero-content {
    opacity: .12;
  }

  .video-layer iframe#heroVideo,
  .video-layer iframe {
    transform: translate(-50%, -52%) scale(1.44) !important;
  }
}

@media (max-width: 600px) {
  .video-hero.video-focus .hero-content {
    opacity: .14;
  }

  .video-hero.video-focus .hero-shade {
    opacity: .18;
  }

  .hero-floating-controls {
    gap: 7px;
  }

  .floating-hero-btn {
    min-height: 44px;
    padding: 0 12px;
    font-size: 11px;
  }

  .video-layer iframe#heroVideo,
  .video-layer iframe {
    transform: translate(-50%, -52%) scale(1.52) !important;
  }
}


/* V6: floating CTA behavior and improved mobile hero framing */
.hero-content .hero-actions,
.hero-content .actions,
.hero-content .cta-row,
.hero-content .button-group {
  transition: opacity .28s ease, transform .28s ease !important;
}

.hero-primary-actions-hidden {
  opacity: 0 !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
}

.hero-primary-actions-visible {
  opacity: 1 !important;
  transform: none !important;
}

.floating-hero-btn.opinion {
  background: rgba(255,255,255,.96);
  color: #0d2558;
  border-color: rgba(255,255,255,.96);
}

.floating-hero-btn.opinion:hover,
.floating-hero-btn.opinion:focus-visible {
  background: #ffffff;
  color: #0b2a66;
}

/* Desktop remains strong. */
.video-layer iframe#heroVideo,
.video-layer iframe {
  transform: translate(-50%, -52%) scale(1.32) !important;
}

/* Tablet: reduce crop a bit. */
@media (max-width: 900px) {
  .video-layer iframe#heroVideo,
  .video-layer iframe {
    width: 100% !important;
    height: 100% !important;
    transform: translate(-50%, -50%) scale(1.16) !important;
  }

  .video-layer video#heroVideo,
  .video-layer video {
    object-position: center center !important;
  }
}

/* Mobile: prioritize showing as much of the video as possible.
   If full-bleed framing is not possible, show more of the scene rather than over-cropping.
*/
@media (max-width: 600px) {
  .video-hero {
    min-height: 74svh;
  }

  .hero-floating-controls {
    left: 14px;
    right: 14px;
    bottom: 16px;
    gap: 8px;
  }

  .floating-hero-btn.opinion {
    order: 1;
  }

  .floating-hero-btn.sound {
    order: 2;
  }

  .floating-hero-btn.text-toggle {
    order: 3;
  }

  .video-layer {
    background: #08152f;
  }

  .video-layer iframe#heroVideo,
  .video-layer iframe {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    transform: translate(-50%, -50%) scale(1.06) !important;
  }

  .video-layer video#heroVideo,
  .video-layer video {
    object-fit: cover !important;
    object-position: center center !important;
  }
}
