/* ===========================================================
   Klarwasser-Handwerk — Design-System
   =========================================================== */

:root {
	--primary: oklch(38% 0.06 200);
	--primary-dark: oklch(27% 0.05 202);
	--primary-soft: oklch(93% 0.02 200);
	--bg: oklch(97% 0.006 85);
	--surface: oklch(99% 0.002 85);
	--accent: oklch(55% 0.13 55);
	--accent-dark: oklch(45% 0.12 50);
	--text: oklch(22% 0.02 230);
	--text-muted: oklch(42% 0.02 230);
	--border: oklch(89% 0.012 85);
	--radius: 4px;
	--radius-lg: 10px;
	--font-display: 'Fraunces', 'Iowan Old Style', serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--shadow-sm: 0 1px 2px oklch(22% 0.02 230 / 0.06), 0 1px 1px oklch(22% 0.02 230 / 0.04);
	--shadow-md: 0 8px 24px oklch(22% 0.02 230 / 0.10), 0 2px 6px oklch(22% 0.02 230 / 0.06);
	--shadow-lg: 0 20px 48px oklch(22% 0.02 230 / 0.16), 0 4px 12px oklch(22% 0.02 230 / 0.08);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--header-h: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
video, iframe { max-width: 100%; }
svg { max-width: 100%; height: auto; }
.icon { width: 1.4em; height: 1.4em; flex: 0 0 auto; vertical-align: middle; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--primary-dark);
	text-wrap: balance;
}
p { text-wrap: pretty; margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.25rem, 3vw, 2.5rem); }
.wrap--narrow { max-width: 820px; }

.eyebrow {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent-dark);
	margin: 0 0 0.75em;
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.section-head { max-width: 640px; margin: 0 0 clamp(2rem, 4vw, 3rem); }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--primary); color: #fff; padding: 0.8em 1.2em;
	border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ===========================================================
   Buttons
   =========================================================== */

.btn {
	display: inline-flex; align-items: center; gap: 0.6em;
	padding: 0.85em 1.5em;
	font-weight: 600; font-size: 0.95rem;
	border-radius: var(--radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
	min-height: 44px;
	white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-dark); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--primary-dark); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn--secondary { background: var(--primary); color: #fff; }
.btn--secondary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn--phone { background: var(--primary-soft); color: var(--primary-dark); padding: 0.6em 1.1em; font-size: 0.9rem; }
.btn--phone:hover { background: var(--primary); color: #fff; }

/* ===========================================================
   Header
   =========================================================== */

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	transition: box-shadow 220ms var(--ease-out), padding 220ms var(--ease-out);
}
.site-header.is-compressed { box-shadow: var(--shadow-md); }
.site-header__inner {
	max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.25rem, 3vw, 2.5rem);
	display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
	height: var(--header-h);
	transition: height 220ms var(--ease-out);
}
.site-header.is-compressed .site-header__inner { height: 68px; }

.site-logo { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.site-logo__mark { color: var(--accent); display: flex; }
.site-logo__text { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--primary-dark); }
.site-logo__text em { font-style: normal; color: var(--accent); }
.custom-logo { max-height: 56px; width: auto; transition: max-height 220ms var(--ease-out); }
.site-header.is-compressed .custom-logo { max-height: 42px; }

.main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.nav-menu { list-style: none; display: flex; gap: clamp(1.25rem, 2vw, 2.25rem); margin: 0; padding: 0; }
.nav-menu li { position: relative; }
.nav-menu a {
	display: inline-block; padding: 0.5em 0.1em; font-weight: 500; font-size: 0.96rem;
	color: var(--text); position: relative;
}
.nav-menu a::after {
	content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
	background: var(--accent); transition: right 220ms var(--ease-out);
}
.nav-menu a:hover::after, .nav-menu a:focus-visible::after { right: 0; }
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--primary-dark); }

.site-header__actions { display: flex; align-items: center; gap: 0.85rem; flex: 0 0 auto; }

