.reveal-on-scroll {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.hero-backdrop {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #0d9488;
}

.hero-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Top-down gradient: subtle teal at the top, amber dominating from 30% down */
  /* background-image: 
    linear-gradient(to bottom, rgba(13, 148, 136, 0.22) 0%, rgba(217, 119, 6, 0.40) 30%, rgba(217, 119, 6, 0.40) 100%),
    url('/img/backdrop.webp'); */
  background-image: url('/img/backdrop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: backdropPan 28s ease-in-out infinite alternate;
  transform-origin: center center;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 38%);
  pointer-events: none;
  z-index: 1;
}

.hero-banner-image {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: heroBannerFadeUp 0.8s ease-out forwards;
  animation-delay: 120ms;
}

.hero-banner-graphic {
  width: 100%;
  display: block;
  aspect-ratio: 1904 / 650;
  background-image: url('/img/hero_banner.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

.hero-backdrop {
  line-height: 0;
  display: block;
}

.department-hero {
  min-height: 340px;
  line-height: normal;
  display: flex;
  align-items: center;
}

.department-hero-content {
  position: relative;
  z-index: 2;
}

.department-hero-compact {
  line-height: normal;
}

.department-hero-compact::before {
  background-image: linear-gradient(45deg, rgba(0, 65, 65, 0.9), rgba(145, 72, 0, 0.78)), url('/img/backdrop.webp');
  background-position: center;
  transform: none;
  animation: none;
}

@keyframes heroBannerFadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes backdropPan {
  0% {
    background-position: center;
    transform: scale(1);
  }
  50% {
    background-position: 52% 48%;
    transform: scale(1.03);
  }
  100% {
    background-position: 48% 52%;
    transform: scale(1.06);
  }
}
