/* ==========================================================================
   Fusspflege Fecht - "Klinische Ruhe (Sage & Lehm)"
   ========================================================================== */

:root {
	--primary: oklch(38% 0.055 150);
	--primary-soft: oklch(92% 0.02 150);
	--primary-soft-2: oklch(87% 0.03 150);
	--accent: oklch(46% 0.13 40);
	--accent-soft: oklch(93% 0.035 45);
	--bg: oklch(96% 0.012 80);
	--surface: oklch(99% 0.004 80);
	--text: oklch(22% 0.015 60);
	--text-muted: oklch(42% 0.02 60);
	--border: oklch(88% 0.015 80);

	--radius: 2px;
	--radius-bold: 28px;
	--space-unit: 0.5rem;

	--font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
	--font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--text-xs: 0.8rem;
	--text-sm: 0.95rem;
	--text-base: 1.125rem;
	--text-lg: 1.5rem;
	--text-xl: 2rem;
	--text-2xl: 2.66rem;
	--text-hero: clamp(2.75rem, 6vw, 5.25rem);

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--dur: 220ms;

	--container-max: 1240px;
	--container-narrow: 760px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: 1.6;
	text-wrap: pretty;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 0.6em; text-wrap: pretty; color: var(--text); }
p { margin: 0 0 1em; }
button { font: inherit; background: none; border: none; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.3em; height: 1.3em; flex: 0 0 auto; vertical-align: middle; }
svg { max-width: 100%; height: auto; }

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

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.container--narrow { max-width: var(--container-narrow); }

.eyebrow {
	font-size: var(--text-sm);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	font-weight: 600;
	margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 0.6em;
	padding: 0.9em 1.6em;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: var(--text-sm);
	transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
	min-height: 44px;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: oklch(40% 0.13 40); box-shadow: 0 8px 20px -10px oklch(46% 0.13 40 / 0.6); }
.btn--accent:active { transform: scale(0.98); }
.btn--ghost { border: 1.5px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost:active { transform: scale(0.98); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Sticky header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: oklch(96% 0.012 80 / 0.92);
	border-bottom: 1px solid transparent;
	transition: padding var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.site-header__inner {
	max-width: var(--container-max); margin: 0 auto;
	padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
	display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border), 0 12px 24px -20px oklch(20% 0.02 60 / 0.3); }
.site-header.is-scrolled .site-header__inner { padding-block: 0.8rem; }

.site-logo { display: inline-flex; }
.site-logo__text { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--primary); display: flex; flex-direction: column; line-height: 1.15; }
.site-logo__sub { font-family: var(--font-body); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.site-logo__text--light { color: var(--bg); }
.custom-logo { max-height: 56px; width: auto; }

.site-nav__list { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.site-nav__list a { font-size: var(--text-sm); font-weight: 500; position: relative; padding: 0.3em 0; }
.site-nav__list a::after {
	content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
	background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out);
}
.site-nav__list a:hover::after, .site-nav__list a:focus-visible::after { transform: scaleX(1); }

.site-header__actions { display: flex; align-items: center; gap: 1rem; }
.site-header__cta { white-space: nowrap; }

.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; position: relative; }
.burger__box { width: 22px; height: 16px; position: relative; display: block; }
.burger__inner, .burger__inner::before, .burger__inner::after {
	position: absolute; width: 22px; height: 2px; background: var(--text); border-radius: 1px;
	transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), top var(--dur) var(--ease-out);
}
.burger__inner { top: 7px; }
.burger__inner::before { content: ''; top: -7px; }
.burger__inner::after { content: ''; top: 7px; }
.burger[aria-expanded="true"] .burger__inner { background: transparent; }
.burger[aria-expanded="true"] .burger__inner::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__inner::after { top: 0; transform: rotate(-45deg); }
.burger--close { position: static; }

/* Drawer lives as a sibling of <header>, not nested inside it, so the
   sticky header's stacking context can never intercept its clicks. */
