/* ==========================================================================
   Med. Fußpflege Yvonne Knoop – Klinisches Vertrauen
   ========================================================================== */

:root {
	--primary: oklch(38% 0.06 240);
	--primary-ink: oklch(22% 0.03 240);
	--bg: oklch(99% 0.003 240);
	--surface: oklch(97% 0.004 240);
	--accent: oklch(62% 0.07 160);
	--accent-ink: oklch(30% 0.05 160);
	--text: oklch(22% 0.01 240);
	--text-muted: oklch(45% 0.02 240);
	--border: oklch(88% 0.01 240);
	--radius: 4px;
	--space-unit: 0.5rem;
	--font-display: 'Fraunces', serif;
	--font-body: 'Source Sans 3', sans-serif;
	--shadow-sm: 0 1px 2px oklch(22% 0.01 240 / 0.06), 0 1px 1px oklch(22% 0.01 240 / 0.04);
	--shadow-md: 0 8px 24px oklch(22% 0.01 240 / 0.10), 0 2px 6px oklch(22% 0.01 240 / 0.06);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--dur: 220ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	overflow-x: hidden;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	text-wrap: pretty;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.icon {
	width: 1.4em;
	height: 1.4em;
	max-width: 32px;
	max-height: 32px;
	flex: 0 0 auto;
	vertical-align: middle;
	stroke: currentColor;
	fill: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.12;
	color: var(--primary-ink);
	text-wrap: pretty;
	margin: 0;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1.1em; max-width: 65ch; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-muted); max-width: 48ch; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.grid-12 {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 1.6rem;
	min-height: 48px;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: 1rem;
	border: 1px solid transparent;
	transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.btn-primary { background: var(--accent); color: oklch(99% 0.003 240); }
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(-2px) scale(0.98); }
.btn-outline { background: transparent; border-color: oklch(99% 0.003 240 / 0.5); color: inherit; }
.btn-outline:hover { background: oklch(99% 0.003 240 / 0.12); transform: translateY(-2px); }
.btn-outline:active { transform: translateY(-2px) scale(0.98); }

/* ---------- Skip link ---------- */
.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
	padding: 0.75rem 1.25rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	transition: padding var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.site-header.is-condensed { box-shadow: var(--shadow-sm); }
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.3rem;
	transition: padding-block var(--dur) var(--ease-out);
}
.site-header.is-condensed .site-header__inner { padding-block: 0.75rem; }

.site-logo {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--primary-ink);
	line-height: 1.2;
	white-space: nowrap;
}
.site-logo span { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; color: var(--text-muted); text-transform: uppercase; }

.primary-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2vw, 2.25rem); margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(1.1rem, 1.8vw, 1.9rem); }
.primary-nav a {
	font-weight: 600;
	font-size: 0.98rem;
	color: var(--text);
	padding: 0.4rem 0.1rem;
	position: relative;
}
.primary-nav a::after {
	content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent);
	transition: width var(--dur) var(--ease-out);
}
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { width: 100%; }

.header-cta { white-space: nowrap; }
.header-cta .btn-primary { padding: 0.6rem 1.3rem; min-height: 40px; background: var(--primary); }

