/**
 * PflegeBrücke — Base Styles
 */

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

html {
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: var(--ink-primary);
	background: var(--surface-canvas);
	font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-display);
	font-weight: 500;
	letter-spacing: var(--tracking-tight);
	line-height: var(--leading-tight);
	color: var(--ink-primary);
}

h1 { font-size: clamp(var(--text-3xl), 4vw + 1rem, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3vw + 0.5rem, var(--text-4xl)); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
	margin: 0 0 var(--space-4);
	color: var(--ink-secondary);
	line-height: var(--leading-relaxed);
}

p.lead {
	font-size: var(--text-lg);
	line-height: var(--leading-relaxed);
	color: var(--ink-secondary);
}

a {
	color: var(--brand-500);
	text-decoration: none;
	transition: color var(--dur-fast) ease;
}
a:hover { color: var(--brand-600); }
a:focus-visible {
	outline: none;
	box-shadow: var(--shadow-focus);
	border-radius: var(--radius-xs);
}

small { font-size: var(--text-sm); color: var(--ink-tertiary); }

::selection {
	background: var(--brand-100);
	color: var(--brand-800);
}

/* ── Layout primitives ───────────────────────────────────── */
.container {
	width: 100%;
	max-width: var(--container-base);
	margin-inline: auto;
	padding-inline: var(--space-6);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section {
	padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-8); }

.cluster {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	align-items: center;
}

/* Visually hidden but accessible to screen readers */
.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--ink-tertiary); }
.eyebrow {
	display: inline-block;
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--brand-500);
	margin-bottom: var(--space-3);
}

img { max-width: 100%; height: auto; display: block; }

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	top: -100px;
	left: var(--space-4);
	background: var(--ink-primary);
	color: var(--ink-on-brand);
	padding: var(--space-2) var(--space-4);
	border-radius: var(--radius-sm);
	z-index: var(--z-modal);
	transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }
