/* Homepage hero: keep the former MetaSlider layout and caption treatment. */
#slider.hero-carousel {
  height: clamp(400px, 56.25vw, 800px);
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.hero-carousel .splide__track,
.hero-carousel .splide__list,
.hero-carousel__slide {
  height: 100%;
}

.hero-carousel__slide {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}

.hero-carousel__media {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 60% 50%;
}

.hero-carousel .caption-wrap {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  justify-items: start;
  max-width: var(--wrapper-max-width);
  pointer-events: none;
}

.hero-carousel .caption {
  align-self: center;
  margin-bottom: 2rem;
  padding: 1rem 3rem 1rem var(--gap-fluid);
  background: rgba(0, 42, 94, 0.6);
  position: relative;
}

.hero-carousel .caption h1 {
  font-size: clamp(2.25rem, calc(1rem + 3.333vw), 4rem);
  color: var(--white);
  padding: 0 3rem 2rem;
  margin: 0;
  line-height: 1;
  text-wrap: balance;
  position: relative;
}

.hero-carousel .caption h1 strong {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.25rem, calc(0.893rem + 0.952vw), 1.75rem);
  font-weight: 300;
  text-transform: uppercase;
}

.hero-carousel .caption h1::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("img/slider-frame.svg") center/100% no-repeat;
  background-size: contain;
}

.hero-carousel__controls {
  position: absolute;
  z-index: 2;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  gap: 0.65rem;
}

.hero-carousel__progress-button {
  width: 0.9rem;
  height: 0.9rem;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
}

.hero-carousel__progress-button[aria-current="true"] {
  background: var(--white);
}

.hero-carousel__progress-button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  #slider.hero-carousel {
    height: clamp(400px, 52vw, 740px);
  }

  .hero-carousel .caption-wrap {
    position: absolute;
    right: 0;
    bottom: 3rem;
    left: 0;
  }

  .hero-carousel .caption {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .hero-carousel .caption {
    align-self: end;
    width: 100%;
    margin-bottom: 0;
  }

  .hero-carousel .caption h1::after {
    content: none;
  }

  .hero-carousel .caption::after {
    content: "";
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: url("img/slider-line.svg") center/100% no-repeat;
  }

  .hero-carousel__controls {
    right: 1rem;
    bottom: 1rem;
  }
}
