/*
 * Naventec Handwerk – Grundlagen: Schrift, Elemente, Fokus, Buttons, Banner, Kopfzeile, Mobilmenü, Suche,
 * Fußzeile, Maßkette, KI-Label. Werte aus Figma (OtyvK53161c9Ds5VPQSL4T) und design/entwurf/*.dc.html,
 * wo der Entwurf vom Corporate Design abweicht, gilt das CD (design/brief.md).
 */

:root {
	--rand: clamp(16px, 4vw, 32px);
	--inhalt: 1280px;
	--weit: 1440px;
	--fokus: 3px solid var(--wp--preset--color--tanne);
	--kurve-steigen: cubic-bezier(.2, .7, .1, 1);
	--kurve-ziehen: cubic-bezier(.6, 0, .2, 1);
}

/* ---------- Grundlagen ---------- */

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

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, blockquote, .serif,
.wp-block-post-title, .wp-block-accordion-heading__toggle-title {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-variation-settings: "SOFT" 0, "WONK" 0;
	font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl { margin: 0; }

img { max-width: 100%; height: auto; }

a { text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--fokus);
	outline-offset: 2px;
}
.flaeche-dunkel :where(a, button, input, [tabindex]):focus-visible,
.demo-banner :where(a):focus-visible { outline-color: var(--wp--preset--color--kreide); }

/* Zielfläche 44 × 44 px (CD Abschnitt 5) ohne Änderung am Layout: eine unsichtbare Fläche mittig über Links, die
   niedriger oder schmaler sind; der Abstand zum nächsten Bedienelement reicht dafür (gemessen, democontent#116). */
:is(.karte-titel a, .karte-mehr, .treffer-titel a, .overlay-telefon a, .vergleich-tabelle td > a:only-child) { position: relative; }
:is(.karte-titel a, .karte-mehr, .treffer-titel a, .overlay-telefon a, .vergleich-tabelle td > a:only-child)::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: max(100%, 44px);
	height: max(100%, 44px);
	transform: translate(-50%, -50%);
}

::placeholder { color: var(--wp--preset--color--nussbaum-gedaempft); opacity: 1; }

.skip-link.screen-reader-text:focus {
	clip-path: none;
	left: 16px;
	top: 8px;
	width: auto;
	height: auto;
	padding: 12px 24px;
	background: var(--wp--preset--color--tanne);
	color: var(--wp--preset--color--papier);
	font-size: 1rem;
	z-index: 100001;
}

.seiteninhalt > * + * { margin-block-start: 0; }
.seiteninhalt > :where(p, ul, ol, h2, h3, .wp-block-image) {
	max-width: var(--inhalt);
	margin-inline: auto;
	padding-inline: var(--rand);
}

.leise { color: var(--wp--preset--color--nussbaum-gedaempft); }
.flaeche-dunkel .leise { color: var(--wp--preset--color--kreide-gedaempft); }

/* Labels (Fußtitel, Maßketten, Metazeilen, Tabellenköpfe, Schriftfeld) stehen in normaler Schreibweise und Laufweite,
   in 14 px eine Stufe unter dem Text (CD Abschnitt 2, Rolle „Label“; Skill design-slop G2, naventec-gmbh/claude#191).
   Eine Zeile über der Überschrift (Eyebrow) gibt es nicht mehr (G1). */

/* ---------- Flächen ---------- */

.flaeche-span { background: var(--wp--preset--color--span); }
.flaeche-dunkel {
	background: var(--wp--preset--color--waldschatten);
	color: var(--wp--preset--color--kreide);
}
.flaeche-dunkel :where(h1, h2, h3, a:not(.wp-element-button)) { color: var(--wp--preset--color--kreide); }

/* ---------- Buttons (CD Abschnitt 5) ---------- */

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--tanne);
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--tanne);
	padding: 10px 22px;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--span);
	color: var(--wp--preset--color--tanne);
}
.wp-block-button.is-style-kontur-hell .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--kreide);
	background: transparent;
	color: var(--wp--preset--color--kreide);
	padding: 10px 22px;
}
.wp-block-button.is-style-kontur-hell .wp-block-button__link:hover {
	background: var(--wp--preset--color--kreide);
	color: var(--wp--preset--color--waldschatten);
}

