/*
 * Chronik [koenig_chronik] – Figma 1778:15878 "Landingpage – Chronik".
 *
 * Raster (02.11.2026): Inhalt boxed wie die Immobilien-Seite – max. 1390 px,
 * Seitenabstand 36 px ab 768 px, 24 px darunter. Hintergründe (Sand / Blau)
 * laufen über die volle Breite, das Foto im Zeitstrahl randlos bis links.
 *
 * Maße aus dem 1512er Frame, umgerechnet auf die Box (Figma: Box 60–1452 = 1392):
 *   Fotokante   627 px  → 45.04 %   Linie 706 px → 50.72 %
 *   Textspalte  824 px  → 59.20 %   Textbreite 509 px
 *   Panel-Inhalt endet 39 px vor der Fotokante (Linie unter dem Jahr 588 px).
 * Vertikal (Figma): Reiter 45 px unter Oberkante, Label 10 px darunter;
 *   Kapitel-Label 112 px unter Sektionsbeginn; Label→Titel 10, Titel→Text 8,
 *   Abstand zwischen Ereignissen 70; Bildunterschrift 60 px über Unterkante.
 * Typo: H2 Nunito Sans Light 38/1.2 (mobil 30/36), H1-Zahlen 56/1.2 (mobil 36),
 *   Label Mada Regular 14 / 4 %, H5 Mada Regular 18 / 4 % (mobil 16),
 *   p klein Mada Light 16/1.6, Jahr Mada Light 188 / 4 %.
 *
 * Alle Typo-Regeln mit ".kc" davor: die Elementor-Kit-Regeln für h2/h3/h4/p
 * (".elementor-kit-N h3") wären sonst stärker.
 * Farben/Schriften über die Variablen aus inc/global-style-bridge.php.
 */

