/* ==========================================================================
   Base: reset, design tokens, typography, buttons, icon guardrails
   ========================================================================== */

:root {
	--primary: oklch(32% 0.06 230);
	--bg: oklch(98.3% 0.004 90);
	--bg-raised: oklch(100% 0 0);
	--accent: oklch(58% 0.05 155);
	--accent-dark: oklch(46% 0.05 155);
	--accent-darker: oklch(38% 0.05 155);
	--accent-light: oklch(72% 0.05 155);
	--sand: oklch(89% 0.02 80);
	--ink: oklch(26% 0.045 230);
	--ink-soft: oklch(38% 0.035 230 / 0.78);
	--ink-faint: oklch(38% 0.035 230 / 0.56);
	--line: oklch(32% 0.03 230 / 0.16);
	--line-strong: oklch(32% 0.03 230 / 0.3);

	--radius: 4px;
	--radius-pill: 999px;

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

	--fs-eyebrow: 0.8125rem;
	--fs-small: 0.9375rem;
	--fs-body: 1.125rem;
	--fs-h4: 1.5rem;
	--fs-h3: clamp(1.75rem, 1.55rem + 1vw, 2.125rem);
	--fs-h2: clamp(2.25rem, 1.7rem + 2vw, 3.25rem);
	--fs-h1: clamp(3.5rem, 2.4rem + 4.6vw, 6rem);
	--fs-quote: clamp(1.75rem, 1.4rem + 2.2vw, 2.75rem);

	--space-3xs: 0.5rem;
	--space-2xs: 0.75rem;
	--space-xs: 1.25rem;
	--space-s: clamp(2.5rem, 2rem + 2vw, 4rem);
	--space-m: clamp(4rem, 3rem + 4vw, 6rem);
	--space-l: clamp(6rem, 4rem + 8vw, 10rem);
	--space-xl: clamp(7rem, 4.5rem + 10vw, 12rem);

	--container: 1240px;
	--gap: clamp(1.5rem, 4vw, 3rem);

	--shadow-sm: 0 1px 3px oklch(32% 0.06 230 / 0.08);
	--shadow-md: 0 12px 32px oklch(32% 0.06 230 / 0.12);

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--dur-fast: 180ms;
	--dur-base: 260ms;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

html,
body {
	overflow-x: hidden;
	max-width: 100%;
}

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

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--primary);
	line-height: 1.12;
	margin: 0 0 0.5em;
	font-weight: 500;
	text-wrap: pretty;
}

h1 { font-size: var(--fs-h1); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); font-weight: 500; }
h3 { font-size: var(--fs-h3); font-weight: 500; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
	margin: 0 0 1.1em;
	text-wrap: pretty;
	max-width: 68ch;
}

p.has-no-measure {
	max-width: none;
}

a {
	color: inherit;
}

ul, ol {
	padding-left: 1.3em;
}

/* --- Icons: dezentes Beiwerk, nie Blickfang --------------------------- */
.icon {
	width: 1.4em;
	height: 1.4em;
	flex: 0 0 auto;
	vertical-align: middle;
	color: currentColor;
}

/* --- Layout utilities --------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container--wide {
	max-width: 1440px;
}

.grid-12 {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: var(--gap);
}

.measure {
	max-width: 62ch;
}

.rule {
	border: none;
	border-top: 1px solid var(--line);
	margin: 0;
}

.eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent-dark);
	margin: 0 0 0.9em;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--fs-small);
	padding: 0.95em 1.7em;
	border-radius: var(--radius-pill);
	text-decoration: none;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
	min-height: 44px;
}

.btn-cta {
	/* accent-dark, not accent: white text on the base accent tone is only
	   4.2:1, below the WCAG AA 4.5:1 floor for normal-size text. */
	background: var(--accent-dark);
	color: #fff;
	box-shadow: var(--shadow-sm);
}

.btn-cta:hover {
	background: var(--accent-darker);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

.btn-cta:active {
	transform: scale(0.98);
}

.btn-outline {
	background: transparent;
	color: var(--primary);
	border-color: var(--line-strong);
}

.btn-outline:hover {
	border-color: var(--primary);
	background: oklch(32% 0.06 230 / 0.05);
}

.btn-outline:active {
	transform: scale(0.98);
}

.btn .icon {
	width: 1.1em;
	height: 1.1em;
}

/* --- Focus states --------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2.5px solid var(--accent-dark);
	outline-offset: 3px;
	border-radius: 2px;
}

/* --- Skip link -------------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--primary);
	color: #fff;
	padding: 0.8em 1.4em;
	z-index: 10000;
	border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
	left: 0;
}

/* --- Forms baseline (kontaktformular / anamnese_formular plugin output) --- */
input,
textarea,
select {
	font-family: var(--font-body);
	font-size: 1rem;
	padding: 0.85em 1em;
	border: 1.5px solid var(--line-strong);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	width: 100%;
}

label {
	font-weight: 600;
	font-size: var(--fs-small);
	display: block;
	margin-bottom: 0.4em;
}

/* --- Gutenberg alignment support ------------------------------------------ */
.alignwide {
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
