/* ==========================================================================
   STUDIOMV Haustechnik – theme.css
   Mobile-first. Breakpoints: 640px (Tablet), 960px (Desktop), 1280px (breit)
   ========================================================================== */

/* ---------- Schriften (lokal, DSGVO-konform) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
	/* werden per Customizer überschrieben */
	--c-primary: #0F5D9C;
	--c-ink: #0A2A43;
	--c-accent: #2BA8D8;

	--c-mist: #EEF5F9;
	--c-line: #D5E4EE;
	--c-field: #B9CEDD;
	--c-text: #1B3246;
	--c-muted: #56708A;
	--c-alert: #D2432B;
	--c-white: #fff;

	--c-primary-dark: color-mix(in srgb, var(--c-primary) 82%, #000);
	--c-primary-soft: color-mix(in srgb, var(--c-primary) 9%, #fff);
	--c-alert-soft: color-mix(in srgb, var(--c-alert) 9%, #fff);

	--f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-head: "Barlow Semi Condensed", "Arial Narrow", "Barlow", system-ui, sans-serif;

	--wrap: 1200px;
	--gut: 20px;
	--header-h: 64px;
	--dock-h: 76px;
	--hero-h: 100svh;
	--hero-h-d: 100svh;
	--interval: 6000ms;
	--safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.wz-open { overflow: hidden; }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--c-text);
	background: var(--c-white);
	padding-bottom: calc(var(--dock-h) + var(--safe-b));
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.1; color: var(--c-ink); margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { width: 24px; height: 24px; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 1000;
	background: var(--c-white); color: var(--c-ink); padding: 10px 16px; border-radius: 6px; font-weight: 500;
}
.skip-link:focus { top: 12px; }

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 22px;
	font-family: var(--f-head); font-weight: 600; font-size: 1.125rem; letter-spacing: .01em;
	line-height: 1.1; text-decoration: none; text-align: center;
	border: 2px solid transparent; border-radius: 6px;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--c-primary); color: var(--c-white); }
.btn-primary:hover { background: var(--c-primary-dark); color: var(--c-white); }
.btn-light { background: var(--c-white); color: var(--c-ink); }
.btn-light:hover { background: var(--c-mist); color: var(--c-ink); }
.btn-alert { background: var(--c-alert); color: var(--c-white); }
.btn-alert:hover { background: color-mix(in srgb, var(--c-alert) 85%, #000); color: var(--c-white); }
.btn-outline { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-outline:hover { background: var(--c-primary-soft); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	height: var(--header-h);
	background: var(--c-ink);
	color: var(--c-white);
	transition: background-color .25s, box-shadow .25s;
}
.has-hero .site-header:not(.is-scrolled):not(.nav-open) {
	background: linear-gradient(to bottom, rgba(6, 22, 36, .55), rgba(6, 22, 36, 0));
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--c-white); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--c-white); }
.brand-logo { max-height: 40px; width: auto; }
.brand-mark { width: 30px; height: 30px; color: var(--c-accent); stroke-width: 2; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-emergency {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 44px; height: 44px; border-radius: 50%;
	background: var(--c-alert); color: var(--c-white); text-decoration: none;
}
.header-emergency:hover { color: var(--c-white); }
.header-emergency .icon { width: 20px; height: 20px; }
.header-emergency > span { display: none; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--c-white);
}
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

.site-nav {
	position: fixed; inset: var(--header-h) 0 0 0;
	background: var(--c-ink);
	padding: 16px var(--gut) 40px;
	overflow-y: auto;
	visibility: hidden; opacity: 0;
	transition: opacity .2s, visibility .2s;
}
.nav-open .site-nav { visibility: visible; opacity: 1; }
.nav-list, .nav-list ul { list-style: none; margin: 0; padding: 0; }
.nav-list a {
	display: block; padding: 14px 0;
	color: var(--c-white); text-decoration: none;
	font-family: var(--f-head); font-weight: 600; font-size: 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.nav-list ul a { font-size: 1.125rem; padding-left: 16px; font-weight: 500; }
.nav-list .current-menu-item > a { color: var(--c-accent); }

/* ==========================================================================
   Hero-Slider
   ========================================================================== */
.hero {
	position: relative;
	height: var(--hero-h);
	min-height: 440px;
	background: var(--c-ink);
	color: var(--c-white);
	overflow: hidden;
	touch-action: pan-y;
}
.hero-track { position: absolute; inset: 0; }
.slide {
	position: absolute; inset: 0;
	opacity: 0; visibility: hidden;
	transition: opacity .9s ease, visibility 0s linear .9s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.slide-media, .slide-overlay { position: absolute; inset: 0; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }
.slide-placeholder {
	width: 100%; height: 100%;
	background:
		repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, .05) 119px 121px),
		linear-gradient(160deg, var(--c-primary), var(--c-ink) 70%);
}
.slide-content {
	position: relative; z-index: 2;
	height: 100%;
	display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
	padding-top: calc(var(--header-h) + 24px);
	padding-bottom: 84px;
}
.align-center .slide-content { align-items: center; text-align: center; }
.slide-title {
	color: var(--c-white);
	font-size: clamp(2.25rem, 1.3rem + 4.6vw, 4.75rem);
	line-height: 1;
	letter-spacing: -.015em;
	max-width: 13em;
	margin: 0 0 .35em;
	text-wrap: balance;
}
.slide-text { font-size: clamp(1.0625rem, 1rem + .4vw, 1.3125rem); max-width: 34em; margin-bottom: 1.5em; color: rgba(255, 255, 255, .92); }

.hero-controls {
	position: absolute; z-index: 3; left: 0; right: 0; bottom: 20px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hero-dots { display: flex; gap: 8px; }
.dot {
	position: relative; width: 36px; height: 24px; padding: 0; border: 0; background: transparent;
}
.dot::before, .dot-fill {
	content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px;
	background: rgba(255, 255, 255, .35);
}
.dot-fill { background: var(--c-white); transform-origin: left; transform: scaleX(0); }
.dot.is-active .dot-fill { transform: scaleX(1); }
.is-playing .dot.is-active .dot-fill { animation: dot-run var(--interval) linear forwards; }
@keyframes dot-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-arrows { display: flex; gap: 8px; }
.hero-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, .5); background: rgba(10, 42, 67, .25); color: var(--c-white);
}
.hero-btn:hover { background: rgba(255, 255, 255, .15); }
.hero-btn .icon { width: 20px; height: 20px; }
.hero-btn[data-prev], .hero-btn[data-next] { display: none; }
.hero-btn .i-play { display: none; }
.hero.is-paused .hero-btn .i-play { display: block; }
.hero.is-paused .hero-btn .i-pause { display: none; }