.kc {
	--kc-blau: var(--color-blue, #232c3c);
	--kc-gold: var(--color-gold, #907947);
	--kc-sand: #f4f2ed;
	--kc-weiss: var(--color-surface, #fff);
	--kc-heading: var(--font-heading, 'Nunito Sans', sans-serif);
	--kc-body: var(--font-body, 'Mada', sans-serif);
	--kc-top: 0px; /* Höhe des fixierten Headers, setzt chronik.js */
	/* Breite der Chronik in px (setzt chronik.js, ohne JS = Fensterbreite).
	   Früher container-type/cqw – das hat auf iPhones das mitlaufende Foto
	   beim Scrollen vibrieren lassen (03.11.2026). */
	--kc-w: 100vw;
	position: relative;
	width: 100%;
	overflow-x: clip; /* clip statt hidden: sticky bleibt intakt */
	font-family: var(--kc-body);
	-webkit-font-smoothing: antialiased;
}

.kc *,
.kc *::before,
.kc *::after {
	box-sizing: border-box;
}

.kc p,
.kc h2,
.kc h3,
.kc h4,
.kc blockquote {
	margin: 0;
	padding: 0;
}

/* Raster: Box 1390 px + Seitenabstand (36 / 24 px). */
.kc > section {
	--kc-pad: 36px;
	--kc-raum: 144px; /* Innenabstand oben/unten je Bereich (Desktop + Tablet), Handy 100 px */
	--kc-box: min(1390px, var(--kc-w) - 2 * var(--kc-pad));
	--kc-links: calc((var(--kc-w) - var(--kc-box)) / 2);
}

.kc-box {
	width: 100%;
	max-width: calc(1390px + 2 * var(--kc-pad));
	margin-inline: auto;
	padding-inline: var(--kc-pad);
}

/* Kleine Versal-Labels (Figma: Mada Regular 14, Laufweite 0.56 px). */
.kc .kc-label {
	font-family: var(--kc-body);
	font-weight: 400;
	font-size: 14px;
	line-height: 18px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ===================== Kopfbereich (Sand) ===================== */
.kc-kopf {
	background: var(--kc-sand);
	color: var(--kc-blau);
}

.kc-kopf__inner {
	display: grid;
	grid-template-columns: 59.2% minmax(0, 509px);
	align-items: start;
	padding-top: var(--kc-raum);
	padding-bottom: var(--kc-raum);
}

.kc .kc-kopf__headline {
	padding-right: 40px;
	font-family: var(--kc-heading);
	font-weight: 300;
	font-size: 38px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--kc-gold);
}

.kc-kopf__rechts {
	padding-top: 8px;
}

.kc .kc-kopf__kicker {
	color: var(--kc-gold);
}

.kc .kc-kopf__jahre {
	display: flex;
	align-items: center;
	gap: 21px;
	margin-top: 10px;
	font-family: var(--kc-heading);
	font-weight: 300;
	font-size: 56px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
}

.kc-kopf__von {
	color: var(--kc-blau);
}

.kc-kopf__bis {
	color: var(--kc-gold);
}

.kc-kopf__strich {
	flex: 0 1 176px;
	min-width: 32px;
	height: 1px;
	background: var(--kc-gold);
}

.kc .kc-kopf__text {
	margin-top: 20px;
	font-family: var(--kc-body);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.6;
	color: var(--kc-blau);
}

/* ===================== Zeitstrahl ===================== */
.kc-zeit {
	--kc-panel: calc(var(--kc-links) + var(--kc-box) * 0.4504);
	--kc-linie: calc(var(--kc-box) * 0.0568);  /* Linie ab Fotokante */
	--kc-text: calc(var(--kc-box) * 0.1415);   /* Text ab Fotokante */
	--kc-punkt: 18px;
	--kc-start: var(--kc-raum);                 /* Oberkante → erstes Label */
	position: relative;
	display: grid;
	grid-template-columns: var(--kc-panel) minmax(0, 1fr);
	background: var(--kc-blau);
	color: var(--kc-weiss);
}

/* ---------- Foto links (läuft mit, unter dem Header) ---------- */
.kc-panel {
	position: sticky;
	top: var(--kc-top);
	height: calc(100vh - var(--kc-top));
	height: calc(100svh - var(--kc-top));
	min-height: 520px;
	overflow: hidden;
	background: var(--kc-blau);
}

.kc-panel__bilder,
.kc-bild {
	position: absolute;
	inset: 0;
}

.kc-bild {
	display: block;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 1.4s ease, transform 2.4s ease;
}

.kc-bild img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
}

.kc-bild.is-active {
	opacity: 1;
	transform: scale(1);
}

/* Verlauf unten (Figma: 452 von 982 px → Blau) + leichte Abdunklung oben
   für die Kapitel-Reiter. */
.kc-panel__verlauf {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(35, 44, 60, 0) 54%, var(--kc-blau) 100%),
		linear-gradient(to bottom, rgba(35, 44, 60, 0.5) 0, rgba(35, 44, 60, 0) 140px);
}

/* Inhalt im Panel: links bündig mit der Box, rechts 39 px vor der Fotokante. */
.kc-tabs,
.kc-panel__unten {
	position: absolute;
	left: var(--kc-links);
	right: 39px;
	z-index: 2;
}

/* Kapitel-Reiter oben */
.kc-tabs {
	top: 45px;
	display: grid;
	grid-template-columns: repeat(var(--kc-tabs, 4), minmax(0, 1fr));
	gap: 8px;
}

.kc .kc-tab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 0 0 6px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--kc-weiss);
	font: inherit;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.kc .kc-tab:hover,
.kc .kc-tab:focus {
	background: none;
	color: var(--kc-weiss);
}

.kc .kc-tab:focus-visible {
	outline: 1px solid var(--kc-gold);
	outline-offset: 4px;
}

.kc-tab__bar {
	position: relative;
	display: block;
	width: 100%;
	height: 1px;
	background: rgba(255, 255, 255, 0.3);
}

.kc-tab__fill {
	position: absolute;
	left: 0;
	top: -0.5px;
	width: 100%;
	height: 2px;
	background: var(--kc-gold);
	transform: scaleX(var(--kc-fill, 0));
	transform-origin: left center;
}

.kc .kc-tab__label {
	max-width: 100%;
	overflow: hidden;
	font-family: var(--kc-body);
	font-weight: 400;
	font-size: 14px;
	line-height: 18px;
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	opacity: 0.5;
	transition: opacity 0.4s ease;
}

.kc .kc-tab.is-active .kc-tab__label,
.kc .kc-tab:hover .kc-tab__label {
	opacity: 1;
}

/* Kapitelname, Jahr, Linie, Bildunterschrift unten */
.kc-panel__unten {
	bottom: 60px;
}

.kc .kc-panel__kicker {
	min-height: 18px;
	color: var(--kc-weiss);
}

.kc .kc-panel__jahr {
	margin-top: 4px;
	margin-left: -0.06em;
	font-family: var(--kc-body);
	font-weight: 300;
	font-size: clamp(96px, calc(var(--kc-w) * 0.1243), 188px);
	line-height: 0.82;
	letter-spacing: 0.04em;
	white-space: nowrap;
	color: var(--kc-weiss);
	font-variant-numeric: lining-nums;
}

