/*
Theme Name: Bauhelf Industrial
Description: Lightweight, cookie-free theme for Bauhelf Spezialtiefbau GmbH. System fonts, no external requests, no JavaScript framework.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: bauhelf
*/

:root {
	--ink: #0f1114;
	--steel: #1b1f24;
	--steel-2: #15181c;
	--line: #2c323a;
	--y: #f5b400;
	--b: #2b4fe0;
	--t: #e9ecef;
	--m: #9aa3ad;
	--soft: #c5ccd3;
	--strong: #fff;
	--btn-o: #ffffff66;
	--wrap: 1200px;
	color-scheme: dark;
}
/* Light mode: only content areas switch; photo sections (hero, header, service tiles) stay dark. */
:root[data-theme="light"] {
	--ink: #f4f5f7;
	--steel: #ffffff;
	--steel-2: #eceef1;
	--line: #d9dde3;
	--t: #15181c;
	--m: #5b6470;
	--soft: #363d46;
	--strong: #0f1114;
	--btn-o: #0f111455;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	background: var(--ink);
	color: var(--t);
	font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--y); color: #111; padding: 10px 16px; font-weight: 700; }

/* ---------- header ---------- */
.site-header { position: absolute; inset: 0 0 auto; z-index: 20; color: #fff; }
.site-header.solid { position: sticky; top: 0; background: #0f1114; border-bottom: 1px solid #2c323a; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.site-header .logo { display: block; flex: none; }
.site-header .logo img { height: 46px; width: auto; filter: drop-shadow(0 1px 3px #0009); }
.site-header .wrap > .main-nav { margin-left: auto; }
.tools { display: flex; align-items: center; gap: 6px; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-weight: 700; font-size: 13px; letter-spacing: .08em; border: 1px solid #ffffff40; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--y); color: var(--y); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; padding: 6px; margin: 0; background: #0f1114; border: 1px solid #2c323a; border-top: 3px solid var(--y); min-width: 190px; z-index: 30; }
.lang-switch li a { display: flex; gap: 10px; padding: 8px 10px; font-size: 14px; color: #e9ecef; }
.lang-switch li a b { color: var(--y); width: 24px; font-size: 12px; letter-spacing: .06em; padding-top: 2px; }
.lang-switch li a:hover, .lang-switch li a[aria-current] { background: #1b1f24; }
.theme-toggle { background: none; border: 1px solid #ffffff40; color: #fff; padding: 8px; cursor: pointer; display: flex; line-height: 0; }
.theme-toggle:hover { border-color: var(--y); color: var(--y); }
.theme-toggle .icon:first-child { display: none; }
:root[data-theme="light"] .theme-toggle .icon:first-child { display: block; }
:root[data-theme="light"] .theme-toggle .icon:last-child { display: none; }
.main-nav ul { list-style: none; padding: 0; display: flex; gap: 28px; }
.main-nav a { font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--y); border-color: var(--y); }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 14px 8px; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
	display: block; width: 26px; height: 2px; background: #fff; position: relative; content: "";
}
.nav-toggle-label span::before { position: absolute; top: -8px; }
.nav-toggle-label span::after { position: absolute; top: 8px; }

/* ---------- shared ---------- */
.kicker { color: var(--y); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }
h1, h2, h3 { line-height: 1.1; }
.section { padding: 110px 0; }
.section.tight { padding-top: 0; }
.section-title { font-size: clamp(28px, 4.5vw, 56px); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; margin: 12px 0 40px; overflow-wrap: break-word; hyphens: auto; }
.btns { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.btn { display: inline-flex; gap: 10px; align-items: center; padding: 15px 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; border: 2px solid transparent; }
.btn-y { background: var(--y); color: #111; }
.btn-y:hover { background: #ffc933; }
.btn-o { border-color: var(--btn-o); }
.hero .btn-o { border-color: #ffffff66; }
.btn-o:hover { border-color: var(--y); color: var(--y); }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- home hero ---------- */
.hero { color: #fff; position: relative; min-height: clamp(560px, 92vh, 960px); display: flex; align-items: flex-end; background: #000; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero .wrap { position: relative; padding-bottom: 72px; padding-top: 140px; width: 100%; }
.hero h1 { font-size: clamp(44px, 8vw, 104px); line-height: .92; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; margin: 14px 0 22px; }
.hero h1 span { color: var(--y); }
.hero p { max-width: 620px; color: #d6dbe0; font-size: 18px; }

.stats { background: var(--y); color: #111; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats .wrap > div { padding: 30px 0 30px 24px; border-left: 1px solid #0002; }
.stats .wrap > div:first-child { border: 0; padding-left: 0; }
.stats b { display: block; font-size: 40px; font-weight: 900; line-height: 1; }
.stats span { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

.svc { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--line); }
.svc article { color: #fff; background: #1b1f24; position: relative; min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.svc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; transition: opacity .4s, transform .4s; }
.svc article:hover img { opacity: .6; transform: scale(1.04); }
.svc .in { position: relative; padding: 24px; }
.svc .n { color: var(--y); font-weight: 800; font-size: 13px; }
.svc h3 { font-size: 20px; text-transform: uppercase; margin: 6px 0 10px; }
.svc p { font-size: 14px; color: #c9cfd5; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.split > img { height: 520px; width: 100%; object-fit: cover; }
.split p { color: var(--soft); font-size: 17px; margin-bottom: 16px; }

.proj { border-top: 1px solid var(--line); }
.proj > div { display: grid; grid-template-columns: 1.4fr 1.2fr 140px; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.proj b { font-size: 18px; }
.proj span { color: var(--m); }
.proj em { font-style: normal; color: var(--y); font-weight: 800; font-size: 22px; text-align: right; }
.more-link { display: inline-flex; gap: 10px; align-items: center; margin-top: 28px; color: var(--y); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }

.mach { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; background: var(--line); }
.mach > div { background: var(--steel); padding: 26px 16px; text-align: center; font-weight: 800; font-size: 18px; }
.mach small { display: block; color: var(--m); font-weight: 500; font-size: 12px; letter-spacing: .08em; }

.dl { background: var(--steel); }
.docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.docs a { background: var(--ink); padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.docs a:hover { background: var(--steel-2); color: var(--y); }
.docs a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.docs .doc-type { display: block; color: var(--m); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.docs .doc-title { display: block; font-weight: 600; }
.docs .doc-meta { color: var(--m); font-size: 13px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }

.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact > div { border-top: 3px solid var(--y); padding-top: 18px; }
.contact b { display: block; font-size: 18px; }
.contact span, .contact a { color: var(--m); display: block; }
.contact a:hover { color: var(--y); }

/* ---------- inner pages ---------- */
.page-hero { color: #fff; position: relative; background: #000; padding: 180px 0 70px; overflow: hidden; border-bottom: 4px solid var(--y); }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; margin-top: 12px; }
.page-hero p { max-width: 680px; color: #d6dbe0; margin-top: 14px; font-size: 18px; }

.content { padding: 80px 0 110px; }
.prose { max-width: 820px; overflow-wrap: break-word; hyphens: auto; }
.page-hero h1, .hero h1 { overflow-wrap: break-word; hyphens: auto; }
.prose > * + * { margin-top: 18px; }
.prose p, .prose li { color: var(--soft); font-size: 17px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 900; text-transform: uppercase; margin-top: 56px; }
.prose h3 { font-size: 21px; margin-top: 36px; color: var(--strong); }
.prose a { color: var(--y); border-bottom: 1px solid #f5b40066; }
.prose a:hover { border-color: var(--y); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose strong { color: var(--strong); }
.prose .wp-block-image img, .prose figure img { width: 100%; }
.prose figcaption { color: var(--m); font-size: 14px; margin-top: 8px; }
.content .wide { max-width: none; }

/* service rows on Leistungen */
.svc-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.svc-row:nth-child(even) > figure { order: 2; }
.svc-row img { height: 380px; width: 100%; object-fit: cover; }
.svc-row h2 { margin-top: 8px !important; }

/* gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 24px; }
.gallery-grid figure { position: relative; background: var(--steel); }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-grid figcaption { position: absolute; left: 0; bottom: 0; background: var(--y); color: #111; font-weight: 800; padding: 6px 12px; font-size: 15px; margin: 0; }

/* project table */
.proj-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.proj-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; }
.proj-list b { color: var(--strong); font-size: 18px; }
.proj-list span { color: var(--m); grid-column: 1; }
.proj-list em { font-style: normal; color: var(--y); font-weight: 800; grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* contact cards */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 24px; }
.contact-grid > div { background: var(--steel); padding: 24px; border-top: 3px solid var(--y); }
.contact-grid b { color: var(--strong); display: block; font-size: 18px; }
.contact-grid span { color: var(--m); display: block; }
.contact-grid a { color: var(--soft); border: 0; }
.contact-grid a:hover { color: var(--y); }

/* downloads page */
.dl-unlock { background: var(--steel); border: 2px solid var(--line); border-left: 4px solid var(--y); padding: 28px; margin: 32px 0 8px; max-width: 820px; }
.dl-unlock > p:first-child { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--strong); }
.dl-unlock .icon { margin-top: 3px; color: var(--y); }
.dl-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dl-row input { flex: 1 1 220px; min-width: 0; padding: 14px 16px; font: inherit; color: var(--t); background: var(--ink); border: 2px solid var(--line); }
.dl-row input:focus { outline: none; border-color: var(--y); }
.dl-row .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; }
.dl-error { color: #ff6b5e; font-weight: 600; margin-top: 12px; }
:root[data-theme="light"] .dl-error { color: #b42318; }
.dl-file { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: var(--m); margin-top: 8px; overflow-wrap: anywhere; }
.dl-unlocked { display: flex; gap: 10px; align-items: center; color: var(--y); font-weight: 600; margin: 24px 0 8px; }
.doc-group + .doc-group { margin-top: 56px; }
.doc-group h2 { margin-bottom: 20px !important; }
.doc-note { color: var(--m); font-size: 14px; margin-top: 16px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; color: var(--m); font-size: 14px; background: var(--ink); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer img { height: 44px; width: auto; margin-bottom: 16px; }
.logo-on-light { display: none; }
:root[data-theme="light"] .logo-on-light { display: block; }
:root[data-theme="light"] .logo-on-dark { display: none; }
.legal-note { display: block; margin-top: 4px; }
.site-footer h4 { color: var(--strong); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a:hover { color: var(--y); }
.site-footer .legal { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.svc { grid-template-columns: repeat(3, 1fr); }
	.mach { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
	.nav-toggle-label { display: block; }
	.main-nav { position: absolute; top: 84px; left: 0; right: 0; background: #0f1114; border-bottom: 2px solid var(--y); display: none; }
	.nav-toggle:checked ~ .main-nav { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
	.main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid #2c323a; }
	.site-header .wrap { gap: 10px; }
	.site-header .logo img { height: 38px; }
	.stats .wrap { grid-template-columns: repeat(2, 1fr); }
	.stats .wrap > div:nth-child(3) { border: 0; padding-left: 0; }
	.svc { grid-template-columns: 1fr 1fr; }
	.svc article { min-height: 320px; }
	.split, .docs, .contact, .svc-row { grid-template-columns: 1fr; gap: 28px; }
	.svc-row:nth-child(even) > figure { order: 0; }
	.split > img, .svc-row img { height: 300px; }
	.proj > div { grid-template-columns: 1fr; gap: 4px; }
	.proj em { text-align: left; }
	.section { padding: 72px 0; }
	.site-footer .cols { grid-template-columns: 1fr; }
	.docs .doc-meta { display: none; }
}
@media (max-width: 520px) {
	.svc { grid-template-columns: 1fr; }
	.mach { grid-template-columns: repeat(2, 1fr); }
	.hero h1 { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .site-footer, .hero > img, .page-hero > img { display: none; }
	body { background: #fff; color: #000; }
}

/* yellow text on light backgrounds needs a darker amber for contrast */
:root[data-theme="light"] .proj em, :root[data-theme="light"] .proj-list em, :root[data-theme="light"] .more-link,
:root[data-theme="light"] .content .kicker, :root[data-theme="light"] .section:not(.hero) > .wrap > .kicker,
:root[data-theme="light"] .split .kicker, :root[data-theme="light"] .prose a, :root[data-theme="light"] .docs a:hover { color: #9a6a00; }
:root[data-theme="light"] .prose a { border-color: #9a6a0066; }
