/* Dömling Restaurierung – Stylesheet
   Ein Stylesheet für alle Seiten, ohne Frameworks. */

/* ---------- Schrift (lokal eingebunden, keine Google-Server) ---------- */

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/open-sans-300.woff2') format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 300;
	font-display: swap;
	src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'), url('../fonts/open-sans-300-italic.woff2') format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url('../fonts/open-sans-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 600;
	font-display: swap;
	src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'), url('../fonts/open-sans-600-italic.woff2') format('woff2');
}

/* ---------- Grundlagen ---------- */

:root {
	--hintergrund: #f0ede8;
	--fuss: #e9e9e9;
	--text: #000;
	--weiss: #fff;
	/* Hover-Farben: Blautöne der alten Seite, so weit abgedunkelt,
	   dass sie den Mindestkontrast 4,5:1 erreichen */
	--akzent: #2f6db5;
	--akzent-hell: #3a66c4;
	--abstand: 1.5rem;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	padding-bottom: 72px;
	background: var(--hintergrund);
	color: var(--text);
	font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.45;
}

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

a {
	color: inherit;
}

strong,
b {
	font-weight: 600;
}

h1,
h2 {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 300;
	line-height: 1.4;
}

h3 {
	margin: 1.6em 0 0.5em;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.45;
}

p {
	margin: 0 0 1em;
}

/* Sichtbarer Fokusrahmen für die Bedienung per Tastatur */
:focus-visible {
	outline: 2px solid var(--akzent);
	outline-offset: 2px;
}

/* Nur für Screenreader (z. B. Überschriften, die optisch nicht nötig sind) */
.unsichtbar {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* „Zum Inhalt springen“: erscheint erst beim Tabben */
.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 1rem;
	top: 1rem;
	z-index: 10;
	padding: 0.5rem 1rem;
	background: var(--weiss);
}

/* ---------- Seitenraster ---------- */

.seite {
	display: grid;
	grid-template-columns: 7% 1fr 5%;
	grid-template-areas:
		". kopf ."
		". nav ."
		". einleitung ."
		". inhalt .";
}

.kopf {
	grid-area: kopf;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding-top: 3em;
	margin-bottom: 10px;
}

.einleitung {
	grid-area: einleitung;
}

main {
	grid-area: inhalt;
	min-width: 0;
}

.navigation {
	grid-area: nav;
}

@media (min-width: 1024px) {
	.seite {
		grid-template-columns: 10% 60% 28% 2%;
		grid-template-areas:
			". kopf . ."
			". einleitung . ."
			". inhalt nav .";
	}

	.navigation {
		padding-left: 22px;
	}

	.logo {
		margin-left: -36px;
	}
}

.logo img {
	width: 35px;
	height: 35px;
}

/* ---------- Navigation ---------- */

