/**
 * Native background-video hero (replaces Slider Revolution).
 *
 * Sizing reproduces what the old slider did: it was configured gridwidth 1280
 * x gridheight 799 with sliderLayout "auto", i.e. 799px tall at 1280px and
 * wider, scaling proportionally below that.
 */

.av-video-hero {
	position: relative;
	width: 100%;
	height: 799px;
	overflow: hidden;
	background-color: #000;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.av-video-hero__video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	transform: translate( -50%, -50% );
	object-fit: cover;
	display: block;
	border: 0;
	pointer-events: none;
}

/* Below the slider's 1280px grid width, scale height proportionally. */
@media only screen and ( max-width: 1280px ) {

	.av-video-hero {
		height: calc( 100vw * 799 / 1280 );
		min-height: 320px;
	}
}

/*
 * Respect a reduced-motion preference: drop the video and leave the poster
 * image, which is already painted on the container.
 */
@media ( prefers-reduced-motion: reduce ) {

	.av-video-hero__video {
		display: none;
	}
}
