.hero {
  position: relative;
  min-height: clamp(460px, 48vw, 640px);
  overflow: hidden;
  isolation: isolate;
  background: #3f4c34;
  color: var(--color-white);
}

.hero__slides,
.hero__slide {
  position: absolute;
  inset: 0;
}

.hero__slide {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 900ms ease,
    visibility 900ms ease;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--focal-position, center);
}

.hero__slide.is-active .hero__image {
  animation: media-drift 18s ease-out forwards;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(15, 21, 13, 0.66) 0%,
    rgba(15, 21, 13, 0.3) 50%,
    rgba(15, 21, 13, 0.14) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), 1280px);
  min-height: inherit;
  margin-inline: auto;
  padding-top: 190px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero__eyebrow {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero__content h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 6.3rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
  overflow: hidden;
}

.hero__content h1 {
  animation: masked-type 900ms ease both;
}

.hero__lead {
  max-width: 38ch;
  margin: 22px 0 0;
  font-size: clamp(1.125rem, 1.7vw, 1.35rem);
  line-height: 1.6;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 28px;
  padding: 12px 26px;
  border: 1px solid var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.hero__cta:hover,
.hero__cta:active {
  background-color: var(--color-accent);
  color: var(--color-text);
}

.hero__control {
  position: absolute;
  top: 55%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(20, 25, 17, 0.12);
  color: #fff;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.hero__control--previous {
  left: 20px;
}

.hero__control--next {
  right: 20px;
}

.hero__control:hover,
.hero__control:active {
  background-color: rgba(20, 25, 17, 0.42);
}

.hero.is-single .hero__control {
  display: none;
}

@keyframes media-drift {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.06);
  }
}

@keyframes masked-type {
  from {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
  }

  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (max-width: 899px) {
  .hero {
    min-height: max(560px, 68svh);
  }

  .hero__content {
    width: min(calc(100% - 32px), 1280px);
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero__control--previous {
    left: 10px;
  }

  .hero__control--next {
    right: 10px;
  }
}

@media (max-width: 430px) {
  .hero__content h1 {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .hero__control {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide.is-active .hero__image,
  .hero__content h1 {
    animation: none;
  }
}