.burger {
	display: none; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: var(--radius);
	background: transparent; border: 1px solid var(--border); color: var(--primary-dark);
	cursor: pointer; transition: background-color 150ms var(--ease-out);
}
.burger:hover { background: var(--primary-soft); }

.mobile-drawer-overlay {
	position: fixed; inset: 0; background: oklch(20% 0.02 230 / 0.45);
	opacity: 0; visibility: hidden; transition: opacity 240ms var(--ease-out), visibility 240ms;
	z-index: 150;
}
.mobile-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 360px);
	background: var(--surface); z-index: 151;
	transform: translateX(100%); transition: transform 280ms var(--ease-out);
	padding: 1.5rem; overflow-y: auto;
	display: flex; flex-direction: column; gap: 1.5rem;
	box-shadow: var(--shadow-lg);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.mobile-nav-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mobile-nav-menu a {
	display: block; padding: 0.9em 0.2em; font-size: 1.05rem; font-weight: 500;
	border-bottom: 1px solid var(--border); color: var(--text);
}
.mobile-drawer__cta { justify-content: center; margin-top: auto; }

/* ===========================================================
   Hero
   =========================================================== */

.hero {
	position: relative; overflow: hidden;
	min-height: min(88vh, 820px);
	display: flex; align-items: flex-end;
	color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
	position: absolute; inset: 0;
	background: linear-gradient(180deg, oklch(20% 0.03 220 / 0.35) 0%, oklch(18% 0.04 220 / 0.55) 55%, oklch(15% 0.05 210 / 0.88) 100%);
}
.hero__motif {
	position: absolute; right: -4%; top: 0; width: 46%; height: 100%;
	color: oklch(97% 0.01 85 / 0.18);
	z-index: 1; pointer-events: none;
	clip-path: polygon(28% 0, 100% 0, 100% 100%, 0% 100%);
}
.hero__content { position: relative; z-index: 2; padding-bottom: clamp(3rem, 7vw, 5.5rem); padding-top: clamp(7rem, 14vw, 10rem); }
.hero__content .eyebrow { color: oklch(85% 0.06 60); }
.hero__title { color: #fff; max-width: 16ch; }
.hero__subtitle { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 44ch; color: oklch(95% 0.01 85 / 0.92); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__actions .btn--ghost { color: #fff; border-color: oklch(100% 0 0 / 0.4); }
.hero__actions .btn--ghost:hover { background: oklch(100% 0 0 / 0.12); border-color: #fff; }

.reveal { transform: translateY(28px); transition: transform 640ms var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-visible { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
	.reveal { transform: none; transition: none; }
}

/* ===========================================================
   Slider
   =========================================================== */

.slider-section { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.slider { position: relative; }
.slider__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
	gap: clamp(1rem, 2vw, 1.5rem); padding: 0 clamp(1.25rem, 3vw, 2.5rem);
	scrollbar-width: none;
}
.slider__track::-webkit-scrollbar { display: none; }
.slide {
	scroll-snap-align: center; flex: 0 0 min(88vw, 920px);
	position: relative; border-radius: var(--radius-lg); overflow: hidden;
	aspect-ratio: 16 / 9; box-shadow: var(--shadow-md);
}
.slide__img { width: 100%; height: 100%; object-fit: cover; }
.slide__caption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1.25rem, 3vw, 2.25rem);
	background: linear-gradient(0deg, oklch(15% 0.05 210 / 0.85) 0%, transparent 100%);
	color: #fff;
}
.slide__caption h2 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 0.3em; }
.slide__caption div { color: oklch(95% 0.01 85 / 0.9); max-width: 60ch; font-size: 0.95rem; }
.slider__controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.5rem; }
.slider__btn {
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
	background: var(--surface); color: var(--primary-dark); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.slider__btn:hover { background: var(--primary-soft); }
.slider__btn:active { transform: scale(0.94); }
.slider__btn--prev svg { transform: rotate(180deg); }
.slider__dots { display: flex; gap: 0.5rem; }
.slider__dots button {
	width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--border);
	cursor: pointer; padding: 0; transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.slider__dots button.is-active { background: var(--accent); transform: scale(1.2); }

/* ===========================================================
   Stats
   =========================================================== */

.stats-section { background: var(--primary); color: #fff; }
.stats-grid {
	display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
}
.stat { grid-column: span 4; text-align: center; padding: 1rem; }
.stat__number {
	display: block; font-family: var(--font-display); font-weight: 600;
	font-size: clamp(2.4rem, 5vw, 3.4rem); color: oklch(85% 0.08 60);
}
.stat__label { display: block; font-size: 0.92rem; color: oklch(92% 0.01 85 / 0.85); margin-top: 0.4rem; }

/* ===========================================================
   Services
   =========================================================== */

.services-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.service-card {
	grid-column: span 3; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
	transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:active { transform: translateY(-4px) scale(0.99); }
.service-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--primary-soft); }
.service-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease-out); }
.service-card:hover .service-card__img { transform: scale(1.06); }
.service-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.service-card__body h3 { margin-bottom: 0.1em; }
.service-card__excerpt { color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.service-card__link {
	display: inline-flex; align-items: center; gap: 0.4em; color: var(--accent-dark);
	font-weight: 600; font-size: 0.88rem; margin-top: 0.5rem;
}

/* ===========================================================
   About
   =========================================================== */

.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.about-grid__media { grid-column: span 5; }
.about-grid__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about-grid__content { grid-column: span 7; }
.check-list { list-style: none; margin: 1.5rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.check-list li { display: flex; align-items: flex-start; gap: 0.7em; }
.check-list .icon { color: var(--accent); margin-top: 0.15em; }

/* ===========================================================
   CTA band
   =========================================================== */

.cta-band { background: var(--primary-soft); }
.cta-band__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
	background: var(--primary); color: #fff; border-radius: var(--radius-lg);
	padding: clamp(2rem, 4vw, 3rem); box-shadow: var(--shadow-md);
}
.cta-band__inner h2 { color: #fff; margin-bottom: 0.3em; }
.cta-band__inner p { color: oklch(92% 0.01 85 / 0.85); margin: 0; }

/* ===========================================================
   Contact
   =========================================================== */

.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.contact-grid__info { grid-column: span 5; }
.contact-grid__form { grid-column: span 7; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }

.contact-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.contact-list li a, .contact-list li span { display: flex; align-items: center; gap: 0.7em; }
.contact-list .icon { color: var(--accent); flex-shrink: 0; }
.contact-list--large { font-size: 1.02rem; }
.contact-map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.contact-map iframe { display: block; }

.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35em; color: var(--primary-dark); }
.wpcf7-form input:not([type=submit]), .wpcf7-form textarea {
	width: 100%; padding: 0.75em 0.9em; border: 1px solid var(--border); border-radius: var(--radius);
	font-family: var(--font-body); font-size: 0.95rem; background: var(--bg);
	transition: border-color 150ms var(--ease-out);
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { border-color: var(--accent); outline: none; }
.wpcf7-form input[type=submit] {
	background: var(--accent); color: #fff; border: none; padding: 0.85em 1.6em; border-radius: var(--radius);
	font-weight: 600; cursor: pointer; min-height: 44px; transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.wpcf7-form input[type=submit]:hover { background: var(--accent-dark); }
.wpcf7-form input[type=submit]:active { transform: scale(0.98); }
.wpcf7-spinner { margin-left: 0.6em; }

/* ===========================================================
   Generic page / content
   =========================================================== */

.page-hero { position: relative; background: var(--primary); color: #fff; padding: clamp(5rem, 12vw, 7.5rem) 0 clamp(3rem, 6vw, 4rem); overflow: hidden; }
.page-hero--compact { padding: clamp(3.5rem, 8vw, 5rem) 0 clamp(2rem, 4vw, 2.75rem); }
.page-hero .eyebrow { color: oklch(85% 0.06 60); }
.page-hero__title { color: #fff; max-width: 20ch; margin: 0; }
.page-hero__motif { position: absolute; right: -10%; top: -20%; width: 50%; height: 140%; color: oklch(97% 0.01 85 / 0.12); z-index: 0; }

.content-block { max-width: 74ch; }
.content-block h2 { margin-top: 1.6em; }
.content-block h2:first-child { margin-top: 0; }
.content-block ul, .content-block ol { padding-left: 1.3em; }
.content-block li { margin-bottom: 0.5em; }
.content-block__image { margin-bottom: 2rem; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.content-block__image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.service-detail-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.service-detail-grid__main { grid-column: span 8; }
.service-detail-grid__aside { grid-column: span 4; }
.aside-card {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	padding: 1.75rem; position: sticky; top: calc(var(--header-h) + 1.5rem);
}
.aside-card h3 { margin-bottom: 0.75em; }
.aside-card .btn { width: 100%; justify-content: center; margin-top: 1rem; }
.related-services { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.related-services a { display: flex; align-items: center; justify-content: space-between; padding: 0.6em 0.1em; border-bottom: 1px solid var(--border); font-weight: 500; }
.related-services a:hover { color: var(--accent-dark); }

/* ===========================================================
   Footer
   =========================================================== */

.site-footer { background: var(--primary-dark); color: oklch(92% 0.01 85 / 0.85); }
.site-footer__top {
	max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3rem);
	display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem);
}
.footer-col { grid-column: span 3; }
.footer-col--brand { grid-column: span 4; }
.footer-col__lead { color: oklch(85% 0.01 85 / 0.75); font-size: 0.92rem; margin-top: 0.75rem; }
.footer-col__title { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-col .contact-list .icon { color: oklch(85% 0.08 60); }
.footer-col .contact-list a:hover { color: #fff; }
.footer-nav-menu, .footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav-menu a, .footer-links a { font-size: 0.94rem; }
.footer-nav-menu a:hover, .footer-links a:hover { color: #fff; }
.site-footer__bottom {
	border-top: 1px solid oklch(100% 0 0 / 0.1);
	padding: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
	max-width: 1240px; margin: 0 auto;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
	font-size: 0.85rem; color: oklch(85% 0.01 85 / 0.6);
}

/* ===========================================================
   Pipe motif
   =========================================================== */

.pipe-motif { display: block; }

/* ===========================================================
   Responsive — Tablet ≤900px
   =========================================================== */

@media (max-width: 900px) {
	.main-nav { display: none; }
	.burger { display: flex; }
	.site-header__actions .btn--phone { display: none; }

	.stat { grid-column: span 4; }
	.service-card { grid-column: span 6; }
	.about-grid__media, .about-grid__content { grid-column: span 12; }
	.about-grid__media { order: -1; }
	.contact-grid__info, .contact-grid__form { grid-column: span 12; }
	.service-detail-grid__main, .service-detail-grid__aside { grid-column: span 12; }
	.aside-card { position: static; }

	.footer-col--brand { grid-column: span 12; }
	.footer-col { grid-column: span 4; }
}

/* ===========================================================
   Responsive — Mobile ≤600px
   =========================================================== */

@media (max-width: 600px) {
	:root { --header-h: 76px; }
	.hero { min-height: 92vh; }
	.hero__content { padding-top: clamp(5.5rem, 20vw, 7rem); }
	.hero__actions { flex-direction: column; align-items: stretch; }
	.hero__actions .btn { justify-content: center; }

	.stats-grid { gap: 1.5rem; }
	.stat { grid-column: span 12; }

	.services-grid { gap: 1.25rem; }
	.service-card { grid-column: span 12; }

	.cta-band__inner { flex-direction: column; align-items: flex-start; text-align: left; }
	.cta-band__inner .btn { width: 100%; justify-content: center; }

	.footer-col { grid-column: span 12; }
	.site-footer__top { text-align: left; }
	.site-footer__bottom { flex-direction: column; }

	.slide { flex-basis: 92vw; }
}