/* ==========================================================================
   Sektionen
   ========================================================================== */
.section { padding: 64px 0; }
.h-section { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem); text-wrap: balance; }
.lead { font-size: 1.1875rem; color: var(--c-muted); max-width: 40em; }
.section-head { margin-bottom: 36px; }

/* ---------- Intro ---------- */
.intro-grid { display: grid; gap: 8px 48px; }
.intro-body p { max-width: 38em; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; color: var(--c-ink); }
.facts .icon {
	width: 26px; height: 26px; padding: 5px; border-radius: 50%;
	background: var(--c-accent); color: var(--c-white); stroke-width: 3; margin-top: 1px;
}
.intro-figure { margin: 24px 0 0; }
.intro-figure img { width: 100%; border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Leistungen: als Leitungsplan ---------- */
.services { background: var(--c-mist); }
.service-list {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 28px;
	position: relative;
}
/* senkrechte Leitung auf Mobile: von Anschluss zu Anschluss */
.service::before {
	content: ""; position: absolute; left: 26px; top: 28px; bottom: -28px; width: 4px;
	background: var(--c-line);
}
.service:last-child::before { display: none; }
.service { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; align-content: start; }
.service-icon {
	position: relative; z-index: 1;
	display: grid; place-items: center;
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--c-white); color: var(--c-primary);
	border: 3px solid var(--c-primary);
}
.service-icon .icon { width: 26px; height: 26px; }
.service-body h3 { font-size: 1.375rem; margin: 12px 0 4px; }
.service-body p { color: var(--c-muted); margin: 0; }

.services-cta {
	margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--c-line);
	display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.services-cta p { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 1.375rem; color: var(--c-ink); }

/* ---------- Seiteninhalt (Gutenberg) ---------- */
.entry { max-width: 72ch; }
.entry > * + * { margin-top: 1em; }

