/**
 * Variant CSS: video--background-cover-text
 * Layer 2 — Path B video role (2026-06-06).
 * Full-bleed cover poster + gradient scrim + centred pure-CSS play button.
 * Text block is anchored to the lower-left corner of the frame (editorial poster look),
 * distinct from video--fullwidth-cover-cta where everything is centred and the play sits
 * above the headline. All text-on-photo colours are fixed (white / accent lift) per KI-020.
 */

body.aibt-universal .universal-video--background-cover-text {
	background: var(--background);
	color: var(--text-primary);
}

/* --- Stage: full poster with text overlaid --- */
body.aibt-universal .universal-video--background-cover-text .universal-video__stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--decor-radius);
	isolation: isolate;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__poster-img {
	margin: 0 !important;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__poster-img img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	min-height: 380px;
	object-fit: cover;
	filter: var(--photo-filter, none);
}

/* Gradient scrim: darker toward the lower-left so corner-anchored text stays legible
   on any poster. Fixed rgba sits on a PHOTO, not a theme surface (correct pattern). */
body.aibt-universal .universal-video--background-cover-text .universal-video__stage::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.32) 42%, rgba(0, 0, 0, 0.08) 78%),
		linear-gradient(to right, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 60%);
	pointer-events: none;
}

/* --- Centred play button (reused contract: empty .universal-video__play) --- */
body.aibt-universal .universal-video--background-cover-text .universal-video__play {
	position: absolute !important;
	top: 42%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	width: clamp(64px, 8vw, 96px);
	height: clamp(64px, 8vw, 96px);
	border-radius: 50%;
	background: var(--accent);
	box-shadow:
		0 0 0 2px rgba(255, 255, 255, 0.55),
		0 0 0 4px rgba(0, 0, 0, 0.16),
		0 10px 30px rgba(0, 0, 0, 0.42);
	transition: transform var(--duration-fast, 180ms) var(--ease-default, ease);
}

/* CSS triangle, centred (optical nudge right). */
body.aibt-universal .universal-video--background-cover-text .universal-video__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	width: 34%;
	height: 38%;
	background: var(--cta-text-primary, #FFFFFF);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

body.aibt-universal .universal-video--background-cover-text .universal-video__stage:hover .universal-video__play {
	transform: translate(-50%, -50%) scale(1.08);
}

/* --- Corner-anchored caption box --- */
body.aibt-universal .universal-video--background-cover-text .universal-video__caption-box {
	position: absolute;
	z-index: 2;
	left: clamp(1.25rem, 4vw, 3.25rem);
	right: clamp(1.25rem, 4vw, 3.25rem);
	bottom: clamp(1.25rem, 4vw, 2.75rem);
	margin: 0 !important;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	/* Accent lift keeps a light accent from dissolving into the photo (KI-020). */
	color: color-mix(in srgb, var(--accent) 62%, var(--on-dark, #FFFFFF)) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-video--background-cover-text h2.universal-video__headline,
body.aibt-universal .universal-video--background-cover-text .universal-video__headline {
	font-family: var(--font-display) !important;
	color: var(--text-on-dark, #FFFFFF) !important;
	margin: 0 0 var(--space-sm) 0 !important;
	text-wrap: balance;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__headline em {
	color: color-mix(in srgb, var(--accent) 62%, var(--on-dark, #FFFFFF)) !important;
	font-style: italic;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__body {
	font-family: var(--font-body) !important;
	font-size: var(--text-lg) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--text-on-dark, #FFFFFF) !important;
	opacity: 0.92;
	margin: 0 0 var(--space-md) 0 !important;
	max-width: 52ch;
}

body.aibt-universal .universal-video--background-cover-text .universal-video__meta {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide) !important;
	color: var(--text-on-dark, #FFFFFF) !important;
	opacity: 0.82;
	margin: 0 !important;
}

/* --- Mobile: taller frame so corner text never overruns the poster --- */
@media (max-width: 781px) {
	body.aibt-universal .universal-video--background-cover-text .universal-video__poster-img img {
		aspect-ratio: 3 / 4;
		min-height: 460px;
	}
	body.aibt-universal .universal-video--background-cover-text .universal-video__play {
		top: 38%;
	}
	body.aibt-universal .universal-video--background-cover-text .universal-video__body {
		font-size: var(--text-base) !important;
	}
}

/* A5: neutralise wide tracking on small screens to prevent kicker wrap/overflow. */
@media (max-width: 640px) {
	body.aibt-universal .universal-video--background-cover-text .universal-video__kicker {
		letter-spacing: 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-video--background-cover-text .universal-video__play {
		transition: none;
	}
	body.aibt-universal .universal-video--background-cover-text .universal-video__stage:hover .universal-video__play {
		transform: translate(-50%, -50%);
	}
}
