/**
 * Site-wide animations — scroll reveals, hero entrance, micro-interactions
 * Prefix: anim-*
 */

/* ── Scroll reveal base states ── */
.anim-fade-up,
.anim-fade-in,
.anim-scale-up,
.anim-slide-left,
.anim-slide-right {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-duration: 0.75s;
  transition-delay: var(--anim-delay, 0ms);
  will-change: opacity, transform;
}

.anim-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition-property: opacity, transform;
}

.anim-fade-in {
  opacity: 0;
  transition-property: opacity;
}

.anim-scale-up {
  opacity: 0;
  transform: scale(0.94) translateY(12px);
  transition-property: opacity, transform;
}

.anim-slide-left {
  opacity: 0;
  transform: translateX(-32px);
  transition-property: opacity, transform;
}

.anim-slide-right {
  opacity: 0;
  transform: translateX(32px);
  transition-property: opacity, transform;
}

.anim-fade-in.is-visible {
  opacity: 1;
}

.anim-fade-up.is-visible,
.anim-scale-up.is-visible,
.anim-slide-left.is-visible,
.anim-slide-right.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Hero entrance (home) ── */
.anim-hero-enter {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--anim-delay, 0ms),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--anim-delay, 0ms);
}

.hero-v2.is-hero-ready .anim-hero-enter {
  opacity: 1;
  transform: translateY(0);
}

/* Ken Burns — slow zoom on hero background */
.hero-v2 > img:first-of-type {
  animation: anim-ken-burns 22s ease-in-out infinite alternate;
  transform-origin: center center;
}

@keyframes anim-ken-burns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

/* ── Card & image hover enhancements ── */
.v2-adventure-card .aspect-\[16\/10\] img,
.v2-adventure-feature > img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-adventure-card:hover .aspect-\[16\/10\] img,
.v2-adventure-feature:hover > img {
  transform: scale(1.05);
}

.v2-testimonial .overflow-hidden img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-testimonial:hover .overflow-hidden img {
  transform: scale(1.04);
}

.v2-moments-slide {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

.v2-moments-slide:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Trust bar icons — gentle float when visible */
.v2-trust-item svg {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-trust-item.is-visible svg {
  animation: anim-icon-float 3s ease-in-out infinite;
}

.v2-trust-item:nth-child(2).is-visible svg {
  animation-delay: 0.4s;
}

.v2-trust-item:nth-child(3).is-visible svg {
  animation-delay: 0.8s;
}

.v2-trust-item:nth-child(4).is-visible svg {
  animation-delay: 1.2s;
}

@keyframes anim-icon-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* CTA banner — subtle zoom on reveal */
.v2-cta-banner > img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-cta-banner.is-visible > img {
  transform: scale(1.03);
}

/* Nav CTA arrow nudge */
.nav-v2-cta:hover .nav-v2-cta-icon svg {
  animation: anim-arrow-nudge 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes anim-arrow-nudge {
  0% {
    transform: translateX(0);
  }
  40% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

.nav-v2-cta-icon svg {
  transition: transform 0.2s ease;
}

/* Book tags sparkle */
.v2-book-tag-icon {
  animation: anim-sparkle 2.5s ease-in-out infinite;
}

.v2-book-tag:nth-child(2) .v2-book-tag-icon {
  animation-delay: 0.3s;
}

.v2-book-tag:nth-child(3) .v2-book-tag-icon {
  animation-delay: 0.6s;
}

.v2-book-tag:nth-child(4) .v2-book-tag-icon {
  animation-delay: 0.9s;
}

.v2-book-tag:nth-child(5) .v2-book-tag-icon {
  animation-delay: 1.2s;
}

@keyframes anim-sparkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.12) rotate(8deg);
    opacity: 0.85;
  }
}

/* Gallery grid cells — activity detail */
.gallery-grid figure img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

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

  .anim-fade-up,
  .anim-fade-in,
  .anim-scale-up,
  .anim-slide-left,
  .anim-slide-right,
  .anim-hero-enter {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-v2 > img:first-of-type,
  .v2-trust-item svg,
  .v2-book-tag-icon,
  .nav-v2-cta:hover .nav-v2-cta-icon svg {
    animation: none !important;
  }

  .v2-moments-slide:hover,
  .v2-adventure-card:hover,
  .catalog-card:hover {
    transform: none !important;
  }
}
