/* ==========================================================================
   Optionale Zusatzeffekte
   Jeder Effekt hängt an einer Klasse am <body> (fx-...), die der Customizer setzt.
   Ohne Klasse passiert nichts. Alle bewegten Effekte respektieren "Bewegung reduzieren".
   ========================================================================== */

/* Kopfzeile: Milchglas, schrumpft beim Scrollen ---------------------------- */
.fx-glass .site-header {
	background: color-mix(in srgb, var(--c-white) 76%, transparent);
	-webkit-backdrop-filter: saturate(1.5) blur(14px);
	backdrop-filter: saturate(1.5) blur(14px);
}
.fx-glass .header-main { transition: min-height 0.25s ease; }
.fx-glass .site-header.is-scrolled .header-main { min-height: 60px; }
.fx-glass .site-header.is-scrolled .brand .custom-logo { max-height: 42px; transition: max-height 0.25s ease; }
@media (max-width: 980px) { .fx-glass .primary-nav { background: var(--c-white); } }

/* Parallax: Hintergrundbild bewegt sich langsamer als der Inhalt ----------- */
.fx-parallax .hero.has-image .cover-img,
.fx-parallax .page-hero.has-image .cover-img {
	transform: translate3d(0, var(--py, 0px), 0) scale(1.22);
	will-change: transform;
}

/* Überschrift Wort für Wort (die Wörter setzt effects.js) ------------------ */
.fx-words .hero__title .w {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.45em);
	animation: fx-word-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
	animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}
@keyframes fx-word-in { to { opacity: 1; transform: none; } }

/* Fahrbahnmarkierung läuft -------------------------------------------------- */
.fx-road .hero__road,
.fx-road .page-hero__road {
	background: linear-gradient(90deg, var(--c-accent) 0 56px, transparent 56px 104px) 0 0 / 104px 100% repeat-x;
	animation: fx-road-run 2.6s linear infinite;
}
@keyframes fx-road-run { to { background-position-x: -104px; } }

/* Karten: Hover-Effekte ----------------------------------------------------- */
.fx-cards-lift .card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s; }
.fx-cards-lift .card:not(.card--detail):hover { transform: translateY(-6px); box-shadow: 0 24px 40px -26px rgba(0, 0, 0, 0.55); border-color: var(--c-primary); }
.fx-cards-spotlight .card:not(.card--detail)::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c-accent) 26%, transparent), transparent 62%);
}
.fx-cards-spotlight .card:not(.card--detail):hover::before { opacity: 1; }
.fx-cards-spotlight .card:not(.card--detail):hover { border-color: color-mix(in srgb, var(--c-accent) 70%, var(--c-primary)); }
@media (hover: none) {
	.fx-cards-lift .card:not(.card--detail):hover { transform: none; box-shadow: none; }
	.fx-cards-spotlight .card::before { display: none; }
}

/* Kartenbilder werden aufgedeckt ------------------------------------------- */
.img-wipe { clip-path: inset(0 0 100% 0); }
.img-wipe img, .img-wipe .card__placeholder { transform: scale(1.14); }
.img-wipe.is-in { clip-path: inset(0); transition: clip-path 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.img-wipe.is-in img, .img-wipe.is-in .card__placeholder { transform: none; transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Lesefortschritt ----------------------------------------------------------- */
.scroll-progress { display: none; }
.fx-progress .scroll-progress { display: block; position: fixed; left: 0; right: 0; top: var(--top, 0px); height: 4px; z-index: 99; pointer-events: none; --p: 0; }
.scroll-progress__bar { display: block; height: 100%; background: var(--c-accent); transform: scaleX(var(--p)); transform-origin: 0 50%; }
.scroll-progress__truck {
	position: absolute;
	top: 4px;
	left: calc(var(--p) * 100%);
	transform: translateX(-100%);
	padding: 3px 8px 5px;
	background: var(--c-accent);
	color: var(--c-on-accent);
	border-radius: 0 0 8px 8px;
	line-height: 0;
}
.scroll-progress__truck .semi { display: block; }
@media (max-width: 640px) { .scroll-progress__truck { padding: 2px 6px 4px; } .scroll-progress__truck .semi { width: 32px; height: 13px; } }

/* Laufband ------------------------------------------------------------------ */
.marquee { background: var(--c-primary); color: var(--c-on-primary); overflow: hidden; padding-block: 1.1rem; }
.marquee__track { display: flex; width: max-content; animation: fx-marquee 42s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.marquee__list li { display: flex; align-items: center; gap: 1.6rem; padding-right: 1.6rem; margin: 0; white-space: nowrap; font: 700 clamp(1.05rem, 2vw, 1.4rem) / 1.2 var(--font-head); }
.marquee__list li::after { content: ""; flex: none; width: 0.55rem; height: 0.55rem; background: var(--c-accent); transform: rotate(45deg); }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* Kennzahlen ---------------------------------------------------------------- */
.stats { background: var(--c-primary); color: var(--c-on-primary); padding-block: clamp(2.5rem, 6vw, 4rem); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 0.5rem 1.5rem; border-left: 1px solid color-mix(in srgb, var(--c-on-primary) 22%, transparent); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__num { margin: 0 0 0.35rem; font: 700 clamp(2.4rem, 5vw, 3.75rem) / 1 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat__label { margin: 0; color: color-mix(in srgb, var(--c-on-primary) 78%, transparent); }
@media (max-width: 860px) {
	.stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
	.stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* Bewegung reduzieren ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.fx-words .hero__title .w { opacity: 1; transform: none; animation: none; }
	.fx-road .hero__road, .fx-road .page-hero__road { animation: none; }
	.fx-parallax .hero.has-image .cover-img, .fx-parallax .page-hero.has-image .cover-img { transform: scale(1.22); }
	.img-wipe { clip-path: none; }
	.img-wipe img, .img-wipe .card__placeholder { transform: none; }
	.fx-cards-lift .card:hover { transform: none; }
	.marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
	.marquee__list[aria-hidden="true"] { display: none; }
	.marquee__list { flex-wrap: wrap; justify-content: center; }
}
