/*
 * envitron 2026 - YouTube Two-Click-Video.
 *
 * Vor dem Klick: Poster mit Play-Overlay + Hinweis.
 * Nach dem Klick: iframe in der gleichen aspect-ratio-Box.
 */
.video-youtube {
	position: relative;
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	background: #0a0f1c;
	box-shadow: 0 18px 40px -20px rgba(8, 33, 59, 0.45);
	aspect-ratio: var(--video-aspect, 16 / 9);
	max-width: 100%;
}

.video-youtube__iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.video-youtube__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #fff;
	text-align: left;
}

.video-youtube__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	transition: transform 0.4s ease, filter 0.3s ease;
	filter: brightness(0.85);
}

.video-youtube__poster:hover .video-youtube__thumb,
.video-youtube__poster:focus-visible .video-youtube__thumb {
	transform: scale(1.02);
	filter: brightness(1);
}

.video-youtube__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: clamp(56px, 9vw, 88px);
	height: auto;
	display: inline-flex;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
	transition: transform 0.2s ease;
}
.video-youtube__poster:hover .video-youtube__play,
.video-youtube__poster:focus-visible .video-youtube__play {
	transform: translate(-50%, -50%) scale(1.05);
}
.video-youtube__play svg {
	width: 100%;
	height: auto;
}

.video-youtube__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: clamp(0.85rem, 2vw, 1.4rem);
	color: #fff;
	font-weight: 700;
	font-size: clamp(0.95rem, 1.6vw, 1.1rem);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.video-youtube__hint {
	display: block;
	font-weight: 400;
	font-size: 0.78rem;
	opacity: 0.85;
	max-width: 60ch;
}

.video-youtube__poster:focus-visible {
	outline: 3px solid var(--brand-500, #2aa84a);
	outline-offset: 3px;
}

.video-youtube.is-playing {
	box-shadow: 0 22px 50px -22px rgba(8, 33, 59, 0.65);
}

@media (prefers-reduced-motion: reduce) {
	.video-youtube__thumb,
	.video-youtube__play {
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Front-Page Video-Section
   Sitzt zwischen Produkt-Slider und Use-Case-Karussell, ist visuell
   klar als eigenstaendiger Block lesbar (zentrierter hgroup, leicht
   breiterer als der Lese-Container, damit das 16:9-Video wirkt). */
.front-video {
	background: var(--white);
}
.front-video__wrap {
	max-width: 880px;
	margin-inline: auto;
}
