/**
 * The clip over a photo (change recipe-motion-media).
 *
 * tirolez_attachment_image( …, array( 'motion' => true ) ) prints a <video data-media-motion>
 * right after the <img>, in the same media box. It covers the photo with the same crop
 * (object-fit: cover) and stays transparent until assets/js/media-motion.js has it playing:
 * a clip that never loads, never plays or has ended shows the photo. Each section stylesheet
 * makes its own media box the positioning context.
 */
.media-motion {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--duration-thumb-hover) var(--ease-out);
}

.media-motion.is-playing {
	opacity: 1;
}

/* Home banner: only the clip of the active slide may show. */
.hero__image:not(.is-active) + .media-motion {
	opacity: 0;
	transition: none;
}

/* The featured article stacks its photo under the gradient; the clip goes with the photo. */
.article-featured > .media-motion {
	z-index: -2;
}

@media (prefers-reduced-motion: reduce) {
	.media-motion {
		display: none;
	}
}
