/* ==========================================================================
   Bestattungsinstitut Eberhardt — Grundlagen
   Farben, Schriften, Raster, Schaltflächen. Alle Werte stammen aus dem
   Figma-Entwurf „Eberhardt“ (Entwurfsbreite 1440 px, Inhalt 1200 px bei x = 120).
   Eigene Grundregeln stehen in :where(), damit Klassen sie sicher überschreiben.
   ========================================================================== */

/* -------------------------------------------------------------------- Schriften
   Lokal gehostet (keine Verbindung zu Dritten), beide unter der SIL Open Font License
   (Lizenztexte in files/layout/fonts/). Variable Schriften, Zeichensätze Latin + Latin Extended. */
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Dancing Script';
	src: url('../fonts/dancing-script-latin-wght-normal.woff2') format('woff2');
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Dancing Script';
	src: url('../fonts/dancing-script-latin-ext-wght-normal.woff2') format('woff2');
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------------- Farben, Maße */
:root {
	--gold: #b38f58;          /* Schaltflächen, Titel, Raute, Linien */
	--gold-hell: #c1a978;     /* Zwischentitel im geöffneten Ratgeber */
	--text: #5a5a5a;          /* Fließtext */
	--dunkel: #2c2a29;        /* Titel in Schreibschrift, Hervorhebungen */
	--anthrazit: #575756;     /* Menü, Rahmen der Kopfknöpfe, Schaltfläche beim Überfahren */
	--oliv: #afb192;          /* Fußzeile, Menüebene, Menüsymbol, Kopf „Vorsorge“ */
	--oliv-linie: #8b7d3c;    /* Linie oben in der Fußzeile */
	--grund: #faf8f5;         /* Seitengrund */
	--gruen: #e8ece6;         /* Kopfleiste, „Wir sind für Sie da!“, Grabarten, Zitat */
	--grau: #edebe7;          /* Karten und Kapitel */
	--beige: #f4efe8;         /* Karten, Kapitel, Filmabschnitte */
	--creme: #fffdf8;         /* Kapitel, Sofortbild-Rahmen */
	--sand: #dfd2c0;          /* Filmabschnitt „Vorsorge“ */
	--taupe: #776e6e;         /* Kopf „Über uns“, Filmabschnitt „Abschied gestalten“ */
	--rand: #e8e4dc;          /* Kartenrand */
	--weiss: #ffffff;

	--schrift: 'Inter', Arial, sans-serif;
	--schreibschrift: 'Dancing Script', 'Inter', cursive;

	/* Schriftgrößen: Fließtext 17, Titel 44 / 32 / 29, unter 1440 px stufenlos kleiner */
	--titel-gross: clamp(32px, 24.6px + 1.32vw, 44px);   /* 44/52.8 */
	--titel: clamp(26px, 22.2px + 0.68vw, 32px);         /* 32/38.4 */
	--titel-klein: clamp(24px, 21px + 0.55vw, 29px);     /* 29/34.8 */
	--titel-start: clamp(38px, 22px + 2.9vw, 64px);      /* 64/73.6 */

	/* Raster: Inhalt 1200 px (x = 120 … 1320), Kapitel mit 112 px Rand */
	--inhalt: 1200px;
	--rand-seite: 120px;
	--abstand: 80px;          /* oberer/unterer Abschnittsabstand */

	@media (max-width: 1439px) { --rand-seite: clamp(20px, 8.33vw, 120px); }
	@media (max-width: 1023px) { --abstand: 64px; }
	@media (max-width: 599px)  { --abstand: 48px; --rand-seite: 20px; }
}

