/* Shared motion grammar: transform/opacity only, with an accessible off switch. */
:root { --mg-motion-spring: cubic-bezier(.22, 1, .36, 1); }
html { scroll-behavior: smooth; }
/* The Elementor home header adds a 24px internal offset. Neutralize it so
   the landing menu begins at the same visual top edge as standalone pages. */
body.home #site-header { top: 8px; }
body.home #site-header .mg-nav { transform: translateY(-24px); }
.mg-overlay__col:first-child .mg-overlay__links a { font-size: clamp(25px, 2.25vw, 36px) !important; }
.mg-overlay__col:not(:first-child) .mg-overlay__links a { font-size: clamp(17px, 1.35vw, 21px) !important; }
.mg-overlay__links a { transform: translateZ(0); }
.mg-overlay__links a:hover { transform: translateX(-7px); }
.mg-overlay__links a:active { transform: translateX(-3px) scale(.985); }

:where(.mg-pdp-body, .mg-about, .mg-blog-body, .mg-academy) :where(a, button, .btn-primary) { transition: transform .24s var(--mg-motion-spring), box-shadow .24s ease, background-color .24s ease, color .2s ease, border-color .2s ease; }
:where(.mg-pdp-body, .mg-about, .mg-blog-body, .mg-academy) :where(a, button, .btn-primary):active { transform: translateY(1px) scale(.985); }
.mg-about__principles article, .mg-about__systems-list a { will-change: transform; }

/* Interactive cards lift gently; the same pace is used throughout the site. */
:where(.mg-pdp__fcard, .mg-related__card, .mg-blog-card, .mg-news-pdfcard, .mg-cat-card, .mg-about__grid article) { transition: transform .34s var(--mg-motion-spring), box-shadow .34s ease, border-color .28s ease, background-color .28s ease; }
@media (hover:hover) and (pointer:fine) {
	:where(.mg-pdp__fcard, .mg-related__card, .mg-blog-card, .mg-news-pdfcard, .mg-cat-card, .mg-about__grid article):hover { transform: translateY(-6px); box-shadow: 0 22px 42px -31px rgba(3, 38, 60, .65); }
	.mg-about__hero-links > a:not(.btn-primary):hover { color: #75cdf5; border-color: #75cdf5; transform: translateX(-4px); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
