/* Twin Horizon — Motion utilities (pair with animations.js) */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--transition-smooth),
    transform var(--transition-smooth);
  will-change: opacity, transform;
}

.reveal.is-inview {
  opacity: 1;
  transform: none;
}

.reveal--delay-1 {
  transition-delay: 0.08s;
}

.reveal--delay-2 {
  transition-delay: 0.16s;
}

.reveal--delay-3 {
  transition-delay: 0.24s;
}

.parallax {
  will-change: transform;
}

.media-zoom {
  overflow: hidden;
}

.media-zoom__img {
  width: 100%;
  height: 100%;
  transform: scale(1.04);
  transition: transform 1.1s var(--ease-smooth);
}

.media-zoom.is-inview .media-zoom__img {
  transform: scale(1);
}

.line-mask {
  overflow: hidden;
  display: block;
}

.line-mask__inner {
  display: block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-smooth);
}

.line-mask.is-inview .line-mask__inner {
  transform: none;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.anim-fade-rise {
  animation: fade-rise 0.8s var(--ease-smooth) both;
}

/* Shared scroll reveal (Section 2+) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s var(--ease-smooth),
    transform 0.85s var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-inview {
  opacity: 1;
  transform: none;
}

.reveal-on-scroll.is-inview .stat-card,
.reveal-on-scroll.is-inview .highlight-item {
  animation: fade-rise 0.7s var(--ease-smooth) both;
}

.reveal-on-scroll.is-inview .stat-card:nth-child(2),
.reveal-on-scroll.is-inview .highlight-item:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal-on-scroll.is-inview .stat-card:nth-child(3),
.reveal-on-scroll.is-inview .highlight-item:nth-child(3) {
  animation-delay: 0.16s;
}

.reveal-on-scroll.is-inview .stat-card:nth-child(4),
.reveal-on-scroll.is-inview .highlight-item:nth-child(4) {
  animation-delay: 0.24s;
}

/* Hero load entrance */
.hero-enter {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-enter-up 0.85s var(--ease-smooth) forwards;
}

.hero-enter--1 {
  animation-delay: 0.1s;
}

.hero-enter--2 {
  animation-delay: 0.2s;
}

.hero-enter--3 {
  animation-delay: 0.32s;
}

.hero-enter--4 {
  animation-delay: 0.44s;
}

/* Opacity-only enter — keeps backdrop-filter working on glass surfaces */
.hero-enter--glass {
  opacity: 0;
  animation: hero-enter-fade 0.9s var(--ease-smooth) forwards;
  animation-delay: 0.28s;
}

@keyframes hero-enter-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-enter-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-inview,
  .reveal-on-scroll,
  .reveal-on-scroll.is-inview,
  .media-zoom__img,
  .media-zoom.is-inview .media-zoom__img,
  .line-mask__inner,
  .line-mask.is-inview .line-mask__inner {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .reveal-on-scroll.is-inview .stat-card,
  .reveal-on-scroll.is-inview .highlight-item,
  .anim-fade-rise,
  .hero-enter,
  .hero-enter--glass {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
