/*
 * Enzo Vincenzo Prisco – Stylesheet
 * Handgeschrieben, ohne Build-Schritt. Aufbau:
 *   1. Schriften   2. Variablen   3. Basis   4. Layout   5. Kopf & Navigation
 *   6. Abschnitte  7. Komponenten 8. Seiten  9. Fuß     10. Animationen
 */

/* 1. Schriften ------------------------------------------------------------ */

@font-face {
	font-family: "Source Sans Pro";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/source-sans-pro-v14-latin-regular.woff2") format("woff2");
}

@font-face {
	font-family: "Source Sans Pro";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/static/fonts/source-sans-pro-v14-latin-700.woff2") format("woff2");
}

@font-face {
	font-family: "Aldrich";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/aldrich-v11-latin-regular.woff2") format("woff2");
}

/* 2. Variablen ------------------------------------------------------------ */

:root {
	--orange: #f36701;          /* Markenfarbe: Flächen, große Schrift, auf Schwarz */
	--orange-strong: #c25200;   /* Kleine orange Schrift auf Weiß, Weiß auf Orange (Kontrast >= 4.5:1) */
	--black: #000;
	--ink: #222;
	--text: #333;
	--muted: #595959;
	--line: #d6d6d6;
	--paper: #fff;
	--surface: #f4f4f4;         /* Hintergrund von Karten */

	--radius: 1rem;             /* Ecken von Karten */
	--radius-pill: 999px;       /* Ecken von Knöpfen */

	--font-body: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-display: "Aldrich", "Source Sans Pro", sans-serif;

	--width: 75rem;
	--gutter: clamp(1rem, 4vw, 2rem);
	--section-space: clamp(4.5rem, 10vw, 8rem);   /* Grundabstand zwischen Abschnitten */

	/* Gemessene Kopfhöhen (voll / kompakt), Platzhalter oben und Sprungziel-Abstand */
	/* Kopf aus festen Pixelhöhen, damit Platzhalter und Kopf exakt gleich hoch sind
	   (sonst blitzt in der Rundungslücke der Hintergrund durch) */
	--strip-h: 34px;          /* inkl. 2px Rand */
	--brand-h: 120px;
	--brand-h-compact: 90px;
	--nav-h: 48px;            /* inkl. 2 x 2px Rand */
	--header-full: calc(var(--strip-h) + var(--brand-h) + var(--nav-h));
	--ease: cubic-bezier(.2, .7, .2, 1);
	--fast: .2s;
	--slow: .6s;
}

@media (max-width: 63.99em) {
	:root {
		--brand-h: 90px;
		--brand-h-compact: 70px;
		--nav-h: 2px;             /* Menü ist mobil eine Ebene über dem Inhalt, bleibt nur die weiße Linie */
	}
}

/* 3. Basis ---------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-full) + 1rem);
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding-top: var(--header-full);
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

body.menu-open {
	overflow: hidden;
}

h1,
h2,
h3 {
	margin: 0 0 .5em;
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.25;
	color: var(--ink);
	text-wrap: balance;
}

h3 {
	font-size: 1.25rem;
}

p,
ul,
blockquote,
figure {
	margin: 0 0 1em;
}

ul {
	padding: 0;
	list-style: none;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--fast) ease;
}

a:hover {
	color: var(--orange-strong);
}

:focus-visible {
	outline: 3px solid var(--orange);
	outline-offset: 3px;
}

::selection {
	background: var(--orange);
	color: var(--black);
}

/* Sprungziele wie #vita oder #kontakt bekommen beim Ansprung den Fokus, aber keinen Rahmen */
main:focus,
[tabindex="-1"]:focus {
	outline: none;
}

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

.skiplink {
	position: fixed;
	top: .5rem;
	left: .5rem;
	z-index: 1000;
	padding: .75rem 1.25rem;
	background: var(--black);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transform: translateY(-200%);
	transition: transform var(--fast) ease;
}

.skiplink:focus {
	transform: none;
	color: #fff;
}

.center {
	text-align: center;
}

/* 4. Layout --------------------------------------------------------------- */

.container {
	width: min(100% - 2 * var(--gutter), var(--width));
	margin-inline: auto;
}

.split {
	display: grid;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: start;
}

@media (min-width: 64em) {
	.split {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}
}

