/* ==========================================================================
   WALLNUT 360 — MOTION
   Scroll-reveal utility classes (toggled by js/app.js via IntersectionObserver)
   plus small ambient/hover animations. All motion is disabled for users who
   request reduced motion.
   ========================================================================== */

[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"], [data-reveal="right"] { transform: none; }
[data-reveal="scale"] { transform: none; }
.motion-enabled [data-reveal] { opacity: 0; transform: translateY(14px); }
.motion-enabled [data-reveal="left"] { transform: translateX(-18px); }
.motion-enabled [data-reveal="right"] { transform: translateX(18px); }
.motion-enabled [data-reveal="scale"] { transform: scale(0.97); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-18px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(18px); }
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="scale"] { transform: scale(0.97); }
[data-reveal="scale"].is-visible { transform: scale(1); }

/* Stagger children of a revealed group */
[data-reveal-group] > * { transition-delay: calc(var(--stagger-index, 0) * 48ms); }

/* Counting stat numbers */
.stat strong[data-count] { font-variant-numeric: tabular-nums; }

/* Hero connecting-lines ambient animation */
.hero-illustration .pulse-dot {
  animation: pulse 2.6s ease-in-out infinite;
  transform-origin: center;
}
.hero-illustration .pulse-dot.d2 { animation-delay: 0.6s; }
.hero-illustration .pulse-dot.d3 { animation-delay: 1.2s; }
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

.hero-illustration .flow-line {
  stroke-dasharray: 6 8;
  animation: flow 2.4s linear infinite;
}
@keyframes flow {
  to { stroke-dashoffset: -28; }
}

/* Floating card idle motion */
.hero__art { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Logo strip gentle marquee-in on load */
.logo-strip .logo-tile { animation: fadeUp 0.45s var(--ease-out) both; }
.logo-strip .logo-tile:nth-child(1) { animation-delay: 0.04s; }
.logo-strip .logo-tile:nth-child(2) { animation-delay: 0.08s; }
.logo-strip .logo-tile:nth-child(3) { animation-delay: 0.12s; }
.logo-strip .logo-tile:nth-child(4) { animation-delay: 0.16s; }
.logo-strip .logo-tile:nth-child(5) { animation-delay: 0.2s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page-load hero entrance */
.hero__copy > * {
  animation: heroIn 0.55s var(--ease-out) both;
}
.hero__copy .eyebrow { animation-delay: 0.04s; }
.hero__copy h1 { animation-delay: 0.1s; }
.hero__copy .lede { animation-delay: 0.16s; }
.hero__copy .hero__actions { animation-delay: 0.22s; }
.hero__copy .hero__proof { animation-delay: 0.28s; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion universally */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
