/*
 * Shared motion styles (GSAP layer, src/js/pages/motion.js).
 * Nothing here hides content before JavaScript runs: crawlers and no-JS visitors see the full page.
 */

/* the pages' own CSS reveals are replaced by GSAP (or shown at once without it) */
.m-on .l-reveal, .m-static .l-reveal,
.m-on .i5-reveal, .m-static .i5-reveal { opacity: 1; transform: none; }
.m-on [data-aos], .m-static [data-aos] { opacity: 1; transform: none; }

/* scroll progress */
.m-progress {
	position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 10000; pointer-events: none;
	transform: scaleX(0); transform-origin: 0 50%;
	background: linear-gradient(90deg, #0f9488, #6366f1 55%, #ec4899);
	box-shadow: 0 0 12px rgba(99, 102, 241, .45);
}
[dir="rtl"] .m-progress { transform-origin: 100% 50%; }

/* split headline */
.m-split .m-w {
	display: inline-block; overflow: hidden; vertical-align: top; max-width: 100%;
	padding: .04em .02em .12em; margin: -.04em -.02em -.12em;
}
.m-split .m-wi { display: inline-block; overflow-wrap: anywhere; will-change: transform; }

/* gradient headline words keep moving slowly */
.m-on .l-grad, .m-on .i5-grad, .m-on .gradient-text, .m-on .m-shine {
	background-size: 220% auto !important;
	animation: m-shine 7s ease-in-out infinite alternate;
}
@keyframes m-shine { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* spotlight that follows the pointer on interactive cards */
.m-spot { position: relative; isolation: isolate; }
.m-spot::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, .10), transparent 45%);
	opacity: 0; transition: opacity .35s ease;
}
.m-spot:hover::after { opacity: 1; }

/* focus visibility for keyboard users on the animated controls */
.m-on a:focus-visible, .m-on button:focus-visible, .m-on select:focus-visible {
	outline: 3px solid #6366f1; outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.m-progress { display: none; }
	.m-on .l-grad, .m-on .i5-grad, .m-on .gradient-text, .m-on .m-shine { animation: none; }
}
