/**
 * Variant CSS: gallery--portrait-caption-aside
 * Layer 2 (Path B gallery role, 2026-06-10).
 *
 * One portrait 4:5 photo on the left, with kicker + headline + one caption stacked
 * in a column on the right, aligned to the photo's vertical centre. Unlike the
 * centered wide cover (single-statement-frame): an editorial "image + caption"
 * split that gives a single portrait shot room for narration. Text sits on the
 * section bg so it uses polarity-aware --ink; kicker + the em take --accent. The
 * image src is swapped by the photo system. Element Count [1]. `gallery` role.
 */

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

/* Split: align the two columns to a shared centre line; comfortable gutter. */
body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__split {
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

/* Portrait frame. */
body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__frame {
	position: relative;
	border-radius: var(--decor-radius, 16px);
	overflow: hidden;
	aspect-ratio: 4 / 5;
	box-shadow: 0 22px 56px -30px color-mix(in srgb, var(--ink) 46%, transparent);
}

body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__img {
	margin: 0 !important;
	height: 100%;
}

body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slower, 700ms) var(--ease-default, ease);
}

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

/* Text column. */
body.aibt-universal .universal-gallery--portrait-caption-aside .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.16em) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-sm, 0.75rem) 0 !important;
}

/* Accent rule under the kicker for an editorial tick. */
body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__kicker::after {
	content: "";
	display: block;
	width: 2.4rem;
	height: 2px;
	margin-top: 0.7rem;
	background: var(--accent);
	border-radius: var(--radius-pill, 999px);
}

body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__headline em {
	color: var(--accent);
	font-style: italic;
}

body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__caption {
	font-family: var(--font-body) !important;
	font-size: var(--text-md) !important;
	color: var(--ink) !important;
	opacity: 0.84;
	margin: clamp(1rem, 2.4vw, 1.6rem) 0 0 0 !important;
	line-height: var(--leading-relaxed, 1.55);
	max-width: 46ch;
}

/* Tablet: keep the split but tighten the gutter. */
@media (max-width: 959px) and (min-width: 641px) {
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__split {
		gap: clamp(1.5rem, 4vw, 2.5rem);
	}
}

/* Mobile: stack to one column, photo on top, text centered below. The columns
   become full-width, so center the text and auto its margins (A8/A9 — a centered
   child of a constrained section must auto both horizontal margins, else it pins
   left under the contentSize cap). */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__split {
		gap: clamp(1.4rem, 6vw, 2.2rem);
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__media-col,
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__text-col {
		flex-basis: 100% !important;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__frame {
		max-width: 420px;
		margin-inline: auto;
		aspect-ratio: 4 / 5;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__text-col {
		text-align: center;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__kicker {
		letter-spacing: 0.04em !important;
		margin-inline: auto !important;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__kicker::after {
		margin-inline: auto;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__headline {
		margin-inline: auto !important;
	}
	body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__caption {
		margin-inline: auto !important;
	}
}

/* Keyboard focus parity with hover. */
body.aibt-universal .universal-gallery--portrait-caption-aside .universal-gallery__img a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 4px;
	border-radius: var(--decor-radius, 16px);
}

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