.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-carousel__slides {
  position: absolute;
  inset: 0;
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 0;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.85s;
}

.hero-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-carousel__link {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.9);
  transform: scale(1.08);
  transition: transform 5.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero-carousel__slide.is-active img {
  transform: scale(1);
}

.hero-carousel__controls {
  position: absolute;
  right: max(var(--sp-4), calc((100vw - var(--container-max)) / 2 + var(--sp-4)));
  bottom: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transform: translateY(50%);
  pointer-events: auto;
}

.hero-carousel__btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.88);
  color: var(--c-text);
  box-shadow: var(--shadow-md);
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.hero-carousel__btn svg {
  width: 22px;
  height: 22px;
}

.hero-carousel__btn:hover {
  background: #fff;
  color: var(--c-brand);
}

.hero-carousel__btn:active {
  transform: scale(0.96);
}

.hero-carousel__dots {
  position: absolute;
  right: max(var(--sp-4), calc((100vw - var(--container-max)) / 2 + var(--sp-4)));
  bottom: var(--sp-6);
  z-index: 4;
  display: flex;
  gap: var(--sp-2);
  pointer-events: auto;
}

.hero-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.45);
  transition: width var(--t-base), background var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.hero-carousel__dot.is-active {
  width: 28px;
  background: #fff;
}

@media (min-width: 768px) {
  .hero-carousel__btn {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 1023px) {
  .hero-carousel__controls {
    right: var(--sp-2);
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row;
    gap: var(--sp-1);
  }

  .hero-carousel__btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.92);
  }

  .hero-carousel__btn svg {
    width: 16px;
    height: 16px;
  }

  .hero-carousel__dots {
    right: 50%;
    bottom: var(--sp-2);
    transform: translateX(50%);
  }

  .hero-carousel__dot {
    width: 7px;
    height: 7px;
  }

  .hero-carousel__dot.is-active {
    width: 18px;
  }
}

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

  .hero-carousel__slide img {
    transform: none;
    transition: none;
  }
}
