/* ==========================================================================
   Pflegedienst Sanitas GmbH — Klinische Klarheit
   ========================================================================== */

:root {
	--primary: #1b4b66;
	--primary-oklch: oklch(38% 0.07 232);
	--primary-dark: #123244;
	--accent: #5c7e64;
	--accent-oklch: oklch(52% 0.06 152);
	--accent-dark: #45614b;
	--bg: #faf9f6;
	--surface: #ffffff;
	--text: #23282b;
	--text-muted: #565f63;
	--border: #e2e2dc;

	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-signature: 28px; /* the one deliberate radius, used only on the hero portrait */

	--shadow-1: 0 1px 2px rgba(27, 43, 56, 0.06), 0 1px 1px rgba(27, 43, 56, 0.04);
	--shadow-2: 0 12px 32px -12px rgba(27, 43, 56, 0.22);

	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

	--step-0: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
	--step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.66rem);
	--step-2: clamp(1.66rem, 1.4rem + 1.1vw, 2.36rem);
	--step-3: clamp(2.2rem, 1.7rem + 2vw, 3.55rem);
	--step-4: clamp(2.9rem, 2.1rem + 3.2vw, 5rem);

	--space-2xs: 0.5rem;
	--space-xs: 1rem;
	--space-sm: 1.5rem;
	--space-md: 2.5rem;
	--space-lg: 4rem;
	--space-xl: 6rem;
	--space-2xl: 8rem;
	--space-3xl: 10rem;

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

	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

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

img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; height: auto; }
video, iframe { max-width: 100%; }

.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;
	color: var(--primary-dark);
	line-height: 1.15;
	text-wrap: pretty;
	margin: 0 0 0.5em;
}

h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: 62ch; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: clamp(4rem, 8vw, 7rem); }

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

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 1rem; left: 1rem; width: auto; height: auto;
	background: var(--primary); color: #fff; padding: 0.75rem 1.25rem;
	border-radius: var(--radius-sm); z-index: 1000; clip: auto;
}

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

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 0.6rem;
	font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
	padding: 0.85em 1.5em;
	border-radius: var(--radius-md);
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
	min-height: 44px;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: scale(0.98) translateY(0); }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); }
