/* ==========================================================
   SHARED MOTION — one entrance language for every page.
   Elements fade in with a soft blur and a tiny rise, staggered.
   motion.js tags elements with data-m and a delay (--md).
   To make everything slower/faster, change --m-dur here.
   ========================================================== */
:root{ --m-dur:1000ms; --m-ease:cubic-bezier(.22,1,.36,1) }

@keyframes m-in{ from{ opacity:0; filter:blur(12px); translate:0 14px } }
@keyframes m-fade{ from{ opacity:0; filter:blur(10px) } }

[data-m]{ animation:m-in var(--m-dur) var(--m-ease) var(--md,0ms) backwards }
[data-m="fade"]{ animation-name:m-fade }

/* Hold things hidden until motion.js is ready (it removes .m-pre). */
html.m-pre :is(
  .nav .logo, .nav .clock, .nav .nav-links, .site-footer,
  .center-name .n, .center-name .t, .field .card,
  .project .preview, .rig .card, .soon,
  .hero-logo, .hero h1, .rail, .section > *,
  .info-panel, .media-item
){ opacity:0 }

/* Soft exit when moving to another page. */
html.m-leaving body{ opacity:0; transition:opacity .28s ease }

@media (prefers-reduced-motion:reduce){
  [data-m]{ animation:none }
  html.m-pre :is(.nav .logo,.nav .clock,.nav .nav-links,.site-footer,.center-name .n,.center-name .t,.field .card,.project .preview,.rig .card,.soon,.hero-logo,.hero h1,.rail,.section > *,.info-panel,.media-item){ opacity:1 }
  html.m-leaving body{ transition:none; opacity:1 }
}

/* Dot-only cursor, enforced on every page (also here as a safety net):
   no system arrow, hand or grab cursor while the custom dot is in use. */
@media (hover:hover) and (pointer:fine){
  html, html *, html *::before, html *::after,
  html.m-leaving, html.m-leaving *, html.is-leaving, html.is-leaving *{ cursor:none !important }
}
