/**
 * Variant CSS: gallery--single-polaroid-feature
 *
 * One feature photo presented like a polaroid — a thick, light instant-photo
 * frame with a generous bottom border, a slight playful tilt and a soft drop
 * shadow, with a hand-labeled caption sitting on the bottom border. When the
 * client has ONE shot with character we show it warmly, like a print pulled
 * from the camera and set on a desk. Unlike grids or carousels: no thumbnails.
 *
 * The polaroid "white" uses a light surface mixed against --background so it
 * stays a believable photo border on dark themes too. The caption ink is a
 * near-black mixed with --accent so it reads on THAT light border (never
 * --text-primary, which can be white on dark themes — KI-020). Intro text is
 * --ink (polarity aware); kicker + the em take --accent. The image src is
 * swapped by the photo system. Part of the `gallery` role.
 */

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

/* Intro. */
body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__intro {
	margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

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

body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* The polaroid: a thick light frame, generous bottom border, slight tilt. */
body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__polaroid {
	width: min(100%, 30rem);
	margin-inline: auto;
	padding: clamp(0.9rem, 2.4vw, 1.4rem);
	padding-bottom: calc(clamp(3.4rem, 8vw, 4.6rem) * var(--density, 1));
	background: var(--surface, color-mix(in srgb, #ffffff 90%, var(--background)));
	border-radius: calc(var(--decor-radius, 16px) / 4);
	box-shadow: var(--decor-shadow-elevated, 0 30px 60px -24px color-mix(in srgb, var(--ink) 48%, transparent));
	transform: rotate(-2.4deg);
	transition: transform 220ms var(--ease-default, ease);
}

/* Straighten on hover — the print gets "tidied". */
body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__polaroid:hover {
	transform: rotate(0deg);
}

body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__item {
	margin: 0 !important;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	filter: var(--photo-filter, none);
}

/* Hand-labeled caption on the bottom border. Ink mixed with accent reads on the
   light polaroid surface on BOTH themes (not a bg-token-as-text — KI-020). */
body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__cap {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-normal, 0) !important;
	line-height: var(--leading-snug, 1.3) !important;
	color: color-mix(in srgb, #000000 80%, var(--accent)) !important;
	margin: clamp(1rem, 3vw, 1.5rem) auto 0 auto !important;
}

/* Mobile: reset the tilt so the print never overflows the narrow column. */
@media (max-width: 480px) {
	body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__polaroid {
		transform: rotate(0deg);
		width: 100%;
	}
}

/* Keyboard focus parity (the image is the focusable target when a client links
   it). */
body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__item a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 4px;
	border-radius: calc(var(--decor-radius, 16px) / 4);
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-gallery--single-polaroid-feature .universal-gallery__polaroid {
		transition: none;
	}
}

/* A8/A9 left-shift fix: centered intro element(s) are max-width-capped by WP
   constrained layout but pinned left by horizontal margin:0. Force
   margin-inline:auto. Doubled section class -> specificity beats the inline
   h2 typography rule; harmless on already-centered elements (auto -> 0). */
body.aibt-universal .universal-gallery--single-polaroid-feature.universal-gallery--single-polaroid-feature .universal-gallery__headline { margin-inline: auto !important; }
