/**
 * Variant CSS: before-after--triptych-arch-frames
 * Layer 2 — Path B before-after role (2026-06-06).
 * Three transformation stages ("Przed" / "W trakcie" / "Po") composed as a
 * triptych of arch-topped frames. The middle "W trakcie" panel is ELEVATED
 * (taller + raised) and accent-tagged, so the eye lands on the work-in-progress.
 * Distinct from three-stage-progression (equal columns + arrow flow): here the
 * layout is asymmetric and gallery-like. Text stays --ink (polarity-aware);
 * kicker, em and the "W trakcie" tag take --accent. Images are literal uploads.
 */

body.aibt-universal .universal-before-after--triptych-arch-frames {
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
	background: var(--background-alt);
	color: var(--ink);
}

/* Intro — centred block, A8-safe (horizontal-auto margins preserved). */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__intro {
	margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__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-before-after--triptych-arch-frames .universal-before-after__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 auto !important;
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--ink) !important;
	opacity: 0.78;
	margin: var(--space-sm) auto 0 auto !important;
	max-width: 56ch;
}

/* Triptych — three panels, baseline-aligned so the raised middle reads clearly. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__triptych {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-end;
	justify-content: center;
	gap: clamp(0.75rem, 2.4vw, 1.6rem);
}

/* Side panels (before / after) — narrower. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* Middle "W trakcie" panel — wider + lifted, the visual anchor. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel--during {
	flex: 1.32 1 0;
	transform: translateY(-1.4rem);
}

/* Arch frame — large top corners, gentle bottom; clips the photo + tag. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__frame {
	position: relative;
	overflow: hidden;
	border-radius: clamp(60px, 11vw, 130px) clamp(60px, 11vw, 130px) var(--decor-radius) var(--decor-radius);
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
	box-shadow: 0 18px 44px -28px color-mix(in srgb, var(--ink) 42%, transparent);
	transition: transform var(--duration-fast, 240ms) var(--ease-default, ease),
		box-shadow var(--duration-fast, 240ms) var(--ease-default, ease);
}

/* The middle frame gets a thin accent ring to mark it as the live stage. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel--during .universal-before-after__frame {
	border-color: color-mix(in srgb, var(--accent) 55%, transparent);
	box-shadow: 0 22px 52px -26px color-mix(in srgb, var(--accent) 50%, transparent);
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel:hover .universal-before-after__frame {
	transform: translateY(-3px);
	box-shadow: 0 24px 56px -26px color-mix(in srgb, var(--ink) 50%, transparent);
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__img {
	margin: 0 !important;
	display: block;
}

body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	filter: var(--photo-filter, none);
	transition: transform var(--duration-slow, 900ms) var(--ease-elegant, ease);
}

/* Gentle zoom on hover — tactile cue (reduced-motion handled below + globally). */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel:hover .universal-before-after__img img {
	transform: scale(1.04);
}

/* Corner tags — sit on each frame. Fixed rgba drop-shadow lifts the chip off
   any photo (theme-independent, correct text-on-photo pattern). */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__tag {
	position: absolute;
	top: var(--space-sm);
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	margin: 0 !important;
	padding: 0.35em 0.9em !important;
	border-radius: var(--decor-radius-pill);
	white-space: nowrap;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* "Przed" — neutral dark chip (text-on-dark). */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__tag--before {
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

/* "W trakcie" — accent chip, the live stage. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__tag--during {
	background: var(--accent);
	color: var(--cta-text-primary, #fff) !important;
}

/* "Po" — CTA chip to signal the win. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__tag--after {
	background: var(--cta-bg-primary);
	color: var(--cta-text-primary) !important;
}

/* Stage caption under each frame. */
body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__caption {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	font-weight: 600 !important;
	color: var(--ink) !important;
	opacity: 0.8;
	margin: var(--space-sm) auto 0 auto !important;
}

/* Tablet — flatten the lift so baselines don't collide, keep 3-up. */
@media (max-width: 781px) {
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel--during {
		transform: none;
	}
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__frame {
		border-radius: clamp(40px, 9vw, 80px) clamp(40px, 9vw, 80px) var(--decor-radius) var(--decor-radius);
	}
}

/* Mobile — stack to a single column, each panel full width. */
@media (max-width: 560px) {
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__triptych {
		flex-direction: column;
		align-items: stretch;
		gap: clamp(1.4rem, 6vw, 2rem);
	}
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel,
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel--during {
		flex: 1 1 100%;
		width: 100%;
	}
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__img img {
		aspect-ratio: 4 / 3;
	}
}

/* Cap uppercase tracking on small screens (A5). */
@media (max-width: 640px) {
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__tag {
		letter-spacing: 0 !important;
	}
}

/* Respect reduced-motion — no hover transforms/zoom. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel:hover .universal-before-after__frame,
	body.aibt-universal .universal-before-after--triptych-arch-frames .universal-before-after__panel:hover .universal-before-after__img img {
		transform: none;
	}
}
