@charset "utf-8";
/* mein-himmel-reich.de: the sky is the page. Everything else stays quiet and gets out of the way. */

@font-face {
	font-family: "Open Sans Cond Light";
	src: url("../fonts/OpenSans-CondLight-webfont.woff") format("woff");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Open Sans Light Italic";
	src: url("../fonts/OpenSans-LightItalic-webfont.woff") format("woff");
	font-weight: 300;
	font-style: italic;
	font-display: swap;
}

:root {
	--lila: #8a008a;
	--lila-hell: #b04db0;
	--nacht: rgb(32 56 102 / 0.82);
	--nacht-fest: #203866;
	--weiss: #fff;
	--schatten: 0 1px 12px rgb(10 25 60 / 0.45);
	--kond: "Open Sans Cond Light", "Open Sans Condensed", "Arial Narrow", sans-serif;
	--kursiv: "Open Sans Light Italic", "Trebuchet MS", sans-serif;
	--rand: clamp(1rem, 4vw, 3rem);
	--unten: calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
	--knopf: 2.5rem; /* the round buttons; bands around them take their radius from it */
	--rund: 1.5rem; /* corners of the text panels */
	--dauer: 20s;
	--blende: 3s;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--nacht-fest); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--kursiv);
	font-style: italic;
	font-weight: 300;
	font-size: 1rem;
	letter-spacing: 0.08em;
	color: var(--weiss);
	background: var(--nacht-fest);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--weiss); outline-offset: 3px; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.nur-vorleser {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Bühne: the slideshow ---------- */
.buehne {
	position: fixed;
	inset: 0;
	overflow: hidden;
	background: var(--nacht-fest);
	touch-action: pan-y;
}
.bild {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: right bottom; /* the watermark sits bottom right, keep it in frame */
	transform-origin: right bottom;
	opacity: 0;
	transition: opacity var(--blende) ease-in-out;
	user-select: none;
	-webkit-user-drag: none;
}
.bild.ist-sichtbar { opacity: 1; }
.bild.treibt { animation: treiben calc(var(--dauer) + var(--blende)) linear forwards; }
@keyframes treiben {
	from { transform: scale(1.07); }
	to { transform: scale(1); }
}
/* Tall screens see only a slice of the 3:2 photo, so the eye wanders across it instead. */
@media (max-aspect-ratio: 1/1) {
	.bild {
		left: auto;
		right: 0;
		width: auto;
		aspect-ratio: 3 / 2;
	}
	.bild.treibt { animation-name: wandern; }
	@keyframes wandern {
		from { transform: translateX(calc(100% - 100vw)); }
		to { transform: translateX(0); }
	}
}
.buehne::after { /* soft scrim so white type stays legible over white clouds */
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 16rem;
	background: linear-gradient(to top, rgb(12 26 60 / 0.42), transparent);
	pointer-events: none;
	transition: opacity 1.2s ease;
}
.ist-still .bild.treibt,
.ist-still .laufband__fuellung.laeuft { animation-play-state: paused; }

/* ---------- Fuss: date caption and band, stacked at the bottom so they never collide ---------- */
.fuss {
	position: fixed;
	left: var(--rand);
	right: var(--rand);
	bottom: var(--unten);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	z-index: 2;
	pointer-events: none;
}
.fuss > * { pointer-events: auto; }

/* ---------- Moment: the date of the sky on screen ---------- */
.moment {
	align-self: stretch;
	text-shadow: var(--schatten);
	pointer-events: none !important;
	transition: opacity 1.2s ease;
}
.moment__datum {
	margin: 0;
	font-family: var(--kond);
	font-style: normal;
	font-weight: 300;
	font-size: clamp(1.75rem, 4.2vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: 0.06em;
}
.moment__zeit { margin: 0.35rem 0 0; font-size: 0.95rem; }

/* ---------- Leiste: the purple band ---------- */
.leiste {
	width: min(58rem, 100%);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 1rem;
	--polster: 0.2rem;
	padding: var(--polster) var(--polster) var(--polster) 1.25rem;
	border-radius: calc(var(--knopf) / 2 + var(--polster)); /* a pill on one line, its right end round around the last button */
	background: var(--lila);
	box-shadow: 0 6px 24px rgb(40 0 40 / 0.25);
	transition: opacity 1.2s ease;
}
.leiste ul { display: flex; flex-wrap: wrap; gap: 0 1.4rem; margin: 0; padding: 0; list-style: none; }
.leiste li > a, .leiste__text {
	display: block;
	padding: 0.45rem 0;
	text-decoration: none;
	white-space: nowrap;
}
.leiste a:hover, .leiste__text:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.leiste [aria-current="page"], .leiste [aria-expanded="true"] { text-decoration: underline; text-underline-offset: 0.3em; }
.steuerung { display: flex; align-items: center; margin-left: auto; }
.knopf {
	display: grid;
	place-items: center;
	width: var(--knopf);
	height: var(--knopf);
	border-radius: 50%;
	transition: background-color 0.2s;
}
.knopf:hover { background: var(--lila-hell); }
.knopf svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.knopf .symbol-weiter { display: none; }
.ist-still .knopf .symbol-halt { display: none; }
.ist-still .knopf .symbol-weiter { display: block; }

/* ---------- Laufband: time left for this sky ---------- */
.laufband {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(env(safe-area-inset-bottom, 0px) + 4px);
	pointer-events: none;
	z-index: 2;
}
.laufband__fuellung {
	height: 4px;
	background: rgb(255 255 255 / 0.7);
	transform-origin: left;
	transform: scaleX(0);
}
.laufband__fuellung.laeuft { animation: vergehen var(--dauer) linear forwards; }
@keyframes vergehen {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

/* ---------- Idle: after a while only the sky and the thin time line remain ---------- */
.ist-ruhig .moment,
.ist-ruhig .leiste:not(:focus-within),
.ist-ruhig .buehne::after { opacity: 0; }
.ist-ruhig .leiste:not(:focus-within) { pointer-events: none; }
.ist-ruhig { cursor: none; }

/* ---------- Tafel: the text panel ---------- */
.tafel {
	position: fixed;
	top: calc(env(safe-area-inset-top, 0px) + var(--rand) + var(--tafel-oben, 0px)); /* --tafel-oben: room for the day/evening buttons on narrow screens (tageszeit.css) */
	left: var(--rand);
	width: min(24rem, 100% - 2 * var(--rand));
	max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--rand) - var(--tafel-oben, 0px) - var(--unten) - var(--fuss-hoehe, 9rem) - 1.25rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgb(255 255 255 / 0.4) transparent; /* no track box for the round corners to cut */
	padding: 1.4rem 1.5rem 1.5rem;
	border-radius: var(--rund);
	background: var(--nacht);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	font-family: var(--kond);
	font-style: normal;
	font-size: 1rem;
	line-height: 1.6;
	letter-spacing: 0.16em;
	z-index: 3;
	transition: opacity 4s ease, filter 4s ease, translate 4s ease;
}
.tafel[hidden] { display: none; }
.tafel:focus-visible { outline: none; } /* focused only as the target of #mein-himmel-reich; not a Tab stop, its close button keeps the ring */
.tafel.verweht { opacity: 0; filter: blur(14px); translate: 0 -0.75rem; pointer-events: none; }
.tafel h1 {
	margin: 0 2rem 1rem 0;
	font-family: var(--kursiv);
	font-style: italic;
	font-weight: 300;
	font-size: 1.35rem;
	letter-spacing: 0.08em;
	line-height: 1.3;
}
.tafel p { margin: 0 0 1em; }
.tafel__schluss { font-family: var(--kursiv); font-style: italic; letter-spacing: 0.08em; }
.tafel__name { margin-bottom: 0; text-align: right; font-family: var(--kursiv); font-style: italic; letter-spacing: 0.08em; }
.tafel__zu {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	width: 2.25rem;
	height: 2.25rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
}
.tafel__zu:hover { background: rgb(255 255 255 / 0.15); }
.tafel__zu svg { width: 0.9rem; height: 0.9rem; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Rechtstext: Impressum and Datenschutz ---------- */
.seite-text .buehne::after { height: 100%; background: rgb(12 26 60 / 0.35); }
.rechtstext {
	position: relative;
	z-index: 1;
	width: min(42rem, 100% - 2 * var(--rand));
	margin: calc(env(safe-area-inset-top, 0px) + var(--rand)) auto calc(var(--unten) + 6rem);
	padding: clamp(1.25rem, 4vw, 2.5rem);
	border-radius: var(--rund);
	background: var(--nacht);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	font-family: var(--kond);
	font-style: normal;
	font-size: 1.0625rem;
	line-height: 1.6;
	letter-spacing: 0.06em;
	overflow-wrap: break-word;
}
.rechtstext h1, .rechtstext h2 {
	font-family: var(--kursiv);
	font-style: italic;
	font-weight: 300;
	letter-spacing: 0.06em;
	line-height: 1.3;
}
.rechtstext h1 { margin: 0 0 1.25rem; font-size: 1.75rem; }
.rechtstext h2 { margin: 2rem 0 0.5rem; font-size: 1.2rem; }
.rechtstext p, .rechtstext ul { margin: 0 0 1em; }
.rechtstext .quelle, .rechtstext .stand { margin-top: 2rem; font-size: 0.9rem; opacity: 0.8; }
.rechtstext .verbindlich { margin-bottom: 1.5rem; font-family: var(--kursiv); font-style: italic; font-size: 0.95rem; opacity: 0.9; } /* translations: "only the German version is binding" */
.rechtstext .portrait { float: right; width: 6.5rem; height: auto; margin: 0 0 1rem 1.5rem; }

@media (prefers-reduced-motion: reduce) {
	.bild.treibt { animation: none; }
	.bild { transition-duration: 1s; }
	.tafel { transition: opacity 1s ease; }
	.tafel.verweht { filter: none; translate: none; }
}
@media (max-width: 30rem) {
	:root { --knopf: 2.25rem; }
	.leiste { --polster: 0.15rem; padding-left: 1rem; font-size: 0.875rem; letter-spacing: 0.04em; }
	.leiste ul { gap: 0 0.9rem; }
	.fuss { gap: 0.9rem; }
}
