#hero {
  min-height: 100vh;
  padding: 0;
  background-color: var(--color-text);
}

#hero .container {
  max-width: none;
  width: 100%;
}

.hero-carousel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  color: var(--color-bg);
  background-color: var(--color-text);
  animation: hero-content-fade 0.36s ease both;
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20, 18, 17, 0.62) 0%, rgba(20, 18, 17, 0.22) 46%, rgba(20, 18, 17, 0.08) 100%),
    linear-gradient(0deg, rgba(20, 18, 17, 0.48) 0%, rgba(20, 18, 17, 0) 42%);
  pointer-events: none;
}

.hero-carousel__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-text);
  color: inherit;
  text-decoration: none;
}

.hero-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  animation: hero-image-fade 0.7s ease forwards;
}

.hero-carousel--empty {
  background:
    linear-gradient(90deg, rgba(20, 18, 17, 0.84) 0%, rgba(20, 18, 17, 0.68) 100%),
    var(--color-text);
}

.hero-carousel__content {
  position: absolute;
  top: clamp(5.5rem, 12vh, 7rem);
  left: clamp(1.25rem, 6vw, 5rem);
  bottom: clamp(7.5rem, 14vh, 10rem);
  z-index: 2;
  display: grid;
  align-content: end;
  gap: 0.65rem;
  width: min(46rem, calc(100% - 2.5rem));
}

.hero-carousel__meta,
.hero-carousel__counter {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-carousel__meta {
  color: rgba(246, 241, 235, 0.78);
}

.hero-carousel__title {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.25rem);
  font-weight: 400;
  line-height: 0.95;
  max-width: 15ch;
  overflow-wrap: anywhere;
}

.hero-carousel__title a {
  color: inherit;
  text-decoration: none;
}

.hero-carousel__title a:focus-visible,
.hero-carousel__media:focus-visible {
  outline: 3px solid rgba(246, 241, 235, 0.36);
  outline-offset: 4px;
}

.hero-carousel__controls {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.25rem, 5vw, 4rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hero-carousel__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(246, 241, 235, 0.46);
  border-radius: 50%;
  background: rgba(20, 18, 17, 0.18);
  color: var(--color-bg);
  cursor: pointer;
  font: inherit;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.hero-carousel__control:hover {
  background: rgba(246, 241, 235, 0.14);
  border-color: rgba(246, 241, 235, 0.82);
  transform: translateY(-1px);
}

.hero-carousel__control:focus-visible {
  outline: 3px solid rgba(246, 241, 235, 0.36);
  outline-offset: 4px;
}

.hero-carousel__counter {
  min-width: 4.7rem;
  color: rgba(246, 241, 235, 0.72);
  text-align: center;
}

@keyframes hero-image-fade {
  from {
    opacity: 0;
    transform: scale(1.025);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-content-fade {
  from {
    opacity: 0.88;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .hero-carousel__content {
    top: 5.75rem;
    bottom: 8.25rem;
  }

  .hero-carousel__title {
    font-size: clamp(2rem, 13vw, 3.4rem);
    max-width: 9ch;
  }

  .hero-carousel__controls {
    right: auto;
    left: 1.25rem;
    width: calc(100% - 2.5rem);
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__image {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-carousel__control {
    transition: none;
  }

  .hero-carousel {
    animation: none;
  }
}