.kc-panel__kicker,
.kc-panel__jahr,
.kc-panel__bildtext {
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.kc-zeit.is-wechsel .kc-panel__kicker,
.kc-zeit.is-wechsel .kc-panel__jahr,
.kc-zeit.is-wechsel .kc-panel__bildtext {
	opacity: 0;
	transform: translateY(12px);
}

.kc-panel__linie {
	display: block;
	height: 1px;
	margin-top: 14px;
	background: rgba(255, 255, 255, 0.3);
}

.kc .kc-panel__bildtext {
	min-height: 16px;
	margin-top: 16px;
	font-family: var(--kc-body);
	font-weight: 300;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--kc-weiss);
}

/* ---------- Ereignisse rechts ---------- */
.kc-liste {
	position: relative;
	padding: var(--kc-start) var(--kc-links) var(--kc-raum) var(--kc-text);
}

/* Linie: weiß 25 % durchgehend, gold (2 px) wächst mit – Höhe per JS. */
.kc-linie {
	position: absolute;
	top: calc(var(--kc-start) + var(--kc-punkt) / 2);
	bottom: 0;
	left: var(--kc-linie);
	width: 1px;
	background: rgba(255, 255, 255, 0.25);
}

.kc-linie__fill {
	position: absolute;
	top: 0;
	left: -0.5px;
	width: 2px;
	height: var(--kc-progress, 0px);
	background: var(--kc-gold);
}

/* Abstand zwischen den Ereignissen = Scrollweg pro Wechsel.
   Größer = Chronik wechselt langsamer (Figma: 70 px, 03.11. auf 140 px). */
.kc-step {
	position: relative;
	max-width: 509px;
	padding-bottom: var(--kc-schritt, 140px);
}

.kc-kapitel + .kc-kapitel {
	padding-top: 30px;
}

/* Text blass, aktives Ereignis voll. */
.kc-step > * {
	opacity: 0.4;
	transition: opacity 0.8s ease;
}

.kc-step.is-active > * {
	opacity: 1;
}

/* Punkt auf der Linie, mittig zum Label (18 px Zeilenhöhe).
   Figma: kommend = blau mit Goldrand, erreicht = gold gefüllt. */
.kc-step::before {
	content: '';
	position: absolute;
	top: 0;
	left: calc(var(--kc-linie) - var(--kc-text) - var(--kc-punkt) / 2);
	width: var(--kc-punkt);
	height: var(--kc-punkt);
	border: 1.5px solid var(--kc-gold);
	border-radius: 50%;
	background: var(--kc-blau);
	transition: background-color 0.6s ease;
}

.kc-step.is-past::before,
.kc-step.is-active::before {
	background: var(--kc-gold);
}

.kc .kc-step__datum {
	color: var(--kc-gold);
}

.kc .kc-step__kapitel {
	margin-top: 10px;
	font-family: var(--kc-heading);
	font-weight: 300;
	font-size: 38px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--kc-weiss);
}

.kc .kc-step__titel {
	margin-top: 10px;
	font-family: var(--kc-body);
	font-weight: 400;
	font-size: 18px;
	line-height: 23px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--kc-weiss);
}

.kc .kc-step__text,
.kc .kc-step__text p {
	font-family: var(--kc-body);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.6;
	color: var(--kc-weiss);
}

.kc .kc-step__text {
	margin-top: 8px;
}

.kc .kc-step__einleitung {
	margin-top: 15px;
}

.kc .kc-step__text p + p {
	margin-top: 1em;
}

.kc .kc-step__quelle {
	margin-top: 12px;
	font-family: var(--kc-body);
	font-weight: 300;
	font-size: 11px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.6);
}

/* ===================== Zitat ===================== */
.kc-zitat {
	background: var(--kc-blau);
	color: var(--kc-weiss);
}

.kc-zitat .kc-box {
	padding-top: var(--kc-raum);
	padding-bottom: var(--kc-raum);
}

.kc .kc-zitat__text {
	max-width: 764px;
	margin: 0 auto;
	border: 0;
	font-family: var(--kc-heading);
	font-weight: 300;
	font-style: normal;
	font-size: 38px;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	text-transform: uppercase;
	color: var(--kc-weiss);
}

.kc .kc-zitat__text p {
	font: inherit;
	color: inherit;
}

.kc-leer {
	padding: 40px;
	background: var(--kc-sand);
}

