/* FXOrvia motion system. Everything below runs only when main.js has added .motion to <html>
   (so: JS on and no reduced-motion preference). At rest every element is fully visible. */

/* 1 · FXOrvia lines draw themselves (hero + CTA band decoration). pathLength="1" on each path. */
.motion .meridians path { stroke-dasharray: 1; animation: m-draw 2.8s var(--ease-draw) backwards; }
.motion .meridians path:nth-child(2n) { animation-delay: .18s; }
.motion .meridians path:nth-child(3n) { animation-delay: .36s; }
.motion .meridians path:nth-child(5n) { animation-delay: .54s; }
.motion .meridians .meridians__accent { animation-duration: 3.4s; animation-delay: .7s; }
@keyframes m-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* 2 · One orchestrated hero moment per page: eyebrow, title, lead, actions, art cross-fade in sequence. */
.motion [data-hero] > * { animation: h-in 1.1s var(--ease-out) backwards; }
.motion [data-hero] > :nth-child(2) { animation-delay: .12s; }
.motion [data-hero] > :nth-child(3) { animation-delay: .26s; }
.motion [data-hero] > :nth-child(4) { animation-delay: .4s; }
.motion [data-hero] > :nth-child(5) { animation-delay: .52s; }
.motion [data-hero-art] { animation: h-art 1.6s var(--ease-out) .35s backwards; }
@keyframes h-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes h-art { from { opacity: 0; transform: scale(.985); } }

/* 3 · Ticker drift */
.motion .ticker__track { animation: tick 90s linear infinite; }
.motion .ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* 4 · Slow globe turn for small inline globes (logo mark on hover) */
.motion .logo:hover .logo__mark .logo__meridian { animation: m-turn 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes m-turn { 50% { transform: scaleX(-1); } }

/* 5 · Toast */
.motion .toast--in { animation: t-in .45s var(--ease-out); }
@keyframes t-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ticker { overflow-x: auto; }
  .page-hero__art img, .hero__visual img { transform: none !important; }
}
