/**
 * Motion layer — loaded only under (prefers-reduced-motion: no-preference).
 *
 * MOTION_INTENSITY 4: one hero reveal, one sectional scroll-entry system,
 * tactile feedback on interactive elements. No loops, no parallax, no
 * fade-up-on-everything. Transform and opacity only.
 */

/* ---- Hero entry: one staged reveal, once, on load ---- */

@media (prefers-reduced-motion: no-preference) {

	.t77-js .t77-hero__copy > * {
		opacity: 0;
		transform: translateY(14px);
		animation: t77-rise .78s cubic-bezier(.22, .61, .36, 1) forwards;
	}

	.t77-js .t77-hero__copy > *:nth-child(1) { animation-delay: .06s; }
	.t77-js .t77-hero__copy > *:nth-child(2) { animation-delay: .14s; }
	.t77-js .t77-hero__copy > *:nth-child(3) { animation-delay: .22s; }
	.t77-js .t77-hero__copy > *:nth-child(4) { animation-delay: .3s; }
	.t77-js .t77-hero__copy > *:nth-child(5) { animation-delay: .38s; }

	/* The image comes in as a wipe, not a fade — it reads as a plate sliding
	   into place rather than a stock crossfade. */
	.t77-js .t77-hero__media .t77-pic {
		clip-path: inset(0 0 0 100%);
		animation: t77-wipe .95s cubic-bezier(.22, .61, .36, 1) .1s forwards;
	}

	.t77-js .t77-hero__plate {
		opacity: 0;
		transform: translateX(-34%) translateY(16px);
		animation: t77-plate-in .7s cubic-bezier(.22, .61, .36, 1) .68s forwards;
	}

	@media (max-width: 64rem) {
		.t77-js .t77-hero__plate {
			transform: translateY(16px);
			animation-name: t77-rise;
		}
	}

	/* ---- Sectional scroll entry ----
	   Gated on .t77-reveal-armed, which reveal.js only adds once it has an
	   IntersectionObserver watching. If the module fails, never loads, or the
	   page is captured/printed without scrolling, the content is simply visible:
	   the animation fails open, never closed. */

	.t77-reveal-armed [data-t77-reveal] {
		opacity: 0;
		transform: translateY(18px);
		transition:
			opacity .62s cubic-bezier(.22, .61, .36, 1),
			transform .62s cubic-bezier(.22, .61, .36, 1);
		transition-delay: var(--t77-delay, 0ms);
	}

	.t77-reveal-armed [data-t77-reveal].is-in {
		opacity: 1;
		transform: none;
	}

	/* Media reveals with a short scale settle instead of a plain fade. */
	.t77-reveal-armed [data-t77-reveal="media"] .t77-pic img,
	.t77-reveal-armed [data-t77-reveal="media"] > img {
		transform: scale(1.04);
		transition: transform 1.1s cubic-bezier(.22, .61, .36, 1);
	}

	.t77-reveal-armed [data-t77-reveal="media"].is-in .t77-pic img,
	.t77-reveal-armed [data-t77-reveal="media"].is-in > img {
		transform: none;
	}
}

@keyframes t77-rise {
	to { opacity: 1; transform: none; }
}

@keyframes t77-wipe {
	from { clip-path: inset(0 0 0 100%); }
	to   { clip-path: inset(0 0 0 0); }
}

@keyframes t77-plate-in {
	to { opacity: 1; transform: translateX(-34%); }
}
