/* =====================================================
   Quality Wardrobes — Animations
   All gated by prefers-reduced-motion
   ===================================================== */

/* --- Hero wordmark: letter-by-letter rise + de-blur --- */
@keyframes charReveal {
  0%   { opacity: 0; transform: translateY(0.4em); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0);     filter: blur(0); }
}

@keyframes scrollCue {
  0%, 100% { opacity: 1; transform: scaleY(1);    }
  50%       { opacity: 0; transform: scaleY(0.3);  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

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

@keyframes navBlurIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* wordmark chars — animated by JS after page load */
.wm-char.is-visible {
  animation: charReveal 0.55s cubic-bezier(.2,0,.1,1) both;
  animation-delay: calc(var(--i) * 40ms);
}

/* Fade-up observer targets */
.js-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(.2,0,.1,1), transform 0.65s cubic-bezier(.2,0,.1,1);
  transition-delay: calc(var(--stagger, 0) * 80ms);
}
.js-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in (no translate) */
.js-fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.js-fade-in.is-visible {
  opacity: 1;
  transition-delay: var(--delay, 0ms);
}

/* Staggered children (cards, list items) */
.js-stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-stagger-children.is-visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0ms; }
.js-stagger-children.is-visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 80ms; }
.js-stagger-children.is-visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 160ms; }
.js-stagger-children.is-visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 240ms; }
.js-stagger-children.is-visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 320ms; }
.js-stagger-children.is-visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 400ms; }
.js-stagger-children.is-visible > *:nth-child(n+7){ opacity: 1; transform: none; transition-delay: 480ms; }

/* --- prefers-reduced-motion: kill everything --- */
@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;
  }
  .wm-char            { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js-fade-up,
  .js-fade-in,
  .js-stagger-children > * { opacity: 1 !important; transform: none !important; }
  .scroll-cue__line   { animation: none !important; }
  .hero__firelight    { transform: none !important; }
}
