/**
 * Variant CSS: gallery--spotlight-offset-panel
 * Layer 2 (Path B gallery role, 2026-06-10).
 *
 * One 3:2 photograph pushed to the front, with an accent-coloured backdrop panel
 * offset behind it (peeking out bottom-right) to build depth. Kicker + headline sit
 * above, one caption below. Unlike a flat shadowed frame (single-statement-frame):
 * a dynamic, "designed" accent using a layered background panel instead of a plain
 * shadow. The panel is drawn with a ::before pseudo-element (no extra block); the
 * photo is layered above it. Text sits on the section bg -> polarity-aware --ink;
 * kicker + em take --accent. Image src swapped by the photo system. Element Count
 * [1]. Part of the `gallery` role.
 */

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

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

body.aibt-universal .universal-gallery--spotlight-offset-panel .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 auto var(--space-sm, 0.75rem) auto !important;
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 auto !important;
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__headline em {
	color: var(--accent);
	font-style: italic;
}

/* Stage gives the offset panel room to overhang on the right + bottom without
   clipping or forcing horizontal scroll. */
body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__stage {
	max-width: 920px;
	margin-inline: auto;
	padding-inline-end: clamp(1rem, 3vw, 2.2rem);
	padding-block-end: clamp(1rem, 3vw, 2.2rem);
}

/* Frame holds the photo; ::before is the offset accent backdrop panel behind it. */
body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame {
	position: relative;
	aspect-ratio: 3 / 2;
	border-radius: var(--decor-radius, 14px);
	isolation: isolate;
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-block-start: clamp(1rem, 3vw, 2.2rem);
	inset-inline-start: clamp(1rem, 3vw, 2.2rem);
	right: calc(-1 * clamp(1rem, 3vw, 2.2rem));
	bottom: calc(-1 * clamp(1rem, 3vw, 2.2rem));
	background: var(--accent);
	border-radius: var(--decor-radius, 14px);
	opacity: 0.92;
	transition: transform var(--duration-medium, 350ms) var(--ease-emphasized, ease);
}

/* On hover the photo nudges toward the panel, deepening the layered look. */
body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame:hover::before {
	transform: translate(0.3rem, 0.3rem);
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__img {
	margin: 0 !important;
	position: relative;
	z-index: 1;
	height: 100%;
	border-radius: var(--decor-radius, 14px);
	overflow: hidden;
	box-shadow: 0 18px 44px -26px color-mix(in srgb, var(--ink) 40%, transparent);
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slower, 700ms) var(--ease-default, ease);
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame:hover .universal-gallery__img img {
	transform: scale(1.03);
}

/* Caption. */
body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__caption {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.55rem;
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	color: var(--ink) !important;
	opacity: 0.84;
	margin: clamp(1.4rem, 3vw, 2rem) auto 0 auto !important;
}

body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__caption::before {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	transform: translateY(-2px);
}

/* Tablet: keep the offset but trim the overhang. */
@media (max-width: 959px) and (min-width: 641px) {
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__stage {
		max-width: 620px;
	}
}

/* Mobile: shrink the offset so nothing clips at 375px; tighten tracking. */
@media (max-width: 640px) {
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__stage {
		padding-inline-end: 0.6rem;
		padding-block-end: 0.6rem;
	}
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame::before {
		inset-block-start: 0.6rem;
		inset-inline-start: 0.6rem;
		right: -0.6rem;
		bottom: -0.6rem;
	}
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__kicker {
		letter-spacing: 0.04em !important;
	}
}

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

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame:hover::before {
		transform: none;
	}
	body.aibt-universal .universal-gallery--spotlight-offset-panel .universal-gallery__frame:hover .universal-gallery__img img {
		transform: none;
	}
}

/* A8/A9 left-shift fix: centered intro children are capped by the constrained
   section but pinned left by horizontal margin:0 from the inline h2 typography
   rule. Force margin-inline:auto; doubled section class beats the inline rule. */
body.aibt-universal .universal-gallery--spotlight-offset-panel.universal-gallery--spotlight-offset-panel .universal-gallery__headline { margin-inline: auto !important; }
