/**
 * Variant CSS: before-after--vertical-stacked-reveal
 * Layer 2 — Path B before-after role (2026-06-06).
 * One dramatic case stacked vertically: full-width "before" frame ABOVE the
 * "after" frame, joined by a centred seam pill ("Nasza praca") that reads as
 * the moment of transition. Distinct from the column variants (side-by-side /
 * three-stage / case-grid): the eye travels top -> bottom through a single
 * transformation, the seam chip marking the cut.
 */

body.aibt-universal .universal-before-after--vertical-stacked-reveal {
	background: var(--background-alt);
	color: var(--text-primary);
}

/* Intro — centred block, A8-safe (horizontal-auto margins kept). */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__intro {
	margin-bottom: var(--space-xl);
	text-align: center;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__intro > * {
	margin-inline: auto !important;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal .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 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal h2.universal-before-after__headline,
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

/* Emphasised word in the headline picks up the accent. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__headline em {
	color: var(--accent);
	font-style: normal;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	line-height: var(--leading-relaxed) !important;
	color: color-mix(in srgb, var(--text-primary) 75%, transparent) !important;
	max-width: 56ch;
	margin: var(--space-sm) auto 0 auto !important;
}

/* Reveal stack — single column, before over after, framed as one object. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__reveal {
	display: flex;
	flex-direction: column;
	gap: 0 !important;
	border-radius: var(--decor-radius);
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
	box-shadow: 0 30px 70px -42px color-mix(in srgb, var(--ink) 50%, transparent);
}

/* Each shot frame — relative anchor for its corner tag. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__shot {
	position: relative;
	overflow: hidden;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__img {
	margin: 0 !important;
	display: block;
}

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

/* Subtle paired zoom on hover of the whole reveal — tactile result cue. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__reveal:hover .universal-before-after__img img {
	transform: scale(1.03);
}

/* Slightly desaturate the "before" so the "after" pops by contrast. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__shot--before .universal-before-after__img img {
	filter: var(--photo-filter, grayscale(0.18) contrast(0.96));
}

/* Corner tags — sit on each frame.
   Fixed rgba drop-shadow lifts the chip off any photo (theme-independent,
   correct text-on-photo pattern) so light chips stay crisp on bright shots. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__tag {
	position: absolute;
	top: var(--space-sm);
	left: var(--space-sm);
	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.4em 0.9em !important;
	border-radius: var(--decor-radius-pill);
	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--vertical-stacked-reveal .universal-before-after__tag--before {
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #fff) !important;
}

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

/* Seam — the centred transition marker sitting between the two frames.
   A thin accent band carrying a centred pill label that overlaps both shots. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__seam {
	position: relative;
	height: 0;
	z-index: 3;
	display: flex;
	justify-content: center;
}

body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__seam-label {
	position: relative;
	top: -1.1em;
	margin: 0 auto !important;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--cta-text-primary) !important;
	background: var(--accent);
	padding: 0.5em 1.4em !important;
	border-radius: var(--decor-radius-pill);
	box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent),
		0 0 0 4px color-mix(in srgb, var(--background-alt) 90%, transparent);
}

/* Caption — centred, A8-safe (horizontal-auto margins kept). */
body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__caption {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: color-mix(in srgb, var(--text-primary) 72%, transparent) !important;
	max-width: 60ch;
	margin: var(--space-md) auto 0 auto !important;
}

/* Tablet / mobile — taller frames read better when narrow. */
@media (max-width: 781px) {
	body.aibt-universal .universal-before-after--vertical-stacked-reveal .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--vertical-stacked-reveal .universal-before-after__kicker,
	body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__tag,
	body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__seam-label {
		letter-spacing: 0 !important;
	}
}

/* Honour reduced-motion — kill the hover zoom. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__img img,
	body.aibt-universal .universal-before-after--vertical-stacked-reveal .universal-before-after__reveal:hover .universal-before-after__img img {
		transition: none;
		transform: none;
	}
}

/* A8/A9 left-shift fix (2026-06-08): centered intro element(s) were max-width-capped by
   WP constrained layout but pinned left by horizontal margin:0. Force margin-inline:auto.
   Section class doubled -> specificity (0,4,1) beats h2.__headline-style rules; harmless on
   already-centered elements (auto margins compute to 0). Only left/right are overridden. */
body.aibt-universal .universal-before-after--vertical-stacked-reveal.universal-before-after--vertical-stacked-reveal .universal-before-after__kicker,
body.aibt-universal .universal-before-after--vertical-stacked-reveal.universal-before-after--vertical-stacked-reveal .universal-before-after__headline { margin-inline: auto !important; }
