/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-32px);
}

.reveal--left.is-visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(32px);
}

.reveal--right.is-visible {
  transform: translateX(0);
}

@media (max-width: 767px) {
  .reveal--left,
  .reveal--right {
    transform: translateY(20px);
  }

  .reveal--left.is-visible,
  .reveal--right.is-visible {
    transform: translateY(0);
  }
}

.reveal--scale {
  transform: scale(0.96);
}

.reveal--scale.is-visible {
  transform: scale(1);
}

/* Section divider grow */
.reveal-line {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--reveal-delay, 200ms);
}

.reveal-line.is-visible {
  transform: scaleX(1);
}

/* Hero visual — без анімацій */

@keyframes heroZoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: calc(var(--space-8) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeInHint 800ms cubic-bezier(0.4, 0, 0.2, 1) 900ms forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
  animation: scrollPulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes fadeInHint {
  to {
    opacity: 1;
  }
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.3;
    transform: scaleY(0.7);
  }
}

/* Modal entrance */
.modal {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.is-open .modal__backdrop {
  opacity: 1;
}

.modal__box {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition:
    opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.is-open .modal__box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

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

  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-line {
    transform: scaleX(1);
    transition: none;
  }

  .hero__bg-img {
    animation: none;
  }

  .hero__scroll-hint {
    opacity: 1;
    animation: none;
  }

  .hero__scroll-line {
    animation: none;
  }

  .modal,
  .modal__backdrop,
  .modal__box {
    transition: none;
  }

  .modal.is-open .modal__box {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}
