/*
 * Variante „effekte“ (Standard seit 2026-11-16, Freigabe Inhaber; Rückweg ?variante=lebendig bzw.
 * wp option update pnt_variante lebendig). Baut auf pnt-lebendig.css auf; greift nur mit body.pnt-effekte.
 * Startseite: Fotokacheln, dunkle Abschnitte mit Foto, Ablauf als Scroll-Geschichte; /leistungen/: Fotokacheln;
 * Seitenköpfe mit Foto (.pnt-subhero--foto): Parallax und gestaffeltes Einblenden.
 * Bewegung nur bei prefers-reduced-motion: no-preference; Scroll-Effekte nur, wo der Browser
 * Scroll-Animationen kann – sonst steht alles still und bleibt vollständig lesbar.
 */

/* ---------- Kopfleiste: Milchglas beim Scrollen ---------- */
body.pnt-effekte .l-header.sticky .l-subheader.at_middle {
	background: color-mix(in srgb, var(--pnt-white) 72%, transparent);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	backdrop-filter: blur(16px) saturate(1.4);
	transition: background .3s;
}

/* ---------- Leistungen als Fotokacheln ---------- */
body.pnt-effekte .pnt-cards--fotos .g-cols {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-template-rows: 380px; /* erste Reihe (zwei große Kacheln) höher */
	grid-auto-rows: minmax(300px, auto);
	gap: 18px;
	margin-inline: 0; /* Impreza-Spaltenabstand (negativer Rand) entfällt im Raster */
}
body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card { width: auto !important; margin: 0; grid-column: span 2; }
/* Raster 3 + 3 / 2 + 2 + 2 / 2 + 2 + 2 / 3 + 3 (10 Leistungen) */
body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:nth-child(-n+2),
body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:nth-child(n+9) { grid-column: span 3; }
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner { padding: 0 !important; height: 100%; }
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper,
body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:last-child:nth-child(3n+1) > .vc_column-inner > .wpb_wrapper {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	height: 100%;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	gap: 0;
	padding: 28px;
	border: 0;
	border-radius: var(--pnt-radius-card);
	background: linear-gradient(140deg, var(--pnt-primary) 0%, var(--pnt-dark) 85%);
	color: var(--pnt-white);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
/* Foto (aus inc/pnt-2026.php, --pnt-kachel-bild) und dunkler Verlauf für die Lesbarkeit */
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper::before {
	content: "";
	position: absolute;
	inset: 0;
	width: auto; /* überschreibt die grüne Akzentlinie aus pnt-lebendig.css (gleiches Pseudo-Element) */
	height: auto;
	z-index: -1;
	background: center / cover no-repeat;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
/* Fotos erst laden, wenn das Raster in die Nähe kommt (pnt-effekte.js setzt .ist-nah) – sonst konkurrieren
   ~460 KB Kachelfotos mit dem Hero-Foto um die Ladezeit */
body.pnt-effekte .pnt-cards--fotos.ist-nah .pnt-card > .vc_column-inner > .wpb_wrapper::before { background-image: var(--pnt-kachel-bild, none); }
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(var(--pnt-dark-2-rgb), .05) 15%, rgba(var(--pnt-dark-2-rgb), .82) 78%);
}
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 50px rgba(var(--pnt-dark-2-rgb), .28);
	border: 0;
}
body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper:hover::before { width: auto; transform: scale(1.05); }
body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box { display: block; margin: 0 0 12px; }
body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box .w-iconbox-icon { color: var(--pnt-lime); font-size: 22px; margin: 0 0 10px; }
body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box .w-iconbox-title,
body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box .w-iconbox-title a { color: var(--pnt-white); font-size: 22px; }
body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:nth-child(-n+2) .w-iconbox.pnt-card__box .w-iconbox-title { font-size: 28px; }
body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box .w-iconbox-text { color: color-mix(in srgb, var(--pnt-white) 86%, transparent); font-size: 15px; max-width: 520px; }
body.pnt-effekte .pnt-cards--fotos .pnt-textlink { margin: 0; align-self: flex-start; color: var(--pnt-white) !important; }
@media (max-width: 1024px) {
	body.pnt-effekte .pnt-cards--fotos .g-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(280px, auto); }
	body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card,
	body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:nth-child(n) { grid-column: span 1; } /* :nth-child(n) hebt die Spezifität über die Desktop-Regeln */
}
@media (max-width: 600px) {
	body.pnt-effekte .pnt-cards--fotos .g-cols { grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(240px, auto); gap: 14px; }
	body.pnt-effekte .pnt-cards--fotos .w-iconbox.pnt-card__box .w-iconbox-title,
	body.pnt-effekte .pnt-cards--fotos .g-cols > .pnt-card:nth-child(-n+2) .w-iconbox.pnt-card__box .w-iconbox-title { font-size: 21px; }
	body.pnt-effekte .pnt-cards--fotos .pnt-card > .vc_column-inner > .wpb_wrapper { padding: 22px; }
}

