/* ============================================================
   AMX Luxury — Scroll Animations & Transitions
   ============================================================ */

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Staggered children: each .reveal inside a common parent delays slightly */
.story__grid .reveal:nth-child(1) { transition-delay: 0s; }
.story__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.story__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.story__grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.story__grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.story__grid .reveal:nth-child(6) { transition-delay: 0.40s; }

.values__grid .reveal:nth-child(1) { transition-delay: 0s; }
.values__grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.values__grid .reveal:nth-child(3) { transition-delay: 0.24s; }

.vegan__stats .vegan__stat:nth-child(1) { transition-delay: 0s; }
.vegan__stats .vegan__stat:nth-child(2) { transition-delay: 0.12s; }
.vegan__stats .vegan__stat:nth-child(3) { transition-delay: 0.24s; }

/* ---------- Hero entrance ---------- */
.hero__badge {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__title {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 1s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__cta-group {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1s 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__scroll {
  opacity: 0;
  animation: heroFadeUp 1s 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Gold accent line ---------- */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  transform: translate(-50%, -50%);
  animation: goldLine 2s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0.12;
  z-index: 1;
}

@keyframes goldLine {
  to { height: 80%; }
}

/* ---------- Set product image glow on hover ---------- */
.set--dark .set__product-image img {
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.3));
  transition: transform 0.6s var(--ease-smooth), filter 0.6s var(--ease-smooth);
}
.set--dark .set__product-image:hover img {
  filter: drop-shadow(0 20px 60px rgba(197, 164, 78, 0.18));
  transform: scale(1.04);
}

.set--light .set__product-image img {
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.1));
  transition: transform 0.6s var(--ease-smooth), filter 0.6s var(--ease-smooth);
}
.set--light .set__product-image:hover img {
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.18));
  transform: scale(1.04);
}

/* ---------- Set products staggered reveal ---------- */
.set__products .set__product:nth-child(1).reveal { transition-delay: 0s; }
.set__products .set__divider.reveal { transition-delay: 0.1s; }
.set__products .set__product:nth-child(3).reveal { transition-delay: 0.2s; }

/* ---------- Value cards subtle lift ---------- */
.values__card {
  transition: border-color 0.4s, transform 0.4s var(--ease-smooth), box-shadow 0.4s;
}
.values__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(197, 164, 78, 0.08);
}

/* ---------- Stat number count-like emphasis ---------- */
.vegan__stat {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.vegan__stat--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer form focus glow ---------- */
.footer__form input:focus {
  box-shadow: 0 0 0 1px var(--gold), 0 0 20px rgba(197, 164, 78, 0.1);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero__badge,
  .hero__title,
  .hero__subtitle,
  .hero__cta-group,
  .hero__scroll,
  .vegan__stat {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .hero::before {
    animation: none;
    height: 80%;
  }
  .hero__scroll-line {
    animation: none;
  }
}
