
/* =========================
   HERO CAROUSEL
========================= */

.hero {
  position: relative;
  min-height: 590px;
  height: min(690px, 72vw);
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: #51463d;
}

/* Slides */

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.9s ease,
    visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Imagens */

.hero-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  transition: transform 6.5s ease;
}

.hero-slide.is-active .hero-slide-image {
  transform: scale(1);
}

/* Sobreposição */

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(35, 28, 25, 0.84) 0%,
      rgba(35, 28, 25, 0.58) 43%,
      rgba(35, 28, 25, 0.08) 100%
    ),
    linear-gradient(
      0deg,
      rgba(35, 28, 25, 0.25),
      transparent 45%
    );
}

/* Conteúdo */

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--container-width), calc(100% - 48px));
  margin-inline: auto;
  padding-top: 12px;
  color: white;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 22px 0 18px;
  font: 500 clamp(42px, 5.6vw, 72px)/1.08 var(--font-heading);
  letter-spacing: -0.035em;
}

.hero-content h1 em,
.hero-content h2 em {
  font-weight: 500;
  color: #e5b9a4;
}

.hero-content > p {
  max-width: 510px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 15px;
  line-height: 1.85;
}

/* Controles */

.hero-controls {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100% - var(--container-width)) / 2));
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 17px;
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: white;
  color: var(--color-terracotta);
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

/* Indicadores */

.hero-indicators {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 25px;
  border-radius: 8px;
  background: #e6c8b8;
}

/* Legenda */

.hero-caption {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100% - var(--container-width)) / 2));
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-counter {
  color: #e6c8b8;
}

/* Responsividade */

@media (max-width: 700px) {
  .hero {
    min-height: 570px;
    height: 78vh;
    max-height: 690px;
  }

  .hero-slide-image {
    object-position: 58% center;
  }

  .hero-slide::after {
    background:
      linear-gradient(
        90deg,
        rgba(35, 28, 25, 0.84),
        rgba(35, 28, 25, 0.35)
      ),
      linear-gradient(
        0deg,
        rgba(35, 28, 25, 0.3),
        transparent
      );
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(40px, 10vw, 58px);
  }

  .hero-content > p {
    max-width: 420px;
    font-size: 13px;
  }

  .hero-controls {
    left: 18px;
    bottom: 18px;
    gap: 12px;
  }

  .hero-arrow {
    width: 34px;
    height: 34px;
  }

  .hero-caption {
    right: 18px;
    bottom: 30px;
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .hero-caption span:last-child {
    display: none;
  }
}

/* Acessibilidade */

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide-image,
  .hero-arrow,
  .hero-dot {
    transition: none;
  }

  .hero-slide-image {
    transform: none;
  }
}