/* ---------- Demo-Banner ---------- */

.demo-banner {
	background: var(--wp--preset--color--waldschatten);
	color: var(--wp--preset--color--kreide);
	padding: 10px 16px;
	text-align: center;
	font-size: .875rem;
	line-height: 1.45;
}
.demo-banner a { color: var(--wp--preset--color--kreide); }
.demo-banner a:hover { color: var(--wp--preset--color--kreide); }

/* ---------- Kopfzeile ---------- */

.kopfzeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: var(--inhalt);
	margin-inline: auto;
	padding: 20px var(--rand);
}

.logo { margin: 0; }
.logo a { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { display: block; height: 36px; width: auto; aspect-ratio: 581 / 120; }

/* Hauptmenü Desktop (Figma 21:27): Standard Nussbaum, Hover und Aktiv Tanne unterstrichen, Abstand 6 px. */
.hauptmenue { font-size: 1.0625rem; font-weight: 600; }
.hauptmenue .wp-block-navigation__container { gap: 28px; }
.hauptmenue .wp-block-navigation-item__content { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279.98px) {
	.hauptmenue .wp-block-navigation__container { gap: 16px; }
	.kopf-suche .wp-block-search__input { width: 160px; }
}
.hauptmenue .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 4px;
	color: var(--wp--preset--color--nussbaum);
	text-decoration: none;
	line-height: 1.6;
}
.hauptmenue .wp-block-navigation-item__content:hover,
.hauptmenue .current-menu-item > .wp-block-navigation-item__content,
.hauptmenue .current-menu-ancestor > .wp-block-navigation-item__content,
.hauptmenue [aria-current="page"] {
	color: var(--wp--preset--color--tanne);
	text-decoration: underline;
	text-underline-offset: 6px;
}
.hauptmenue .current-menu-item > .wp-block-navigation-item__content,
.hauptmenue .current-menu-ancestor > .wp-block-navigation-item__content,
.hauptmenue [aria-current="page"] { text-decoration-thickness: 1px; }
.hauptmenue .wp-block-navigation__submenu-icon {
	width: 16px;
	height: 16px;
	margin-left: 4px;
	padding: 0;
	color: inherit;
}
.hauptmenue .wp-block-navigation__submenu-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }
/* Zielfläche des Pfeils 44 × 44 px (CD Abschnitt 5): von „Leistungen“ bis zum nächsten Eintrag sind es zwischen
   1024 und 1279 px genau 44 px. Die beiden Links geben dafür ihren Innenabstand zum Pfeil als Außenabstand ab, so bleibt
   alles an seinem Platz und die Flächen überlappen nicht. */
.hauptmenue .wp-block-navigation-submenu > .wp-block-navigation-item__content:has(+ button) { padding-right: 0; }
.hauptmenue button.wp-block-navigation__submenu-icon { position: relative; margin-left: 8px; }
.hauptmenue button.wp-block-navigation__submenu-icon::after {
	content: "";
	position: absolute;
	left: -8px;
	top: 50%;
	width: 44px;
	height: 44px;
	transform: translateY(-50%);
}
.hauptmenue .wp-block-navigation-submenu:has(> button.wp-block-navigation__submenu-icon) + .wp-block-navigation-item {
	margin-left: 4px;
}
.hauptmenue .wp-block-navigation-submenu:has(> button.wp-block-navigation__submenu-icon)
	+ .wp-block-navigation-item > .wp-block-navigation-item__content { padding-left: 0; }