.burger-toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.burger-box { position: relative; display: inline-block; width: 22px; height: 16px; }
.burger-bar {
	display: block;
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: var(--primary-ink);
	border-radius: 2px;
	transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.burger-bar:nth-child(1) { top: 0; }
.burger-bar:nth-child(2) { top: 7px; }
.burger-bar:nth-child(3) { top: 14px; }
.burger-toggle[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-toggle[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.burger-toggle[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer – direct child of <body>, never inside <header> */
.mobile-drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(84vw, 360px);
	height: 100vh;
	background: var(--bg);
	border-left: 1px solid var(--border);
	transform: translateX(100%);
	transition: transform var(--dur) var(--ease-out);
	z-index: 1000;
	overflow-y: auto;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__close {
	align-self: flex-end;
	width: 44px; height: 44px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: transparent;
	font-size: 1.4rem;
	color: var(--primary-ink);
}
.mobile-drawer ul { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-drawer a {
	display: block;
	padding: 0.9rem 0.25rem;
	font-size: 1.1rem;
	font-weight: 600;
	min-height: 44px;
	border-bottom: 1px solid var(--border);
}
.drawer-overlay {
	position: fixed; inset: 0; background: oklch(22% 0.01 240 / 0.4);
	opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-out);
	z-index: 900;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer-phone { margin-top: auto; }

/* ==========================================================================
   Hero – text-dominant, image below
   ========================================================================== */
.hero {
	padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
	background: var(--bg);
}
.hero__content { max-width: 760px; }
.hero__eyebrow {
	display: inline-flex; align-items: center; gap: 0.5rem;
	font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
	color: var(--accent-ink);
	margin-bottom: 1.1rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero .lede { margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-bottom: 0.5rem; }
.hero__phone { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--primary-ink); }

.hero__image-wrap {
	margin-top: clamp(2.5rem, 6vw, 4rem);
	aspect-ratio: 16/8;
	overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 2.5% 100%, 0 92%);
	box-shadow: var(--shadow-md);
}
.hero__image-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Intro – asymmetric 7/5 grid
   ========================================================================== */
.intro { padding-block: clamp(4rem, 8vw, 6rem); }
.intro__text { grid-column: 1 / span 7; }
.intro__media { grid-column: 9 / span 4; align-self: center; }
.intro__media img { aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.intro__text h2 { margin-bottom: 1.25rem; }

/* ==========================================================================
   Services – the only place with a card grid
   ========================================================================== */
.services { padding-block: clamp(5rem, 9vw, 7.5rem); background: var(--surface); }
.services__head { grid-column: 1 / span 7; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.services__grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
.service-card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.9rem 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card__icon { color: var(--accent-ink); }
.service-card h3 { margin-bottom: 0.1rem; }
.service-card p { font-size: 0.97rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.service-card a.service-card__link { font-weight: 600; color: var(--accent-ink); margin-top: auto; }

/* ==========================================================================
   Slider – tighter rhythm, scroll-snap
   ========================================================================== */
.slider-section { padding-block: clamp(4rem, 7vw, 5.5rem); }
.slider-section__head { margin-bottom: 2rem; }
.slider {
	position: relative;
}
.slider__track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 0.5rem;
	scrollbar-width: thin;
}
.slider__item {
	flex: 0 0 min(80vw, 480px);
	scroll-snap-align: start;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	position: relative;
	aspect-ratio: 16/10;
}
.slider__item img { width: 100%; height: 100%; object-fit: cover; }
.slider__caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 1rem 1.1rem 0.9rem;
	background: linear-gradient(to top, oklch(22% 0.01 240 / 0.75), transparent);
	color: #fff;
}
.slider__caption h3 { color: #fff; font-size: 1.05rem; }
.slider__nav { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.slider__nav button {
	width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg);
	display: inline-flex; align-items: center; justify-content: center;
	transition: background-color var(--dur) var(--ease-out);
}
.slider__nav button:hover { background: var(--surface); }

/* ==========================================================================
   Trust break – full-bleed, deliberate structural break
   ========================================================================== */
.trust-break {
	background: var(--primary);
	color: oklch(98% 0.003 240);
	padding-block: clamp(5.5rem, 12vw, 10rem);
}
.trust-break__inner { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; gap: clamp(2rem, 4vw, 3rem); }
.trust-break__stat { grid-column: 1 / span 4; }
.trust-break__stat .num { font-family: var(--font-display); font-size: clamp(3rem, 7vw, 5rem); font-weight: 500; line-height: 1; }
.trust-break__stat .cap { font-size: 0.95rem; color: oklch(98% 0.003 240 / 0.75); margin-top: 0.4rem; }
.trust-break__text { grid-column: 6 / span 7; }
.trust-break__text h2 { color: #fff; margin-bottom: 1rem; }
.trust-break__text p { color: oklch(98% 0.003 240 / 0.85); max-width: 56ch; }

/* ==========================================================================
   CTA / Contact teaser
   ========================================================================== */
.cta-section { padding-block: clamp(4.5rem, 8vw, 7rem); }
.cta-card {
	grid-column: 1 / -1;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: clamp(2rem, 5vw, 3.5rem);
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2rem;
	align-items: center;
}
.cta-card__text { grid-column: 1 / span 7; }
.cta-card__actions { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 1rem; }
.contact-line { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--primary-ink); }
.contact-line .icon { color: var(--accent-ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--primary); color: oklch(98% 0.003 240 / 0.9); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer__grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2.5rem; margin-bottom: 2.5rem; }
.footer__brand { grid-column: 1 / span 4; }
.footer__brand .site-logo, .footer__brand .site-logo span { color: oklch(98% 0.003 240); }
.footer__col { grid-column: span 4; }
.footer__col h4 { color: oklch(98% 0.003 240); font-size: 1rem; margin-bottom: 1rem; }
.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col a { color: oklch(98% 0.003 240 / 0.8); font-size: 0.95rem; }
.footer__col a:hover { color: oklch(98% 0.003 240); }
.footer__contact-line { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; color: oklch(98% 0.003 240 / 0.85); font-size: 0.95rem; }
.footer__bottom { border-top: 1px solid oklch(98% 0.003 240 / 0.15); padding-top: 1.5rem; font-size: 0.85rem; color: oklch(98% 0.003 240 / 0.6); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.footer__bottom a { text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Generic page content (page.php)
   ========================================================================== */
.page-hero { padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.page-hero h1 { max-width: 20ch; }
.page-content { padding-block: 0 clamp(4rem, 8vw, 6rem); }
.page-content .container { max-width: 760px; }
.page-content h2 { margin-top: 2.25rem; margin-bottom: 1rem; }
.page-content h2:first-child { margin-top: 0; }
.page-content ul.wp-block-list { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.1em; }
.page-content ul.wp-block-list li { margin-bottom: 0.4em; }
.page-content figure { margin: 2rem 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* Services overview list (page-leistungen) */
.leistungen-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; margin: 2rem 0; }
.leistungen-list .service-card { max-width: none; }

/* Contact page layout */
.contact-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 3rem); }
.contact-grid__info { grid-column: 1 / span 5; }
.contact-grid__form { grid-column: 6 / span 7; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.75rem, 3vw, 2.5rem); }
.contact-grid__info .contact-line { margin-bottom: 1rem; font-size: 1.05rem; }

.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea {
	width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
	min-height: 48px; transition: border-color var(--dur) var(--ease-out);
}
.wpcf7-form textarea { min-height: 120px; }
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.wpcf7-form input[type="submit"] {
	background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
	padding: 0.85rem 1.8rem; font-weight: 600; min-height: 48px; transition: transform var(--dur) var(--ease-out);
}
.wpcf7-form input[type="submit"]:hover { transform: translateY(-2px); }
.wpcf7-not-valid-tip { color: oklch(50% 0.18 25); font-size: 0.85rem; }
.wpcf7-response-output { border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-top: 1rem; border: 1px solid var(--border); }

/* ==========================================================================
   Scroll reveal – transform only, never opacity:0 as start state
   ========================================================================== */
.reveal {
	transform: translateY(28px);
	transition: transform 640ms var(--ease-out);
	will-change: transform;
}
.reveal.is-visible { transform: translateY(0); }
.reveal-stagger > * {
	transform: translateY(28px);
	transition: transform 640ms var(--ease-out);
}
.reveal-stagger.is-visible > * { transform: translateY(0); }

/* ==========================================================================
   Focus visibility
   ========================================================================== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ==========================================================================
   Breakpoint: tablet ≤900px
   ========================================================================== */
@media (max-width: 900px) {
	.primary-nav ul, .header-cta { display: none; }
	.burger-toggle { display: inline-flex; }

	.intro__text, .intro__media { grid-column: 1 / -1; }
	.intro__media { order: -1; margin-bottom: 1.5rem; }

	.services__head { grid-column: 1 / -1; }
	.services__grid { grid-template-columns: repeat(2, 1fr); }

	.trust-break__stat, .trust-break__text { grid-column: 1 / -1; }
	.trust-break__text { margin-top: 1rem; }

	.cta-card__text, .cta-card__actions { grid-column: 1 / -1; }
	.cta-card__actions { align-items: flex-start; }

	.footer__brand, .footer__col { grid-column: 1 / span 6; }

	.contact-grid__info, .contact-grid__form { grid-column: 1 / -1; }

	.leistungen-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Breakpoint: mobile ≤600px — re-assert resets that higher-specificity
   desktop :hover/:focus-within rules could otherwise still win
   ========================================================================== */
@media (max-width: 600px) {
	body { font-size: 1rem; }
	.site-header__inner { padding-block: 1rem; }
	.site-header.is-condensed .site-header__inner { padding-block: 0.6rem; }

	.hero__actions { flex-direction: column; align-items: flex-start; }
	.hero__image-wrap { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

	.services__grid { grid-template-columns: 1fr; }
	.footer__brand, .footer__col { grid-column: 1 / -1; }
	.footer__bottom { flex-direction: column; }

	.primary-nav a::after { transform: none; }
	.mobile-drawer a:hover, .mobile-drawer a:focus-within { transform: none; }
}

/* ==========================================================================
   Header backdrop-filter is desktop-only to avoid trapping the fixed drawer
   ========================================================================== */
@media (min-width: 901px) {
	.site-header.is-condensed { backdrop-filter: saturate(1.1) blur(6px); background: oklch(99% 0.003 240 / 0.92); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal, .reveal-stagger > *, .btn-primary, .btn-outline, .service-card, .mobile-drawer, .drawer-overlay, .burger-bar, .primary-nav a::after {
		transition: opacity 1ms linear !important;
		transform: none !important;
	}
	.reveal, .reveal-stagger > * { opacity: 1; }
}