/* 5. Kopf & Navigation ---------------------------------------------------- */

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	background: var(--orange);
	box-shadow: 0 2px 12px rgb(0 0 0 / .18);  /* einziger Schatten der Seite: hebt den festen Kopf vom Inhalt ab */
}

.site-header-strip {
	height: var(--strip-h);
	margin: 0;
	overflow: hidden;
	background: var(--black);
	border-bottom: 2px solid #fff;
	color: #fff;
	font-family: var(--font-display);
	font-size: .8rem;
	line-height: calc(var(--strip-h) - 2px);
	letter-spacing: .08em;
	text-align: center;
	text-transform: uppercase;
	transition: height var(--slow) var(--ease), border-width var(--slow) var(--ease);
}

.site-header-brand {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	height: var(--brand-h);
	transition: height var(--slow) var(--ease);
}

.site-logo,
.site-logo img {
	display: block;
	height: 100%;
}

.site-logo img {
	width: auto;
}

.site-logo .anim {
	height: 100%;
}

/* Animierte Zeichen (Logo, „V“): Standbild plus Bildstreifen, den CSS Bild für Bild abspielt.
   Kein GIF, weil Safari animierte Bilder je nach Einstellung anhält. Der Streifen deckt nur den
   Bereich ab, in dem sich das „V“ dreht (70 x 59 px ab x 68 im 208 px breiten Bild). Jedes Bild
   hat im Streifen 2 px Rand (Abstand 74 px, Höhe 63 px), damit beim Skalieren nichts vom Nachbarbild
   durchscheint. */
.anim {
	position: relative;
	display: block;
}

.anim-frames {
	position: absolute;
	left: 32.6923%;           /* 68 / 208 */
	width: 33.6538%;          /* 70 / 208 */
	background: 0 50% / 15222.8571% 106.7797% no-repeat;   /* 144 x 74 / 70, 63 / 59 */
	animation: evp-v 26.2s infinite;
}

.anim--logo .anim-frames {
	top: 37.5%;               /* 45 / 120 */
	height: 49.1667%;         /* 59 / 120 */
	background-image: url("../images/logo-evp-frames.png");
}

.anim--v .anim-frames {
	top: 6.25%;               /* 4 / 64 */
	height: 92.1875%;         /* 59 / 64 */
	background-image: url("../images/v-evp-frames.png");
}

.site-nav {
	height: var(--nav-h);
	background: var(--black);
	border-block: 2px solid #fff;
}

.site-nav-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-block: 0;
}

.site-nav-list li + li {
	border-left: 1px solid #fff;
}

.site-nav-list a {
	position: relative;
	display: block;
	height: calc(var(--nav-h) - 4px);
	padding: 0 1rem;
	line-height: calc(var(--nav-h) - 4px);
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.15rem;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--fast) ease;
}

/* Orange Linie wächst beim Hover von der Mitte */
.site-nav-list a::after {
	content: "";
	position: absolute;
	left: 50%;
	right: 50%;
	bottom: 0;
	height: 3px;
	background: var(--orange);
	transition: left var(--fast) var(--ease), right var(--fast) var(--ease);
}

.site-nav-list a:hover,
.site-nav-list a:focus-visible {
	background: #222;
	color: #fff;
}

.site-nav-list a:hover::after,
.site-nav-list a:focus-visible::after,
.site-nav-list a[aria-current="page"]::after {
	left: 0;
	right: 0;
}

/* Kompakter Kopf nach dem Runterscrollen (Klasse setzt app.js) */
.site-header.is-compact .site-header-strip {
	height: 0;
	border-bottom-width: 0;
}

.site-header.is-compact .site-header-brand {
	height: var(--brand-h-compact);
}

