/* ───────────────────────────────────────────────
   Lattot · motion.css
   Hero protocol-map animation + site-wide scroll reveal.
   All reveal hiding is JS-gated: if motion.js does not run,
   nothing is hidden and all content stays visible.
   Fully disabled under prefers-reduced-motion.
   ─────────────────────────────────────────────── */

/* ── Hero protocol map ── */
@keyframes lt-pop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes lt-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes lt-sweep {
  0%   { transform: translateX(0);     opacity: 0; }
  10%  { opacity: .85; }
  90%  { opacity: .85; }
  100% { transform: translateX(288px); opacity: 0; }
}
@keyframes lt-breathe {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}

.lt-map .lt-node {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: lt-pop .5s cubic-bezier(.2,.7,.3,1) forwards;
}
.lt-map .lt-line {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: lt-draw 1s ease forwards;
}
.lt-map .lt-active {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: lt-pop .5s cubic-bezier(.2,.7,.3,1) forwards,
             lt-breathe 3s ease-in-out 1.4s infinite;
}
.lt-map .lt-sweep {
  animation: lt-sweep 4.4s ease-in-out 1.6s infinite;
}

/* ── Site-wide scroll reveal ── */
.lt-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1),
              transform .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--lt-delay, 0ms);
  will-change: opacity, transform;
}
.lt-reveal.lt-in {
  opacity: 1;
  transform: none;
}

/* ── Honor user preference: no motion at all ── */
@media (prefers-reduced-motion: reduce) {
  .lt-map .lt-node,
  .lt-map .lt-active { animation: none; opacity: 1; }
  .lt-map .lt-line   { animation: none; stroke-dashoffset: 0; }
  .lt-map .lt-sweep  { display: none; }
  .lt-reveal,
  .lt-reveal.lt-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
