/* Hero-карусель головної. */

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: min(72dvh, 36rem);
  background: color-mix(in srgb, var(--color-accent-start) 12%, #fff);
  overflow: hidden;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.home-hero__slider {
  position: absolute;
  inset: 0;
}

.home-hero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.home-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.home-hero__slide a,
.home-hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero__slide img {
  object-fit: cover;
  object-position: center;
}

.home-hero__overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  min-height: min(72dvh, 36rem);
  padding:
    calc(2rem + var(--safe-top))
    var(--space)
    clamp(3.5rem, 8vw, 4.5rem);
  width: 100%;
  max-width: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.home-hero__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: none;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.home-hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: 0.05em;
  text-transform: none;
  max-width: min(36rem, 90%);
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.48);
}

.home-hero__brand--logo {
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  max-width: min(28rem, 92%);
}

.home-hero__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(3.5rem, 14vw, 7.5rem);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.35));
}

.home-hero__slogan {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  text-wrap: pretty;
}

.home-hero__cta {
  margin-top: 0.5rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.home-hero__controls {
  position: absolute;
  z-index: 4;
  left: var(--space);
  right: var(--space);
  bottom: 1rem;
  display: flex;
  justify-content: center;
}

.home-hero__dots {
  display: flex;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: min(16rem, 100%);
  width: 100%;
}

.home-hero__dots > li {
  flex: 1;
  min-width: 0;
}

.home-hero__dot {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 1.15rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-hero__dot-track {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: color-mix(in srgb, #fff 45%, transparent);
  overflow: hidden;
}

.home-hero__dot-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--btn-gradient);
}

.home-hero__dot.is-active .home-hero__dot-fill {
  animation: hero-dot-fill var(--hero-interval, 4s) linear forwards;
}

@keyframes hero-dot-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.home-hero__fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.85rem;
  min-height: min(55dvh, 28rem);
  padding: clamp(2rem, 6vw, 3.5rem) var(--space);
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--color-accent-start) 28%, transparent), transparent 50%),
    var(--color-bg);
}

@media (max-width: 767px) {
  .home-hero {
    min-height: min(62dvh, 28rem);
    border-radius: 0;
  }

  .home-hero__overlay {
    min-height: min(62dvh, 28rem);
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.12) 58%,
      transparent 100%
    );
    justify-content: flex-end;
  }

  .home-hero__brand {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .home-hero__logo {
    max-height: clamp(2.75rem, 18vw, 4.5rem);
  }
}

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

  .home-hero__dot.is-active .home-hero__dot-fill {
    animation: none;
    transform: scaleX(1);
  }
}
