/**
 * Variant CSS: gallery--single-wide-cinema-caption
 * Layer 2 (Path B gallery role — count-1 expansion, 2026-06-10).
 *
 * One ultrawide 21:9 cinematic strip laid out like a panorama, with the kicker +
 * headline above and one caption on its own row BELOW it. No black letterbox bars and
 * no on-photo text: a clean panoramic crop with the description underneath. Unlike
 * cinematic-letterbox-band (text overlaid on a bottom scrim): here the photo is
 * untouched and the caption stands apart. All text is off-photo, so it stays
 * polarity-aware --ink / --text-secondary. Image src is swapped by the photo system.
 * Element Count [1]. Part of the `gallery` role.
 */

body.aibt-universal .universal-gallery--single-wide-cinema-caption {
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
}

/* Intro above the strip. */
body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__intro {
	margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest, 0.24em) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 auto var(--space-sm, 1rem) auto !important;
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
	text-wrap: balance;
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* The ultrawide 21:9 strip — untouched photo, soft shadow, gently rounded. */
body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__frame {
	position: relative;
	border-radius: var(--radius-lg, 16px);
	overflow: hidden;
	aspect-ratio: 21 / 9;
	box-shadow: 0 24px 64px -30px color-mix(in srgb, var(--ink) 44%, transparent);
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__img {
	margin: 0 !important;
	height: 100%;
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slower, 700ms) var(--ease-expressive, ease);
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__frame:hover .universal-gallery__img img {
	transform: scale(1.03);
}

/* Caption below the strip — a small accent rule precedes it. */
body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__caption {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.6rem;
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 500 !important;
	color: var(--text-secondary) !important;
	letter-spacing: 0.01em;
	margin: var(--space-md, 1.5rem) auto 0 auto !important;
	line-height: var(--leading-relaxed, 1.65);
}

body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__caption::before {
	content: "";
	flex: 0 0 auto;
	width: 28px;
	height: 2px;
	background: var(--accent);
	transform: translateY(-0.4em);
}

/* Tablet: 16:9 keeps the panorama from going letterbox-thin on a mid column. */
@media (max-width: 959px) {
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__frame,
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__img img {
		aspect-ratio: 16 / 9;
	}
}

/* Mobile: 3:2 so the subject survives a narrow column; stack the caption rule above. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__frame,
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__img img {
		aspect-ratio: 3 / 2;
	}
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__caption {
		flex-direction: column;
		align-items: center;
		gap: 0.7rem;
	}
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__caption::before {
		transform: none;
	}
}

/* Keyboard focus parity with hover (frame/image is the focusable target when a
   client links the photo). */
body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__img a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 4px;
	border-radius: var(--radius-lg, 16px);
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--single-wide-cinema-caption .universal-gallery__frame:hover .universal-gallery__img img {
		transform: none;
	}
}

/* A8/A9 left-shift fix: centered intro/caption are max-width-capped by WP constrained
   layout; force margin-inline:auto so they never pin left. Doubled section class ->
   specificity beats the inline h2 typography rule. */
body.aibt-universal .universal-gallery--single-wide-cinema-caption.universal-gallery--single-wide-cinema-caption .universal-gallery__headline,
body.aibt-universal .universal-gallery--single-wide-cinema-caption.universal-gallery--single-wide-cinema-caption .universal-gallery__caption { margin-inline: auto !important; }
