/* =============================================================================
   BlickSpektrum – Basis: Schriften, Design-Tokens, Reset, Grundtypografie
   ========================================================================== */

/* -----------------------------------------------------------------------
   Schriftarten (selbst gehostet, nur lateinisches Subset – deckt Ä Ö Ü ä ö ü ß
   vollständig ab; keine externe Google-Fonts-Verbindung zur Laufzeit)
   -------------------------------------------------------------------- */

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url('../fonts/sourcesans3-latin-400-600.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
	font-family: 'Newsreader';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/newsreader-latin-400-700.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
	font-family: 'Newsreader';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/newsreader-italic-latin-400.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

/* -----------------------------------------------------------------------
   Design-Tokens
   -------------------------------------------------------------------- */

:root {
	/* Farben */
	--color-bg: #FAF7F1;
	--color-surface: #FFFFFF;
	--color-surface-alt: #F1EBE0;
	--color-surface-stone: #F4F1EA;
	--color-text: #201D19;
	--color-text-secondary: #4A453D;
	/* War #786F62 – auf --color-surface-alt/--color-surface-stone (den in
	   .card-meta u. Ä. häufigsten Hintergründen) lag der Kontrast bei nur
	   ~4.17:1, unter der WCAG-AA-Mindestanforderung von 4.5:1 für normal
	   großen Text (Lighthouse-Accessibility-Audit September 2026). Um ~10 %
	   abgedunkelt (gleicher warme Grauton) ergibt dort ~5.1:1 und überall
	   sonst noch mehr Reserve – kein spürbarer optischer Unterschied. */
	--color-muted: #6B6154;
	--color-accent: #9A2E1D;
	--color-accent-dark: #7A2216;
	--color-on-accent: #FFFFFF;
	--color-border: #E4DDCE;
	--color-border-strong: #CBC0AA;
	--color-focus: #201D19;
	--color-success: #2F6B4F;
	--color-error: #9A2E1D;

	/* Typografie */
	--font-editorial: 'Newsreader', Georgia, 'Times New Roman', serif;
	--font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	--text-xs: 0.875rem;
	--text-sm: 0.9375rem;
	--text-base: 1.0625rem;
	--text-md: 1.1875rem;
	--text-lg: 1.375rem;
	--text-xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
	--text-2xl: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem);
	--text-3xl: clamp(2.375rem, 1.7rem + 2.9vw, 3.625rem);
	--text-display: clamp(2.625rem, 1.65rem + 4.2vw, 4.5rem);

	--leading-tight: 1.15;
	--leading-snug: 1.32;
	--leading-normal: 1.5;
	--leading-relaxed: 1.72;

	/* Abstände */
	--space-3xs: 0.25rem;
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;
	--space-2xl: 6rem;

	/* Container */
	--container-wide: 1360px;
	--container-narrow: 960px;
	--container-reading: 740px;
	--container-gutter: clamp(1.25rem, 3vw, 2.5rem);

	/* Rahmen, Radien, Schatten */
	--border-width: 1px;
	--radius-sm: 2px;
	--radius-md: 4px;
	--shadow-sm: 0 1px 2px rgba(32, 29, 25, 0.07);
	--shadow-md: 0 6px 20px rgba(32, 29, 25, 0.10);

	/* Übergänge */
	--transition-fast: 150ms ease;
	--transition-base: 220ms ease;

	/* Ebenen */
	--z-header: 100;
	--z-dropdown: 110;
	--z-mobile-nav: 200;

	color-scheme: light;
}

/* -----------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------- */

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@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;
		scroll-behavior: auto !important;
	}
}

body {
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	font-weight: 400;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}

/* Sicherheitsnetz gegen horizontales Scrollen durch lange, unteilbare
   Wörter oder URLs in redaktionellen Inhalten. */
h1, h2, h3, h4, h5, h6, p, li, blockquote {
	overflow-wrap: break-word;
}

main {
	display: block;
	flex: 1 0 auto;
}

img,
picture,
svg {
	max-width: 100%;
	display: block;
}

img {
	height: auto;
}

figure {
	margin: 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
}

a {
	color: var(--color-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--color-accent-dark);
}

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

/* -----------------------------------------------------------------------
   Grundtypografie
   -------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-editorial);
	font-weight: 600;
	line-height: var(--leading-tight);
	color: var(--color-text);
	text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; }

p {
	text-wrap: pretty;
}

/* -----------------------------------------------------------------------
   Fokus & Barrierefreiheit
   -------------------------------------------------------------------- */

:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

::selection {
	background-color: var(--color-accent);
	color: var(--color-on-accent);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: var(--space-sm);
	top: -100px;
	background: var(--color-text);
	color: #fff;
	padding: var(--space-2xs) var(--space-sm);
	z-index: 1000;
	transition: top var(--transition-fast);
	border-radius: var(--radius-sm);
}

.skip-link:focus {
	top: var(--space-sm);
	color: #fff;
}

html.no-scroll {
	overflow: hidden;
}
