/* ============================================
   ROYAL JOY — Animations & Scroll Reveals
   ============================================ */

/* --- SCROLL REVEAL BASE --- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-up {
  transform: translateY(40px);
}

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

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

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- HERO ANIMATIONS --- */
.hero-content .reveal-up {
  opacity: 0;
  transform: translateY(30px);
}

.hero-content .reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-content .reveal-up:nth-child(1) { transition-delay: 0.2s; }
.hero-content .reveal-up:nth-child(2) { transition-delay: 0.4s; }
.hero-content .reveal-up:nth-child(3) { transition-delay: 0.6s; }
.hero-content .reveal-up:nth-child(4) { transition-delay: 0.8s; }
.hero-content .reveal-up:nth-child(5) { transition-delay: 1.0s; }

/* --- GOLD SHIMMER ON BUTTONS --- */
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-gold:hover::after {
  left: 100%;
}

/* --- SERVICE CARD STAGGER --- */
.service-card.reveal-up {
  transition-delay: calc(var(--stagger, 0) * 0.1s);
}

/* --- GALLERY ITEM TRANSITIONS --- */
.gallery-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.gallery-enter {
  animation: galleryFadeIn 0.4s ease forwards;
}

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- LIGHTBOX --- */
.lightbox {
  animation: lightboxIn 0.3s ease;
}

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

.lightbox-content img {
  animation: lightboxImgIn 0.3s ease;
}

@keyframes lightboxImgIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- APPROACH CARD HOVER --- */
.approach-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.approach-card:hover::before {
  transform: scaleX(1);
}

/* --- NAV LINK UNDERLINE --- */
.nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
  margin-top: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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

  .hero-img {
    transform: none !important;
  }

  .scroll-line {
    animation: none;
  }
}