/**
 * File: assets/css/pages/contact/motion.css
 * Description: Contact page reveal states, visual artwork motion, and reduced-motion support.
 *
 * MAGIDA CONTACT PAGE PASS 14.0:
 * Adds subtle motion after the structure is stable.
 *
 * MAGIDA CONTACT HERO POLISH PASS 14.1:
 * - Adds visible internal hero artwork motion, not only section reveal motion.
 * - Adds shimmer/float/pulse effects while respecting reduced-motion preferences.
 */

[data-magida-contact-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s ease,
		transform 0.7s ease;
}

[data-magida-contact-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

.magida-contact-card:nth-child(2) {
	transition-delay: 0.08s;
}

.magida-contact-card:nth-child(3) {
	transition-delay: 0.16s;
}

.magida-contact-card:nth-child(4) {
	transition-delay: 0.24s;
}

/* MAGIDA CONTACT HERO POLISH PASS 14.1: Keyframes are scoped to Contact page artwork only. */
@keyframes magida-contact-panel-float {
	0%,
	100% {
		transform: translate3d(
				var(--magida-contact-front-x),
				var(--magida-contact-front-y),
				0
			)
			rotate(-1.5deg);
	}

	50% {
		transform: translate3d(
				var(--magida-contact-front-x),
				calc(var(--magida-contact-front-y) - 6px),
				0
			)
			rotate(0.85deg);
	}
}

@keyframes magida-contact-halo-pulse {
	0%,
	100% {
		opacity: 0.78;
		transform: scale(1);
	}

	50% {
		opacity: 1;
		transform: scale(1.08);
	}
}

@keyframes magida-contact-orb-drift {
	0%,
	100% {
		margin-top: 0;
		margin-left: 0;
	}

	50% {
		margin-top: -12px;
		margin-left: 10px;
	}
}

@keyframes magida-contact-row-shimmer {
	0% {
		transform: translateX(-120%);
	}

	100% {
		transform: translateX(160%);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.magida-contact-visual__panel--front {
		animation: magida-contact-panel-float 7s ease-in-out infinite;
	}

	.magida-contact-visual__halo {
		animation: magida-contact-halo-pulse 5.8s ease-in-out infinite;
	}

	.magida-contact-visual__orb {
		animation: magida-contact-orb-drift 8s ease-in-out infinite;
	}

	.magida-contact-visual__orb--two {
		animation-duration: 9.5s;
		animation-direction: reverse;
	}

	.magida-contact-visual__rows span::after {
		content: "";
		position: absolute;
		inset: 0;
		width: 42%;
		background: linear-gradient(
			90deg,
			transparent,
			rgba(255, 255, 255, 0.2),
			transparent
		);
		animation: magida-contact-row-shimmer 3.4s ease-in-out infinite;
	}

	.magida-contact-visual__rows span:nth-child(2)::after {
		animation-delay: 0.28s;
	}

	.magida-contact-visual__rows span:nth-child(3)::after {
		animation-delay: 0.54s;
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-magida-contact-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.magida-contact-visual,
	.magida-contact-visual *,
	.magida-contact-card,
	.magida-contact-card:hover,
	.magida-contact-card:focus-visible {
		animation: none !important;
		transform: none;
	}
}