.mobile-drawer {
	position: fixed; top: 0; right: 0; height: 100%; width: min(360px, 88vw);
	background: var(--surface);
	box-shadow: -20px 0 50px -20px oklch(20% 0.02 60 / 0.35);
	transform: translateX(100%);
	transition: transform 320ms var(--ease-out);
	z-index: 210;
	display: flex; flex-direction: column;
	padding: 1.5rem;
	overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.mobile-drawer__list { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-drawer__list a { display: block; padding: 0.9em 0.25em; font-size: 1.15rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-drawer__contact { margin-top: auto; padding-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.mobile-drawer__address { display: flex; align-items: flex-start; gap: 0.6rem; font-size: var(--text-sm); color: var(--text-muted); margin: 0; }
.mobile-drawer__overlay {
	position: fixed; inset: 0; background: oklch(20% 0.02 60 / 0.4);
	opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-out);
	z-index: 200;
}
.mobile-drawer__overlay.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 6vw, 5rem); }
.hero .container { text-align: left; max-width: 900px; }
.hero__title { font-size: var(--text-hero); max-width: 16ch; }
.hero__subtitle { font-size: var(--text-lg); color: var(--text-muted); max-width: 52ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.hero__media { width: 100%; aspect-ratio: 21 / 9; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); border-radius: var(--radius); }
.hero__image { width: 100%; height: 100%; object-fit: cover; }

.intro { padding: clamp(4rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3rem); }
.intro__text { font-size: var(--text-lg); font-family: var(--font-display); font-weight: 400; color: var(--primary); max-width: 68ch; }

/* ---------- Section rhythm ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--services { padding-top: clamp(3rem, 6vw, 5rem); }
.section__head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section__head h2 { font-size: var(--text-2xl); }
.section__head p { color: var(--text-muted); font-size: var(--text-base); }

/* Asymmetric 12-col service grid: wide single rows, not a uniform card grid. */
.service-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2vw, 2.5rem); }
.service-card { grid-column: span 4; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px oklch(20% 0.02 60 / 0.35); }
.service-card--1 { grid-column: span 5; }
.service-card--2 { grid-column: span 4; }
.service-card--3 { grid-column: span 3; }
.service-card__media { aspect-ratio: 4 / 5; overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; }
.service-card__body { padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.service-card__icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 0.5rem; }
.service-card__body h3, .service-card__body h2 { font-size: var(--text-lg); margin-bottom: 0.3em; }
.service-card__text { color: var(--text-muted); font-size: var(--text-sm); flex: 1; }
.service-card__text p { margin: 0; }
.service-card__link { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.5em; color: var(--accent); font-weight: 600; font-size: var(--text-sm); }
.service-card__link .icon { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.service-card__link:hover .icon { transform: translateX(3px); }

/* ---------- The deliberate overwide break ---------- */
.break-section {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: clamp(6rem, 16vw, 11rem) 2rem;
	display: flex; align-items: center; justify-content: center;
	text-align: center;
	overflow: hidden;
}
.break-section__bg { position: absolute; inset: 0; background: var(--primary); }
.break-section__content { position: relative; z-index: 1; max-width: 920px; }
.break-section__quote {
	font-family: var(--font-display); font-style: italic; font-weight: 500;
	font-size: clamp(2.2rem, 6vw, 4rem);
	color: var(--bg);
	margin: 0;
	text-wrap: balance;
}

/* ---------- Zielgruppe: wide asymmetric row, not a card grid ---------- */
.zielgruppe-row { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.zielgruppe-row__text h2 { font-size: var(--text-2xl); max-width: 16ch; }
.zielgruppe-row__text p { color: var(--text-muted); max-width: 54ch; }
.check-list { display: flex; flex-direction: column; gap: 0.85rem; margin: 1.5rem 0; }
.check-list li { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.check-list .icon { color: var(--accent); width: 20px; height: 20px; }
.stat { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }
.stat__number { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--primary); font-weight: 600; }
.stat__label { font-size: var(--text-xs); color: var(--text-muted); max-width: 16ch; line-height: 1.35; }
.zielgruppe-row__media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-bold); clip-path: polygon(6% 0, 100% 0%, 100% 94%, 94% 100%, 0 100%, 0% 6%); }
.zielgruppe-row__image { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Slider ---------- */
.section--slider .container { margin-bottom: 1.5rem; }
.slider { padding: 0 clamp(1.25rem, 4vw, 3rem); }
.slider__track {
	display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
	padding-bottom: 1rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.slider__slide {
	scroll-snap-align: start; flex: 0 0 min(78vw, 420px);
	margin: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.slider__slide img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.slider__slide figcaption { padding: 1.25rem 1.4rem; }
.slider__slide h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.slider__slide p { font-size: var(--text-sm); color: var(--text-muted); margin: 0; }

/* ---------- Timetable: 6-column grid, deliberately different column count
   from the services grid above so no two card grids repeat the same shape. */
.timetable { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.85rem; margin-bottom: 2.5rem; }
.timetable__day {
	background: var(--primary-soft); border-radius: var(--radius); padding: 1.1rem 0.75rem;
	display: flex; flex-direction: column; gap: 0.4rem; text-align: center;
}
.timetable__label { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--primary); }
.timetable__slot { font-size: var(--text-xs); color: var(--text-muted); }
.timetable__cta { width: 100%; justify-content: center; }

/* ---------- CTA box ---------- */
.cta-box { background: var(--accent-soft); border-radius: var(--radius-bold); padding: clamp(2.5rem, 6vw, 4rem); }
.cta-box h2 { font-size: var(--text-2xl); }
.cta-box p { color: var(--text-muted); max-width: 58ch; }
.cta-box__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.5rem; }
.cta-box__row span { display: inline-flex; align-items: center; gap: 0.6em; color: var(--text); font-weight: 500; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; }
.page-hero__media { margin-top: 2rem; aspect-ratio: 21 / 8; overflow: hidden; border-radius: var(--radius); }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.prose { max-width: var(--container-narrow); font-size: var(--text-base); }
.prose h2 { font-size: var(--text-xl); margin-top: 1.8em; }
.prose h3 { font-size: var(--text-lg); margin-top: 1.4em; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1.2em; }
.prose ul li { margin-bottom: 0.5em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; margin-bottom: clamp(3rem, 6vw, 5rem); }
.contact-list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 0.85rem; }
.contact-list .icon { color: var(--accent); margin-top: 0.15em; }
.contact-list strong { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.15em; }
.contact-grid__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.75rem, 3vw, 2.5rem); }
.contact-grid__form h2 { font-size: var(--text-lg); }
.contact-map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; }
.contact-map iframe { width: 100%; height: 100%; border: 0; }

