/*
 * Objektraum – ergänzende Stile zum theme.json.
 * Ruhiges Raster wie ein Planblatt: große Bilder, viel Weißraum, Beschriftungen in Mono.
 */

:root {
	--or-ink: var(--wp--preset--color--tinte, #1E252B);
	--or-muted: var(--wp--preset--color--grau, #5A646C);
	--or-line: var(--wp--preset--color--linie, #D3D8D9);
	--or-bg: var(--wp--preset--color--kalk, #F2F3F1);
	--or-slate: var(--wp--preset--color--schiefer, #26313A);
	--or-accent: var(--wp--preset--color--rebengruen, #557A3E);
	--or-signal: var(--wp--preset--color--signalgruen, #2FA84F);
	--or-on-slate: #EEF1F1;
	--or-gutter: var(--wp--custom--gutter, clamp(16px, 5vw, 64px));
	--or-mono: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	--or-display: var(--wp--preset--font-family--display, "Helvetica Neue", Arial, sans-serif);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, h4 { font-stretch: 112%; text-wrap: balance; }
h1 { font-stretch: 118%; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--or-accent); outline-offset: 2px; }

/* ---------- Label (Mono, klein) ---------- */
.is-style-label,
p.is-style-label {
	font-family: var(--or-mono);
	font-size: 0.75rem !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--or-muted);
	margin-bottom: 0.4rem;
}
.is-style-label a { color: inherit; text-decoration: none; }
.is-style-label a:hover { color: var(--or-accent); }

/* ---------- Kopfzeile ---------- */
.or-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: saturate(1.4) blur(8px);
	-webkit-backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--or-line);
	padding-left: var(--or-gutter);
	padding-right: var(--or-gutter);
}
.admin-bar .or-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .or-site-header { top: 46px; } }

.or-header {
	max-width: 1240px;
	margin: 0 auto !important;
	min-height: 72px;
	gap: 24px;
	align-items: center;
}
.or-logo { display: block; line-height: 0; flex: none; }
.or-logo img { display: block; height: 34px; width: auto; }
.or-header-right { gap: 28px; align-items: center; }
.or-nav { font-size: 0.875rem; font-weight: 500; }
.or-nav .wp-block-navigation-item__content { color: var(--or-ink); text-decoration: none; }
.or-nav .wp-block-navigation-item__content:hover,
.or-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--or-accent); }
.or-nav .wp-block-navigation__container { gap: 24px; }
.or-header-cta .wp-block-button__link { padding: 0.6rem 1.1rem; }

/* ---------- Hauptbereich ---------- */
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
.or-main > .or-hero:first-child, .or-main > .wp-block-post-featured-image:first-child { margin-block-start: 0; }
.or-main { padding-bottom: clamp(48px, 8vw, 104px); }
.or-section { padding-top: clamp(48px, 8vw, 104px); }
.or-section-head { margin-bottom: clamp(24px, 4vw, 48px); align-items: flex-end; }
.or-section-head h2 { margin-top: 0; }
.or-lead { font-size: 1.1875rem; color: var(--or-muted); }
.or-more a,
a.or-more { font-weight: 600; font-size: 0.875rem; color: var(--or-accent); text-decoration: none; }
.or-more a:hover, a.or-more:hover { color: var(--or-ink); }
.or-page { padding-top: clamp(32px, 6vw, 72px); }
.or-page .or-page-hero { margin-top: calc(-1 * clamp(32px, 6vw, 72px)); margin-bottom: clamp(32px, 6vw, 64px); }
.or-page-title { margin-bottom: 1.5rem; }

/* ---------- Startbild ---------- */
.or-hero { position: relative; margin-top: 0 !important; }
.or-startbild { margin: 0; background: #9AA7AC; }
.or-startbild-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 8;
	max-height: 78vh;
	object-fit: cover;
}
.or-hero-card {
	position: relative;
	z-index: 2;
	background: #fff;
	max-width: 640px;
	margin: -140px 0 0 max(var(--or-gutter), calc((100vw - 1240px) / 2)) !important;
	padding: clamp(22px, 4vw, 44px) !important;
}
.or-hero-card > * { max-width: none !important; margin-left: 0 !important; }
.or-hero-card h1 { margin: 0.2rem 0 0.75rem; font-size: clamp(2rem, 5vw, 3.5rem); }
.or-hero-card .wp-block-buttons { margin-top: 1.5rem; }

/* ---------- Kennzahlen ---------- */
.or-facts {
	margin-top: clamp(32px, 5vw, 56px) !important;
	border-top: 1px solid var(--or-line);
	border-bottom: 1px solid var(--or-line);
}
.or-facts .wp-block-columns { gap: 0; margin: 0; }
.or-facts .wp-block-column { padding: 22px 0; }
.or-facts .wp-block-column + .wp-block-column { border-left: 1px solid var(--or-line); padding-left: 32px; }
.or-fact-big {
	font-family: var(--or-display);
	font-stretch: 118%;
	font-size: 1.625rem;
	font-weight: 650;
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.or-fact-small { font-size: 0.875rem; color: var(--or-muted); margin: 0.2rem 0 0; }

/* ---------- Haltung ---------- */
.or-values .wp-block-columns { gap: clamp(24px, 4vw, 56px); }
.or-value { border-top: 2px solid var(--or-ink); padding-top: 16px; }
.or-value h3 { margin: 0.2rem 0 0.5rem; }
.or-value p:empty { display: none; }

/* ---------- Projekte auf der Startseite ---------- */
.or-proj {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: clamp(20px, 4vw, 56px);
	align-items: end;
}
.or-proj + .or-proj { margin-top: clamp(40px, 7vw, 88px); }
.or-proj.is-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.or-proj.is-flip .or-proj-img { order: 2; }
.or-proj-img { display: block; line-height: 0; overflow: hidden; background: #C9D0D2; }
.or-proj-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s ease; }
.or-proj-img:hover img { transform: scale(1.02); }
.or-proj-text { display: grid; gap: 12px; padding-bottom: 6px; }
.or-proj-text h3 { margin: 0; font-size: clamp(1.375rem, 2.6vw, 1.875rem); font-stretch: 115%; }
.or-proj-text h3 a { color: inherit; text-decoration: none; }
.or-proj-text h3 a:hover { color: var(--or-accent); }
.or-proj-text p { color: var(--or-muted); margin: 0; }

.or-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-family: var(--or-mono);
	font-size: 0.75rem;
	color: var(--or-muted);
	align-items: center;
}

/* ---------- Projektübersicht ---------- */
.or-pgrid { gap: clamp(28px, 4vw, 48px) clamp(16px, 2.5vw, 32px) !important; }
.or-pgrid > li { display: grid; gap: 10px; align-content: start; }
.or-pgrid .wp-block-post-featured-image { margin: 0; overflow: hidden; background: #C9D0D2; }
.or-pgrid .wp-block-post-featured-image img { transition: transform 0.6s ease; }
.or-pgrid .wp-block-post-featured-image a:hover img { transform: scale(1.02); }
.or-card-title { margin: 0; font-size: 1.25rem !important; font-stretch: 112%; }
.or-card-title a { color: inherit; text-decoration: none; }
.or-card-title a:hover { color: var(--or-accent); }

/* ---------- Technik-Icons und Effizienzklasse ---------- */
.or-tech { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--or-signal); }
.or-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--or-line);
	border-radius: 50%;
	color: var(--or-signal);
	flex: none;
}
.or-ico.is-wide { width: 46px; border-radius: 16px; }
.or-ico svg {
	height: 18px;
	width: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.or-ebadge {
	display: inline-flex;
	height: 24px;
	font-family: var(--or-display);
	font-stretch: 110%;
	font-weight: 800;
	font-size: 13px;
	line-height: 1;
	color: #fff;
	vertical-align: middle;
}
.or-ebadge .seg {
	display: flex;
	align-items: center;
	padding: 0 15px 0 9px;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
.or-ebadge .seg + .seg {
	margin-left: -7px;
	padding-left: 18px;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}
.or-ebadge.is-big { height: 36px; font-size: 18px; }
.or-ebadge.is-big .seg {
	padding: 0 20px 0 12px;
	clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
}
.or-ebadge.is-big .seg + .seg {
	margin-left: -10px;
	padding-left: 25px;
	clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%, 15px 50%);
}
.k-aplus { background: #2FA84F; }
.k-a { background: #5DBB46; }
.k-nh { background: #2C6E5B; }
.k-ee { background: #1D6A96; }

/* ---------- Projektseite ---------- */
.or-projekt { padding-top: 0; }
.or-projekt-hero { margin-top: 0 !important; margin-bottom: clamp(32px, 6vw, 64px) !important; }
.or-projekt-hero img { max-height: 80vh; }
.or-projekt-head { gap: clamp(24px, 5vw, 64px) !important; }
.or-projekt-head h1 { margin: 0.2rem 0 0.75rem; font-size: clamp(1.875rem, 4.6vw, 3.25rem); }
.or-projekt-text { max-width: 62ch; font-size: 1.0625rem; }
.or-projekt-text .wp-block-gallery,
.or-projekt-text figure.wp-block-image { margin-top: 2rem; margin-bottom: 2rem; }

.or-steckbrief { margin: 0; border-top: 2px solid var(--or-ink); font-size: 0.9375rem; }
.or-steckbrief > div {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--or-line);
}
.or-steckbrief dt {
	font-family: var(--or-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--or-muted);
	padding-top: 3px;
}
.or-steckbrief dd { margin: 0; }
.or-steckbrief dd .or-ebadge { margin-left: 8px; }
.or-techlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.or-techlist li { display: flex; align-items: center; gap: 10px; }
.or-credit { font-family: var(--or-mono); font-size: 0.6875rem; color: var(--or-muted); margin-top: 12px; }

.or-projekt-nav {
	margin-top: clamp(40px, 7vw, 88px) !important;
	border-top: 1px solid var(--or-line);
	padding-top: 20px;
	font-size: 0.9375rem;
}
.or-projekt-nav a { color: var(--or-ink); text-decoration: none; font-weight: 600; }
.or-projekt-nav a:hover { color: var(--or-accent); }
.or-projekt-nav .post-navigation-link__label { display: block; font-family: var(--or-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--or-muted); font-weight: 400; }

/* ---------- Dunkles Band (Energie) ---------- */
.is-style-band {
	background: var(--or-slate);
	color: var(--or-on-slate);
	padding-top: clamp(48px, 8vw, 104px) !important;
	padding-bottom: clamp(48px, 8vw, 104px) !important;
	margin-top: clamp(48px, 8vw, 104px) !important;
}
.is-style-band h1, .is-style-band h2, .is-style-band h3, .is-style-band h4 { color: #fff; }
.is-style-band .is-style-label { color: rgba(238, 241, 241, 0.65); }
.is-style-band a:not(.wp-element-button) { color: #fff; }
.is-style-band .wp-element-button:hover { background: #fff; color: var(--or-slate); }
.or-energy { gap: clamp(28px, 5vw, 72px) !important; }
.or-energy h2 { margin: 0.4rem 0 0.9rem; font-size: clamp(1.625rem, 3.6vw, 2.5rem); }

.or-dashlist { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; display: grid; gap: 10px; }
.or-dashlist li { display: flex; gap: 12px; align-items: baseline; }
.or-dashlist li::before {
	content: "";
	width: 14px;
	height: 2px;
	background: var(--or-signal);
	flex: none;
	transform: translateY(-4px);
}

.or-scale { display: grid; gap: 5px; font-family: var(--or-mono); font-size: 0.75rem; margin-bottom: 24px; }
.or-scale .bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 26px;
	padding: 0 18px 0 10px;
	color: #10180c;
	font-weight: 500;
	clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}
.or-scale small { margin-top: 6px; opacity: 0.75; }

.or-thermo { gap: 8px !important; margin: 0; }
.or-thermo .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.or-thermo .blocks-gallery-caption {
	font-family: var(--or-mono);
	font-size: 0.6875rem;
	opacity: 0.75;
	text-align: left;
	color: inherit;
	margin-top: 4px;
}

/* ---------- Ablauf ---------- */
.or-steps { gap: 0 !important; border-top: 1px solid var(--or-line); margin-top: 1.5rem; }
.or-steps > .wp-block-column { padding: 20px 18px 6px; border-right: 1px solid var(--or-line); }
.or-steps > .wp-block-column:first-child { padding-left: 0; }
.or-steps > .wp-block-column:last-child { border-right: 0; }
.or-steps h4 { margin: 0.2rem 0 0.3rem; font-size: 1.0625rem; }
.or-steps p:not(.or-step-no) { font-size: 0.875rem; color: var(--or-muted); margin: 0; }
.or-step-no { font-family: var(--or-mono); font-size: 0.75rem; color: var(--or-accent); margin: 0; }

/* ---------- Kontakt ---------- */
.or-contact .wp-block-columns { gap: clamp(24px, 5vw, 64px); }
.or-contact h2 { font-size: clamp(1.75rem, 4vw, 2.875rem); margin: 0.2rem 0 1.5rem; }
.or-office { margin: 0; }
.or-office img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.or-office figcaption { font-family: var(--or-mono); font-size: 0.6875rem; color: var(--or-muted); text-align: left; }
.or-clist { border-top: 2px solid var(--or-ink); padding-top: 12px; }
.or-clist p { margin: 0; }
.or-clist p.is-style-label { margin-top: 1.1rem; }
.or-clist a { color: var(--or-ink); font-size: 1.125rem; text-decoration: none; }
.or-clist a:hover { color: var(--or-accent); }

/* ---------- Fußzeile ---------- */
.or-footer {
	background: var(--or-bg);
	border-top: 1px solid var(--or-line);
	padding-top: clamp(40px, 6vw, 64px);
	padding-bottom: 28px;
	font-size: 0.9375rem;
	margin-top: 0 !important;
}
.or-footer-cols { gap: clamp(24px, 4vw, 56px) !important; }
.or-footer p { margin: 0; }
.or-footer a { color: var(--or-ink); text-decoration: none; }
.or-footer a:hover { color: var(--or-accent); }
.or-logo-footer img { height: 28px; margin-bottom: 10px; }
.or-footer-bottom {
	margin-top: clamp(28px, 4vw, 48px) !important;
	padding-top: 16px;
	border-top: 1px solid var(--or-line);
	font-size: 0.8125rem;
	color: var(--or-muted);
}
.or-footer-bottom a { color: var(--or-muted); margin-left: 16px; }

/* ---------- Hinweise nur für angemeldete Redakteure ---------- */
.or-hinweis {
	background: #FBF3E2;
	border: 1px dashed #B7790F;
	color: #6B4708;
	padding: 12px 16px;
	font-size: 0.875rem;
}
.or-editor-platzhalter {
	border: 1px dashed var(--or-line);
	background: var(--or-bg);
	padding: 18px;
	font-family: var(--or-mono);
	font-size: 0.75rem;
	color: var(--or-muted);
}
.or-editor-platzhalter strong { display: block; font-family: var(--or-display); font-size: 1rem; color: var(--or-ink); margin-bottom: 4px; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
	.or-header-right { gap: 12px; }
}
@media (max-width: 781px) {
	.or-logo img { height: 28px; }
	.or-startbild-img { aspect-ratio: 4 / 3; }
	.or-hero-card { margin: -48px var(--or-gutter) 0 !important; }
	.or-proj, .or-proj.is-flip { grid-template-columns: minmax(0, 1fr); }
	.or-proj.is-flip .or-proj-img { order: 0; }
	.or-facts .wp-block-column + .wp-block-column { border-left: 0; padding-left: 0; border-top: 1px solid var(--or-line); }
	.or-steps > .wp-block-column { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--or-line); padding-bottom: 16px; }
	.or-steckbrief > div { grid-template-columns: 110px minmax(0, 1fr); }
	.or-footer-bottom a { margin: 0 16px 0 0; }
}

/* ---------- Dunkle Fassung (immer aktiv, Jans Wahl) ---------- */
@media all {
	:root:root {
		color-scheme: dark;
		--wp--preset--color--weiss: #14191D;
		--wp--preset--color--kalk: #1C2328;
		--wp--preset--color--tinte: #E6EAEA;
		--wp--preset--color--schiefer: #0E1215;
		--wp--preset--color--grau: #9AA5AC;
		--wp--preset--color--linie: #323D45;
		--wp--preset--color--rebengruen: #8DB86A;
		--or-on-slate: #E6EAEA;
	}
	body { background: #14191D; color: #E6EAEA; }
	.or-site-header { background: rgba(20, 25, 29, 0.92); }
	.or-logo img { filter: invert(1) brightness(0.92); }
	.or-hero-card { background: #1C2328; }
	.or-startbild, .or-proj-img, .or-pgrid .wp-block-post-featured-image { background: #2B353B; }
	.wp-element-button:hover, .wp-block-button__link:hover { background: #E6EAEA !important; color: #14191D !important; }
	.wp-block-button.is-style-outline > .wp-block-button__link,
	.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: #E6EAEA !important; border-color: #E6EAEA !important; background: transparent !important; }
	.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #E6EAEA !important; color: #14191D !important; }
	.is-style-band .wp-element-button { color: #13200B; }
	.or-hinweis { background: #2C2414; border-color: #F0B848; color: #F0B848; }
	img { color-scheme: normal; }
}
