/* =========================================================================
   DITIB-NRW 2026 — base.css
   Reset, Custom-Properties (Radii / Motion / Ornament), Basis-Typografie.
   Alle Farb-/Größen-/Spacing-Tokens kommen aus theme.json (--wp--preset--*).
   ========================================================================= */

:root {
	/* Radii — EINE Formsprache: dezent abgerundete Rechtecke (~12px) überall.
	   Alle Tokens zeigen bewusst auf denselben Wert, damit Karten, Buttons,
	   Bilder, Container und Eingaben identisch gerundet sind. (design-system §4.3) */
	--radius: 12px;
	--radius-sm: 10px;      /* nur Eingaben/Fokus, minimal enger */
	--radius-md: 12px;
	--radius-lg: 12px;
	--radius-xl: 12px;
	--radius-pill: 12px;    /* keine Pillen mehr — bewusst auf 12px kollabiert */
	--radius-full: 12px;    /* keine Kreise mehr — außer Logo-Emblem (eigene Regel) */

	/* Motion (design-system §5.1) */
	--ease-standard: cubic-bezier(.4, 0, .2, 1);
	--ease-out-soft: cubic-bezier(.16, 1, .3, 1);
	--ease-in-out-slow: cubic-bezier(.65, 0, .35, 1);
	--dur-fast: 120ms;
	--dur-base: 220ms;
	--dur-slow: 480ms;
	--dur-reveal: 700ms;
	--dur-ornament: 24s;

	/* Schatten (design-system §4.4) */
	--shadow-xs: 0 1px 2px rgba(14, 37, 43, .06);
	--shadow-sm: 0 2px 8px rgba(14, 37, 43, .06), 0 1px 2px rgba(14, 37, 43, .04);
	--shadow-md: 0 8px 24px rgba(14, 37, 43, .08), 0 2px 6px rgba(14, 37, 43, .05);
	--shadow-lg: 0 20px 48px rgba(14, 37, 43, .12), 0 6px 16px rgba(14, 37, 43, .06);
	--shadow-gold: 0 0 0 1px rgba(201, 162, 39, .35);

	/* Höhe des fixierten Headers (für Platzhalter/Anker-Offsets) */
	--header-h: 68px;

	/* Semantische Aliase auf theme.json-Presets */
	--focus-ring: var(--wp--preset--color--petrol-700);

	/* Ornament-Pfade — EIN Muster (Khatam-Stern) in zwei Tonfassungen.
	   Alle dekorativen Layer verweisen bewusst auf dieselbe Geometrie. */
	--ornament-girih: url("../img/ornament/khatam-light.svg");
	--ornament-girih-gold: url("../img/ornament/khatam-dark.svg");
}

/* ---- Box-Model-Reset ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth;
	/* Anker-Ziele nicht unter den fixierten Header rutschen lassen */
	scroll-padding-top: var(--header-h);
	/* Horizontal-Overflow kappen (bricht den FIXED-Header nicht) */
	overflow-x: clip;
}
@media (min-width: 700px) { :root { --header-h: 72px; } }
/* Platz für den fixierten Header reservieren, damit Inhalt nicht darunter startet */
body { padding-top: var(--header-h); }
/* Eingeloggte Editoren: WP-Adminbar-Höhe berücksichtigen */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

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

body {
	margin: 0;
	min-height: 100vh;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* OpenType-Features global (design-system §3.1) */
	font-feature-settings: "cv11", "ss03";
	/* Ruhige, GLATTE Grundfläche — KEIN Muster hinter Text (max. Lesbarkeit).
	   Das Sternmuster erscheint nur noch als dezenter Akzent in den
	   Petrol-Kopfbändern (Header/Seitentitel), nie unter Fließtext. */
	background-color: #eef4f5;
}

/* Serifen-Titelschrift (selbst-gehostet, variabel) — würdevoll/editorial. */
@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/SourceSerif4Variable.woff2") format("woff2");
}

/* Schrift ERZWINGEN (ein Fremd-Plugin setzt sonst „Mulish"):
   Titel = Serife (Würde), Fließtext/UI = Inter (Klarheit). */
