/* ================================================
   ART BY JADA — Animations
   ================================================ */

/* --- Scroll Reveal --- */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero Entrance --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title-line:nth-child(1) {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-title-line:nth-child(2) {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.hero-subtitle {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

.hero-cta {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both;
}

/* --- Hero Background Ken Burns --- */
@keyframes kenBurns {
  0% { transform: scale(1.05); }
  50% { transform: scale(1.12) translate(-1%, -1%); }
  100% { transform: scale(1.05); }
}

.hero-bg-img {
  animation: kenBurns 25s ease-in-out infinite;
  will-change: transform;
}

.hero-bg-img.paused {
  animation-play-state: paused;
  will-change: auto;
}

/* --- Gallery Item Reveal --- */
.gallery-item {
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Gallery Filter Transitions --- */
.gallery-item.filtering-out {
  opacity: 0;
  transform: scale(0.9);
}

.gallery-item.filtering-in {
  animation: filterIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: var(--stagger-delay, 0ms);
}

@keyframes filterIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Image Lazy Load Fade-In --- */
.gallery-item img,
.featured-item img {
  opacity: 0;
}

.gallery-item img.loaded,
.featured-item img.loaded {
  opacity: 1;
}

/* --- Lightbox Transitions --- */
.lightbox {
  opacity: 0;
  animation: lightboxIn 0.3s ease forwards;
}

@keyframes lightboxIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox .lightbox-content {
  animation: lightboxContentIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
}

@keyframes lightboxContentIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox.closing {
  animation: lightboxOut 0.25s ease forwards;
}

@keyframes lightboxOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* --- Lightbox Image Navigation --- */
.lightbox-img-wrapper img.transitioning {
  opacity: 0.3;
}

/* --- Back to Top Button --- */
.back-to-top {
  opacity: 0;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Shimmer Loading Placeholder --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Scroll Indicator Bounce --- */
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* --- Mobile Filter Scroll Hint --- */
@keyframes scrollHint {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(4px); }
}

/* --- Mobile Performance --- */
@media (max-width: 768px) {
  .hero-bg-img {
    animation: none;
    will-change: auto;
  }
}

/* --- Reduced Motion: Force visible state --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .gallery-item {
    opacity: 1;
    transform: none;
  }

  .hero-bg-img {
    animation: none;
    will-change: auto;
  }

  .gallery-filters::after {
    animation: none;
  }
}
