/*
 * EYEDEA – Theme-CSS (Block 3.2a: Grundlage, Kopf, Menü, Fuß, Fokus).
 * Alle Werte kommen aus theme.json (--wp--preset--… / --wp--custom--…).
 * Hier nur Kurznamen, keine zweite Pflege der Werte.
 */

:root {
	--c-hg: var(--wp--preset--color--hintergrund);
	--c-flaeche: var(--wp--preset--color--flaeche);
	--c-linie: var(--wp--preset--color--linie);
	--c-rahmen: var(--wp--preset--color--rahmen);
	--c-grau: var(--wp--preset--color--grau);
	--c-grau-hell: var(--wp--preset--color--grau-hell);
	--c-text: var(--wp--preset--color--weiss);
	--c-rot: var(--wp--preset--color--rot);
	/* C10 (F1): helleres Rot NUR für kleinen Text auf den Flächen #141414/#1C1C1C (Kontrast 4,5:1). CI-Rot bleibt für Flächen, Linien, Pfeile, große Schrift und alles auf #0B0B0B */
	--rot-text: #EE5044;
	--rot-klein: var(--c-rot);
	--rand: var(--wp--preset--spacing--rand);
	--uebergang: var(--wp--custom--uebergang);
	--kurve: var(--wp--custom--kurve);
	--kopf-hoehe: 80px;
}

/* C10 (F1): auf Flächen (Karten, Kästen) nimmt kleiner roter Text das hellere Rot */
.kundenstimme,
.karte,
.wp-block-group.is-style-karte,
.ratgeber-kurz,
.fluentform .ff-message-success,
.anfrage-hinweis { --rot-klein: var(--rot-text); }

@media (max-width: 639px) {
	:root { --rand: var(--wp--preset--spacing--rand-handy); }
}

/* ---------- Grundlage ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--c-hg);
	color: var(--c-text);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--text);
	line-height: var(--wp--custom--zeilenhoehe--text);
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3 { margin: 0 0 .5em; }

/* C14 (A1): Überschriften nie mit Silbentrennung, kein Umbruch mitten im Wort (alle Geräte, alle Browser).
   Kacheltitel (.filmkachel-titel, weiche Trennstellen C13c) sind keine h1–h3 und bleiben unberührt. */
h1, h2, h3, h4,
.wp-block-heading,
.listenzeile-titel,
.einladung-titel {
	-webkit-hyphens: none;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}

.h2-gross {
	font-size: var(--wp--preset--font-size--h-2-gross);
	line-height: var(--wp--custom--zeilenhoehe--h-2-gross);
}

.text-gross { font-size: var(--wp--preset--font-size--text-gross); }
.text-klein { font-size: var(--wp--preset--font-size--klein); }

/* Dachzeile */
.label {
	display: block;
	margin: 0 0 12px;
	color: var(--rot-klein);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: var(--wp--custom--laufweite--label);
	text-transform: uppercase;
}

/* ---------- Links (keine Inline-Farben, Vorgabe 6) ---------- */

a {
	color: var(--c-text);
	text-underline-offset: .2em;
	transition: color var(--uebergang), background-color var(--uebergang), border-color var(--uebergang);
}

a:focus-visible { color: var(--c-rot); }
@media (hover: hover) and (pointer: fine) {
	a:hover { color: var(--c-rot);
	}
}

/* ---------- Fokus (Vorgabe 11) ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.kachel:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--c-rot);
	outline-offset: 3px;
}


/* main wird nur per Sprunglink fokussiert – kein Rahmen um den ganzen Inhalt */
main[tabindex="-1"]:focus { outline: none; }

/* ---------- Hilfsklassen ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 16px;
	background: var(--c-text);
	color: var(--c-hg);
	font-weight: 700;
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

@media (hover: hover) and (pointer: fine) {
	.skip-link:hover { color: var(--c-hg);
	}
}


/* ---------- Kopf ---------- */

.kopf {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--c-hg) 92%, transparent);
}

.kopf-zeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px var(--rand);
}

.kopf-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
	color: var(--c-text);
}

.kopf-logo:focus-visible { color: var(--c-rot); }
@media (hover: hover) and (pointer: fine) {
	.kopf-logo:hover { color: var(--c-rot);
	}
}

.kopf-logo .logo-schrift {
	display: block;
	width: auto;
	height: 18px;
}

.kopf-logo .logo-kurz { display: none; }

