/*! SRH Hero v2 — image + video slider, no dependencies */
.srh-hero {
  --srh-height: clamp(560px, 88svh, 920px);
  --srh-gutter: clamp(12px, 3vw, 48px);
  --srh-pad: clamp(22px, 5vw, 72px);
  --srh-radius: 20px;
  --srh-dark: #14191c;
  --srh-tint: 0.2; /* override with data-tint="0.35" on the section or a slide */
  --srh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0 var(--srh-gutter) var(--srh-gutter);
  font-family: var(--title-font-family) !important;
}
.srh-hero * {
  box-sizing: border-box;
}

.srh-hero__stage {
  position: relative;
  height: var(--srh-height);
  overflow: hidden;
  border-radius: var(--srh-radius);
  background: var(--srh-dark);
  color: #fff;
  touch-action: pan-y;
  cursor: grab;
}
.srh-hero__stage:active {
  cursor: grabbing;
}

/* Slides: crossfade */
.srh-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1.2s var(--srh-ease),
    visibility 0s 1.2s;
}
.srh-hero__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.srh-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(8, 12, 14, 0.7), transparent 60%), rgba(8, 12, 14, var(--srh-tint));
}

/* Media: image / video / YouTube with slow zoom */
.srh-hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  transform: scale(1.08);
  transition: transform 10s linear;
}
.is-active .srh-hero__media,
.srh-hero__bg {
  transform: none; /* shared background video layer: no zoom */
}
.srh-hero__media picture {
  display: contents;
}
.srh-hero__media img,
.srh-hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.srh-hero__yt {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  border: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2); /* crops YouTube chrome */
  transition: opacity 0.8s;
}
/* Videos fade in over the poster image once playing */
.srh-hero__media video {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s;
}
/* Jarallax YouTube layer (built by JS). The transform makes Jarallax use absolute positioning, so the stage's rounded corners still clip it */
.srh-hero__jx,
.srh-hero__jx > div {
  position: absolute;
  inset: 0;
}
.srh-hero__jx {
  z-index: 1;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity 0.8s;
}
.srh-hero__jx.is-ready,
.srh-hero__yt.is-ready,
.srh-hero__media video.is-ready {
  opacity: 1;
}

/* Content */
.srh-hero__content {
  position: absolute;
  z-index: 2;
  bottom: 0;
  max-width: 980px;
  padding: 0 var(--srh-pad) calc(92px + 2vw);
}
.is-active .srh-hero__content > * {
  animation: srh-rise 1s var(--srh-ease) 0.3s both;
}
.is-active .srh-hero__content > :nth-child(2) {
  animation-delay: 0.42s;
}
.is-active .srh-hero__content > :nth-child(3) {
  animation-delay: 0.54s;
}

.srh-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
/* .srh-hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
} */

.srh-hero__title {
  margin: 0 0 30px;
  color: inherit;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 600;
  line-height: 0.98 !important;
  letter-spacing: -0.035em;
  text-wrap: balance !important;
}

/* Control bar (built by JS) */
.srh-hero__bar {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--srh-pad) clamp(20px, 3vw, 36px);
}
.srh-hero__tabs {
  display: flex;
  flex: 1;
  gap: clamp(12px, 2vw, 28px);
  margin-right: clamp(8px, 3vw, 40px);
}
.srh-hero__tab {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 10px 0 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s;
}
.srh-hero__tab:hover,
.srh-hero__tab[aria-current] {
  opacity: 1;
}
.srh-hero__num {
  margin-right: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.srh-hero__tab::after,
.srh-hero__fill {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}
.srh-hero__fill {
  z-index: 1;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
[aria-current] > .srh-hero__fill {
  transform: none;
}
.is-auto [aria-current] > .srh-hero__fill {
  animation: srh-fill var(--srh-dur) linear both;
}
.is-paused .srh-hero__fill {
  animation-play-state: paused !important;
}

.srh-hero__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: 0.3s;
}
.srh-hero__btn:hover {
  background: #fff;
  color: var(--srh-dark);
}
.srh-hero :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 767.98px) {
  .srh-hero {
    --srh-gutter: 12px;
    --srh-radius: 16px;
    --srh-height: clamp(520px, 82svh, 760px);
  }
  .srh-hero__content {
    padding-bottom: 92px;
  }
  .srh-hero__tab {
    padding: 14px 0;
    font-size: 0;
  } /* numbers + bars only; label kept for screen readers */
  .srh-hero__arrow {
    display: none;
  }
}

@keyframes srh-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}
@keyframes srh-fill {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .srh-hero__slide {
    transition: none;
  }
  .srh-hero__media {
    transform: none;
  }
  .is-active .srh-hero__content > * {
    animation: none;
  }
}
