/* Gemeinsame Basis fuer alle Seiten.
   Das Farbschema haengt an data-theme auf <html>; jede Farbe existiert einmal
   als Custom Property, sodass das Umschalten reines CSS ist und kein
   JavaScript-Rendering braucht. theme.js setzt nur das Attribut. */

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

html,
body {
	margin: 0;
}

/* ---------- Farbschema ---------- */

:root,
[data-theme='dark'] {
	--bg: #0b0f10;
	--text: #e8eeed;
	--body: #cfd8d6;
	--muted: #8c9a97;
	--subtle: #6b7876;
	--accent: #46d5c6;
	--accent-border: rgba(70, 213, 198, 0.6);
	--card-bg: rgba(9, 13, 14, 0.66);
	--card-border: rgba(255, 255, 255, 0.1);
	--pill-border: rgba(255, 255, 255, 0.14);
	--pill-text: #b7c6c3;

	--map-dark-opacity: 0.75;
	--map-light-opacity: 0;
	--overlay: radial-gradient(90% 90% at 50% 50%, rgba(6, 9, 10, 0.15), rgba(6, 9, 10, 0.75) 90%),
		repeating-linear-gradient(0deg, rgba(120, 205, 193, 0.045) 0 1px, transparent 1px 46px),
		repeating-linear-gradient(90deg, rgba(120, 205, 193, 0.045) 0 1px, transparent 1px 46px);

	/* Zustaende des Tag/Nacht-Schalters */
	--slider-bg: #2a2a2a;
	--knob-left: 0.5em;
	--knob-shadow: inset 8px -4px 0px 0px #fff;
	--star-opacity: 1;
	--cloud-opacity: 0;
}

[data-theme='light'] {
	--bg: #f3efe6;
	--text: #1c2321;
	--body: #3d4a45;
	--muted: #5c6b66;
	--subtle: #7c8a85;
	--accent: #0f8f7f;
	--accent-border: rgba(15, 143, 127, 0.45);
	--card-bg: rgba(255, 255, 255, 0.68);
	--card-border: rgba(15, 35, 30, 0.14);
	--pill-border: rgba(15, 35, 30, 0.18);
	--pill-text: #3d4a45;

	--map-dark-opacity: 0;
	--map-light-opacity: 1;
	--overlay: radial-gradient(90% 90% at 50% 50%, rgba(243, 239, 230, 0.05), rgba(243, 239, 230, 0.75) 90%),
		repeating-linear-gradient(0deg, rgba(15, 50, 40, 0.035) 0 1px, transparent 1px 46px),
		repeating-linear-gradient(90deg, rgba(15, 50, 40, 0.035) 0 1px, transparent 1px 46px);

	--slider-bg: #00a6ff;
	--knob-left: 2.3em;
	--knob-shadow: inset 15px -4px 0px 15px #ffcf48;
	--star-opacity: 0;
	--cloud-opacity: 1;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: 'IBM Plex Sans', sans-serif;
	transition:
		background 0.35s,
		color 0.35s;
}

/* ---------- Startseite ---------- */

body.home {
	height: 100%;
}

.stage {
	position: fixed;
	inset: 0;
	overflow: hidden;
}

.map {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.35s;
}

.map--dark {
	filter: grayscale(1) brightness(0.62) contrast(1.08);
	opacity: var(--map-dark-opacity);
}

.map--light {
	opacity: var(--map-light-opacity);
}

.overlay {
	position: absolute;
	inset: 0;
	background: var(--overlay);
	transition: background 0.35s;
}

/* Eckmarkierungen */
.tick {
	position: absolute;
	width: 28px;
	height: 28px;
}

.tick--tl {
	top: 30px;
	left: 30px;
	border-top: 1px solid var(--accent-border);
	border-left: 1px solid var(--accent-border);
}

.tick--tr {
	top: 30px;
	right: 30px;
	border-top: 1px solid var(--accent-border);
	border-right: 1px solid var(--accent-border);
}

.tick--bl {
	bottom: 30px;
	left: 30px;
	border-bottom: 1px solid var(--accent-border);
	border-left: 1px solid var(--accent-border);
}

