/**
 * Variant CSS: gallery--split-seam-pair
 *
 * Two equal frames butted close together, separated only by a thin accent "seam"
 * down the centre (hover zoom). Unlike the gapped duo with captions: the photos
 * almost touch and read as one wide, split frame — a diptych. The seam is a single
 * centred accent rule drawn on the grid container (::before), so no extra DOM.
 * Text stays --ink (polarity aware); kicker + the em take --accent; images carry
 * --photo-filter. Image src are swapped by the photo system. Dedicated to exactly
 * two photos. Part of the `gallery` role.
 */

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

/* Intro. */
body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__intro {
	margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

body.aibt-universal .universal-gallery--split-seam-pair .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--split-seam-pair .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* The pair: two equal columns, a hair of gap, one shared rounded frame. The seam
   rule is drawn centred on this container via ::before. */
body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__seam {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.25rem, 0.7vw, 0.5rem);
	border-radius: var(--decor-radius, 16px);
	overflow: hidden;
	box-shadow: var(--decor-shadow, none);
}

/* The centre seam — a thin vertical accent rule sitting in the gap. */
body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__seam::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: var(--accent);
	opacity: 0.85;
	z-index: 2;
	pointer-events: none;
}

body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item {
	margin: 0 !important;
	overflow: hidden;
	height: 100%;
}

body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 500ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item:hover img,
body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item:focus-within img {
	transform: scale(1.05);
}

/* Keyboard focus parity with hover (image becomes focusable when a client links it). */
body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: -3px;
}

/* Tablet: hold the side-by-side diptych, trim the seam gap. */
@media (min-width: 641px) and (max-width: 959px) {
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__seam {
		gap: clamp(0.2rem, 0.5vw, 0.4rem);
	}
}

/* Mobile: stack the pair; the seam turns horizontal across the middle. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__seam {
		grid-template-columns: 1fr;
		gap: clamp(0.25rem, 1.4vw, 0.5rem);
	}
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__seam::before {
		top: 50%;
		bottom: auto;
		left: 0;
		right: 0;
		width: auto;
		height: 2px;
		transform: translateY(-50%);
	}
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item img {
		aspect-ratio: 4 / 3;
	}
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__kicker {
		letter-spacing: var(--tracking-wide) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item img {
		transition: none;
	}
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item:hover img,
	body.aibt-universal .universal-gallery--split-seam-pair .universal-gallery__item:focus-within img {
		transform: none;
	}
}
