/* AB Video Reveal 1.1.0 - allBLANCO */

.ab-vr {
	--ab-vr-w0: 62;
	--ab-vr-h0: 58;
	--ab-vr-r0: 24;
	--ab-vr-r1: 0;
	--ab-vr-pin: 130vh;
	--ab-vr-veil: rgba(0, 0, 0, 0.55);
	--ab-vr-veil-soft: 7%;
	position: relative;
	width: 100%;
}

.ab-vr--bleed {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
}

.ab-vr__track {
	position: relative;
	height: calc(100vh + var(--ab-vr-pin));
	height: calc(100svh + var(--ab-vr-pin));
}

.ab-vr__sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	overflow: clip;
}

/* Rahmen: immer voll gross, sichtbar gemacht per clip-path.
   Das ist ruckelfrei, weil sich das Layout nie aendert. */
.ab-vr__frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
	clip-path: inset(21% 19% 21% 19% round 24px);
	will-change: clip-path;
	cursor: pointer;
	background: #000;
}

.ab-vr__media {
	position: absolute;
	inset: 0;
	will-change: transform;
	transform-origin: 50% 50%;
}

.ab-vr__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	max-width: none;
	border: 0;
	border-radius: 0;
}

.ab-vr__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
	background: repeating-linear-gradient(45deg, #1a1a1c 0 14px, #202023 14px 28px);
}

.ab-vr__shade {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0;
	pointer-events: none;
}

/* ---------- Dunkle Flaeche ----------
   Eine 3x so grosse Flaeche mit weichem Verlauf (dunkel -> transparent)
   wird per transform hereingeschoben. Bei 0 sieht man nur den transparenten
   Teil, bei 1 nur den dunklen. Die Kante wandert dabei von links oben
   nach rechts unten (bzw. von oben / von links). */
.ab-vr__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.ab-vr__veil-plane {
	position: absolute;
	left: 0;
	top: 0;
	width: 300%;
	height: 300%;
	will-change: transform;
	transform: translate3d(-66.667%, -66.667%, 0);
	background: linear-gradient(
		135deg,
		var(--ab-vr-veil) 0%,
		var(--ab-vr-veil) calc(50% - var(--ab-vr-veil-soft)),
		transparent calc(50% + var(--ab-vr-veil-soft))
	);
}

.ab-vr--veil-top .ab-vr__veil-plane {
	width: 100%;
	transform: translate3d(0, -66.667%, 0);
	background: linear-gradient(
		180deg,
		var(--ab-vr-veil) 0%,
		var(--ab-vr-veil) calc(50% - var(--ab-vr-veil-soft)),
		transparent calc(50% + var(--ab-vr-veil-soft))
	);
}

.ab-vr--veil-left .ab-vr__veil-plane {
	height: 100%;
	transform: translate3d(-66.667%, 0, 0);
	background: linear-gradient(
		90deg,
		var(--ab-vr-veil) 0%,
		var(--ab-vr-veil) calc(50% - var(--ab-vr-veil-soft)),
		transparent calc(50% + var(--ab-vr-veil-soft))
	);
}

/* ---------- Text / Bild ueber dem Video ---------- */

.ab-vr__overlay {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 2;
	width: min(90%, 1100px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
	opacity: 0;
	transform: translate(-50%, -40%);
	transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
	pointer-events: none;
}

.ab-vr.is-titled .ab-vr__overlay {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.ab-vr__heading {
	margin: 0;
	color: #fff;
	font-size: clamp(32px, 6vw, 96px);
	line-height: 1.02;
	letter-spacing: -0.02em;
}

.ab-vr__heading--img {
	font-size: 0;
	line-height: 0;
	letter-spacing: 0;
}

/* Standardbreite bewusst mit niedriger Spezifitaet,
   damit der Elementor-Regler "Bildbreite" immer gewinnt */
.ab-vr__logo {
	width: 520px;
}

.ab-vr img.ab-vr__logo {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ab-vr--logo-white .ab-vr__logo {
	filter: brightness(0) invert(1);
}

/* ---------- Sound-Button ---------- */

.ab-vr__sound {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px 10px 13px;
	border: 0;
	border-radius: 40px;
	background: #ffffff;
	color: #0c0c0e;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	will-change: transform, opacity;
	transition: opacity 0.4s ease, scale 0.25s ease;
	pointer-events: none;
}

.ab-vr.is-ready .ab-vr__sound {
	opacity: 1;
	pointer-events: auto;
}

/* vor dem Aufziehen noch zurueckhaltend */
.ab-vr.is-ready:not(.is-grown) .ab-vr__sound {
	opacity: 0;
	pointer-events: none;
}

.ab-vr__sound:hover {
	scale: 1.05;
}

.ab-vr__sound:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ab-vr__ico {
	width: 18px;
	height: 18px;
	flex: none;
}

.ab-vr__ico--off { display: none; }
.ab-vr.is-unmuted .ab-vr__ico--on { display: none; }
.ab-vr.is-unmuted .ab-vr__ico--off { display: block; }

/* Folgt der Button der Maus, laesst er Klicks zum Video durch,
   sonst wuerde er dem Mauszeiger "im Weg" stehen */
.ab-vr.is-following .ab-vr__sound {
	pointer-events: none;
}

@media (hover: none) {
	.ab-vr__frame { cursor: default; }
}

@media (prefers-reduced-motion: reduce) {
	.ab-vr__overlay { transition: none; }
}