/* ===================== Tablet (768–1023) + Mobil ===================== */
@media (max-width: 1023px) {
	.kc-kopf__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding-top: var(--kc-raum);
		padding-bottom: var(--kc-raum);
	}

	.kc .kc-kopf__headline {
		padding-right: 0;
	}

	.kc-kopf__rechts {
		padding-top: 0;
		max-width: 509px;
	}

	/* Foto oben mitlaufend (unter dem Header), Ereignisse darunter. */
	.kc-zeit {
		--kc-linie: var(--kc-pad);
		--kc-text: calc(var(--kc-pad) + 34px);
		--kc-punkt: 14px;
		--kc-start: var(--kc-raum);
		grid-template-columns: minmax(0, 1fr);
	}

	.kc-panel {
		height: 46vh;
		height: 46svh;
		min-height: 300px;
		max-height: 520px;
		z-index: 3;
	}

	.kc-tabs,
	.kc-panel__unten {
		left: var(--kc-pad);
		right: var(--kc-pad);
	}

	.kc-tabs {
		top: 20px;
		gap: 6px;
	}

	.kc .kc-tab {
		gap: 8px;
	}

	.kc .kc-tab__label {
		font-size: 11px;
		letter-spacing: 0.02em;
	}

	.kc-panel__unten {
		bottom: 22px;
	}

	.kc .kc-panel__jahr {
		font-size: clamp(64px, calc(var(--kc-w) * 0.17), 120px);
	}

	.kc-panel__linie {
		margin-top: 10px;
	}

	.kc .kc-panel__bildtext {
		margin-top: 10px;
	}

	.kc-liste {
		padding: var(--kc-start) var(--kc-pad) var(--kc-raum) var(--kc-text);
	}

	.kc-linie {
		left: var(--kc-linie);
	}

	.kc-step {
		max-width: 560px;
		padding-bottom: var(--kc-schritt-mobil, 100px);
	}

	.kc-br {
		display: none;
	}

	.kc-zitat .kc-box {
		padding-top: var(--kc-raum);
		padding-bottom: var(--kc-raum);
	}
}

@media (max-width: 767px) {
	.kc > section {
		--kc-pad: 24px;
		--kc-raum: 100px;
	}

	.kc .kc-kopf__headline,
	.kc .kc-step__kapitel {
		font-size: 30px;
		line-height: 36px;
	}

	.kc .kc-kopf__jahre {
		gap: 16px;
		font-size: 36px;
		line-height: 1.2;
	}

	.kc .kc-step__titel {
		font-size: 16px;
		line-height: 21px;
	}

	.kc .kc-zitat__text {
		font-size: 26px;
		line-height: 1.25;
	}
}

/* Mobil: Foto und Texte im mitlaufenden Bereich nur überblenden, ohne
   Zoom/Verschieben – bewegte Ebenen im mitlaufenden Bereich ruckeln auf
   iOS beim Scrollen. */
@media (max-width: 1023px) {
	.kc-bild,
	.kc-bild.is-active {
		transform: none;
		transition: opacity 0.9s ease;
	}

	.kc-panel__kicker,
	.kc-panel__jahr,
	.kc-panel__bildtext {
		transition: opacity 0.4s ease;
	}

	.kc-zeit.is-wechsel .kc-panel__kicker,
	.kc-zeit.is-wechsel .kc-panel__jahr,
	.kc-zeit.is-wechsel .kc-panel__bildtext {
		transform: none;
	}
}

/* iPhone: Foto während der Chronik FEST am Bildschirm statt "sticky".
   Safari lässt mitlaufende (sticky) Bereiche mit großen Fotos beim
   Scrollen zittern; fixierte Elemente (wie der Header) stehen ruhig.
   chronik.js schaltet: kc-fix = Modus an, is-fix = angeheftet,
   is-unten = am Ende der Chronik unten abgelegt (03.11.2026). */
@media (max-width: 1023px) {
	.kc-zeit.kc-fix {
		--kc-ph: clamp(300px, 46svh, 520px);
		padding-top: var(--kc-ph);
	}

	.kc-zeit.kc-fix .kc-panel {
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		height: var(--kc-ph);
		min-height: 0;
		max-height: none;
	}

	.kc-zeit.kc-fix.is-fix .kc-panel {
		position: fixed;
		top: var(--kc-top);
		right: auto;
		left: var(--kc-fx, 0px);
		width: var(--kc-fw, 100%);
	}

	.kc-zeit.kc-fix.is-unten .kc-panel {
		top: auto;
		bottom: 0;
	}
}

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