/* Revealr – before/after slider */
.rvl {
	--rvl-pos: 50%;
	--rvl-accent: #fff;
	--rvl-radius: 16px;
	--rvl-ratio: 16 / 10;
	margin: 0 0 1.5em;
	padding: 0;
}
.rvl__stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--rvl-ratio);
	border-radius: var(--rvl-radius);
	background: #e5e7eb;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
	cursor: ew-resize;
	isolation: isolate;
	box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.45);
}
.rvl--v .rvl__stage { touch-action: pan-x; cursor: ns-resize; }
.rvl .rvl__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
}
.rvl__clip {
	position: absolute;
	inset: 0;
	z-index: 1;
	clip-path: inset(0 calc(100% - var(--rvl-pos)) 0 0);
	will-change: clip-path;
}
.rvl--v .rvl__clip { clip-path: inset(0 0 calc(100% - var(--rvl-pos)) 0); }

/* Handle */
.rvl__handle {
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	left: var(--rvl-pos);
	width: 0;
	outline: none;
}
.rvl--v .rvl__handle { left: 0; right: 0; top: var(--rvl-pos); bottom: auto; width: auto; height: 0; }
.rvl__line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -1.5px;
	width: 3px;
	background: var(--rvl-accent);
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}
.rvl--v .rvl__line { left: 0; right: 0; top: -1.5px; bottom: auto; width: auto; height: 3px; }
.rvl__knob {
	position: absolute;
	top: 50%;
	left: 0;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	color: #0f172a;
	background: var(--rvl-accent);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
	transition: transform 0.2s cubic-bezier(.2, .9, .3, 1.3), box-shadow 0.2s;
}
.rvl--v .rvl__knob { top: 0; left: 50%; }
.rvl__stage:hover .rvl__knob, .rvl.is-dragging .rvl__knob { transform: translate(-50%, -50%) scale(1.08); }
.rvl__handle:focus-visible .rvl__knob { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.55), 0 8px 24px rgba(0, 0, 0, 0.3); }

/* Labels */
.rvl__label {
	position: absolute;
	z-index: 2;
	top: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(8px) saturate(1.3);
	-webkit-backdrop-filter: blur(8px) saturate(1.3);
	pointer-events: none;
	transition: opacity 0.25s;
}
.rvl__label--before { left: 14px; }
.rvl__label--after { right: 14px; }
.rvl--v .rvl__label--after { top: auto; bottom: 14px; right: auto; left: 14px; }
.rvl--labels-hover .rvl__label { opacity: 0; }
.rvl--labels-hover .rvl__stage:hover .rvl__label { opacity: 1; }
/* Hide a label when the handle covers it. */
.rvl.is-near-start .rvl__label--before, .rvl.is-near-end .rvl__label--after { opacity: 0; }

.rvl.is-animating .rvl__clip, .rvl.is-animating .rvl__handle { transition: clip-path 0.9s cubic-bezier(.65, 0, .35, 1), left 0.9s cubic-bezier(.65, 0, .35, 1), top 0.9s cubic-bezier(.65, 0, .35, 1); }

.rvl__caption {
	margin-top: 10px;
	font-size: 14px;
	text-align: center;
	opacity: 0.75;
}
.rvl-missing { padding: 12px 16px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; }

@media (prefers-reduced-motion: reduce) {
	.rvl * { transition: none !important; }
}