/* Burger, nur auf kleinen Bildschirmen */
.burger {
	display: none;
	position: absolute;
	right: 0;
	top: 50%;
	width: 3rem;
	height: 3rem;
	margin-top: -1.5rem;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.burger:focus-visible,
.site-logo:focus-visible {
	outline-color: var(--black);
	outline-offset: -3px;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
	position: absolute;
	left: .6rem;
	right: .6rem;
	height: 3px;
	background: var(--black);
	transition: transform .3s var(--ease), top .3s var(--ease) .3s, background-color 0s .3s;
}

.burger-lines {
	top: calc(50% - 1.5px);
}

.burger-lines::before,
.burger-lines::after {
	content: "";
	left: 0;
	right: 0;
}

.burger-lines::before {
	top: -10px;
}

.burger-lines::after {
	top: 10px;
}

.burger[aria-expanded="true"] .burger-lines {
	background-color: transparent;
}

.burger[aria-expanded="true"] .burger-lines::before,
.burger[aria-expanded="true"] .burger-lines::after {
	top: 0;
	transition: top .3s var(--ease), transform .3s var(--ease) .3s;
}

.burger[aria-expanded="true"] .burger-lines::before {
	transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger-lines::after {
	transform: rotate(-45deg);
}

@media (max-width: 63.99em) {
	html:not(.menu-ready) {
		scroll-padding-top: 1rem;
	}

	html:not(.menu-ready) body {
		padding-top: 0;
	}

	html:not(.menu-ready) .site-header {
		position: static;
	}

	.menu-ready .burger {
		display: block;
	}

	/* Weiße Linie unten wie am Desktop, dort kommt sie von der Navigation */
	.menu-ready .site-header {
		border-bottom: 2px solid #fff;
	}

	.site-nav {
		height: auto;
	}

	/* Die JavaScript-Navigation öffnet ein Menü unter dem festen Kopf. */
	.menu-ready .site-nav {
		display: none;
		position: absolute;
		top: calc(100% + 2px);    /* unter der weißen Linie des Kopfes */
		left: 0;
		right: 0;
		height: calc(100vh - 100% - 2px);
		height: calc(100dvh - 100% - 2px);
		overflow-y: auto;
		border-block: 0;
	}

	.menu-ready .site-nav.is-open {
		display: block;
	}

	.site-nav-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding-block: .5rem;
	}

	.menu-ready .site-nav-list {
		grid-template-columns: 1fr;
		padding-block: 1rem;
	}

	.site-nav-list li + li {
		border-left: 0;
		border-top: 1px solid #444;
	}

	.site-nav-list a {
		height: auto;
		padding: .65rem .5rem;
		line-height: 1.3;
		overflow-wrap: anywhere;
	}

	.menu-ready .site-nav-list a {
		padding: 1.1rem 1rem;
		font-size: 1.6rem;
	}

	.menu-ready .site-nav-list a:focus-visible {
		outline-offset: -3px;
	}
}

/* 6. Abschnitte ----------------------------------------------------------- */

.section {
	position: relative;
	padding-block: var(--section-space) calc(var(--section-space) * .8);
	background: var(--paper);
}

/* Mehr Luft zum Footer */
main > .section:last-child {
	padding-bottom: calc(var(--section-space) * 1.5);
}

.section--page {
	min-height: 60vh;
	padding-bottom: calc(var(--section-space) * 1.5);
}

.section-head {
	margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
	text-align: center;
}

.section-logo {
	width: 208px;
	margin: 0 auto 1.25rem;
}

.section-logo img {
	width: 100%;
}

.section-title {
	display: inline-block;
	margin: 0;
	position: relative;
	padding-top: calc(.6rem + 5px);
	color: var(--orange);
	font-size: clamp(1.75rem, 4vw, 2.4rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
}

/* Schwarzer Balken über dem Titel, wächst beim Einblenden von der Mitte auf */
.section-title::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: var(--black);
	transition: transform .8s var(--ease) .2s;
}

.section-head.reveal-pending .section-title::before {
	transform: scaleX(0);
}

/* Unterseiten: Titel steht schon beim Laden im Bild, daher hier per Keyframe */
.section--page .section-title::before {
	animation: grow-x .8s var(--ease) .2s both;
}

/* Startbild */
.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100vh - var(--header-full));
	min-height: calc(100svh - var(--header-full));
	padding-block: 3rem 2rem;
	background: var(--black);
	color: #f4f4f4;
}

/* Glühbirne: Aus-Bild, darüber das An-Bild, das per CSS im Takt des alten GIFs flackert
   (2 s aus, dreimal kurz an, 5 s an). Kein animiertes Bild, weil Safari solche je nach Einstellung anhält. */
.hero-glow {
	position: absolute;
	inset: 0;
	background: url("../images/evp-glow-off.webp") 70% center / cover no-repeat;
}

.hero-glow::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("../images/evp-glow-on.webp");
	background-position: inherit;
	background-size: inherit;
	background-repeat: no-repeat;
	animation: glow-flicker 8.6s infinite;
}

