/* Sitzt im gepolsterten WPBakery-Layout, muss aber die volle Fensterbreite füllen. */
.chs {
	position: relative;
	width: 100vw;
	height: 100vh;
	height: 100svh;
	margin-left: calc(50% - 50vw);
	overflow: hidden;
	background: #000;
	touch-action: pan-y;
}

.chs-slide {
	position: absolute;
	inset: 0;
	visibility: hidden;
	transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.chs-slide.is-active,
.chs-slide.is-leaving {
	visibility: visible;
}

.chs-slide.no-transition {
	transition: none;
}

.chs-poster,
.chs-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* Das Standbild ist nur Fallback: sichtbar, bis der Film wirklich läuft. */
.chs-video,
.chs-vimeo {
	opacity: 0;
}

.chs-slide.is-playing .chs-video,
.chs-slide.is-playing .chs-vimeo {
	opacity: 1;
}

/* Ein iframe kennt kein object-fit: cover wird über das Seitenverhältnis des Films nachgebaut. */
.chs-vimeo {
	--chs-ratio: 1.7778;
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100%, calc(100vh * var(--chs-ratio)));
	width: max(100%, calc(100svh * var(--chs-ratio)));
	height: max(100%, calc(100vw / var(--chs-ratio)));
	max-width: none;
	border: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
}

/* Größe und Position wie das Logo im Header der übrigen Seiten. */
.chs-logo {
	position: absolute;
	z-index: 2;
	top: 27px;
	left: 50%;
	width: 221px;
	max-width: none;
	height: auto;
	pointer-events: none;
	transform: translateX(-50%);
}

/* Sitzt auf dem Desktop knapp über den Punkten (Abstand der Punkte + deren Höhe + Lücke). */
.chs-button {
	position: absolute;
	z-index: 2;
	bottom: calc(max(28px, 6vh) + 28px + 24px);
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: clamp(160px, 16vw, 310px);
	height: clamp(32px, 3vw, 58px);
	border: 2px solid #fff;
	border-radius: 3px;
	color: #fff;
	font-family: Akatab, sans-serif;
	font-size: clamp(14px, 1.3vw, 25px);
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transform: translateX(-50%);
	transition: background-color 0.2s;
}

.chs-button:hover,
.chs-button:focus-visible {
	background-color: rgba(255, 255, 255, 0.2);
	color: #fff;
	text-decoration: none;
}

.chs-dots {
	position: absolute;
	z-index: 2;
	bottom: max(28px, 6vh);
	left: 50%;
	display: flex;
	gap: 6px;
	transform: translateX(-50%);
}

/* Fläche größer als der sichtbare Punkt, damit er auch am Handy gut zu treffen ist. */
.chs-dot {
	display: block;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.chs-dot::before {
	content: "";
	display: block;
	box-sizing: border-box;
	width: 10px;
	height: 10px;
	margin: auto;
	border: 2px solid #fff;
	border-radius: 50%;
	transition: background-color 0.3s;
}

.chs-dot[aria-current="true"]::before {
	background-color: #fff;
}

.chs-dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
	border-radius: 50%;
}

@media (max-width: 991px) {
	.chs--desktop {
		display: none;
	}

	.chs-logo {
		top: 13px;
		width: 180px;
	}

	.chs-button {
		top: min(calc(50% + 52vw), calc(100% - 130px));
		bottom: auto;
		width: clamp(130px, 33vw, 240px);
		height: clamp(30px, 6.5vw, 46px);
		font-size: clamp(12px, 2.9vw, 18px);
	}
}

@media (min-width: 992px) {
	.chs--mobile {
		display: none;
	}
}

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