/*
Theme Name: Sicherheitskultur
Description: Buch-Landingpage für „Angewandte Sicherheitskultur in Hochzuverlässigkeitsorganisationen“. Ohne Plugins, Schrift lokal.
Version: 2.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sicherheitskultur
*/

@font-face {
	font-family: "Instrument Sans";
	src: url("assets/fonts/instrument-sans.woff2") format("woff2");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-style: normal;
	font-display: swap;
}

/* Farben am Buchcover gemessen: Limette #bed500, Marine #002757. */
:root {
	--lime: #c3d600;
	--lime-pale: #eef3bf;
	--lime-wash: #f6f8e3;
	--green: #8fb800;
	--navy: #002757;
	--navy-deep: #001a3d;
	--white: #fff;
	--text-soft: #3d4f6e;
	--rule: #d9deea;
	--font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 78rem;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--section: clamp(4.5rem, 9vw, 8rem);
	--radius: 10px;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 5.5rem;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--white);
	color: var(--navy);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
	margin: 0;
}

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

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

a {
	color: inherit;
	text-underline-offset: 0.2em;
}

:focus-visible {
	outline: 3px solid var(--navy);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--navy);
	color: var(--lime);
}

/* Überschriften: eng und fett wie die Titelschrift auf dem Cover. */
h1,
h2,
h3 {
	font-weight: 700;
	font-stretch: 78%;
	line-height: 1.02;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

h2 {
	font-size: clamp(2.25rem, 5vw, 4rem);
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--navy);
	color: var(--white);
}

.skip-link:focus {
	top: 1rem;
}

.kicker {
	margin-bottom: 1rem;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 1.05em 1.6em;
	border: 2px solid var(--navy);
	border-radius: var(--radius);
	background: var(--navy);
	color: var(--white);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px -8px rgb(0 26 61 / 0.55);
}

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

.btn--lime {
	background: var(--lime);
	border-color: var(--lime);
	color: var(--navy);
}

.btn--small {
	padding: 0.7em 1.15em;
	font-size: 0.9375rem;
}

/* Kopfzeile */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--lime);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 4.75rem;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	margin-right: auto;
	font-weight: 700;
	font-stretch: 80%;
	font-size: 1.0625rem;
	line-height: 1.05;
	letter-spacing: -0.005em;
	text-decoration: none;
}

.logo svg {
	width: 2.5rem;
	height: 2.5rem;
	flex: none;
}

.site-nav ul {
	display: flex;
	gap: 0.25rem;
	margin-right: 0.75rem;
}