.btn--on-dark { background: #fff; color: var(--primary-dark); }
.btn--on-dark:hover { background: #fff; color: var(--primary-dark); }
.btn--ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost-on-dark:hover { border-color: #fff; }

/* ---------- Reveal animations (transform-only, never opacity:0) ---------- */
.reveal {
	transform: translateY(28px);
	transition: transform 640ms var(--ease-out);
	transition-delay: var(--delay, 0ms);
	will-change: transform;
}
.reveal--scale { transform: scale(0.94) translateY(16px); }
.reveal.is-visible { transform: translateY(0) scale(1); }

@media (prefers-reduced-motion: reduce) {
	.reveal, .reveal--scale { transform: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 200;
	background: rgba(250, 249, 246, 0.94);
	border-bottom: 1px solid var(--border);
	transition: padding var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.site-header.is-compact { box-shadow: var(--shadow-1); }

.site-header__inner {
	max-width: 1200px; margin-inline: auto;
	padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
	display: flex; align-items: center; gap: var(--space-md);
	transition: padding var(--dur) var(--ease-out);
}
.site-header.is-compact .site-header__inner { padding-block: 0.7rem; }

.site-header__logo { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.site-header__logo img { max-height: 52px; width: auto; transition: max-height var(--dur) var(--ease-out); }
.site-header.is-compact .site-header__logo img { max-height: 38px; }
.site-header__logotext { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--primary-dark); }

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

.site-header__cta { white-space: nowrap; }

.burger {
	display: none; background: transparent; border: none; color: var(--primary-dark);
	width: 44px; height: 44px; align-items: center; justify-content: center;
	border-radius: var(--radius-sm); cursor: pointer;
}
.burger .icon { width: 26px; height: 26px; }

.mobile-drawer {
	position: fixed; top: 0; right: 0; height: 100%; width: min(85vw, 360px);
	background: var(--surface); z-index: 400;
	transform: translateX(100%);
	transition: transform 320ms var(--ease-out);
	display: flex; flex-direction: column; gap: var(--space-md);
	padding: var(--space-md) var(--space-sm);
	box-shadow: -12px 0 40px rgba(20,30,38,0.18);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.mobile-drawer__title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.mobile-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a { display: block; padding: 0.85rem 0.25rem; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); min-height: 44px; }
.mobile-drawer__cta { margin-top: auto; justify-content: center; }

.mobile-drawer__overlay {
	position: fixed; inset: 0; background: rgba(18, 28, 36, 0.4); z-index: 390;
	opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-out);
}
.mobile-drawer__overlay.is-open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Hero + contact bar
   ========================================================================== */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3rem); }
.hero__inner {
	display: grid; grid-template-columns: repeat(12, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center;
}
.hero__copy { grid-column: 1 / span 7; }
.hero__media { grid-column: 8 / span 5; }
.hero__media img { border-radius: var(--radius-signature); box-shadow: var(--shadow-2); aspect-ratio: 4/5; object-fit: cover; }
.hero__lead { font-size: 1.15rem; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-sm); }

.contact-bar { background: var(--primary-dark); color: #fff; }
.contact-bar__inner {
	display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 2.5rem);
	padding-block: 1rem; justify-content: space-between;
}
.contact-bar__item { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.contact-bar__item .icon { color: var(--accent); }
a.contact-bar__item:hover { color: #fff; }

/* ==========================================================================
   Slider
   ========================================================================== */
.slider-section { padding-block: clamp(3rem, 6vw, 5rem); }
.slider { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-2); }
.slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide {
	position: relative; flex: 0 0 100%; scroll-snap-align: start;
	aspect-ratio: 21/9; min-height: 320px;
}
.slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.slider__caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	background: linear-gradient(to top, rgba(18,28,36,0.82), rgba(18,28,36,0));
	color: #fff;
}
.slider__caption h3 { color: #fff; margin-bottom: 0.3em; }
.slider__caption p, .slider__caption div { color: rgba(255,255,255,0.9); max-width: 60ch; }
.slider__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 44px; height: 44px; border-radius: 50%; border: none;
	background: rgba(255,255,255,0.9); color: var(--primary-dark);
	display: flex; align-items: center; justify-content: center; cursor: pointer;
	transition: background var(--dur) var(--ease-out);
}
.slider__nav:hover { background: #fff; }
.slider__nav--prev { left: 1rem; }
.slider__nav--prev .icon { transform: rotate(180deg); }
.slider__nav--next { right: 1rem; }
.slider__dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; }
.slider__dots button {
	width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0;
}
.slider__dots button.is-active { background: #fff; }

/* ==========================================================================
   Services — staggered 12-col grid
   ========================================================================== */
.section-head { max-width: 62ch; margin-bottom: var(--space-lg); }
.section-head__lead { font-size: 1.1rem; }

.services__grid {
	display: grid; grid-template-columns: repeat(12, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
}
.service-card { grid-column: span 6; border-radius: var(--radius-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.service-card:nth-child(1) { grid-column: 1 / span 6; }
.service-card:nth-child(2) { grid-column: 7 / span 6; margin-top: clamp(0px, 4vw, 3rem); }
.service-card:nth-child(3) { grid-column: 2 / span 6; margin-top: clamp(0px, 2vw, 1.5rem); }
.service-card:nth-child(4) { grid-column: 8 / span 5; }

.service-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.service-card__media { aspect-ratio: 4/3; overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease-out); }
.service-card__link:hover .service-card__media img { transform: scale(1.045); }
.service-card__body { padding: var(--space-sm); }
.service-card__excerpt p { font-size: 0.98rem; }
.service-card__more {
	display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem;
	color: var(--primary); font-weight: 600; font-size: 0.92rem;
}
.service-card__more .icon { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease-out); }
.service-card__link:hover .service-card__more .icon { transform: translateX(4px); }

/* ==========================================================================
   Trust band — full-bleed accent color
   ========================================================================== */
.trust-band { background: var(--primary); color: #fff; padding-block: clamp(3.5rem, 7vw, 6rem); }
.trust-band__inner { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.trust-band__mark { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.trust-band__figure { font-family: var(--font-display); font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 600; line-height: 1; color: #fff; }
.trust-band__caption { color: rgba(255,255,255,0.82); font-weight: 600; font-size: 0.95rem; }
.trust-band__text h2, .trust-band__text p { color: #fff; }
.trust-band__text p { color: rgba(255,255,255,0.86); max-width: 60ch; }

/* ==========================================================================
   Breakout — the deliberate overwide break
   ========================================================================== */
.breakout {
	position: relative;
	display: grid; grid-template-columns: 1fr;
	margin-block: clamp(3rem, 6vw, 5rem);
}
.breakout__media {
	width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw;
	aspect-ratio: 16/7; min-height: 320px; overflow: hidden;
}
.breakout__media img { width: 100%; height: 100%; object-fit: cover; }
.breakout__panel {
	position: relative; z-index: 2;
	background: var(--surface); box-shadow: var(--shadow-2); border-radius: var(--radius-md);
	max-width: 640px; margin: -4.5rem clamp(1.25rem, 6vw, 8rem) 0 clamp(1.25rem, 6vw, 8rem);
	padding: clamp(1.75rem, 4vw, 3rem);
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: var(--primary-dark); color: #fff; padding-block: clamp(3.5rem, 7vw, 6rem); }
.cta-band__inner { text-align: center; max-width: 720px; margin-inline: auto; }
.cta-band__inner h2, .cta-band__inner p { color: #fff; }
.cta-band__inner p { color: rgba(255,255,255,0.82); margin-inline: auto; }
.cta-band__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: var(--space-sm); }

/* ==========================================================================
   Sub-page layout (page.php)
   ========================================================================== */
.page-hero { position: relative; background: var(--primary-dark); color: #fff; padding-block: clamp(3rem, 6vw, 5rem); overflow: hidden; }
.page-hero.has-media { min-height: 320px; display: flex; align-items: flex-end; }
.page-hero__media { position: absolute; inset: 0; z-index: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.38; }
.page-hero__inner { position: relative; z-index: 1; padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.page-hero .eyebrow { color: rgba(255,255,255,0.7); }
.page-hero .eyebrow a { color: rgba(255,255,255,0.85); }
.page-hero h1 { color: #fff; margin-bottom: 0.3em; }
.page-hero__lead { color: rgba(255,255,255,0.85); max-width: 60ch; font-size: 1.1rem; }

.page-body { }
.page-grid { display: grid; grid-template-columns: 7fr 3fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.page-grid__content :is(h2, h3) { margin-top: 1.6em; }
.page-grid__content p, .page-grid__content li { max-width: 68ch; }
.page-grid__content ul, .page-grid__content ol { padding-left: 1.25em; color: var(--text-muted); }
.page-grid__content li { margin-bottom: 0.5em; }
.page-grid__content figure { margin: var(--space-md) 0; }
.page-grid__content img { border-radius: var(--radius-md); }

.contact-card {
	position: sticky; top: 6rem;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: var(--space-sm);
	box-shadow: var(--shadow-1);
	display: flex; flex-direction: column; gap: 0.85rem;
}
.contact-card h3 { margin-bottom: 0.2em; }
.contact-card .btn { justify-content: center; margin-top: 0.4rem; }

.contact-line { display: flex; align-items: center; gap: 0.6rem; margin: 0; color: var(--text); }
.contact-line a { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.contact-line .icon { color: var(--accent); flex-shrink: 0; }
.contact-line span { max-width: none; }

/* ==========================================================================
   Kontakt page extras
   ========================================================================== */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea {
	width: 100%; padding: 0.85em 1em; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
	font-family: var(--font-body); font-size: 1rem; background: var(--surface); color: var(--text);
	transition: border-color var(--dur) var(--ease-out);
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { border-color: var(--accent); outline: none; }
.wpcf7-form input[type="submit"] {
	background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md);
	padding: 0.85em 1.8em; font-weight: 600; font-size: 1rem; cursor: pointer; min-height: 44px;
	transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.wpcf7-form input[type="submit"]:hover { background: var(--primary-dark); transform: translateY(-2px); }
.wpcf7-form input[type="submit"]:active { transform: scale(0.98); }
.wpcf7-not-valid-tip { color: #b3261e; font-size: 0.85rem; margin-top: 0.3rem; }
.wpcf7-response-output { border-radius: var(--radius-sm); padding: 0.85em 1em; margin-top: 1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer__band { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding-block: clamp(3rem, 6vw, 4.5rem); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 4vw, 3rem); }
.site-footer__brand .site-footer__logotext { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: #fff; }
.site-footer__brand p { color: rgba(255,255,255,0.7); max-width: 40ch; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.9em; }
.site-footer .contact-line { color: rgba(255,255,255,0.85); margin-bottom: 0.7rem; }
.site-footer .contact-line a { color: rgba(255,255,255,0.85); }
.site-footer .contact-line .icon { color: var(--accent); }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-menu a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer-menu a:hover { color: #fff; }
.site-footer__bottom { background: var(--primary-dark); border-top: 1px solid rgba(255,255,255,0.12); padding-block: 1.25rem; }
.site-footer__bottom p { color: rgba(255,255,255,0.6); text-align: center; margin: 0; font-size: 0.85rem; max-width: none; }

/* ==========================================================================
   Legal pages (Impressum/Datenschutz) plain content
   ========================================================================== */
.legal-content h2 { margin-top: 1.5em; }

/* ==========================================================================
   Squeeze zone — keep the navbar from wrapping just above the burger breakpoint
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1250px) {
	.primary-menu { gap: 1rem; }
	.primary-menu a { font-size: 0.92rem; }
	.site-header__cta span { display: none; }
	.site-header__inner { gap: var(--space-sm); }
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */
@media (max-width: 900px) {
	.site-header__nav { display: none; }
	.site-header__cta { display: none; }
	.burger { display: flex; }

	/* Re-assert no-transform reset at mobile: desktop :hover/:focus-within must not leak in */
	.primary-menu a:hover::after, .primary-menu a:focus-visible::after { right: 100%; }

	.hero__inner { grid-template-columns: 1fr; }
	.hero__copy, .hero__media { grid-column: 1 / -1; }
	.hero__media { order: -1; }
	.hero__media img { aspect-ratio: 16/10; }

	.services__grid { grid-template-columns: repeat(6, 1fr); }
	.service-card,
	.service-card:nth-child(1),
	.service-card:nth-child(2),
	.service-card:nth-child(3),
	.service-card:nth-child(4) { grid-column: 1 / -1; margin-top: 0; }

	.trust-band__inner { grid-template-columns: 1fr; text-align: left; }

	.page-grid { grid-template-columns: 1fr; }
	.contact-card { position: static; }

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

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

/* ==========================================================================
   Responsive — Mobile (burger breakpoint)
   ========================================================================== */
@media (max-width: 600px) {
	.hero { padding-block: 2rem 1.5rem; }
	.hero__actions { flex-direction: column; align-items: stretch; }
	.hero__actions .btn { justify-content: center; }

	.contact-bar__inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding-block: 1.25rem; }

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

	.breakout__panel { margin: -3rem 1rem 0 1rem; }

	.trust-band__figure { font-size: 3.5rem; }

	.cta-band__actions { flex-direction: column; align-items: stretch; }
	.cta-band__actions .btn { justify-content: center; }

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