.hero > :not(.hero-glow) {
	position: relative;
}

.hero-inner {
	max-width: var(--width);
}

.hero-title,
.hero-quote {
	max-width: 36rem;
}

.hero-title {
	color: var(--orange);
	font-size: clamp(2.2rem, 6vw, 3.5rem);
}

.hero-quote {
	margin-bottom: 1.5rem;
	font-family: var(--font-display);
	font-size: clamp(1.1rem, 2.4vw, 1.35rem);
	line-height: 1.5;
}

.hero-quote p {
	margin-bottom: .5rem;
}

.hero-quote footer {
	color: #ccc;
	font-family: var(--font-body);
	font-size: .95rem;
}

@media (max-width: 63.99em) {
	/* Glühbirne steht oben frei, die Schrift darunter auf Schwarz */
	.hero {
		padding-top: 1rem;
		background: var(--black);
		text-align: center;
	}

	/* Ausschnitt um die Glühbirne (Bild 1920 x 1080, Ausschnitt x 960–1770, y 170–900),
	   oben und unten weich ausgeblendet, damit Rand und Spiegelung nicht hart abreißen */
	.hero-glow {
		position: relative;
		inset: auto;
		flex: none;
		width: min(100%, 30rem);
		aspect-ratio: 810 / 730;
		margin: 0 auto 1.5rem;
		background-position: 86.5% 48.6%;
		background-size: 237% auto;
		-webkit-mask-image: linear-gradient(transparent, #000 12%, #000 75%, transparent);
		mask-image: linear-gradient(transparent, #000 12%, #000 75%, transparent);
	}

	.hero-title,
	.hero-quote {
		margin-inline: auto;
	}
}

/* Zitat-Band */
.quote-band {
	position: relative;
	padding: clamp(5rem, 11vw, 7.5rem) var(--gutter);
	background: #333 url("../images/bg-parrallaxwrap_zitat.jpg") center / cover no-repeat;
	color: #fff;
	text-align: center;
}

/* Weißes Dreieck als Übergang vom Abschnitt darüber */
.quote-band::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 50%;
	border: clamp(.9rem, 2vw, 1.75rem) solid transparent;
	border-top-color: var(--paper);
	transform: translateX(-50%);
}

.quote {
	max-width: 50rem;
	margin: 0 auto;
}

/* Großes Anführungszeichen als Gestaltungselement: SVG-Maske statt Schriftzeichen,
   damit es exakt über dem Text sitzt und nicht an der Grundlinie nach unten hängt */
.quote::before {
	content: "";
	display: block;
	width: clamp(3.25rem, 7vw, 4.75rem);
	aspect-ratio: 46 / 36;
	margin: 0 auto clamp(1.5rem, 3vw, 2.25rem);
	background: var(--orange);
	-webkit-mask: var(--quote-mark) center / contain no-repeat;
	mask: var(--quote-mark) center / contain no-repeat;
	transition: opacity .8s ease .15s, transform .8s var(--ease) .15s;
}

.quote {
	--quote-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 36'%3E%3Cpath d='M2 34h16V17h-5l6-15h-8L2 17zM28 34h16V17h-5l6-15h-8L28 17z'/%3E%3C/svg%3E");
}

.quote.reveal-pending::before {
	opacity: 0;
	transform: scale(.5) rotate(-10deg);
}

.quote p {
	margin: 0;
	font-size: clamp(1.3rem, 2.8vw, 1.9rem);
	font-weight: 400;
	line-height: 1.45;
	text-wrap: balance;
}

/* Urheber mit kurzer oranger Linie */
.quote footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	margin-top: 1.75rem;
	color: #ccc;
	font-family: var(--font-display);
	font-size: .9rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.quote footer::before {
	content: "";
	width: 2.5rem;
	height: 2px;
	background: var(--orange);
	transition: width .8s var(--ease) .5s;
}

.quote.reveal-pending footer::before {
	width: 0;
}

.quote cite {
	font-style: normal;
}

/* Fotoreihe mit weißen Trennlinien */
.photo-strip {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 3px;
	background: #fff;
}

.photo-strip .media img {
	transition: opacity var(--slow) ease, transform 1.2s var(--ease);
}

.photo-strip .media:hover img {
	transform: scale(1.05);
}

/* 7. Komponenten ---------------------------------------------------------- */

/* Fließtext */
.prose {
	max-width: 70ch;
	line-height: 1.7;
}

.prose p {
	margin-bottom: 1.25em;
}

.prose p,
.prose li {
	hyphens: auto;
}

.prose ul {
	margin-bottom: 1em;
	padding-left: 1.25em;
	list-style: disc;
}

.prose ul.talks {
	padding-left: 0;
	list-style: none;
}

.prose a:not(.btn),
.legal-text a,
.cookie-notice a {
	color: var(--orange-strong);
}


.prose a:not(.btn):hover,
.legal-text a:hover {
	color: var(--ink);
}

/* Rechtstexte (Impressum, Datenschutz): volle Breite */
.legal {
	display: grid;
	grid-template-columns: minmax(0, 1fr);  /* breite Tabellen scrollen, statt die Seite zu verbreitern */
	gap: clamp(2rem, 5vw, 3rem);
	font-size: 1.05rem;
}

.legal-address {
	padding-left: 1rem;
	border-left: 3px solid var(--line);
}

.legal-text h2 {
	margin: 2.75rem 0 1rem;
	padding-bottom: .5rem;
	border-bottom: 2px solid var(--black);
	font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

.legal-text h2:first-child,
.legal-text > nav:first-child h2 {
	margin-top: 0;
}

/* Sitemap: Gruppen stehen in eigenen nav-Elementen */
.legal-text nav + nav h2:first-child {
	margin-top: 2.75rem;
}

.legal-text h3 {
	margin: 1.75rem 0 .5rem;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.15rem;
	font-weight: 700;
}

/* Umsetzung am Ende des Impressums, deutlich abgesetzt */
.legal-credits {
	margin-top: clamp(3rem, 6vw, 4.5rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
}

.legal-credits-viur {
	margin-top: 2rem;
}

.legal-text p,
.legal-text li {
	hyphens: auto;
}

.legal-text ul {
	margin: 0 0 1em;
	padding-left: 1.25em;
	list-style: disc;
}

.legal-text li + li {
	margin-top: .25rem;
}

.legal-lead {
	color: var(--ink);
	font-size: 1.2rem;
}

.legal-table-wrap {
	margin-bottom: 1em;
	overflow-x: auto;
}

.legal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}

.legal-table th,
.legal-table td {
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.legal-table th {
	background: var(--surface);
	color: var(--ink);
}

.legal-table code {
	font-size: .95em;
}

/*
 * Interaktive Elemente folgen einem Muster: schwarz, beim Hover Markenorange mit schwarzem Inhalt
 * (Kontrast 6,7:1). Runde Steuerknöpfe (Weiter, Nach oben) genau umgekehrt.
 */

/* Knöpfe */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: .5rem 1.4rem;
	background: var(--black);
	border: 2px solid var(--black);
	border-radius: var(--radius-pill);
	color: #fff;
	font: 700 1rem / 1.3 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease);
}

.btn:hover,
.btn:focus-visible {
	background: var(--orange);
	border-color: var(--orange);
	color: var(--black);
	transform: translateY(-2px);
}

.btn--ghost {
	background: transparent;
	color: var(--black);
}

/* Zurück-Link am Seitenende */
.page-back {
	margin-top: clamp(3rem, 6vw, 4rem);
}

/* Runde Steuerknöpfe */
.round-btn {
	display: grid;
	place-items: center;
	width: 3.125rem;
	height: 3.125rem;
	border: 2px solid var(--orange);
	border-radius: 50%;
	background: var(--orange);
	color: var(--black);
	transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease);
}