.tick--br {
	bottom: 30px;
	right: 30px;
	border-bottom: 1px solid var(--accent-border);
	border-right: 1px solid var(--accent-border);
}

/* ---------- Tag/Nacht-Schalter ---------- */

.toggle-bar {
	position: absolute;
	top: 34px;
	left: 0;
	right: 0;
	z-index: 4;
	display: flex;
	justify-content: center;
}

.toggle {
	font-size: 17px;
	position: relative;
	display: inline-block;
	width: 4em;
	height: 2.2em;
	border-radius: 30px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	cursor: pointer;
}

.toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.toggle__slider {
	position: absolute;
	inset: 0;
	background-color: var(--slider-bg);
	transition: background-color 0.4s;
	border-radius: 30px;
	overflow: hidden;
}

.toggle input:focus-visible + .toggle__slider {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.toggle__star {
	background-color: #fff;
	border-radius: 50%;
	position: absolute;
	width: 5px;
	height: 5px;
	opacity: var(--star-opacity);
	transition: opacity 0.4s;
}

.toggle__star:nth-of-type(1) {
	left: 2.5em;
	top: 0.5em;
}

.toggle__star:nth-of-type(2) {
	left: 2.2em;
	top: 1.2em;
}

.toggle__star:nth-of-type(3) {
	left: 3em;
	top: 0.9em;
}

.toggle__cloud {
	width: 3.5em;
	position: absolute;
	bottom: -1.4em;
	left: -1.1em;
	opacity: var(--cloud-opacity);
	transition: opacity 0.4s;
}

.toggle__knob {
	position: absolute;
	height: 1.2em;
	width: 1.2em;
	border-radius: 20px;
	left: var(--knob-left);
	bottom: 0.5em;
	box-shadow: var(--knob-shadow);
	transition:
		left 0.4s cubic-bezier(0.81, -0.04, 0.38, 1.5),
		box-shadow 0.4s;
}

/* ---------- Visitenkarte ---------- */

.card-wrap {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	z-index: 3;
	padding: 70px 24px 56px;
	overflow: hidden;
}

.card {
	width: 100%;
	max-width: 580px;
	max-height: 100%;
	overflow: auto;
	background: var(--card-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--card-border);
	border-top: 2px solid var(--accent);
	border-radius: 16px;
	padding: 34px 44px 30px;
	text-align: center;
	transition:
		background 0.35s,
		border-color 0.35s;
}

.card h1 {
	margin: 0;
	font-size: 36px;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1;
	text-transform: uppercase;
}

.card__role {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12px;
	letter-spacing: 0.22em;
	color: var(--accent);
	margin-top: 10px;
}

.card__rule {
	height: 1px;
	background: var(--card-border);
	margin: 20px 0;
}

.card__contact {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 15px;
}

.card__contact a {
	color: var(--text);
	text-decoration: none;
	transition: color 0.15s;
}

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

.pills {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 20px;
}

.pill {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pill-text);
	padding: 6px 12px;
	border: 1px solid var(--pill-border);
	border-radius: 999px;
}

.footer {
	position: absolute;
	bottom: 38px;
	left: 0;
	right: 0;
	text-align: center;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--subtle);
	z-index: 3;
}

.footer a {
	color: var(--subtle);
	text-decoration: none;
	transition: color 0.15s;
}

.footer a:hover {
	color: var(--pill-text);
}

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */

.page {
	min-height: 100vh;
	padding: 80px 24px;
}

.page__inner {
	max-width: 640px;
	margin: 0 auto;
}

.back {
	display: inline-block;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--subtle);
	text-decoration: none;
	margin-bottom: 40px;
}

.back:hover {
	color: var(--text);
}

.page h1 {
	font-size: 32px;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0 0 40px;
}

/* Kleine Mono-Ueberschrift ueber jedem Abschnitt */
.label {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 8px;
}

.prose {
	font-size: 15px;
	line-height: 1.7;
	color: var(--body);
	margin: 0 0 28px;
}

.prose:last-child {
	margin-bottom: 0;
}

.prose a,
.page a:not(.back) {
	color: var(--accent);
}

.prose code {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
}

.rights {
	font-size: 15px;
	line-height: 1.7;
	color: var(--body);
	margin: 0 0 16px;
	padding-left: 20px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
