/* Homepage hero video – see hero-video.php */

.nnsl-hv {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 82vh;
	overflow: hidden;
	background: #0e1a4a;
}

.nnsl-hv__poster,
.nnsl-hv__poster img,
.nnsl-hv__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center 30%;
}

/* Video stays invisible until it actually plays, so the poster never flashes to black. */
.nnsl-hv__video {
	opacity: 0;
	transition: opacity .6s ease;
}

.nnsl-hv.is-playing .nnsl-hv__video {
	opacity: 1;
}

.nnsl-hv__toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	background: rgba(14, 26, 74, .45);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background .2s;
}

.nnsl-hv__toggle[hidden] {
	display: none;
}

.nnsl-hv__toggle:hover,
.nnsl-hv__toggle:focus-visible {
	background: rgba(14, 26, 74, .75);
}

.nnsl-hv__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nnsl-hv__i-play,
.nnsl-hv.is-paused .nnsl-hv__i-pause {
	display: none;
}

.nnsl-hv.is-paused .nnsl-hv__i-play {
	display: block;
}

@media (max-width: 767px) {
	.nnsl-hv {
		aspect-ratio: 4 / 5;
		max-height: none;
	}
	.nnsl-hv__poster img,
	.nnsl-hv__video {
		object-position: center;
	}
	.nnsl-hv__toggle {
		right: 12px;
		bottom: 12px;
		width: 36px;
		height: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nnsl-hv__video {
		transition: none;
	}
}
