/* ============================================================
   MOTION — entrance, scroll reveal, hover, signature (magnetic CTA)
   ============================================================ */

/* ---- Page entrance: staggered hero reveal ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wipe-in {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes mark-draw {
  from { opacity: 0; transform: rotate(-90deg) scale(0.6); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}

.enter { opacity: 0; animation: rise 900ms var(--ease) forwards; }
.enter-1 { animation-delay: 0.05s; }
.enter-2 { animation-delay: 0.16s; }
.enter-3 { animation-delay: 0.28s; }
.enter-4 { animation-delay: 0.40s; }
.enter-5 { animation-delay: 0.52s; }

.hero h1 { animation: wipe-in 1s var(--ease) 0.12s both; }
.wordmark__mark { animation: mark-draw 800ms var(--ease) both; }

/* ---- Scroll reveal (IntersectionObserver toggles .is-visible) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 800ms var(--ease);
}
.reveal-wipe.is-visible { clip-path: inset(0 0 0 0); }

/* stagger children on reveal */
.reveal-stagger.is-visible > * { animation: rise 700ms var(--ease) both; }
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: 0.04s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: 0.22s; }
.reveal-stagger.is-visible > *:nth-child(5) { animation-delay: 0.28s; }

/* ---- Parallax hooks (JS sets --p) ---- */
.parallax { transform: translateY(var(--p, 0)); will-change: transform; }

/* ---- Signature motion: magnetic primary CTA (JS sets --mx/--my) ---- */
.magnetic { transform: translate(var(--mx, 0), var(--my, 0)); transition: transform 120ms var(--ease); }

/* ---- Accessibility ---- */
@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;
  }
  .enter, .hero h1, .reveal, .reveal-wipe { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .parallax, .magnetic { transform: none !important; }
}