html, body,
p, li, a, button, input, textarea, select, .wp-element-button,
.eyebrow, .site-brand__name, .site-brand__sub, .primary-nav, .header-cta {
	font-family: "Inter", "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}
h1, h2, h3, h4,
.wp-block-heading,
.hero__title, .page-hero h1 {
	font-family: "Source Serif 4", Georgia, "Times New Roman", serif !important;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Türkisch: korrektes dotless i / İ */
[lang="tr"] { font-feature-settings: "cv11", "ss03"; }

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

/* Inhaltsbilder: abgerundet, aber NIE beschnitten — vollständig sichtbar. */
.wp-block-image img,
figure.wp-block-image img {
	border-radius: var(--radius);
	object-fit: contain;
	width: 100%;
	height: auto;
}
/* Beschnitt (cover) NUR wo bewusst gewünscht: Karten-Medien & Beitragsbilder in Rastern. */
.card-media img,
.card img,
.wp-post-image,
.person-card .card-media img {
	object-fit: cover;
	border-radius: var(--radius);
}

/* Logo / Icons dürfen nicht abgerundet werden */
.site-logo img,
.wp-block-site-logo img,
.no-radius,
.no-radius img { border-radius: 0 !important; }

a { color: var(--wp--preset--color--petrol-700); }

/* Fließtext-Regeln (design-system §3.2) */
p { max-width: 68ch; }
.entry-content > p,
.is-layout-constrained > p { margin-block: 1em; }

h1, h2, h3, h4, h5, h6 { text-wrap: pretty; }
.balance,
.wp-block-heading.is-balanced { text-wrap: balance; }

/* Listen mit Girih-Marker (design-system §6.2) */
ul.star-list { list-style: none; padding-left: 0; }
ul.star-list li {
	position: relative;
	padding-left: 2rem;
	margin-block: .6rem;
}
ul.star-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .35em;
	width: 1rem;
	height: 1rem;
	background: var(--wp--preset--color--gold-500);
	-webkit-mask: url("../img/ornament/star-mark-gold.svg") center / contain no-repeat;
	mask: url("../img/ornament/star-mark-gold.svg") center / contain no-repeat;
}

/* ---- Accessibility: sichtbarer Fokus überall (design-system §5.2 / §10) ---- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--focus-ring);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* Skip-Link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--petrol-900);
	color: #fff;
	padding: .75rem 1.25rem;
	border-radius: 0 0 var(--radius-sm) 0;
	font-weight: 600;
}
.skip-link:focus {
	left: 0;
}

/* Screenreader-only */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Eyebrow-Label (design-system §3.4 / §8) ---- */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: var(--wp--preset--font-size--caption);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--petrol-700);
	margin: 0 0 .75rem;
}
.eyebrow.on-dark { color: var(--wp--preset--color--gold-300); }
.eyebrow::before {
	content: "";
	width: .85rem; height: .85rem;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: url("../img/ornament/star-mark-gold.svg") center / contain no-repeat;
	mask: url("../img/ornament/star-mark-gold.svg") center / contain no-repeat;
}

/* Lead / Intro */
.is-style-lead,
.lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.55; color: var(--wp--preset--color--text); max-width: 62ch; }

/* Sektions-Rhythmus (design-system §4.1) */
.section-py { padding-block: clamp(4rem, 2.5rem + 6vw, 8rem); }

/* Content-visibility für untere Sektionen (Performance §11) */
.cv-auto { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Dunkle Inhaltssektionen: GLATTES Petrol, KEIN Muster hinter Fließtext. */
.section-dark {
	background-color: var(--wp--preset--color--petrol-900);
	color: #F3F8F8;
}
.section-dark :is(h1, h2, h3, h4, h5, h6) { color: #F3F8F8; }
.section-dark p { color: #DCE8EA; }
.section-dark a:not(.wp-element-button) { color: var(--wp--preset--color--gold-300); }
.section-dark .eyebrow { color: var(--wp--preset--color--gold-300); }

/* Getönte Bänder: transluzent, damit das Türkis-Muster des Seitengrunds durchscheint
   (wie Live-Seite — Muster ist Teil der Fläche, nicht nur im Hintergrund-Spalt). */
.section-tint { background: rgba(221, 238, 240, .55); }
.section-tint-strong { background: rgba(210, 228, 230, .78); }
/* Weiße Inhaltsflächen bleiben deckend weiß für crispe Lesbarkeit. */
.section-white { background: #ffffff; }
