.hero--carousel {
  isolation: isolate;
}

.hero--carousel .hero-media {
  z-index: 0;
  inset: 0;
  opacity: 1;
  overflow: hidden;
}

.hero--carousel .hero-media::after {
  z-index: 2;
  background:
    linear-gradient(90deg, #050b10 0%, rgba(5, 11, 16, .94) 33%, rgba(5, 11, 16, .62) 61%, rgba(5, 11, 16, .26) 100%),
    linear-gradient(0deg, #050b10 0%, transparent 42%, rgba(5, 11, 16, .3) 100%);
}

.home-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  background: #050b10;
  transition: opacity .6s ease;
}

.home-carousel__slide.is-active {
  opacity: .72;
}

.hero--carousel .home-carousel__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.65) contrast(1.06) brightness(.68);
  transform: none;
  transition: none;
  will-change: auto;
}

.hero--carousel .home-carousel__slide.is-active img {
  transform: none;
}

.hero--carousel .home-carousel__slide:nth-child(1) img { object-position: center 58%; }
.hero--carousel .home-carousel__slide:nth-child(2) img { object-position: center 48%; }
.hero--carousel .home-carousel__slide:nth-child(3) img { object-position: center 52%; }
.hero--carousel .home-carousel__slide:nth-child(4) img { object-position: center 54%; }
.hero--carousel .home-carousel__slide:nth-child(5) img { object-position: center 48%; }

.hero--carousel .hero-grid,
.hero--carousel .hero-layout,
.hero--carousel .value-strip {
  z-index: 3;
}

.home-carousel__controls {
  position: absolute;
  z-index: 5;
  top: 106px;
  right: 4vw;
  display: flex;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(151, 207, 220, .18);
  border-radius: 999px;
  background: rgba(5, 11, 16, .56);
  backdrop-filter: blur(10px);
}

.home-carousel__controls button {
  width: 25px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(237, 246, 247, .32);
  cursor: pointer;
  transition: width .25s ease, background .25s ease, box-shadow .25s ease;
}

.home-carousel__controls button.is-active {
  width: 42px;
  background: #4edff5;
  box-shadow: 0 0 14px rgba(78, 223, 245, .7);
}

.home-carousel__controls button:focus-visible {
  outline: 2px solid #edf6f7;
  outline-offset: 5px;
}

@media (max-width: 650px) {
  .hero--carousel .hero-media {
    inset: 0;
    opacity: 1;
  }

  .hero--carousel .hero-media::after {
    background:
      linear-gradient(0deg, #050b10 0%, rgba(5, 11, 16, .82) 48%, rgba(5, 11, 16, .52) 100%),
      linear-gradient(90deg, rgba(5, 11, 16, .8), rgba(5, 11, 16, .2));
  }

  .home-carousel__slide.is-active {
    opacity: .56;
  }

  .hero--carousel .home-carousel__slide img {
    object-position: 62% center;
  }

  .home-carousel__controls {
    top: 82px;
    right: 18px;
  }

  .home-carousel__controls button {
    width: 17px;
  }

  .home-carousel__controls button.is-active {
    width: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-carousel__slide,
  .hero--carousel .home-carousel__slide img,
  .home-carousel__controls button {
    transition: none;
  }

  .hero--carousel .home-carousel__slide.is-active img {
    transform: scale(1.045);
    will-change: auto;
  }
}
