/**
 * Variant CSS: gallery--quad-cinema-band-stack
 *
 * Four ultra-wide cinematic strips (21:9) stacked vertically and read top to
 * bottom like frames of a reel — each band spans the content width with an
 * overlaid corner index ("01".."04") and a short caption sitting on a bottom
 * gradient scrim. Unlike the even 2×2 square grid (quad-square-2x2), where the
 * four photos read as a balanced grid, and unlike the single letterbox band,
 * here the eye scrolls down four immersive panoramic bands. Intro text stays
 * --ink (polarity aware); kicker + the em take --accent. Caption text sits on an
 * always-dark photo scrim, so --on-dark is correct there. Image src are swapped
 * by the photo system (class .universal-gallery__item). Dedicated to exactly
 * four photos. Part of the `gallery` role.
 */

body.aibt-universal .universal-gallery--quad-cinema-band-stack {
	padding-block: calc(clamp(3rem, 7vw, 5.5rem) * var(--density, 1));
	background: var(--background);
	color: var(--text-primary);
}

/* Intro — centered children must keep auto inline margins (A8/A9). */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__intro {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__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;
	color: var(--accent) !important;
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 auto !important;
}

body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* The reel: four full-width bands stacked vertically. */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__bands {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

/* Each band: rounded, clipped, relative so the scrim + caption can overlay. */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band {
	position: relative;
	overflow: hidden;
	border-radius: var(--decor-radius, 14px);
	isolation: isolate;
}

/* The wide cinematic image fills the band (21:9 enforced via aspect-ratio). */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__item {
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 480ms) var(--ease-default, ease);
}

/* Bottom scrim — transparent fading to near-black so the caption stays legible
   on any photo. This is an always-dark surface, so --on-dark text is correct. */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	block-size: 55%;
	background: linear-gradient(
		to bottom,
		transparent,
		color-mix(in srgb, #000 60%, transparent)
	);
	pointer-events: none;
	z-index: 1;
}

/* Overlaid caption, anchored to the bottom-left corner of the band. */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__cap {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 2;
	display: flex;
	align-items: baseline;
	gap: var(--space-sm);
	margin: 0 !important;
	padding: clamp(1rem, 2.4vw, 1.6rem) clamp(1.1rem, 2.8vw, 2rem);
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	font-weight: 600 !important;
	line-height: var(--leading-snug, 1.3) !important;
	letter-spacing: var(--tracking-normal, 0) !important;
	color: var(--on-dark, #fff) !important;
}

/* Decorative accent index "01".."04". */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__idx {
	flex: none;
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: var(--tracking-tight, -0.01em) !important;
	color: var(--accent) !important;
}

/* Hover / keyboard focus — subtle scale, contained by overflow:hidden. */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band:hover img,
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band:focus-within img {
	transform: scale(1.04);
}

/* Keyboard focus parity (image becomes focusable when a client links it). */
body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--decor-radius, 14px);
}

/* Tablet: keep the wide bands, slightly tighter rhythm. */
@media (min-width: 641px) and (max-width: 959px) {
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__bands {
		gap: var(--space-sm);
	}
}

/* Mobile: 21:9 would be a sliver on a narrow screen — relax to 16:9 so each
   photo keeps presence; no horizontal overflow (width:100% + minmax safety). */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__item img {
		aspect-ratio: 16 / 9;
	}
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__kicker {
		letter-spacing: var(--tracking-wide) !important;
	}
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__cap {
		font-size: var(--text-xs) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__item img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band:hover img,
	body.aibt-universal .universal-gallery--quad-cinema-band-stack .universal-gallery__band:focus-within img {
		transform: none;
	}
}