/* ---------- Dunkle Abschnitte mit eigenem Foto (Telefonie, Kasten „Gemeinsame Basis“) ---------- */
body.pnt-effekte .l-section.pnt-dark-band { position: relative; overflow: hidden; isolation: isolate; }
/* Das Nachrücken der Spalten (pnt-lebendig.css) nutzt transform – das würde das Foto an die Spalte binden */
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:first-child { animation: none !important; transform: none !important; }
body.pnt-effekte .pnt-dark-band > .l-section-h,
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols,
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:first-child,
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:first-child > .vc_column-inner,
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper { position: static; }
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:first-child > .vc_column-inner > .wpb_wrapper > :not(.pnt-bild),
body.pnt-effekte .pnt-dark-band > .l-section-h > .g-cols > .wpb_column:nth-child(2) { position: relative; z-index: 1; }
body.pnt-effekte .pnt-dark-band .pnt-bild--flaeche,
body.pnt-effekte .pnt-dark-panel .wpb_wrapper > .pnt-bild--flaeche {
	position: absolute;
	inset: -12% 0;
	z-index: 0;
	margin: 0;
	pointer-events: none;
}
body.pnt-effekte .pnt-dark-panel .wpb_wrapper > .pnt-bild--flaeche { inset: -10% 0; }
body.pnt-effekte .pnt-dark-band .pnt-bild--flaeche img,
body.pnt-effekte .pnt-dark-panel .pnt-bild--flaeche img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: 0;
	object-fit: cover;
}
body.pnt-effekte .pnt-dark-band .pnt-bild--flaeche::after,
body.pnt-effekte .pnt-dark-panel .pnt-bild--flaeche::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(var(--pnt-dark-2-rgb), .92) 0%, rgba(var(--pnt-dark-2-rgb), .78) 55%, rgba(var(--pnt-dark-2-rgb), .55) 100%);
}
body.pnt-effekte .pnt-dark-panel .pnt-bild--flaeche::after { background: rgba(var(--pnt-dark-2-rgb), .8); }
body.pnt-effekte .pnt-dark-panel .wpb_wrapper > :not(.pnt-bild) { z-index: 1; }