.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form label { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: 0.4em; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea {
	width: 100%; padding: 0.8em 1em; border: 1.5px solid var(--border); border-radius: var(--radius);
	font-family: var(--font-body); font-size: var(--text-sm); background: var(--bg);
	transition: border-color var(--dur) var(--ease-out);
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--primary); }
.wpcf7-form input[type="submit"] {
	background: var(--accent); color: #fff; border: none; padding: 0.9em 1.8em; border-radius: var(--radius);
	font-weight: 600; cursor: pointer; transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.wpcf7-form input[type="submit"]:hover { background: oklch(40% 0.13 40); }
.wpcf7-form input[type="submit"]:active { transform: scale(0.98); }
.wpcf7-response-output { border-radius: var(--radius) !important; margin: 1em 0 0 !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: var(--bg); margin-top: clamp(4rem, 8vw, 6rem); }
.site-footer__inner {
	max-width: var(--container-max); margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 3rem;
	display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 4vw, 3rem);
}
.site-footer__brand p { color: oklch(96% 0.012 80 / 0.75); max-width: 36ch; margin-top: 1rem; }
.site-footer h2 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; color: oklch(96% 0.012 80 / 0.6); margin-bottom: 1.2rem; }
.footer-contact { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-contact li, .footer-contact a { display: flex; align-items: center; gap: 0.65rem; color: var(--bg); font-size: var(--text-sm); }
.footer-nav { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-nav a { font-size: var(--text-sm); color: var(--bg); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent-soft); }
.site-footer__bottom { border-top: 1px solid oklch(96% 0.012 80 / 0.15); padding: 1.5rem clamp(1.25rem, 4vw, 3rem); }
.site-footer__bottom p { margin: 0; font-size: var(--text-xs); color: oklch(96% 0.012 80 / 0.6); max-width: var(--container-max); margin-inline: auto; }

/* ---------- Scroll reveal: transform only, never opacity, so headless
   renders and no-JS views still show full content (project hard rule). ---------- */
.reveal { transform: translateY(28px); transition: transform 640ms var(--ease-out); will-change: transform; }
.reveal.is-visible { transform: translateY(0); }
.reveal.reveal--stagger .is-visible { transition-delay: calc(var(--stagger-i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal, .service-card, .btn, .burger__inner, .burger__inner::before, .burger__inner::after, .mobile-drawer, .site-header { transition: none !important; }
	.reveal { transform: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
	.service-card--1, .service-card--2, .service-card--3 { grid-column: span 6; }
}

@media (max-width: 900px) {
	.site-nav, .site-header__cta { display: none; }
	.burger { display: inline-flex; }

	/* header must not blur on mobile - backdrop-filter creates a containing
	   block that clips the fixed drawer (project memory). */
	.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }

	.hero__title { max-width: 100%; }
	.service-card--1, .service-card--2, .service-card--3 { grid-column: span 12; }
	.service-card__media { aspect-ratio: 16 / 10; }

	.zielgruppe-row { grid-template-columns: 1fr; }
	.zielgruppe-row__media { order: -1; aspect-ratio: 16 / 10; }

	.contact-grid { grid-template-columns: 1fr; }

	.site-footer__inner { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }

	.timetable { grid-template-columns: repeat(3, 1fr); }

	/* desktop :hover/:focus-within transforms must be reset here too, or
	   the higher-specificity desktop rule wins and breaks mobile layout. */
	.site-nav__list a:hover::after, .site-nav__list a:focus-within::after { transform: scaleX(0); }
}

@media (max-width: 600px) {
	.hero__media { clip-path: none; aspect-ratio: 4 / 3; }
	.break-section__quote { font-size: 1.9rem; }
	.service-grid { gap: 1.25rem; }
	.timetable { grid-template-columns: repeat(2, 1fr); }
	.site-footer__inner { grid-template-columns: 1fr; }
	.cta-box__row { flex-direction: column; align-items: flex-start; }
	.hero__actions .btn { width: 100%; justify-content: center; }
}