.round-btn .icon {
	width: 1.6rem;
	height: 1.6rem;
	stroke-width: 2;
}

.round-btn:hover,
.round-btn:focus-visible {
	background: var(--black);
	color: var(--orange);
}

.next {
	margin: clamp(3rem, 6vw, 4.5rem) auto 0;
}

.next:hover,
.next:focus-visible {
	transform: translateY(.4rem);
}

.hero .next {
	margin-top: 2rem;
}

/* Desktop: Text bleibt mittig, der Pfeil sitzt unten im Hero */
@media (min-width: 64em) {
	.hero-inner {
		margin-top: auto;
	}

	.hero .next {
		margin-top: auto;
	}

	.hero-quote {
		margin-bottom: 3.5rem;   /* Mindestabstand zum Pfeil bei niedrigen Fenstern */
	}
}

/* Bilder: feste Größe, Spinner beim Laden, Einblenden (Klassen setzt app.js) */
.media {
	position: relative;
	display: block;
	overflow: hidden;
	background: #eee;
}

.media img {
	width: 100%;
	transition: opacity var(--slow) ease, transform var(--slow) var(--ease);
}

.media--square img {
	aspect-ratio: 1;
	object-fit: cover;
}

.media--photo img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.media.is-loading img {
	opacity: 0;
}

