/* ════════════════════════════════════════════════════════════════════
   NexFlow · Motion · reveal animations, scroll states
   ════════════════════════════════════════════════════════════════════ */

/* ── Scroll reveal (vanilla; IntersectionObserver-driven) ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--d-cine) var(--ease-cinematic),
              transform var(--d-cine) var(--ease-cinematic);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--d-cine) var(--ease-cinematic),
              transform var(--d-cine) var(--ease-cinematic);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 90ms;  opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 180ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 270ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 360ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 450ms; opacity: 1; transform: none; }

/* ── Marquee ──────────────────────────────────────────────────────── */
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  /* Edge masks · phrases fade in/out the left/right rather than being
     guillotined at the viewport boundary. Improves the editorial
     feel of the running-headline strip. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.marquee-track {
  display: flex; gap: 56px;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: flex; align-items: center; gap: 56px;
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(24px, 2.6vw, 36px);
  letter-spacing: -.015em;
  white-space: nowrap;
}
.marquee-item .sep {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
}

/* ── Flow animation for active edge in the workflow ─────────────── */
@keyframes flow-dash { to { stroke-dashoffset: -20; } }

/* ── Number ticker (count-up) ──────────────────────────────────── */
.tick { font-variant-numeric: tabular-nums; }

/* ── Loading skeleton (when async data ramps) ──────────────────── */
.skeleton {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%),
    var(--bg-2);
  background-size: 200% 100%;
  animation: skeleton 1.4s linear infinite;
  border-radius: var(--r-s);
}
@keyframes skeleton { to { background-position: -200% 0; } }

/* ── Cursor halos (multiplayer placeholder, Phase 03) ──────────── */
.cursor-halo {
  position: fixed; pointer-events: none; z-index: var(--z-overlay);
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 1.5px solid var(--brand);
  opacity: 0; transition: opacity var(--d-base), transform var(--d-fast) linear;
}
.cursor-halo.on { opacity: .7; }

/* ── Scroll progress (top bar) ─────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  z-index: var(--z-overlay);
  transition: width .1s linear;
}
