/* The video stage fills the complete masthead, including behind the menu. */
#masthead.site-header {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #02030d;
}

#masthead .cosmic-hero-video-stage {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background-color: #02030d;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

#masthead .cosmic-hero-video-stage::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.16) 62%, rgba(0, 0, 0, 0.48) 100%),
		radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.30) 100%);
}

#masthead .cosmic-hero-video-stage video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	transition: opacity 1.5s ease-in-out;
}

#masthead .cosmic-hero-video-intro {
	z-index: 1;
	opacity: 1;
}

#masthead .cosmic-hero-video-arrival {
	z-index: 2;
	opacity: 0;
}

#masthead .cosmic-hero-video-stage.is-arrived .cosmic-hero-video-intro {
	opacity: 0;
}

#masthead .cosmic-hero-video-stage.is-arrived .cosmic-hero-video-arrival {
	opacity: 1;
}

/* Keep the title and navigation above the moving background. */
#masthead .logo-wrapper-block,
#masthead .refined-magazine-menu-container {
	position: relative;
	z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
	#masthead .cosmic-hero-video-stage video {
		display: none;
	}
}

