/**
 * Variant CSS: gallery--single-full-bleed-overlay
 * Layer 2 (Path B gallery role — count-1 expansion, 2026-06-10).
 *
 * One large photograph running edge to edge of the screen (alignfull), tall like a
 * hero banner, with the kicker + headline + one caption laid CENTERED over a bottom
 * gradient scrim. Reads like a cover/"hero" frame filling the whole section.
 * Unlike single-statement-frame (constrained 16:9 card) and cinematic-letterbox-band
 * (low 21:9, left-aligned strip): this is a tall full-viewport hero crop with a
 * centered bottom overlay. On-photo text sits on a scrim, so it uses --on-dark /
 * #FFFFFF, NOT polarity-aware --ink which would vanish (KI-020). Image src is swapped
 * by the photo system. Element Count [1]. Part of the `gallery` role.
 */

body.aibt-universal .universal-gallery--single-full-bleed-overlay {
	padding-block: calc(clamp(2.5rem, 6vw, 4.5rem) * var(--density, 1));
	overflow-x: hidden;
}

/* Full-bleed stage: holds the photo + the centered overlay, min-height gives it the
   tall "hero" presence that distinguishes it from the thin letterbox band. */
body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__stage {
	position: relative;
	width: 100%;
	min-height: clamp(28rem, 64vh, 44rem);
	display: flex;
	overflow: hidden;
	border-radius: 0;
	box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--ink) 52%, transparent);
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__img {
	margin: 0 !important;
	position: absolute;
	inset: 0;
	height: 100%;
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-cinematic, 1000ms) var(--ease-expressive, ease);
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__stage:hover .universal-gallery__img img {
	transform: scale(1.04);
}

/* Centered bottom overlay: a top-to-bottom dark scrim keeps the text legible over
   any image. Anchored to the bottom, content centered. Always-dark -> #FFFFFF text. */
body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__overlay {
	position: relative;
	z-index: 2;
	width: 100%;
	margin-top: auto;
	text-align: center;
	padding-block: calc(clamp(3rem, 9vw, 6rem) clamp(1.6rem, 4vw, 2.8rem) * var(--density, 1));
	padding-inline: clamp(1.25rem, 5vw, 3rem);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 46%, rgba(0, 0, 0, 0) 100%);
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .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-full-bleed-overlay .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: #ffffff !important;
	max-width: 20ch;
	margin: 0 auto !important;
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__headline em {
	color: var(--on-dark, #ffffff);
	font-style: italic;
	opacity: 0.86;
}

body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__caption {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 500 !important;
	color: #ffffff !important;
	opacity: 0.92;
	max-width: 46ch;
	margin: var(--space-md, 1.5rem) auto 0 auto !important;
	line-height: var(--leading-relaxed, 1.65);
}

/* Tablet: shorter stage, still tall enough to feel like a hero. */
@media (max-width: 959px) {
	body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__stage {
		min-height: clamp(24rem, 56vh, 34rem);
	}
}

/* Mobile: keep the subject visible on a narrow column; tighten tracking. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__stage {
		min-height: 26rem;
	}
	body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__kicker {
		letter-spacing: 0.12em !important;
	}
	body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__overlay {
		padding-block: calc(clamp(3rem, 18vw, 5rem) clamp(1.25rem, 6vw, 2rem) * var(--density, 1));
	}
}

/* Keyboard focus parity with hover (stage/image is the focusable target when a
   client links the photo). */
body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__img a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: -4px;
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--single-full-bleed-overlay .universal-gallery__stage:hover .universal-gallery__img img {
		transform: none;
	}
}

/* A8/A9 left-shift fix: centered intro elements inside the constrained overlay are
   max-width-capped; 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-full-bleed-overlay.universal-gallery--single-full-bleed-overlay .universal-gallery__headline,
body.aibt-universal .universal-gallery--single-full-bleed-overlay.universal-gallery--single-full-bleed-overlay .universal-gallery__caption { margin-inline: auto !important; }
