/* Hero carousel: фон свайпається, logo/title/CTA — фіксований overlay */

.hero-carousel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--header-h) - var(--safe-top));
  min-height: calc(100svh - var(--header-h) - var(--safe-top));
  color: var(--c-text-inverse);
  background: #1f1a17;
  overflow: hidden;
}

.hero-carousel__viewport {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.hero-carousel__viewport:focus-visible {
  outline: 2px solid rgba(253, 251, 247, 0.75);
  outline-offset: -4px;
}

.hero-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.hero-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  height: 100%;
}

.hero-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background-color: #1f1a17;
}

.hero-carousel__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.hero-carousel__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 72% 62% at 50% 42%,
      rgba(31, 26, 23, 0.12) 0%,
      rgba(31, 26, 23, 0.32) 52%,
      rgba(31, 26, 23, 0.68) 100%
    ),
    linear-gradient(
      180deg,
      rgba(31, 26, 23, 0.38) 0%,
      rgba(31, 26, 23, 0.14) 42%,
      rgba(31, 26, 23, 0.55) 100%
    );
}

.hero-carousel > .hero__content {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero-carousel > .hero__content .hero__cta,
.hero-carousel > .hero__content .hero__logo-wrap {
  pointer-events: auto;
}

.hero-carousel__hint {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: max(1.15rem, calc(var(--safe-bottom) + 0.65rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  width: max-content;
  max-width: calc(100% - var(--safe-left) - var(--safe-right));
  margin-inline: auto;
  padding-inline: 0.5rem;
  pointer-events: none;
}

.hero-carousel__hint .hero-carousel__dots,
.hero-carousel__hint .hero__scroll {
  position: static;
  left: auto;
  bottom: auto;
  pointer-events: auto;
}

.hero-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.2rem 0;
}

.hero-carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(253, 251, 247, 0.38);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 220ms ease;
}

.hero-carousel__dot.is-active {
  background: rgba(253, 251, 247, 0.95);
}

.hero-carousel__dot:focus-visible {
  outline: 2px solid rgba(253, 251, 247, 0.9);
  outline-offset: 3px;
}

/* Arrows — desktop only */

.hero-carousel__arrow {
  display: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(253, 251, 247, 0.28);
  border-radius: 50%;
  background: rgba(31, 26, 23, 0.42);
  color: rgba(253, 251, 247, 0.92);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  transition:
    background 220ms ease,
    border-color 220ms ease;
}

.hero-carousel__arrow--prev {
  left: max(0.85rem, var(--safe-left));
}

.hero-carousel__arrow--next {
  right: max(0.85rem, var(--safe-right));
}

.hero-carousel__arrow:hover,
.hero-carousel__arrow:focus-visible {
  background: rgba(31, 26, 23, 0.62);
  border-color: rgba(253, 251, 247, 0.5);
}

.hero-carousel__arrow:focus-visible {
  outline: 2px solid rgba(253, 251, 247, 0.85);
  outline-offset: 3px;
}

@media (min-width: 901px) {
  .hero-carousel__arrow {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .hero-carousel {
    min-height: calc(100svh - var(--header-h) - var(--safe-top));
  }

  .hero-carousel__hint {
    bottom: max(0.85rem, calc(var(--safe-bottom) + 0.5rem));
    gap: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__viewport {
    scroll-behavior: auto;
  }

  .hero-carousel__dot,
  .hero-carousel__arrow {
    transition: none;
  }
}