.media.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.25rem;
	height: 2.25rem;
	margin: -1.125rem 0 0 -1.125rem;
	border: 3px solid rgb(0 0 0 / .12);
	border-top-color: var(--orange);
	border-radius: 50%;
	animation: spin .8s linear 5;
}

/* Porträt */
.portrait {
	max-width: 22rem;
	margin: 0 auto;
	text-align: center;
}

.portrait .media {
	border-radius: 50%;
}

.portrait figcaption {
	margin-top: 1.25rem;
	color: var(--muted);
}

.portrait-name {
	display: block;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 400;
}

/* Vorträge */
.talks-title {
	margin-top: 1.5rem;
}

.talks {
	margin-bottom: 1.5rem;
	color: var(--muted);
	font-weight: 700;
	font-size: 1.15rem;
}

.talks li {
	position: relative;
	padding: .2rem 0 .2rem 1.5rem;
}

.talks li::before {
	content: "»";
	position: absolute;
	left: 0;
	color: var(--orange-strong);
}

/* Events */
.event-list {
	display: grid;
	gap: 1rem 2.5rem;
}

@media (min-width: 48em) {
	.event-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

.event {
	padding: 1rem 1.25rem;
	border-radius: var(--radius);
	background: var(--surface);
}

.event-date {
	display: block;
	color: var(--ink);
}

.event-title {
	color: var(--muted);
}

/* Leerzustand, z. B. keine Events: Karte mit rundem Icon wie bei den Kacheln */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 38rem;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
	border-radius: var(--radius);
	background: var(--surface);
	text-align: center;
}

.empty-state-icon {
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	margin-bottom: 1.25rem;
	border-radius: 50%;
	background: var(--black);
	color: var(--orange);
}

.empty-state-icon .icon {
	width: 2.25rem;
	height: 2.25rem;
}

/* Startseite: schlichter Hinweis ohne Karte */
.events-none {
	margin: 0;
	color: var(--muted);
	font-size: 1.1rem;
	text-align: center;
}

.empty-state-title {
	margin-bottom: .5rem;
	font-size: 1.4rem;
}

.empty-state p {
	margin-bottom: 1.5rem;
	color: var(--muted);
}

/* Referenzen (Liste kommt auch als HTML aus dem Admin) */
.ref-list ul,
ul.ref-list {
	display: grid;
	gap: 0 2.5rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

@media (min-width: 48em) {
	.ref-list ul,
	ul.ref-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* A–Z-Register über der Referenzliste */
.az {
	margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.az-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .3rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.az-link {
	display: inline-grid;
	place-items: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 .55rem;
	border: 2px solid var(--black);
	border-radius: var(--radius-pill);
	color: var(--black);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1;
	text-decoration: none;
	transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

a.az-link:hover,
a.az-link:focus-visible {
	background: var(--orange);
	border-color: var(--orange);
	color: var(--black);
}

a.az-link[aria-current] {
	background: var(--black);
	border-color: var(--black);
	color: #fff;
}

.az-link.is-empty {
	border-color: var(--line);
	color: #b0b0b0;
}

/* Mobil: Raster mit 10 Spalten, höchstens 3 Reihen („Alle“ doppelt breit + A–Z + „#“ = 29 Felder) */
@media (max-width: 40em) {
	.az-list {
		display: grid;
		grid-template-columns: repeat(10, minmax(0, 1fr));
		gap: .3rem;
		max-width: 26rem;
		margin-inline: auto;
	}

	.az-all-item {
		grid-column: span 2;
	}

	.az-link {
		width: 100%;
		min-width: 0;
		height: auto;
		aspect-ratio: 1;
		padding: 0;
		font-size: clamp(.8rem, 3.6vw, 1rem);
	}

	.az-all {
		height: 100%;
		aspect-ratio: auto;
	}
}

.ref-group {
	scroll-margin-top: calc(var(--header-full) + 1rem);
}

.ref-group + .ref-group {
	margin-top: clamp(2rem, 4vw, 2.75rem);
}

.ref-letter {
	margin: 0 0 .25rem;
	padding-bottom: .35rem;
	border-bottom: 2px solid var(--black);
	color: var(--orange);
	font-size: clamp(1.5rem, 3vw, 1.9rem);
}

ul.ref-list {
	margin-bottom: 0;
}

.ref-group.az-in {
	animation: fade-up .45s var(--ease);
}

.ref-list li {
	position: relative;
	padding: .4rem .5rem .4rem 1.5rem;
	border-bottom: 1px solid var(--line);
}

.ref-list li::before {
	content: "•";
	position: absolute;
	left: .4rem;
	color: var(--orange-strong);
}

/* Kacheln: schwarzer Kreis, oranges Linien-Icon, beim Hover orange Fläche */
.tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(1rem, 3vw, 2rem);
}

@media (min-width: 64em) {
	.tiles {
		grid-template-columns: repeat(4, 1fr);
	}
}

.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: clamp(.75rem, 2vw, 1.25rem);
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: var(--black);
	color: #fff;
	text-decoration: none;
	transition: color var(--fast) ease;
}

/* Orange Fläche fährt von unten herein */
.tile::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--orange);
	transform: translateY(101%);
	transition: transform .45s var(--ease);
}