/* Dropdown Leistungen (Figma 21:46): Akzentlinie 2 px Eichenhonig, Rahmen Linie, kein Schatten. */
.hauptmenue .wp-block-navigation__submenu-container {
	min-width: 320px !important;
	padding: 0 0 8px !important;
	background: var(--wp--preset--color--papier) !important;
	border: 1px solid var(--wp--preset--color--linie) !important;
	border-top: 2px solid var(--wp--preset--color--eichenhonig) !important;
	border-radius: 4px;
	overflow: clip;
	left: -16px !important;
	font-size: 1.0625rem;
	font-weight: 400;
}
.hauptmenue .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: flex;
	width: 100%;
	min-height: 44px;
	padding: 12px 24px;
	line-height: 1.6;
	font-weight: 400;
	color: var(--wp--preset--color--nussbaum);
	text-decoration: none;
}
.hauptmenue .wp-block-navigation__submenu-container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	font-weight: 600;
	border-bottom: 1px solid var(--wp--preset--color--linie);
}
.hauptmenue .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--span);
	color: var(--wp--preset--color--tanne);
	text-decoration: underline;
	text-underline-offset: 6px;
}
.hauptmenue .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	outline: var(--fokus);
	outline-offset: -3px;
}
.hauptmenue .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--tanne);
	text-decoration: underline;
	text-underline-offset: 6px;
}

/* Menüknopf (Figma 21:36): Kontur 2 px Tanne, Beschriftung „Menü“. */
.hauptmenue .wp-block-navigation__responsive-container-open {
	min-height: 44px;
	padding: 8px 16px;
	align-items: center;
	border: 2px solid var(--wp--preset--color--tanne);
	border-radius: 4px;
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--tanne);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.2;
}

/* Umbruch auf den Menüknopf unter 1024 px (CD Raster), nicht bei 600 px wie im Core. */
@media (min-width: 600px) and (max-width: 1023.98px) {
	.hauptmenue .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.hauptmenue .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (max-width: 1023.98px) {
	.kopf-suche { display: none; }
}

/* Mobilmenü als Overlay-Template-Part (parts/menue-overlay.html, Figma 24:24 und 24:48). */
.hauptmenue .wp-block-navigation__responsive-container.is-menu-open {
	position: fixed;
	inset: 0;
	padding: 0;
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--nussbaum);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.hauptmenue .wp-block-navigation__overlay-container { font-size: 1.125rem; font-weight: 400; }
.overlay-kopf .wp-block-navigation-overlay-close {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	border: 2px solid var(--wp--preset--color--tanne);
	border-radius: 4px;
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--tanne);
	font: 600 1.0625rem/1.2 var(--wp--preset--font-family--handwerk-sans);
	cursor: pointer;
}
.overlay-inhalt { padding: 8px 16px 40px; }
.overlay-menue .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	width: 100%;
}
.overlay-menue > .wp-block-navigation__container > .wp-block-navigation-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--linie);
}
.overlay-menue > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 56px;
	padding: 16px 0;
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-variation-settings: "SOFT" 0, "WONK" 0;
	font-size: 1.625rem;
	line-height: 1.2;
	color: var(--wp--preset--color--nussbaum);
	text-decoration: none;
}
.overlay-menue .current-menu-item > .wp-block-navigation-item__content,
.overlay-menue .current-menu-ancestor > .wp-block-navigation-item__content,
.overlay-menue > .wp-block-navigation__container > .wp-block-navigation-item > [aria-current="page"] {
	color: var(--wp--preset--color--tanne);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}
/* Umschalter Plus/Minus in Eichenhonig statt Chevron (Figma 23:82/23:86). Im Klick-Modus ist der Eintrag selbst der
   Knopf; das Symbol daneben ist Zierde und lässt Klicks durch. */