.menue-knopf {
	display: none;
	padding: 6px 14px;
	border: 1px solid #404040;
	border-radius: 0;
	background: var(--weiss);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.navigation ul {
	margin: 0 0 8px 8px;
	padding: 0;
	list-style: none;
}

.nav-head {
	display: block;
	padding-left: 25px;
	background: url('../bilder/link.gif') 0 7px / 25px no-repeat;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.75;
	text-decoration: none;
	cursor: pointer;
}

.nav-head:hover,
.nav-head:focus-visible {
	color: var(--akzent);
}

summary.nav-head {
	list-style: none;
}

summary.nav-head::-webkit-details-marker {
	display: none;
}

.nav-projekte a {
	display: block;
	padding: 2px 0 2px 0.9em;
	text-indent: -0.9em;
	font-size: 16px;
	line-height: 19px;
	text-decoration: none;
}

.nav-projekte a::before {
	content: '› ';
	font-size: 20px;
}

.nav-projekte a:hover,
.nav-projekte a:focus-visible {
	color: var(--akzent-hell);
	text-decoration: underline;
}

/* aktuelle Seite: fett, ohne Hover-Effekt */
.navigation [aria-current] {
	font-weight: 600;
}

.navigation [aria-current]:hover {
	color: inherit;
	text-decoration: none;
}

.nav-pdf {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 20px;
	text-decoration: none;
}

.nav-pdf:hover,
.nav-pdf:focus-visible {
	text-decoration: underline;
}

.nav-pdf img {
	width: 18px;
}

/* Ohne JavaScript bleibt das Menü auf schmalen Bildschirmen einfach aufgeklappt */
@media (max-width: 1023px) {
	.js .menue-knopf {
		display: block;
	}

	.navigation {
		margin-bottom: 22px;
		padding: 12px 16px;
		border: 1px solid #404040;
		background: var(--weiss);
	}

	.js .navigation:not(.offen) {
		display: none;
	}

	.nur-breit {
		display: none;
	}
}

@media (min-width: 1024px) {
	.nur-schmal {
		display: none;
	}
}

/* ---------- Einleitungstext ---------- */

.einleitung p,
.seitentitel {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.4;
}

.einleitung {
	padding-right: 1em;
	margin-bottom: 36px;
}

/* ---------- Startseite: Projektkacheln ---------- */

.kacheln {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px var(--abstand);
	margin: 0;
	padding: 0;
	list-style: none;
}

.kachel a {
	display: block;
	text-decoration: none;
}

.kachel figure {
	margin: 0;
}

.kachel figcaption {
	display: flex;
	gap: 6px;
	min-height: 5em;
	margin-top: 2px;
	padding: 20px 12px 12px 20px;
	background: var(--weiss);
	line-height: 19px;
}

.kachel figcaption::before {
	content: '';
	flex: 0 0 26px;
	height: 22px;
	background: url('../bilder/link.gif') center / contain no-repeat;
}

.kachel a:hover figcaption,
.kachel a:focus-visible figcaption {
	text-decoration: underline;
}

@media (max-width: 649px) {
	.kacheln {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 22px;
	}
}

/* ---------- Bildergruppen (Projekte, Unterseiten) ---------- */

.galerie {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px var(--abstand);
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.galerie .gross {
	grid-column: span 2;
}

.galerie a {
	display: block;
}

.galerie img {
	width: 100%;
}

@media (max-width: 649px) {
	.galerie {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

/* ---------- Fließtext ---------- */

.text {
	max-width: 46em;
}

.text ul {
	padding-left: 1.2em;
	list-style: circle;
}

.text .fakten {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.fakten li {
	margin-bottom: 8px;
}

.fliesstext {
	margin: 20px 0 26px;
}

.text h2 {
	margin-top: 1.6em;
	font-size: 18px;
	font-weight: 600;
}

.text h1 + h2,
.text > h2:first-child {
	margin-top: 0;
}

/* Referenzen */

.referenzen {
	margin: 0 0 1em;
	padding-left: 1.2em;
	list-style: circle;
}

.referenzen li {
	margin-bottom: 1em;
}

.referenzen strong {
	display: block;
}

/* Über mich: Lebenslauf */

.portrait {
	width: 50%;
	margin-bottom: 20px;
}

.lebenslauf {
	margin: 0;
}

.lebenslauf dt {
	font-weight: 600;
}

.lebenslauf dd {
	margin: 0 0 1em;
}

/* Kontakt */

.adresse {
	font-style: normal;
	margin-bottom: 1em;
}

.zwei-bilder {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--abstand);
	max-width: 50%;
	margin-bottom: 20px;
}

@media (max-width: 649px) {
	.portrait,
	.zwei-bilder {
		width: 100%;
		max-width: none;
	}
}

/* Datenschutz */

.rechtstext h2 {
	font-size: 16px;
}

.rechtstext h3 {
	margin-top: 1em;
	font-size: 16px;
}

/* ---------- Fußzeile ---------- */

.fuss {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	border-top: 1px solid #000;
	background: var(--fuss);
	font-size: 14px;
}

.fuss ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 20px;
	margin: 0;
	padding: 14px 16px;
	list-style: none;
}

.fuss a {
	text-decoration: none;
}

.fuss a:hover,
.fuss a:focus-visible {
	text-decoration: underline;
}

.copyright {
	margin-left: 30px;
}

@media (max-width: 799px) {
	body {
		padding-bottom: 0;
	}

	.seite {
		padding-bottom: 32px;
	}

	.fuss {
		position: static;
	}

	.copyright {
		flex-basis: 100%;
		margin-left: 0;
		text-align: center;
	}
}

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--weiss);
}

.lightbox::backdrop {
	background: rgb(0 0 0 / 0.92);
}

.lightbox-inhalt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 48px 64px 24px;
}

.lightbox figure {
	margin: 0;
	max-width: 100%;
}

.lightbox img {
	max-width: 100%;
	max-height: calc(100vh - 180px);
	max-height: calc(100dvh - 180px); /* berücksichtigt ein- und ausfahrende Leisten auf dem Handy */
	margin: 0 auto;
	border: 4px solid var(--weiss);
	background: var(--weiss);
}

.lightbox figcaption {
	max-width: 60em;
	margin: 12px auto 0;
	font-size: 15px;
	line-height: 1.4;
}

.lightbox-zaehler {
	display: block;
	margin-top: 4px;
	color: #bbb;
	font-size: 13px;
}

.lightbox button {
	position: absolute;
	padding: 8px 14px;
	border: 0;
	background: none;
	color: var(--weiss);
	font: 300 40px/1 'Open Sans', sans-serif;
	cursor: pointer;
	opacity: 0.75;
}

.lightbox button:hover,
.lightbox button:focus-visible {
	opacity: 1;
}

.lightbox :focus-visible {
	outline-color: var(--weiss);
}

.lightbox-zu {
	top: 8px;
	right: 8px;
}

.lightbox-zurueck,
.lightbox-weiter {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-zurueck {
	left: 4px;
}

.lightbox-weiter {
	right: 4px;
}

@media (max-width: 649px) {
	.lightbox-inhalt {
		padding: 48px 12px 24px;
	}

	.lightbox-zurueck,
	.lightbox-weiter {
		top: auto;
		bottom: 8px;
		transform: none;
	}
}

/* ---------- Druck ---------- */

@media print {
	body {
		padding: 0;
		background: none;
		font-size: 11pt;
	}

	.seite {
		display: block;
	}

	.navigation,
	.js .navigation,
	.js .menue-knopf,
	.skip,
	.nur-schmal,
	.fuss {
		display: none;
	}

	.galerie,
	.kacheln {
		break-inside: avoid;
	}

	.galerie li,
	.kachel {
		break-inside: avoid;
	}

	.text {
		max-width: none;
	}
}