.tile .icon {
	position: relative;
	width: 38%;
	height: auto;
	color: var(--orange);
	stroke-width: 1.25;
	transition: color var(--fast) ease;
}

.tile-label {
	position: relative;
	font-family: var(--font-display);
	font-size: clamp(1rem, 2vw, 1.2rem);
	letter-spacing: .06em;
	text-transform: uppercase;
}

.tile:hover,
.tile:focus-visible {
	color: var(--black);
}

.tile:hover::before,
.tile:focus-visible::before {
	transform: none;
}

.tile:hover .icon,
.tile:focus-visible .icon {
	color: var(--black);
}

/* Cookie-Hinweis: mittiges Overlay (natives <dialog> mit showModal, app.js) */
.cookie-notice {
	width: min(100% - 2.5rem, 30rem);
	max-height: calc(100dvh - 2.5rem);
	margin: auto;
	padding: clamp(1.5rem, 5vw, 2.25rem);
	border: 0;
	border-radius: var(--radius);
	background: #fff;
	color: #000;
	text-align: center;
}

.cookie-notice::backdrop {
	background: rgb(0 0 0 / .6);
}

.cookie-notice[open] {
	animation: fade-up .4s var(--ease);
}

.cookie-notice[open]::backdrop {
	animation: fade-in .4s ease;
}

.cookie-title {
	margin-bottom: .75rem;
	font-size: 1.4rem;
}

.cookie-notice p {
	margin-bottom: 1.5rem;
}

/* 8. Seiten --------------------------------------------------------------- */

.contact-mail {
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 4vw, 2rem);
	overflow-wrap: anywhere;
}

.error-code {
	margin: -1rem 0 1.5rem;
	color: var(--orange);
	font-family: var(--font-display);
	font-size: clamp(5rem, 18vw, 9rem);
	line-height: 1;
	text-align: center;
}

.error-page .prose {
	margin-inline: auto;
}

.prose .error-links,
.error-links {
	display: flex;
	padding: 0;
	list-style: none;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-top: 2rem;
}

.error-trace {
	max-width: 100%;
	margin-top: 3rem;
	padding: 1rem;
	overflow: auto;
	border-radius: var(--radius);
	background: #111;
	color: #eee;
	font-size: .8rem;
}

/* 9. Fuß ------------------------------------------------------------------ */

.site-footer {
	padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(4.5rem, 10vw, 7rem);
	background: var(--black);
	border-top: 5px solid var(--orange);
	color: #fff;
	text-align: center;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--orange);
}

.site-footer-title {
	color: #aaa;
	font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.site-footer-contact strong {
	display: block;
}

.site-footer-mail {
	font-size: clamp(1.4rem, 4vw, 1.9rem);
	font-weight: 700;
}

/* Nach oben: runder Steuerknopf unten rechts, erscheint nach dem Scrollen (Klasse setzt app.js) */
.to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 150;
	opacity: 0;
	visibility: hidden;
	transform: translateY(1rem);
	transition: opacity .3s ease, transform .3s var(--ease), visibility 0s .3s, background-color var(--fast) ease, color var(--fast) ease;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .3s ease, transform .3s var(--ease), background-color var(--fast) ease, color var(--fast) ease;
}