.overlay-menue .wp-block-navigation-submenu { position: relative; }
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation-submenu__toggle {
	flex: 1 1 auto;
	justify-content: flex-start;
	width: 100%;
	padding-right: 44px;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: left;
}
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon {
	position: absolute;
	right: 0;
	top: 14px;
	width: 28px;
	height: 28px;
	margin: 0;
	color: var(--wp--preset--color--eichenhonig);
	pointer-events: none;
}
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon svg { display: none; }
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon::before,
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon::after {
	content: "";
	position: absolute;
	left: 4.67px;
	top: 13.25px;
	width: 18.67px;
	height: 1.5px;
	background: currentColor;
}
.overlay-menue .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon::after { transform: rotate(90deg); }
.overlay-menue [aria-expanded="true"] + .wp-block-navigation__submenu-icon::after { transform: rotate(0deg); }
.overlay-menue .wp-block-navigation__submenu-container {
	position: static !important;
	display: none !important;
	width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	padding: 8px 0 16px 16px !important;
	border: 0 !important;
	background: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	overflow: visible !important;
}
.overlay-menue [aria-expanded="true"] ~ .wp-block-navigation__submenu-container { display: flex !important; flex-direction: column; }
.overlay-menue .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 0;
	font-size: 1.125rem;
	line-height: 1.6;
	font-weight: 400;
	color: var(--wp--preset--color--nussbaum);
	text-decoration: none;
}
.overlay-menue .wp-block-navigation__submenu-container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content { font-weight: 600; }
.overlay-menue .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--tanne);
	text-decoration: underline;
	text-underline-offset: 6px;
}
.overlay-suche { margin-top: 32px; }
.overlay-knoepfe { margin-top: 24px; }
.overlay-knoepfe .wp-block-button, .overlay-knoepfe .wp-block-button__link { width: 100%; }
.overlay-telefon { margin-top: 16px; font-size: 1.25rem; line-height: 1.55; font-weight: 600; }
/* Die Navigation nimmt Links die Unterstreichung; im Overlay brauchen Banner und Telefon sie (Links im Text). */
.hauptmenue .wp-block-navigation__overlay-container :is(.demo-banner, .overlay-telefon) a { text-decoration: underline; }

/* ---------- Suche (CD Abschnitt 5: Feld 48 px, Beschriftung sichtbar über dem Feld) ---------- */

.suche .wp-block-search__label {
	display: block;
	margin: 0 0 4px;
	color: var(--wp--preset--color--nussbaum-gedaempft);
	font-size: .875rem;
	line-height: 1.4;
	font-weight: 600;
}
.suche .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.suche .wp-block-search__input {
	width: 200px;
	min-height: 48px;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: 4px;
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--nussbaum);
	font: 400 1.0625rem/1.4 var(--wp--preset--font-family--handwerk-sans);
}
.suche .wp-block-search__button {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--tanne);
	color: var(--wp--preset--color--papier);
	cursor: pointer;
}
.suche .wp-block-search__button:hover { background: var(--wp--preset--color--tanne-dunkel); }
.suche .wp-block-search__button svg { display: none; }
.suche .wp-block-search__button::before {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	mask: url(../zeichen/lupe.svg) center / 20px 20px no-repeat;
}
.overlay-suche .wp-block-search__inside-wrapper { width: 100%; }
.overlay-suche .wp-block-search__input { flex: 1 1 auto; width: auto; }

/* ---------- Fußzeile ---------- */

.fusszeile { border-top: 1px solid var(--wp--preset--color--kreide-gedaempft); }
.fuss-spalten {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 64px;
	max-width: var(--inhalt);
	margin-inline: auto;
	padding: 64px var(--rand) 40px;
	font-size: 1.0625rem;
	line-height: 1.6;
}
.fuss-logo { flex: 1 1 260px; }
.fuss-logo img { height: 36px; }
.fuss-spalte { flex: 1 1 220px; }
.fuss-seiten { flex: 1 1 160px; }
.fuss-titel {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--handwerk-sans);
	font-size: .875rem;
	line-height: 1.6;
	font-weight: 600;
	color: var(--wp--preset--color--honig-hell) !important;
}
.fusszeile a, .fusszeile a:hover { color: var(--wp--preset--color--kreide); }
/* Telefon und E-Mail im Kontakt des Fußes je mit eigener Zielfläche von 44 px Höhe, untereinander ohne Überlappung
   (CD Abschnitt 5, Nils' Abnahme Mittelstand democontent#116, für alle Demos gleich). */
