/* 4MGarage motion layer (anime.js v4.5.0). Everything here is scoped to
   .m4-anim, which only exists while the motion script is in charge. */

/* hidden until anime.js brings them in */
.m4-anim .nav > *, .m4-anim .online,
.m4-anim .hero h1, .m4-anim .hero .lead, .m4-anim .hero .actions .btn,
.m4-anim .livecard,
.m4-anim .reveal, .m4-anim .reveal.on { opacity: 0; }

/* site.css's own CSS reveal steps aside: anime.js owns it now */
.m4-anim .reveal, .m4-anim .reveal.on { transform: none; transition: none; }

/* once split, the headline box is visible and its characters carry opacity */
.m4-anim .hero h1.m4-split { opacity: 1; }
.m4c, .m4w { display: inline-block; will-change: transform, opacity; }
/* every split piece is animated in from 0, so it must start hidden or it shows
   in full until its staggered tween begins */
.m4-anim .m4c, .m4-anim .m4w { opacity: 0; }
/* the head is shown at t=0 so its pieces can animate; its link fades in later */
.m4-anim .section-head .link { opacity: 0; }

/* card accents draw in from the left */
.m4-anim .accent { transform-origin: 0 50%; }

/* pointer light on cards: a soft cyan pool that follows the cursor */
.m4-anim .card { position: relative; transform-style: preserve-3d; }
.m4-anim .card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(25,198,255,.13), transparent 45%);
  opacity: var(--glow, 0); transition: opacity .35s ease;
}
.m4-anim .grid2, .m4-anim .grid3 { perspective: 1200px; }

/* the live stats get monospaced digits so scrambling never reflows the card */
.m4-anim .stat b { font-variant-numeric: tabular-nums; }

/* dropdowns are animated open */
.m4-anim .drop { transform-origin: 20px 0; }

/* ---------------------------------------------------------------- site-wide
   everything the reveal timelines bring in starts hidden while motion runs */
.m4-anim main .section .card, .m4-anim .section-head, .m4-anim .cat-head,
.m4-anim .section .table tr, .m4-anim .pagehero .crumbs, .m4-anim .pagehero h1,
.m4-anim .pagehero .lead, .m4-anim .catbar a { opacity: 0; }
.m4-anim .pagehero h1.m4-split { opacity: 1; }
.dot.m4-off { background: var(--red); box-shadow: 0 0 12px var(--red); }
.m4-count { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------- systems: live demos
   static (no JS) these read as a finished HUD: route drawn, meter full */
.m4-panel { background: linear-gradient(160deg, #0a1018, #05090d); overflow: hidden; }
.m4-hud-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.m4-state, .m4-mult { font: 800 12px/1 Inter, Segoe UI, Arial, sans-serif; letter-spacing: .14em; color: #19c6ff; }
.m4-mult { font-size: 22px; letter-spacing: 0; color: #ff7a1f; display: inline-block; }
.m4-map { display: block; width: 100%; height: auto; border-radius: 10px; background:
  radial-gradient(circle at 70% 30%, rgba(15,140,255,.10), transparent 55%),
  repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 26px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 26px), #05090d;
  border: 1px solid #1a2836; }
.m4-road { fill: none; stroke: #15212d; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.m4-route { fill: none; stroke: none; }
.m4-trail { fill: none; stroke: #0f8cff; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(15,140,255,.8)); }
.m4-ramp { fill: none; stroke: #111b25; stroke-width: 9; stroke-linecap: round; }
.m4-lock, .m4-combo { margin-top: 16px; }
.m4-lock { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; border-radius: 8px; }
.m4-lock span, .m4-combo span, .m4-score-label { color: #7f93a6; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.m4-lock-pct { font: 800 20px/1 Inter, Segoe UI, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.m4-meter { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #121c26; overflow: hidden; margin-top: 6px; }
.m4-meter i { display: block; height: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, #0f8cff, #ff7a1f); }
.m4-combo .m4-meter i { background: linear-gradient(90deg, #ff7a1f, #d61b31); }
.m4-score { font: 900 clamp(44px, 6vw, 68px)/1 Inter, Segoe UI, Arial, sans-serif; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; margin-top: 18px; }
.m4-feed { position: relative; height: 34px; margin-top: 18px; display: none; }
.m4-anim .m4-feed { display: block; }
.m4-feed span { position: absolute; left: 0; top: 0; opacity: 0; font: 800 14px/1.4 Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: .06em; color: #6ee7a2; white-space: nowrap; }
.m4-feed span b { color: #fff; margin-right: 8px; }
.m4-demo-note { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ------------------------------------------------------- news: timeline */
.m4-timeline { position: relative; display: grid; gap: 18px; padding-left: 38px; max-width: 880px; }
.m4-rail { position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: #17232e; border-radius: 1px; }
.m4-rail i { position: absolute; inset: 0; transform-origin: 50% 0; background: linear-gradient(#19c6ff, #ff3158); }
.m4-timeline > .card { position: relative; }
.m4-tl-node { position: absolute; left: -33px; top: 30px; width: 12px; height: 12px; border-radius: 50%;
  background: #0c1219; border: 2px solid #19c6ff; box-shadow: 0 0 12px rgba(25,198,255,.6); }

/* --------------------------------------------------------- 404: siren */
.pagehero { position: relative; overflow: hidden; }
.m4-siren { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.m4-siren i { position: absolute; top: -20%; width: 70%; height: 140%; opacity: 0; filter: blur(30px); }
.m4-siren .b { left: 0; background: radial-gradient(closest-side, rgba(15,140,255,.55), transparent); }
.m4-siren .r { right: 0; background: radial-gradient(closest-side, rgba(214,27,49,.55), transparent); }
.pagehero .shell { position: relative; z-index: 1; }
@media (max-width: 800px) { .m4-timeline { padding-left: 30px; } .m4-tl-node { left: -25px; } .m4-rail { left: 7px; } }