/* ---------- Anfahrt & Kontakt ---------- */
.location-grid { display: grid; gap: 32px; }
.map-box {
	position: relative; overflow: hidden;
	aspect-ratio: 4 / 3; border-radius: 10px;
	background: #DCE9F2;
}
.map-sketch, .map-sketch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ms-bg { fill: #DCE9F2; }
.ms-block rect { fill: var(--c-mist); }
.ms-road { stroke: #fff; stroke-width: 14; fill: none; }
.ms-road.ms-main { stroke: color-mix(in srgb, var(--c-accent) 35%, #fff); stroke-width: 20; }
.ms-pin { fill: var(--c-primary); }
.ms-dot { fill: #fff; }
.ms-pulse { fill: var(--c-accent); opacity: .22; }
.map-consent {
	position: absolute; left: 12px; right: 12px; top: 12px; z-index: 2;
	background: var(--c-white); border-radius: 8px; padding: 14px;
	box-shadow: 0 6px 24px rgba(10, 42, 67, .18);
	display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
	font-size: .9375rem;
}
.map-consent p { margin: 0; color: var(--c-muted); }
.map-consent .btn { flex: none; white-space: nowrap; }
.location .section-head { margin-bottom: 28px; }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-box.is-loaded .map-sketch, .map-box.is-loaded .map-consent { display: none; }

.contact-list { display: grid; gap: 20px; margin: 8px 0 28px; }
.cl-row { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.cl-row > .icon { color: var(--c-primary); margin-top: 2px; }
.cl-row strong { color: var(--c-ink); }
.cl-label { display: block; font-size: .875rem; color: var(--c-muted); }
.cl-row a { color: var(--c-ink); font-weight: 500; font-size: 1.1875rem; text-decoration: none; }
.cl-row a:hover { color: var(--c-primary); text-decoration: underline; }
.cl-note { display: block; margin-top: 6px; font-size: .9375rem; color: var(--c-muted); }
.cl-emergency > .icon { color: var(--c-alert); }
.contact-actions { display: grid; gap: 10px; }

/* ---------- Innenseiten ---------- */
.inner-page { padding: calc(var(--header-h) + 40px) 0 64px; }
.page-title { font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.entry-teaser { padding: 24px 0; border-bottom: 1px solid var(--c-line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: rgba(255, 255, 255, .78); padding: 36px 0; font-size: .9375rem; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; flex-direction: column; }
.footer-brand strong { color: var(--c-white); font-family: var(--f-head); font-size: 1.125rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-list a { color: var(--c-white); display: inline-block; padding: 6px 0; }
.footer-copy { margin: 0; }

/* ==========================================================================
   Kontakt-Dock (immer sichtbar)
   ========================================================================== */
.contact-dock {
	position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
	display: flex; gap: 10px;
	padding: 10px 12px calc(10px + var(--safe-b));
	background: var(--c-white);
	box-shadow: 0 -1px 0 var(--c-line), 0 -8px 24px rgba(10, 42, 67, .08);
}
.dock-call {
	display: grid; place-items: center; flex: none;
	width: 56px; height: 56px; border-radius: 8px;
	border: 2px solid var(--c-primary); color: var(--c-primary);
}
.dock-main {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 56px; border: 0; border-radius: 8px;
	background: var(--c-primary); color: var(--c-white);
	font-family: var(--f-head); font-weight: 700; font-size: 1.25rem;
}
.dock-main:hover { background: var(--c-primary-dark); }
.wz-open .contact-dock { visibility: hidden; }

/* ==========================================================================
   Anfrage-Assistent
   ========================================================================== */
.wz {
	width: 100%; max-width: 100%; height: 100%; max-height: 100%;
	margin: 0; padding: 0; border: 0;
	background: var(--c-white); color: var(--c-text);
	overscroll-behavior: contain;
}
.wz::backdrop { background: rgba(6, 22, 36, .6); }
.wz[open] { animation: wz-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes wz-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.wz-form { display: flex; flex-direction: column; height: 100%; }
.wz-top {
	display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
	padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 12px;
}
.wz-titles { text-align: center; grid-column: 2; min-width: 0; }
.wz-kicker { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: 1.0625rem; color: var(--c-ink); }
.wz-progress-text { margin: 0; font-size: .8125rem; color: var(--c-muted); min-height: 1.2em; }
.wz-icon-btn {
	display: grid; place-items: center; width: 44px; height: 44px;
	border: 0; border-radius: 50%; background: var(--c-mist); color: var(--c-ink);
}
.wz-icon-btn[data-wz-back] { grid-column: 1; grid-row: 1; }
.wz-icon-btn[data-wz-close] { grid-column: 3; grid-row: 1; }
.wz-icon-btn:hover { background: var(--c-line); }

/* Fortschritt als Leitung, die sich mit Wasser füllt */
.wz-pipe {
	grid-column: 1 / -1; position: relative; height: 8px; margin-top: 4px;
	border-radius: 4px; background: var(--c-mist);
	box-shadow: inset 0 0 0 1px var(--c-line);
	overflow: hidden;
}
.wz-pipe-fill {
	position: absolute; inset: 0 auto 0 0; width: 0;
	background: var(--c-accent);
	border-radius: 4px;
	transition: width .45s cubic-bezier(.3, .7, .2, 1), background-color .2s;
}
.wz[data-urgent] .wz-pipe-fill { background: var(--c-alert); }

.wz-body { flex: 1; overflow-y: auto; padding: 8px 20px 28px; -webkit-overflow-scrolling: touch; }
.wz-step { display: none; }
.wz-step.is-active { display: block; }
.wz-h { font-size: 1.875rem; margin: 12px 0 20px; outline: none; }
.wz-hint { color: var(--c-muted); }
.wz-note { margin-top: 20px; font-size: .9375rem; color: var(--c-muted); }
.wz-or { text-align: center; color: var(--c-muted); font-size: .9375rem; margin: 14px 0 20px; }

/* Anfrageart */
.type-list { display: grid; gap: 12px; }
.type-card {
	display: grid; grid-template-columns: 52px 1fr 20px; gap: 14px; align-items: center;
	width: 100%; padding: 16px; text-align: left;
	background: var(--c-white); border: 2px solid var(--c-line); border-radius: 10px;
	transition: border-color .15s, background-color .15s;
}
.type-card:hover, .type-card:focus-visible { border-color: var(--c-primary); background: var(--c-primary-soft); }
.type-icon {
	display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
	background: var(--c-primary); color: var(--c-white);
}
.type-urgent .type-icon { background: var(--c-alert); }
.type-urgent:hover, .type-urgent:focus-visible { border-color: var(--c-alert); background: var(--c-alert-soft); }
.type-text strong { display: block; font-family: var(--f-head); font-size: 1.3125rem; color: var(--c-ink); line-height: 1.15; }
.type-text span { display: block; font-size: .9375rem; color: var(--c-muted); line-height: 1.35; margin-top: 2px; }
.type-chev { color: var(--c-muted); width: 20px; height: 20px; }

/* Felder */
.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field-label { display: block; margin-bottom: 8px; padding: 0; font-weight: 500; color: var(--c-ink); }
.req { color: var(--c-alert); }
.opt { color: var(--c-muted); font-weight: 400; font-size: .875rem; }
.wz input[type="text"], .wz input[type="tel"], .wz input[type="email"], .wz select, .wz textarea {
	display: block; width: 100%; min-height: 52px;
	padding: 12px 14px; font-size: 1.0625rem; /* ≥16px: kein Auto-Zoom auf iOS */
	color: var(--c-text); background: var(--c-white);
	border: 1.5px solid var(--c-field); border-radius: 6px;
	appearance: none;
}
.wz select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356708A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px;
}
.wz textarea { min-height: 120px; resize: vertical; }
.wz input:focus, .wz select:focus, .wz textarea:focus {
	outline: none; border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 22%, transparent);
}
.wz .is-invalid input, .wz .is-invalid select, .wz .is-invalid textarea, .is-invalid .choice-box { border-color: var(--c-alert); }
.field-hint { margin: -2px 0 10px; font-size: .9375rem; color: var(--c-muted); line-height: 1.45; }
.field-error { margin: 6px 0 0; color: var(--c-alert); font-size: .9375rem; font-weight: 500; }

.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
	display: flex; align-items: center; gap: 12px;
	min-height: 52px; padding: 12px 14px;
	border: 1.5px solid var(--c-field); border-radius: 8px; background: var(--c-white);
	line-height: 1.3;
	transition: border-color .12s, background-color .12s;
}
.choice-check {
	width: 22px; height: 22px; padding: 3px; flex: none;
	border: 1.5px solid var(--c-field); border-radius: 5px;
	color: transparent; stroke-width: 3;
}
.choice input[type="radio"] + .choice-box .choice-check { border-radius: 50%; }
.choice input:checked + .choice-box { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: inset 0 0 0 1px var(--c-primary); }
.choice input:checked + .choice-box .choice-check { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.wz-warn {
	display: flex; gap: 12px; margin-top: 12px; padding: 14px;
	background: var(--c-alert-soft); border-left: 4px solid var(--c-alert); border-radius: 4px;
}
.wz-warn .icon { color: var(--c-alert); }
.wz-warn p { margin: 0; color: var(--c-ink); font-weight: 500; }

.call-box {
	display: flex; align-items: center; gap: 14px; padding: 16px 18px;
	background: var(--c-alert); color: var(--c-white); border-radius: 10px; text-decoration: none;
}
.call-box:hover { color: var(--c-white); background: color-mix(in srgb, var(--c-alert) 88%, #000); }
.call-box .icon { width: 28px; height: 28px; }
.call-box strong { display: block; font-family: var(--f-head); font-size: 1.25rem; }
.call-box span span { font-size: 1.0625rem; }

/* Fotos */
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-btn {
	position: relative;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	min-height: 112px; padding: 12px;
	border: 2px dashed color-mix(in srgb, var(--c-primary) 40%, #fff); border-radius: 10px;
	background: var(--c-mist); color: var(--c-primary);
	font-family: var(--f-head); font-weight: 600; font-size: 1.0625rem; text-align: center;
	cursor: pointer;
}
.photo-btn .icon { width: 32px; height: 32px; }
.photo-btn:hover { border-style: solid; }
.photo-btn:focus-within { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.photo-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pb-desk { display: none; }
.photo-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid li { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--c-mist); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid li.is-loading::after {
	content: ""; position: absolute; inset: 50% auto auto 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
	border: 3px solid var(--c-line); border-top-color: var(--c-primary); border-radius: 50%;
	animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-remove {
	position: absolute; top: 6px; right: 6px;
	display: grid; place-items: center; width: 34px; height: 34px;
	border: 0; border-radius: 50%; background: rgba(10, 42, 67, .8); color: var(--c-white);
}
.photo-remove .icon { width: 18px; height: 18px; }
.photo-count { margin: 10px 0 0; font-size: .9375rem; color: var(--c-muted); }

/* Zusammenfassung */
.summary { margin-bottom: 20px; }
.sum-block { border-top: 1px solid var(--c-line); padding: 14px 0 6px; }
.sum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sum-head h3 { font-size: 1.125rem; margin: 0; }
.sum-edit { border: 0; background: none; padding: 6px 0; color: var(--c-primary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.sum-list { margin: 0; }
.sum-list dt { font-size: .8125rem; color: var(--c-muted); }
.sum-list dd { margin: 0 0 10px; color: var(--c-ink); white-space: pre-line; overflow-wrap: anywhere; }
.sum-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }

.field-consent { margin-top: 8px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--c-primary); }
.consent a { display: inline-block; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wz-alert { padding: 14px; background: var(--c-alert-soft); border-left: 4px solid var(--c-alert); border-radius: 4px; color: var(--c-ink); font-weight: 500; }

.wz-done { text-align: center; padding-top: 32px; }
.done-icon {
	display: inline-grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px;
	border-radius: 50%; background: var(--c-accent); color: var(--c-white);
}
.done-icon .icon { width: 38px; height: 38px; stroke-width: 2.5; }
.wz-done p { max-width: 30em; margin-inline: auto; }
.wz-done .btn { margin-top: 12px; }

.wz-foot {
	padding: 12px 20px calc(12px + var(--safe-b));
	border-top: 1px solid var(--c-line); background: var(--c-white);
}
.wz.is-done [data-wz-next] .icon { display: none; }
.wz[data-urgent] [data-wz-next] { background: var(--c-alert); }
.wz[data-urgent] [data-wz-next]:hover { background: color-mix(in srgb, var(--c-alert) 85%, #000); }

/* ==========================================================================
   Tablet ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
	:root { --gut: 32px; }
	.facts { grid-template-columns: 1fr 1fr; }
	.contact-actions { grid-template-columns: 1fr 1fr; }
	.services-cta { flex-direction: row; align-items: center; justify-content: space-between; }

	/* Leitungsplan: 2 Spalten, waagrechte Verbindung je Reihe */
	/* Leitungsplan: Icons oben, waagrecht je Reihe verbunden */
	.service-list { grid-template-columns: 1fr 1fr; gap: 48px 48px; }
	.service { grid-template-columns: 1fr; gap: 14px; }
	.service::before { display: none; }
	.service::after {
		content: ""; position: absolute; left: 56px; right: -48px; top: 26px; height: 4px;
		background: var(--c-line);
	}
	.service:nth-child(2n)::after, .service:last-child::after { display: none; }
	.service-body h3 { margin-top: 4px; }

	.map-consent { flex-direction: row; align-items: center; justify-content: space-between; }
	.choices-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Desktop ≥ 960px
   ========================================================================== */
@media (min-width: 960px) {
	:root { --header-h: 80px; --dock-h: 0px; }
	body { font-size: 1.125rem; }

	.hero { height: var(--hero-h-d); }
	.slide-content { padding-bottom: 120px; }
	.hero-controls { bottom: 40px; justify-content: flex-start; gap: 32px; }
	.hero-btn[data-prev], .hero-btn[data-next] { display: inline-flex; }

	.brand-logo { max-height: 52px; }
	.header-inner { gap: 28px; }
	.nav-toggle { display: none; }
	.site-nav {
		position: static; visibility: visible; opacity: 1;
		background: none; padding: 0; overflow: visible; order: 2;
	}
	.nav-list { display: flex; gap: 4px; }
	.nav-list > li { position: relative; }
	.nav-list a { font-size: 1.125rem; padding: 10px 14px; border: 0; border-radius: 6px; }
	.nav-list > li > a:hover { background: rgba(255, 255, 255, .1); }
	.nav-list ul {
		position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
		background: var(--c-ink); border-radius: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
		visibility: hidden; opacity: 0; transition: opacity .15s, visibility .15s;
	}
	.nav-list li:hover > ul, .nav-list li:focus-within > ul { visibility: visible; opacity: 1; }
	.nav-list ul a { padding: 10px 12px; }
	.header-emergency {
		order: 3; width: auto; height: 44px; padding: 0 16px 0 12px; border-radius: 22px;
	}
	.header-emergency > span { display: inline; font-family: var(--f-head); font-weight: 600; font-size: 1.0625rem; white-space: nowrap; }
	.he-label { opacity: .85; font-weight: 500; }

	.section { padding: 112px 0; }
	.section-head { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: end; margin-bottom: 64px; }
	.section-head .h-section, .section-head .lead { margin: 0; }

	.intro-grid { grid-template-columns: 5fr 7fr; align-items: start; }
	.intro-grid.has-image { grid-template-columns: 7fr 5fr; grid-template-areas: "head fig" "body fig"; }
	.intro-grid.has-image .intro-head { grid-area: head; }
	.intro-grid.has-image .intro-body { grid-area: body; }
	.intro-grid.has-image .intro-figure { grid-area: fig; margin: 0; }
	.intro-grid.has-image .intro-figure img { aspect-ratio: 4 / 5; }
	.intro-grid:not(.has-image) .intro-body { padding-top: 10px; }

	.service-list { grid-template-columns: repeat(3, 1fr); gap: 56px 48px; }
	.service:nth-child(2n)::after { display: block; }
	.service:nth-child(3n)::after, .service:last-child::after { display: none; }

	.location-grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: stretch; }
	.map-box { aspect-ratio: auto; min-height: 480px; }
	.map-consent { top: auto; bottom: 16px; left: 16px; right: 16px; }
	.contact-actions { grid-template-columns: 1fr; }
	.location .section-head { display: block; margin-bottom: 40px; }

	.footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }

	/* Kontakt-Button unten rechts */
	.contact-dock {
		left: auto; right: 28px; bottom: 28px; padding: 0;
		background: none; box-shadow: none;
	}
	.dock-call { display: none; }
	.dock-main {
		padding: 0 26px; min-height: 60px; border-radius: 30px;
		box-shadow: 0 10px 28px color-mix(in srgb, var(--c-primary) 45%, transparent);
	}

	/* Dialog zentriert */
	.wz {
		width: min(640px, calc(100% - 48px)); height: min(820px, calc(100% - 48px));
		margin: auto; border-radius: 14px;
		box-shadow: 0 30px 80px rgba(6, 22, 36, .4);
	}
	.wz-body { padding: 8px 36px 32px; }
	.wz-top { padding: 16px 20px 14px; }
	.wz-foot { padding: 16px 36px; }
}

@media (min-width: 1280px) {
	:root { --gut: 40px; }
}

/* Maus-Geräte: Kamera-Button ausblenden (dort ohnehin Dateiauswahl) */
@media (hover: hover) and (pointer: fine) {
	.photo-actions { grid-template-columns: 1fr; }
	.photo-cam { display: none; }
	.pb-touch { display: none; }
	.pb-desk { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
