/* Current Company hero and the shared information-dialog legal composition. */
.nh-company-hero .nh-hero-picture:has(.nh-company-video) {
	z-index: 0;
	min-width: 0;
}

.nh-company-video,
.nh-company-hero-video {
	position: relative;
	height: 560px;
	margin: 0;
}

.nh-company-hero-video video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nh-company-hero-video:has(figcaption) {
	display: flex;
	flex-direction: column;
}

.nh-company-hero-video:has(figcaption) video {
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
}

.nh-company-hero-video figcaption {
	position: relative;
	z-index: 3;
	flex: none;
	margin: 0;
	padding: 4px 12px;
	background: #fff;
}

/* The initial image reuses the existing source crop; playback stays undistorted. */
.nh-company-video .nh-video-poster {
	position: absolute;
	z-index: 0;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	pointer-events: none;
}

.nh-video-poster:where(.nh-hero-desktop-image) img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.nh-company-video.nh-video-started .nh-video-poster {
	display: none;
}

.nh-company-hero .nh-hero-copy:where(:has(+ .nh-hero-picture .nh-company-video)) {
	z-index: 1;
	pointer-events: none;
}

/* Without scripting, the saved native player remains usable below its title. */
.nh-company-hero:where(:has(.nh-company-video:not(.nh-video-enhanced))) .nh-hero-copy {
	padding-bottom: 96px;
}

.nh-company-hero:has(.nh-video-enhanced) .nh-hero-copy {
	background: transparent;
}

.nh-company-video.nh-video-enhanced::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: rgb(0 0 0 / 20%);
	pointer-events: none;
	content: "";
}

.nh-company-video.nh-video-started::after {
	display: none;
}

.nh-company-hero:has(.nh-video-started) .nh-hero-copy {
	visibility: hidden;
}

.nh-company-hero:has(.nh-video-started) h1 {
	/* Retain the semantic title while native controls own the playback surface. */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	visibility: visible;
}

.nh-company-hero:has(.nh-video-started) video {
	background: #000;
	object-fit: contain;
}

.nh-video-play {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: url('ui-states/testimonial-play.svg') center / 60px 60px no-repeat;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: opacity var(--nh-motion-open) var(--nh-motion-ease);
}

.nh-video-play:hover {
	opacity: .8;
}

.nh-video-play:active {
	opacity: .6;
}

.nh-video-play:focus-visible {
	outline: 3px solid var(--nh-teal);
	outline-offset: 5px;
}

/* A separate close target keeps native playback controls unobstructed. */
.nh-video-close {
	position: absolute;
	z-index: 3;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	border-radius: 50%;
	background: #fff url('r2/44f1331df74b416b69d34914.svg') center / 24px no-repeat;
	cursor: pointer;
	transition: background-color var(--nh-motion-open) var(--nh-motion-ease);
}

.nh-video-close:hover {
	background-color: #f5eedb;
}

.nh-video-close:active {
	background-color: #e4d9bd;
}

.nh-video-close:focus-visible {
	outline: 3px solid var(--nh-teal);
	outline-offset: 3px;
}

.nh-video-error {
	position: absolute;
	z-index: 3;
	right: 20px;
	bottom: 64px;
	left: 20px;
	margin: 0;
	padding: 12px;
	background: #fff;
	color: var(--nh-ink);
}

.nh-policy-content,
.nh-policy-document {
	max-width: 80ch;
	margin-inline: auto;
	font-size: 18px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.nh-policy-content > :first-child {
	margin-top: 0;
}

.nh-policy-content h2,
.nh-policy-content h3,
.nh-policy-document h2,
.nh-policy-document h3 {
	margin-block: 1.5em .6em;
	font-family: inherit;
	font-size: 1.2em;
	font-weight: 600;
	line-height: 1.3;
}

.nh-policy-content a {
	text-decoration: underline;
}

@media (width <= 700px) {
	.nh-company-video,
	.nh-company-hero-video {
		height: 680px;
	}

	.nh-policy-content,
	.nh-policy-document {
		font-size: 16px;
	}

	.nh-policy-dialog .nh-dialog-scroll > h2 {
		margin-right: 0;
		font-size: clamp(20px, 6.5vw, 34px);
		line-height: 1.05;
		letter-spacing: -.02em;
		overflow-wrap: normal;
		word-break: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nh-video-play,
	.nh-video-close {
		transition: none;
	}
}