.to-top.is-visible:hover,
.to-top.is-visible:focus-visible {
	transform: translateY(-4px);
}

.site-footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem 2rem;
	margin: 3rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px dotted #555;
}

.site-footer-links a {
	background: linear-gradient(var(--orange), var(--orange)) center bottom / 0 2px no-repeat;
	padding-bottom: .2rem;
	transition: color var(--fast) ease, background-size .35s var(--ease);
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
	background-size: 100% 2px;
}

.site-footer-links a[aria-current="page"] {
	color: var(--orange);
}

/* Mobil: Kontaktsatz und Links je in einer Zeile */
@media (max-width: 40em) {
	.site-footer-contact strong {
		font-size: clamp(.75rem, 3.7vw, 1rem);
	}

	.site-footer-links {
		gap: .5rem clamp(.75rem, 3.5vw, 2rem);
		font-size: clamp(.8rem, 3.8vw, 1rem);
	}
}

/* 10. Animationen --------------------------------------------------------- */

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}

	40% {
		transform: translateY(-1.5rem);
	}

	60% {
		transform: translateY(-.75rem);
	}
}

@keyframes fade-in {
	from {
		opacity: 0;
	}
}

/* Taktung wie das alte GIF: 26,2 s, Bilder je 0,1 s, Bild 101 steht 2 s, Bild 128 steht 10 s.
   Position von Bild k im Streifen: (74 k + 2) / (144 * 74 - 70) * 100 % */
@keyframes evp-v {
	0% {
		background-position-x: .0189%;
		animation-timing-function: steps(101, end);   /* Bilder 0–100 */
	}

	38.5496% {
		background-position-x: 70.6216%;               /* Bild 101, 2 s */
		animation-timing-function: steps(1, end);
	}

	46.1832% {
		background-position-x: 71.3206%;
		animation-timing-function: steps(26, end);    /* Bilder 102–127 */
	}

	56.1069% {
		background-position-x: 89.4956%;               /* Bild 128, 10 s */
		animation-timing-function: steps(1, end);
	}

	94.2748% {
		background-position-x: 90.1946%;
		animation-timing-function: steps(15, end);    /* Bilder 129–143 */
	}

	100% {
		background-position-x: 100.6801%;
	}
}

/* 8,6 s: 2 s aus, 0,1 an, 0,1 aus, 0,2 an, 0,2 aus, 0,5 an, 0,5 aus, 5 s an */
@keyframes glow-flicker {
	0%,
	24.4186%,
	27.907%,
	36.0465% {
		opacity: 0;
		animation-timing-function: steps(1, end);
	}

	23.2558%,
	25.5814%,
	30.2326%,
	41.8605%,
	100% {
		opacity: 1;
		animation-timing-function: steps(1, end);
	}
}

@keyframes grow-x {
	from {
		transform: scaleX(0);
	}
}

@keyframes fade-up {
	from {
		opacity: 0;
		transform: translateY(1.5rem);
	}
}

.hero-title {
	animation: fade-up .9s var(--ease) .1s both;
}

.hero-quote {
	animation: fade-up .9s var(--ease) .35s both;
}

.next--bounce {
	animation: fade-up .9s var(--ease) .6s both, bounce 3s 1.8s;
}

/* Portrait: leichtes Heranzoomen statt Hochschieben */
.portrait.reveal-pending {
	transform: scale(.94);
}

/* Einblenden beim Scrollen: app.js setzt .reveal-pending nur auf Elemente unterhalb des Sichtbereichs */
.reveal-pending {
	opacity: 0;
	transform: translateY(1.5rem);
}

.reveal-in {
	transition: opacity .7s ease, transform .7s var(--ease);
}

.reveal:focus-within,
.next--bounce:focus-visible {
	opacity: 1;
	transform: none;
	transition: none;
	animation: none;
}

@media print {
	body {
		padding-top: 0;
		background: #fff;
	}

	.site-header,
	.site-nav,
	.next,
	.to-top,
	.cookie-notice,
	.skiplink {
		display: none !important;
	}

	.hero {
		min-height: 0;
		background: none;
		color: #000;
	}
}