.kopf-aktionen {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Logo-Kurzform bis 800px, damit Logo, Button und Menü auf einer Zeile bleiben */
@media (max-width: 799px) {
	.kopf-logo .logo-voll { display: none; }
	.kopf-logo .logo-kurz { display: block; height: 20px; }
}

/* Strich-Symbol (Menü) und Kreuz (Schließen) */
.menue-striche,
.menue-x {
	position: relative;
	display: block;
	width: 18px;
	height: 12px;
}

.menue-striche span,
.menue-x span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.menue-striche span:first-child { top: 2px; }
.menue-striche span:last-child { bottom: 2px; }

.menue-x span { top: 5px; }
.menue-x span:first-child { transform: rotate(45deg); }
.menue-x span:last-child { transform: rotate(-45deg); }

@media (max-width: 639px) {
	.menue-wort { display: none; }
	.kopf-zeile .menue-knopf,
	.kopf-zeile .menue-schliessen { width: 44px; padding: 0; } /* .kopf-zeile: stärker als .btn--klein (bausteine.css) */
	.kopf-zeile .kopf-anfrage { padding: 0 14px; }
}

@media (max-width: 479px) {
	.nur-breit { display: none; }
}

/* C10 (F12): bei sehr schmalen Fenstern (320 px) engerer Kopf */
@media (max-width: 359px) {
	.kopf-zeile { gap: 8px; }
	.kopf-aktionen { gap: 8px; }
	.kopf-zeile .kopf-anfrage { padding: 0 10px; }
}

/* ---------- Vollbild-Menü ---------- */

.menue {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--c-hg);
}

.menue:target,
.menue.ist-offen { display: flex; }

/* Mit JavaScript steuert nur die Klasse das Menü */
.js .menue:target:not(.ist-offen) { display: none; }

html.menue-offen,
html.menue-offen body { overflow: hidden; }

.menue-inhalt {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 32px;
	padding: 40px var(--rand) 48px;
}

.menue-liste,
.fuss-liste {
	margin: 0;
	padding: 0;
	list-style: none;
}

.menue-liste a {
	position: relative;
	display: inline-block;
	color: var(--c-text);
	font-size: var(--wp--preset--font-size--menue);
	font-weight: 800;
	letter-spacing: var(--wp--custom--laufweite--menue);
	line-height: var(--wp--custom--zeilenhoehe--menue);
	text-transform: uppercase;
	text-decoration: none;
	transform-origin: left center;
	transition: color var(--uebergang), transform .45s var(--kurve);
}

.menue-liste a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: var(--c-rot);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .45s var(--kurve);
}

.menue-liste a:focus-visible {
	color: var(--c-rot);
	transform: scale(1.04);
}
@media (hover: hover) and (pointer: fine) {
	.menue-liste a:hover {
	color: var(--c-rot);
	transform: scale(1.04);
	}
}

.menue-liste a:focus-visible::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
	.menue-liste a:hover::after { transform: scaleX(1);
	}
}

.menue-liste .current-menu-item > a,
.menue-liste a[aria-current="page"] { color: var(--c-rot); }

