/**
 * Variant CSS: gallery--hero-plus-three-strip
 *
 * One wide lead frame (16:9) on top, then a strip of three equal thumbnails
 * below (hover zoom) — a layout with a clear "this first, then the rest"
 * hierarchy. Unlike the even 2×2 quad or the four-column filmstrip: the first
 * shot dominates, three support it. Built as one flat grid where the hero spans
 * all three columns. Text stays --ink (polarity aware); kicker + the em take
 * --accent; tiles use --decor-radius and images carry --photo-filter. Image src
 * are swapped by the photo system. Dedicated to exactly four photos. Part of the
 * `gallery` role.
 */

body.aibt-universal .universal-gallery--hero-plus-three-strip {
	padding-block: calc(clamp(3rem, 7vw, 5.5rem) * var(--density, 1));
	background: var(--background);
	color: var(--text-primary);
}

/* Intro. */
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__intro {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .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 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* Layout: 3-column grid. The hero spans all three columns; the three thumbs take
   one column each on the second row. */
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__stack {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.7rem, 1.6vw, 1.1rem);
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item {
	margin: 0 !important;
	overflow: hidden;
	border-radius: var(--decor-radius, 14px);
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item--hero {
	grid-column: 1 / -1;
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 500ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item:hover img,
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item:focus-within img {
	transform: scale(1.04);
}

/* Keyboard focus parity with hover (image becomes focusable when a client links it). */
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--decor-radius, 14px);
}

/* Robustness: the count-fit trims to the client's upload count. The 3-column
   strip only reads cleanly with all three thumbs present. With exactly two tiles
   left (hero + 1) the lone thumb would stretch oddly wide — fall back to a single
   column so each remaining frame stays full-width and balanced. Degrades safely
   where :has() is unsupported (grid simply keeps three columns). */
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__stack:not(:has(.universal-gallery__item:nth-child(3))) {
	grid-template-columns: 1fr;
}
body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__stack:not(:has(.universal-gallery__item:nth-child(3))) .universal-gallery__item--hero {
	grid-column: auto;
}

/* Tablet: keep the hero full-width over three thumbs; just trim the gap. */
@media (min-width: 641px) and (max-width: 959px) {
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__stack {
		gap: clamp(0.6rem, 1.8vw, 0.9rem);
	}
}

/* Mobile: a 3-up thumb strip gets too cramped — drop to two columns so the
   hero leads, then thumbs flow 2-up below. The 4th thumb wraps to its own row;
   that's fine (it keeps its aspect-ratio, no squish). */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__kicker {
		letter-spacing: var(--tracking-wide) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item:hover img,
	body.aibt-universal .universal-gallery--hero-plus-three-strip .universal-gallery__item:focus-within img {
		transform: none;
	}
}
