/* =====================================================================
   AURA DESIGNS — Motion
   Principle: motion confirms structure, it never performs.
   Short distances, single easing, nothing loops in the reader's eye.
   Reveal system driven by IntersectionObserver in js/animations.js:
   elements get [data-reveal]; when in view they get .is-inview.
   ===================================================================== */

/* ---------- Reveal primitives ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="scale"] { transform: scale(0.97); }
[data-reveal].is-inview { opacity: 1; transform: none; }

/* Stagger children */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
[data-stagger].is-inview > * { opacity: 1; transform: none; }
[data-stagger].is-inview > *:nth-child(1) { transition-delay: 0.04s; }
[data-stagger].is-inview > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger].is-inview > *:nth-child(3) { transition-delay: 0.16s; }
[data-stagger].is-inview > *:nth-child(4) { transition-delay: 0.22s; }
[data-stagger].is-inview > *:nth-child(5) { transition-delay: 0.28s; }
[data-stagger].is-inview > *:nth-child(6) { transition-delay: 0.34s; }
[data-stagger].is-inview > *:nth-child(7) { transition-delay: 0.4s; }
[data-stagger].is-inview > *:nth-child(8) { transition-delay: 0.46s; }

/* Image reveal — a curtain wipe in paper, then the image settles */
.img-reveal { position: relative; overflow: hidden; }
.img-reveal img { transform: scale(1.08); transition: transform 1.2s var(--ease-out); }
.img-reveal::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--paper);
  transform-origin: right;
  transition: transform 0.9s var(--ease-out);
  z-index: 1;
}
.img-reveal.is-inview::before { transform: scaleX(0); }
.img-reveal.is-inview img { transform: scale(1); }

/* Hero entrance is per-slide — see .hero__slide rules in style.css */
.hero__foot { opacity: 0; animation: fadeIn 0.9s var(--ease-out) 0.65s forwards; }

/* Inner page-hero entrance */
.page-hero .container--wide > * { opacity: 0; transform: translateY(16px); animation: heroIn 0.8s var(--ease-out) forwards; }
.page-hero .container--wide > *:nth-child(1) { animation-delay: 0.08s; }
.page-hero .container--wide > *:nth-child(2) { animation-delay: 0.18s; }
.page-hero .container--wide > *:nth-child(3) { animation-delay: 0.28s; }
.page-hero .container--wide > *:nth-child(4) { animation-delay: 0.38s; }
.page-hero .container--wide > *:nth-child(5) { animation-delay: 0.48s; }

/* ---------- Keyframes ---------- */
@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
/* Scroll cue: a brass segment travelling down a hairline */
@keyframes scrollDot {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}
/* Carousel: per-slide text lift, Ken Burns drift, autoplay progress fill */
@keyframes heroLift { to { opacity: 1; transform: none; } }
@keyframes kenBurns { from { transform: scale(1.06); } to { transform: scale(1.14); } }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Global-footprint node pulse — the one loop we keep, and it is quiet */
.footprint__map .halo { transform-origin: center; animation: haloPulse 3.6s var(--ease-out) infinite; }
.footprint__map .halo:nth-of-type(even) { animation-delay: 1.2s; }
@keyframes haloPulse {
  0% { opacity: 0.55; transform: scale(0.6); }
  70% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* Marquee (retained for any text ticker) */
.marquee { display: flex; overflow: hidden; gap: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__group { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-right: clamp(1.5rem, 4vw, 4rem); animation: marquee 46s linear infinite; }
.marquee:hover .marquee__group { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  .img-reveal::before { display: none; }
  .img-reveal img { transform: none; }
  .hero__foot, .hero__card { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero__slide .hero__inner > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero__slide.is-active .hero__media img { animation: none !important; transform: scale(1) !important; }
  .hero__dot.is-active::after { animation: none !important; transform: scaleX(1) !important; }
  .collection-card::before, .masonry__item::before,
  .feature-card::after, .flow-node::after, .credential::after { display: none !important; }
  .masonry__item .zoom-cue { opacity: 1; transform: none; }
  .page-hero .container--wide > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .footprint__map .halo { animation: none !important; opacity: 0.4; }
  .hero__scroll .mouse::after { animation: none !important; }
  .marquee__group { animation: none; }
}