/* Gestaffeltes Einblenden */
@keyframes menue-ein {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.menue.ist-offen .menue-liste li,
.menue:target .menue-liste li {
	animation: menue-ein .5s var(--kurve) both; /* C6a (5): 0,5 s statt 0,8 s, Staffel 0,07 s bleibt (CI) */
}

/* C6a (5): Fläche blendet in 0,2 s ein, Schließen 0,15 s; per Tastatur ohne Animation */
@keyframes menue-flaeche-ein { from { opacity: 0; } }
@keyframes menue-flaeche-aus { to { opacity: 0; } }

.menue.ist-offen,
.menue:target { animation: menue-flaeche-ein .2s ease-out both; }
.menue.ist-zu { animation: menue-flaeche-aus .15s ease-out both; }
.menue.per-tastatur,
.menue.per-tastatur .menue-liste li { animation: none !important; }

.menue-liste li:nth-child(2) { animation-delay: .07s; }
.menue-liste li:nth-child(3) { animation-delay: .14s; }
.menue-liste li:nth-child(4) { animation-delay: .21s; }
.menue-liste li:nth-child(5) { animation-delay: .28s; }
.menue-liste li:nth-child(6) { animation-delay: .35s; }
.menue-liste li:nth-child(7) { animation-delay: .42s; }
.menue-liste li:nth-child(8) { animation-delay: .49s; }

.menue-kontakt {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-style: normal;
	text-align: right;
}

@media (max-width: 719px) {
	.menue-inhalt {
		grid-template-columns: 1fr;
		align-items: start;
		align-content: space-between;
	}
	.menue-kontakt { text-align: left; }
}

/* ---------- Inhalt (vorläufig) ---------- */

.seite-inhalt {
	max-width: calc(var(--wp--style--global--content-size) + 2 * var(--rand));
	margin: 0 auto;
	padding: var(--wp--preset--spacing--abschnitt) var(--rand);
}

/* ---------- Fuß ---------- */

.fuss {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 16px 32px;
	padding: 32px var(--rand);
	color: var(--c-grau);
	font-size: var(--wp--preset--font-size--klein);
}

.fuss-logo { line-height: 0; color: var(--c-grau); }

.fuss-logo .logo-schrift {
	display: block;
	width: auto;
	height: 12px;
}

.fuss-liste {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

/* Links: Schriftzug | 3 Profil-Icons, rechts Menü (B5: Icons 18 px, Trennstrich, alles auf einer Mittellinie) */
.fuss-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.fuss-trenner {
	color: #8A8A8A;
	font-size: 14px;
	line-height: 1;
}

/* C11: rechts Links + Lupe (Suche, suche.css) */
.fuss-rechts { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }

.fuss-profile {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fuss-profile li { display: flex; line-height: 0; }

/* Gefülltes Quadrat 18 × 18, Radius ca. 4 px, Zeichen ausgestanzt in Fast-Schwarz */
.fuss-profile a {
	position: relative;
	display: block;
	width: 18px;
	height: 18px;
	color: #8A8A8A;
	line-height: 0;
}

.fuss-profile a::before { content: ""; position: absolute; inset: -6px -3px; } /* größere Klickfläche */
.fuss-profile svg { display: block; width: 18px; height: 18px; }
.fuss-profile .ausgestanzt { fill: #0B0B0B; }

.fuss-profile a:focus-visible { color: #E63B2E; }
@media (hover: hover) and (pointer: fine) {
	.fuss-profile a:hover { color: #E63B2E; }
}

/* C6a: ab 700 px links Schriftzug + Icons, rechts EINE Zeile Links (rechtsbündig, rechter Rand = Menü-Button).
   Unter 700 px gestapelt; Handy: Icons unter dem Schriftzug, kein Trennstrich */
@media (min-width: 701px) {
	.fuss-liste { flex-wrap: nowrap; justify-content: flex-end; white-space: nowrap; }
}
@media (min-width: 701px) and (max-width: 779px) { /* zu schmal für Schriftzug + Icons + Links in einer Reihe: Icons unter den Schriftzug, ohne Trennstrich */
	.fuss-trenner { display: none; }
	.fuss-profile { flex-basis: 100%; }
}
@media (max-width: 700px) {
	.fuss { grid-template-columns: minmax(0, 1fr); }
	.fuss-rechts { justify-self: stretch; }
}
@media (max-width: 700px) {
	.fuss-trenner { display: none; }
	.fuss-profile { flex-basis: 100%; }
	/* C6b: Handy, auf allen Seiten gleich – 1 Schriftzug, 2 Profil-Icons (linksbündig), 3 Mail · Impressum · Datenschutz einzeilig, zentriert */
	.fuss-nav { flex: 1 1 auto; min-width: 0; }
	.fuss-liste {
		flex-wrap: nowrap;
		justify-content: flex-start; /* C11: Mail, Impressum, Datenschutz linksbündig nebeneinander (vorher C6d: links/Mitte/rechts); Lupe am rechten Rand */
		gap: 8px clamp(10px, 5.5vw, 20px); /* unter 360 px enger statt umbrechen */
		white-space: nowrap;
		font-size: 12px; /* C6: ca. 11 px, einzeilig, seitlicher Abstand = Seitenrand (Fuß-Padding) */
	}
}

/* Link-Farben im Fuß und im Menü-Kontakt: Baustein „Textlink grau“ (bausteine.css) */

/* Weniger Bewegung: zentral in motion.css */

/* ---------- Style-Guide (nur Seite „Style-Guide“) ---------- */

.sg-abschnitt { margin-top: var(--wp--preset--spacing--abschnitt); }

.sg-reihe {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	margin-bottom: 24px;
}

.farbfeld { display: flex; flex-direction: column; gap: 4px; }

.farbfeld-flaeche {
	display: block;
	height: 88px;
	margin-bottom: 8px;
	border: 1px solid var(--c-linie);
}

.sg-hoch { max-width: 300px; margin-top: var(--wp--preset--spacing--raster); }

.sg-video {
	position: relative;
	max-width: 960px;
	aspect-ratio: 16 / 9;
}

.sg-video img,
.sg-foto img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sg-foto { max-width: 960px; margin: 0; }

/* ---------- Abstände im Seiteninhalt (Editor-Blöcke) ---------- */

:is(.seite-inhalt, .is-root-container) :where(:not(.label)) + :is(h2, h3) { margin-top: 1.4em; }

:is(.seite-inhalt, .is-root-container) :where(.wp-block-buttons, .wp-block-columns, .wp-block-image, .wp-block-gallery, .kopf-baustein) {
	margin-top: 32px;
	margin-bottom: 32px;
}

/* Editor: Seitenrand wie auf der Website */
.is-root-container { padding-inline: var(--rand); }

/* ---------- Seite nicht gefunden (404, B2) ---------- */
.nicht-gefunden-links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 48px 0 0;
	padding: 0;
	list-style: none;
}