.site-nav a {
	display: block;
	padding: 0.55rem 0.9rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.site-nav a:hover {
	background: rgb(255 255 255 / 0.55);
}

.mobile-nav {
	display: none;
	position: relative;
}

.mobile-nav summary {
	display: grid;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	border: 2px solid var(--navy);
	border-radius: var(--radius);
	cursor: pointer;
	list-style: none;
}

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

.mobile-nav summary span,
.mobile-nav summary span::before {
	display: block;
	width: 1.2rem;
	height: 2px;
	background: var(--navy);
}

.mobile-nav summary span {
	transform: translateY(-3px);
}

.mobile-nav summary span::before {
	content: "";
	transform: translateY(6px);
}

.mobile-nav ul {
	position: absolute;
	right: 0;
	top: calc(100% + 0.75rem);
	min-width: 15rem;
	padding: 0.5rem;
	background: var(--navy);
	border-radius: var(--radius);
}

.mobile-nav a {
	display: block;
	padding: 0.8rem 1rem;
	color: var(--white);
	font-weight: 600;
	text-decoration: none;
}

/* Hero: Limette mit diagonal abgesetzter heller Fläche, Buch in 3D. */
.hero {
	overflow: hidden;
	background: linear-gradient(118deg, var(--lime) 0 56%, var(--lime-pale) 56%);
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: 2rem;
	align-items: center;
	min-height: min(46rem, calc(100vh - 4.75rem));
	padding-block: clamp(3rem, 6vw, 5rem);
}

.hero h1 {
	font-size: clamp(3rem, 7.2vw, 6.25rem);
	line-height: 0.95;
	letter-spacing: -0.03em;
}

.hero h1 span {
	display: block;
}

.lead {
	max-width: 31em;
	margin-top: 1.75rem;
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	line-height: 1.45;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2.25rem;
}

.hero__note {
	margin-top: 1.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
}

.book {
	--depth: 2.4rem;
	position: relative;
	width: min(100%, 23rem);
	margin-inline: auto;
	perspective: 2200px;
}

.book__shadow {
	position: absolute;
	inset: 22% -22% -14% 30%;
	background: rgb(0 26 61 / 0.42);
	filter: blur(30px);
	transform: rotate(18deg) skewX(-18deg);
	border-radius: 20%;
}

.book__body {
	position: relative;
	aspect-ratio: 827 / 1176;
	transform-style: preserve-3d;
	transform: rotateX(26deg) rotateY(22deg) rotateZ(-14deg);
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.book:hover .book__body {
	transform: rotateX(16deg) rotateY(12deg) rotateZ(-8deg);
}

.book__front {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: translateZ(calc(var(--depth) / 2));
	border-radius: 0 3px 3px 0;
}

.book__spine {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--depth);
	height: 100%;
	background:
		linear-gradient(90deg, rgb(0 0 0 / 0.28), transparent 45%),
		linear-gradient(var(--green) 0 37%, var(--navy) 37%);
	transform: translateX(calc(var(--depth) / -2)) rotateY(-90deg);
}

.book__pages {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: var(--depth);
	background: repeating-linear-gradient(#f4f1e8 0 2px, #dcd8cb 2px 3px);
	transform: translateY(calc(var(--depth) / 2)) rotateX(90deg);
}

/* Das Buch */
.section {
	padding-block: var(--section);
}

.about {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

.about__statement {
	position: sticky;
	top: 7.5rem;
}

.prose > * + * {
	margin-top: 1.15em;
}

.about .prose {
	font-size: 1.1875rem;
	line-height: 1.6;
}

/* Inhaltsverzeichnis auf Marineblau */
.section--toc {
	background: var(--navy);
	color: var(--white);
}

.section--toc .kicker {
	color: var(--lime);
}

.toc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 5vw, 5rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.toc__part {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 3px solid var(--lime);
	font-size: 1.25rem;
	font-stretch: 85%;
	line-height: 1.2;
	letter-spacing: 0;
}

.toc__part span {
	flex: none;
	padding: 0.2em 0.6em;
	background: var(--lime);
	border-radius: 5px;
	color: var(--navy);
	font-size: 0.8125rem;
	font-stretch: 100%;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.toc__list li {
	display: grid;
	grid-template-columns: 3.25rem minmax(0, 1fr);
	gap: 0.25rem 0.5rem;
	padding-block: 1.15rem;
	border-bottom: 1px solid rgb(255 255 255 / 0.16);
}

.toc__nr {
	color: var(--lime);
	font-size: 1.75rem;
	font-weight: 700;
	font-stretch: 78%;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.toc__title {
	display: block;
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
}

.toc__meta {
	display: block;
	margin-top: 0.3rem;
	color: rgb(255 255 255 / 0.72);
	font-size: 0.875rem;
}

/* Herausgeber */
.section__head {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: clamp(1.5rem, 5vw, 5rem);
	align-items: end;
}

.section__head p:not(.kicker) {
	color: var(--text-soft);
	font-size: 1.125rem;
}

.editors {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.editor__photo {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--lime);
	border-radius: var(--radius);
	color: var(--navy);
	font-size: clamp(4rem, 9vw, 7.5rem);
	font-weight: 700;
	font-stretch: 75%;
	letter-spacing: -0.04em;
}

/* Ohne Foto bleibt die Kachel flach, damit der Platzhalter die Seite nicht dominiert. */
.editor__photo:not(:has(img)) {
	aspect-ratio: 16 / 9;
	font-size: clamp(3rem, 6vw, 5rem);
}

.editor:nth-child(2) .editor__photo {
	background: var(--navy);
	color: var(--lime);
}

.editor:nth-child(3) .editor__photo {
	background: var(--lime-pale);
}

.editor__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.editor__degree {
	margin-top: 1.5rem;
	color: var(--text-soft);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.editor h3 {
	margin-top: 0.3rem;
	font-size: 2rem;
}

.editor__bio {
	margin-top: 0.9rem;
	font-size: 1rem;
}

/* Häufige Fragen */
.section--faq {
	background: var(--lime-wash);
}

.faq {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

.faq__item {
	border-bottom: 1px solid var(--rule);
}

.faq__item:first-child {
	border-top: 2px solid var(--navy);
}

.faq__item summary {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.15rem;
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	list-style: none;
}

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

.faq__item summary::after {
	content: "+";
	flex: none;
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
}

.faq__item[open] summary::after {
	content: "–";
}

.faq__item p {
	max-width: 38em;
	padding-bottom: 1.35rem;
}

/* Bestellen */
.order {
	background: var(--lime);
}

.order__grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: center;
	padding-block: var(--section);
}

.order .btn {
	margin-top: 2rem;
}

.order__note {
	margin-top: 1rem;
	font-size: 0.875rem;
}

.biblio {
	padding: 0.75rem 1.75rem;
	background: var(--white);
	border-radius: var(--radius);
	font-size: 0.9375rem;
}

.biblio > div {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 1rem;
	padding-block: 0.85rem;
	border-bottom: 1px solid var(--rule);
}

.biblio > div:last-child {
	border-bottom: 0;
}

.biblio dt {
	color: var(--text-soft);
}

.biblio dd {
	font-weight: 600;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Kontakt: die Bögen greifen die Kurven des Covers auf. */
.contact {
	position: relative;
	overflow: hidden;
	padding-block: var(--section);
	background: var(--navy);
	color: var(--white);
}

.contact::before,
.contact::after {
	content: "";
	position: absolute;
	border-radius: 50%;
}

.contact::before {
	right: -14rem;
	top: -22rem;
	width: 44rem;
	height: 44rem;
	background: var(--green);
}

.contact::after {
	right: -24rem;
	top: -30rem;
	width: 46rem;
	height: 46rem;
	background: var(--lime);
}

.contact .wrap {
	position: relative;
	z-index: 1;
}

.contact .kicker {
	color: var(--lime);
}

.contact h2 {
	max-width: 13em;
}

.contact p:not(.kicker) {
	max-width: 34em;
	margin-top: 1.5rem;
	font-size: 1.1875rem;
}

.contact .btn {
	margin-top: 2rem;
}

.contact :focus-visible,
.section--toc :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--lime);
}

/* Fußzeile */
.site-footer {
	padding-block: 3.5rem 2rem;
	background: var(--navy-deep);
	color: rgb(255 255 255 / 0.82);
	font-size: 0.9375rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2rem;
}

.site-footer .logo {
	color: var(--white);
}

.site-footer__links {
	display: grid;
	gap: 0.6rem;
}

.site-footer__links a:hover {
	color: var(--lime);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgb(255 255 255 / 0.16);
	font-size: 0.8125rem;
}

/* Unterseiten (Impressum, Datenschutz) */
.legal__head {
	padding-block: clamp(3rem, 6vw, 5rem);
	background: var(--lime);
}

.legal__head h1 {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	overflow-wrap: break-word;
	hyphens: auto;
}

.prose--page {
	max-width: 46rem;
	padding-block: clamp(2.5rem, 5vw, 4rem) var(--section);
	overflow-wrap: break-word;
}

.prose--page h2 {
	margin-top: 2em;
	font-size: 1.875rem;
	line-height: 1.1;
}

.prose--page h3 {
	margin-top: 1.75em;
	font-size: 1.375rem;
	line-height: 1.15;
}

.prose--page ul,
.prose--page ol {
	padding-left: 1.25em;
	list-style: revert;
}

.prose--page li + li {
	margin-top: 0.5em;
}

/* Kleinere Bildschirme */
@media (max-width: 62rem) {
	.site-nav {
		display: none;
	}

	.mobile-nav {
		display: block;
	}

	.site-header__inner {
		gap: 0.75rem;
	}

	.about,
	.faq,
	.section__head,
	.order__grid,
	.toc-grid {
		grid-template-columns: 1fr;
	}

	.about__statement {
		position: static;
	}

	.editors {
		grid-template-columns: 1fr;
		gap: 3rem;
	}

	.editor {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 5fr);
		gap: 0 1.5rem;
		align-items: start;
	}

	.editor__photo {
		grid-row: span 3;
	}

	.editor__degree {
		margin-top: 0;
	}

	.contact::before,
	.contact::after {
		opacity: 0.25;
	}
}

@media (max-width: 46rem) {
	.hero {
		background: linear-gradient(168deg, var(--lime) 0 62%, var(--lime-pale) 62%);
	}

	.hero__grid {
		grid-template-columns: 1fr;
		gap: 3.5rem;
		min-height: 0;
		padding-bottom: 6rem;
	}

	.book {
		--depth: 1.7rem;
		width: 60%;
	}

	.editor {
		display: block;
	}

	.editor__photo {
		max-width: 14rem;
	}

	.editor__degree {
		margin-top: 1.25rem;
	}

	.biblio > div {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}

	h2,
	.toc__title {
		hyphens: auto;
	}
}

@media (max-width: 26rem) {
	.site-header .btn--small {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition: none !important;
	}
}

@media print {
	.site-header,
	.contact,
	.site-footer,
	.hero__actions {
		display: none;
	}
}