/* -------------------------------------------------------------------- Seitenübergänge */
@view-transition { navigation: auto; }
main::view-transition-old(root) { animation: fade-out 0.4s ease forwards; }
main::view-transition-new(root) { animation: fade-in 0.4s ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

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

html {
	color-scheme: light;
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
	-webkit-text-size-adjust: 100%;
	@media (prefers-reduced-motion: reduce) { scroll-behavior: auto; }
}

body {
	margin: 0;
	min-width: 300px;
	overflow-x: clip;
	background: var(--grund);
	color: var(--text);
	font-family: var(--schrift);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.6;          /* 27.2/17 */
	-webkit-font-smoothing: antialiased;
}

:where(p, ul, ol, figure, blockquote) { margin: 0; }
:where(.rte) > * + * { margin-top: 1em; }
:where(strong, b) { font-weight: 500; color: var(--dunkel); }
:where(img, video, svg) { display: block; max-width: 100%; height: auto; }

:where(a) { color: inherit; text-underline-offset: 0.15em; transition: color 0.3s ease, background-color 0.3s ease; }
:where(.rte) a { color: var(--gold); font-weight: 600; text-decoration: none; }
:where(.rte) a:hover { text-decoration: underline; }

/* Sichtbarer Tastaturfokus */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--anthrazit);
	color: var(--weiss);
	text-decoration: none;
	&:focus { top: 16px; }
}
.invisible {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* -------------------------------------------------------------------- Überschriften (Dancing Script 600) */
:where(h1, h2, h3, h4) {
	margin: 0;
	font-family: var(--schreibschrift);
	font-weight: 600;
	color: var(--dunkel);
	overflow-wrap: break-word;
}
:where(h1) { font-size: var(--titel-gross); line-height: 1.2; color: var(--gold); }
:where(h2) { font-size: var(--titel); line-height: 1.2; }
:where(h3) { font-size: var(--titel-klein); line-height: 1.2; }
:where(h4) { font-size: var(--titel-klein); line-height: 1.1; color: var(--gold-hell); }
.TitelGold { color: var(--gold) !important; font-size: var(--titel-gross) !important; line-height: 1.2 !important; }
.Mittig, .Mittig :is(h1, h2, h3) { text-align: center; }

/* -------------------------------------------------------------------- Motiv: drei Quadrate (12 × 12, Abstand 12)
   über dem Titel — anthrazit 30 %, weiß 70 %, gold 60 % (Rahmen „motif-strip“). */
.mitMotiv::before {
	content: '';
	display: block;
	width: 60px;
	height: 12px;
	margin-bottom: 30px;
	background:
		linear-gradient(rgb(87 87 86 / 0.3), rgb(87 87 86 / 0.3)) 0 0 / 12px 12px no-repeat,
		linear-gradient(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.7)) 24px 0 / 12px 12px no-repeat,
		linear-gradient(rgb(179 143 88 / 0.6), rgb(179 143 88 / 0.6)) 48px 0 / 12px 12px no-repeat;
}
.MotivMittig::before { margin-left: auto; margin-right: auto; }

/* -------------------------------------------------------------------- Schaltflächen (Komponente „accent-button“)
   Gold #b38f58, Ecken 4 px, Innenabstand 10/24, Inter 600 13/15.7, weiß.
   Beim Überfahren (Zustand „Hover“): Grund anthrazit, Schrift gold. */
.Schaltfläche {
	margin: 0;
	& a {
		display: inline-block;
		padding: 10px 24px;
		border-radius: 4px;
		background: var(--gold);
		color: var(--weiss);
		font-family: var(--schrift);
		font-size: 13px;
		font-weight: 600;
		line-height: 16px;
		text-decoration: none;
		&:hover, &:focus-visible { background: var(--anthrazit); color: var(--gold); }
	}
	&.Mittig { text-align: center; }
}

/* -------------------------------------------------------------------- Hintergründe der Abschnitte */
.GrundGrün { background-color: var(--gruen); }
.GrundGrau { background-color: var(--grau); }
.GrundBeige { background-color: var(--beige); }
.GrundCreme { background-color: var(--creme); }
.GrundWeiß { background-color: var(--weiss); }
.GrundSand { background-color: var(--sand); }
.GrundTaupe { background-color: var(--taupe); }
.GrundOliv { background-color: var(--oliv); }
.SchriftHell { color: var(--weiss); }

/* -------------------------------------------------------------------- Inhaltsspalte
   Jeder Artikel läuft über die volle Breite (Hintergrund), sein Inhalt sitzt in der 1200er-Spalte. */
main .mod_article__inner {
	max-width: calc(var(--inhalt) + 2 * var(--rand-seite));
	margin: 0 auto;
	padding: 0 var(--rand-seite);
}
main .mod_article { scroll-margin-top: 0; }