.fuss-spalte a:is([href^="tel:"], [href^="mailto:"]) { display: inline-flex; align-items: center; min-height: 44px; }
.fussmenue { font-size: 1.0625rem; font-weight: 400; }
.fussmenue .wp-block-navigation__container { gap: 0; }
/* Zielgröße 44 px (CD Abschnitt 5): Die Zeilen stehen dadurch weiter auseinander als in Figma. */
.fussmenue .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-decoration: underline;
	padding: 0;
	line-height: 1.6;
}
.fuss-schluss {
	max-width: var(--inhalt);
	margin-inline: auto;
	padding: 0 var(--rand) 32px;
	color: var(--wp--preset--color--kreide-gedaempft);
	font-size: .875rem;
}

/* ---------- Maßkette (Signatur R1) ---------- */

/* Endmarken als Hintergrund (Strich mit Schrägstrich), Linien als Pseudo-Elemente, damit sie sich ziehen lassen. */
.is-style-masskette {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-inline: -5px;
	padding-inline: 18px;
	color: var(--wp--preset--color--eichenhonig);
	background:
		url(../zeichen/endmarke-eichenhonig.svg) left center / 11px 22px no-repeat,
		url(../zeichen/endmarke-eichenhonig.svg) right center / 11px 22px no-repeat;
	font-size: .875rem;
	line-height: 1.4;
	font-weight: 600;
	white-space: nowrap;
	min-height: 22px;
}
.is-style-masskette::before,
.is-style-masskette::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: currentColor;
	transform-origin: left center;
}
.is-style-masskette::after { transform-origin: right center; }
.is-style-masskette:empty { display: none; }
.flaeche-dunkel .is-style-masskette {
	color: var(--wp--preset--color--honig-hell);
	background-image: url(../zeichen/endmarke-honig-hell.svg), url(../zeichen/endmarke-honig-hell.svg);
}

.is-style-masskette-senkrecht {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-block: -5px;
	padding-block: 18px;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	color: var(--wp--preset--color--eichenhonig);
	background:
		url(../zeichen/endmarke-quer-eichenhonig.svg) center top / 22px 11px no-repeat,
		url(../zeichen/endmarke-quer-eichenhonig.svg) center bottom / 22px 11px no-repeat;
	font-size: .875rem;
	line-height: 1.4;
	font-weight: 600;
	white-space: nowrap;
	min-width: 22px;
}
.is-style-masskette-senkrecht::before,
.is-style-masskette-senkrecht::after {
	content: "";
	flex: 1 1 auto;
	width: 1px;
	background: currentColor;
	transform-origin: center top;
}
.is-style-masskette-senkrecht::after { transform-origin: center bottom; }
.is-style-masskette-senkrecht:empty { display: none; }
@media (max-width: 900px) {
	.is-style-masskette-senkrecht { display: none; }
}

/* ---------- KI-Kennzeichnung (Figma 29:266, 29:268, Regelkarte 29:281) ---------- */

.ki-bild { position: relative; container-type: inline-size; }
.ki-label {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	padding: 4px 8px;
	border-radius: 4px;
	background: var(--wp--preset--color--waldschatten);
	color: var(--wp--preset--color--kreide);
	font: 600 .875rem/20px var(--wp--preset--font-family--handwerk-sans);
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	pointer-events: none;
}
/* Unter der Schwelle (doppelte Labelbreite, 178 px): Mikrotext links unter dem Bild, Abstand 8 px. */
@container (max-width: 177.98px) {
	.ki-label {
		position: static;
		display: block;
		margin-top: 8px;
		padding: 0;
		background: none;
		color: var(--wp--preset--color--nussbaum-gedaempft);
		font-weight: 400;
	}
}

/* Bilder ohne Rundung (CD Abschnitt 6). */
.wp-block-image img, .wp-block-post-featured-image img { border-radius: 0; display: block; }
