/* Decorative hero media. The existing image remains the no-JS/error fallback. */
.masthead.has-hero-video {
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: rgba(55, 45, 38, 0.7);
}

.hero-video,
.hero-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  z-index: 0;
  opacity: 0;
  filter: sepia(0) saturate(1) contrast(1);
  transition: opacity 0.6s ease, filter 4s ease;
}

.hero-video.is-visible {
  opacity: 1;
}

.hero-video.is-sepia {
  filter: sepia(0.88) saturate(0.72) contrast(0.96);
}

.hero-poster {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hero-poster.is-visible {
  opacity: 1;
}

header.masthead.has-hero-video > .container {
  position: relative;
  z-index: 3;
}

@media (min-width: 992px) {
  .home-page #mainNav:not(.navbar-shrink) .navbar-brand,
  .home-page #mainNav:not(.navbar-shrink) .navbar-nav .nav-link {
    color: #fff;
  }
}

.hero-video-control {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  place-items: center;
}

.hero-video-control:hover,
.hero-video-control:focus-visible {
  color: #fff;
  background: rgba(0, 0, 0, 0.82);
}

.hero-video-control:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero-poster {
    transition: none;
  }

  .hero-video-control {
    display: none;
  }
}