/* ---------- Ablauf als Scroll-Geschichte (pnt-effekte.js setzt .ist-aktiv) ---------- */
@media (min-width: 901px) {
	body.pnt-effekte #arbeitsweise > .l-section-h > .g-cols > .wpb_column > .vc_column-inner > .wpb_wrapper {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		column-gap: 72px;
		align-items: start;
	}
	body.pnt-effekte #arbeitsweise .wpb_column > .vc_column-inner > .wpb_wrapper > :not(.pnt-ablauf-bilder):not(.pnt-steps) { grid-column: 1 / -1; }
	body.pnt-effekte #arbeitsweise .wpb_text_column.pnt-ablauf-bilder {
		grid-column: 1;
		position: sticky;
		top: 130px;
		margin: 46px 0 0;
	}
	body.pnt-effekte .pnt-ablauf-bilder > .wpb_wrapper {
		position: relative;
		aspect-ratio: 4 / 5;
		max-height: calc(100vh - 180px);
		border-radius: var(--pnt-radius-img);
		overflow: hidden;
		background: var(--pnt-dark);
	}
	body.pnt-effekte .pnt-ablauf-bilder p { margin: 0; }
	body.pnt-effekte .pnt-ablauf-bilder .pnt-bild { position: absolute; inset: 0; margin: 0; transition: opacity .7s ease; }
	body.pnt-effekte .pnt-ablauf-bilder .pnt-bild:not(.ist-aktiv) { opacity: 0; }
	body.pnt-effekte .pnt-ablauf-bilder .pnt-bild img { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
	body.pnt-effekte .pnt-ablauf-bilder figcaption { display: none; }
	body.pnt-effekte #arbeitsweise .g-cols.pnt-steps {
		grid-column: 2;
		display: flex;
		flex-direction: column;
		margin-top: 46px;
	}
	body.pnt-effekte #arbeitsweise .g-cols.pnt-steps > .pnt-step {
		width: 100% !important;
		min-height: 52vh;
		display: flex;
		align-items: center;
		transition: opacity .5s;
	}
	body.pnt-effekte #arbeitsweise .g-cols.pnt-steps.ist-gesteuert > .pnt-step:not(.ist-aktiv) { opacity: .35; }
	/* Ohne Skript (oder ohne IntersectionObserver): keine Bildspalte, Schritte normal lesbar */
	body.pnt-effekte #arbeitsweise .pnt-ablauf-bilder:not(.ist-gesteuert) { display: none; }
	body.pnt-effekte #arbeitsweise .pnt-step > .vc_column-inner { width: 100%; }
	body.pnt-effekte #arbeitsweise .pnt-step h3 { font-size: 30px; font-weight: 900; }
	body.pnt-effekte #arbeitsweise .pnt-step .wpb_text_column { font-size: 18px; max-width: 460px; }
	/* Fortschrittslinie der Variante „lebendig“ hier nicht nötig */
	body.pnt-effekte #arbeitsweise .pnt-step > .vc_column-inner > .wpb_wrapper::after { display: none; }
}
@media (max-width: 900px) {
	body.pnt-effekte .pnt-ablauf-bilder { display: none; }
}

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* Hero: Inhalte gestaffelt beim Laden. Nie ganz unsichtbar (opacity > 0): Chrome wertet unsichtbare
	   Elemente nicht für LCP, sonst zählt erst der später erscheinende Cookie-Hinweis (LCP 5,5 s statt ~2 s). */
	@keyframes pnt-effekte-ein { from { opacity: .25; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
	body.pnt-effekte .pnt-hero--foto .wpb_wrapper > :is(.pnt-eyebrow, .pnt-hero__title-wrap, .pnt-lead, .pnt-actions, .pnt-proof),
	body.pnt-effekte .pnt-subhero--foto .wpb_column:first-child .wpb_wrapper > :is(.pnt-eyebrow, .pnt-crumbs, .pnt-subhero__title-wrap, .pnt-lead, .pnt-actions) {
		animation: pnt-effekte-ein .9s cubic-bezier(.2, .7, .2, 1) both;
	}
	@supports (animation-timeline: scroll()) {
		/* Hero: Foto läuft langsamer als der Text, der Text blendet beim Wegscrollen weich aus.
		   Eigene Eigenschaften (transform, filter), damit es sich nicht mit dem Einblenden (translate, opacity) stört. */
		@keyframes pnt-effekte-parallax { from { transform: translateY(0); } to { transform: translateY(12%); } }
		@keyframes pnt-effekte-weg { from { transform: none; filter: opacity(1); } to { transform: translateY(-70px); filter: opacity(0); } }
		body.pnt-effekte .pnt-hero--foto .pnt-bild {
			inset: -14% 0 0 0;
			animation: pnt-effekte-parallax linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100vh;
		}
		@media (min-width: 901px) {
			body.pnt-effekte .pnt-subhero--foto .pnt-bild--flaeche {
				inset: -14% 0 0 0;
				animation: pnt-effekte-parallax linear both;
				animation-timeline: scroll(root);
				animation-range: 0 100vh;
			}
		}
		body.pnt-effekte .pnt-hero--foto .wpb_wrapper > :is(.pnt-eyebrow, .pnt-hero__title-wrap, .pnt-lead, .pnt-actions, .pnt-proof),
		body.pnt-effekte .pnt-subhero--foto .wpb_column:first-child .wpb_wrapper > :is(.pnt-eyebrow, .pnt-crumbs, .pnt-subhero__title-wrap, .pnt-lead, .pnt-actions) {
			animation: pnt-effekte-ein .9s cubic-bezier(.2, .7, .2, 1) both, pnt-effekte-weg linear both;
			animation-timeline: auto, scroll(root);
			animation-range: normal, 10vh 75vh;
		}

		/* Dunkle Abschnitte: Foto im Hintergrund mit leichtem Parallax */
		@keyframes pnt-effekte-tiefe { from { transform: translateY(-8%); } to { transform: translateY(8%); } }
		body.pnt-effekte .pnt-dark-band .pnt-bild--flaeche,
		body.pnt-effekte .pnt-dark-panel .wpb_wrapper > .pnt-bild--flaeche {
			animation: pnt-effekte-tiefe linear both;
			animation-timeline: view();
			animation-range: cover 0% cover 100%;
		}
	}
	/* Staffelung: gleiche Spezifität wie die Kurzschreibweisen oben – muss DAHINTER stehen, sonst setzt
	   `animation:` die Verzögerung zurück. Nicht umsortieren. */
	body.pnt-effekte .pnt-hero--foto .wpb_wrapper > .pnt-hero__title-wrap { animation-delay: .12s, 0s; }
	body.pnt-effekte .pnt-hero--foto .wpb_wrapper > .pnt-lead { animation-delay: .28s, 0s; }
	body.pnt-effekte .pnt-hero--foto .wpb_wrapper > .pnt-actions { animation-delay: .42s, 0s; }
	body.pnt-effekte .pnt-subhero--foto .wpb_column:first-child .wpb_wrapper > .pnt-subhero__title-wrap { animation-delay: .12s, 0s; }
	body.pnt-effekte .pnt-subhero--foto .wpb_column:first-child .wpb_wrapper > .pnt-lead { animation-delay: .28s, 0s; }
	body.pnt-effekte .pnt-subhero--foto .wpb_column:first-child .wpb_wrapper > .pnt-actions { animation-delay: .42s, 0s; }
	body.pnt-effekte .pnt-hero--foto .wpb_wrapper > .pnt-proof { animation-delay: .56s, 0s; }
}
