:root {
  /* Light palette — blue-biased neutrals around the KRIEG brand */
  --ground: #eef2f8;
  --surface: #ffffff;
  --surface-2: #e5ebf4;
  --ink: #101f38;
  --ink-soft: #4a586f;
  --brand: #16386f;        /* KRIEG navy */
  --brand-2: #1f4f96;
  --sky: #4d9de0;          /* chevron sky-blue */
  --accent: #d99a2b;       /* harvest amber */
  --accent-deep: #b97e1c;
  --line: #d3dcea;
  --hero-ink: #eaf1fb;
  --hero-soft: #a9c2e2;
  --shadow: 22px 30px 60px -30px rgba(16,31,56,.35);
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --ground: #0a1424;
    --surface: #10203a;
    --surface-2: #16294a;
    --ink: #e9f0fb;
    --ink-soft: #9fb3d0;
    --brand: #3f7bc9;
    --brand-2: #5a9be6;
    --sky: #63b0ec;
    --accent: #e6ad45;
    --accent-deep: #c98f2b;
    --line: #26395a;
    --hero-ink: #eaf1fb;
    --hero-soft: #9db8dc;
    --shadow: 22px 30px 60px -30px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --ground: #0a1424;
  --surface: #10203a;
  --surface-2: #16294a;
  --ink: #e9f0fb;
  --ink-soft: #9fb3d0;
  --brand: #3f7bc9;
  --brand-2: #5a9be6;
  --sky: #63b0ec;
  --accent: #e6ad45;
  --accent-deep: #c98f2b;
  --line: #26395a;
  --hero-ink: #eaf1fb;
  --hero-soft: #9db8dc;
  --shadow: 22px 30px 60px -30px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

.wrap { width: min(1160px, 92vw); margin-inline: auto; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky);
}

/* ---- nav ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brandlogo { display: flex; flex-direction: column; }
.wordmark { height: 30px; width: auto; display: block; }
.wordmark--sm { height: 22px; }
.logo-img { height: 40px; width: auto; display: block; }
.logo-img--sm { height: 30px; }
/* Im Dark-Mode eine helle Platte hinter das navyfarbene Logo, damit es lesbar bleibt */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img { background: #fff; padding: 5px 10px; border-radius: 9px; }
}
:root[data-theme="dark"] .logo-img { background: #fff; padding: 5px 10px; border-radius: 9px; }
.word { font-weight: 900; font-size: 1.5rem; letter-spacing: .04em; color: var(--brand); }
.logo .sub { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-top: 1px; padding-left: 3px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-soft); transition: color .15s; }
.nav-links a:hover { color: var(--brand); }
.nav-links a.nav-cta {
  background: var(--brand); color: #fff; padding: .55rem 1.1rem; border-radius: 999px;
  font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.nav-links a.nav-cta:hover { background: var(--brand-2); color: #fff; }
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center;
}
.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0; padding: 1.2rem 4vw 1.6rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px;
}

/* ---- hero ---- */
.hero {
  position: relative; background: var(--brand); color: var(--hero-ink);
  overflow: hidden; isolation: isolate; display: flex; align-items: center;
}
.hero--compact { min-height: 55vh; }
.hero--normal  { min-height: 72vh; }
.hero--full    { min-height: 100vh; }

/* Vollflaechiges Hintergrundbild: deckt den GESAMTEN Hero-Bereich ab */
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(99,176,236,.42), transparent 55%),
    linear-gradient(180deg, rgba(6,18,38,.55) 0%, transparent 40%);
  pointer-events: none;
}
/* Mit Foto: dunkler Verlauf statt Farbschleier, Deckkraft per --ov aus dem CMS */
.hero--photo::before {
  background: linear-gradient(180deg,
    rgba(8,20,42, calc(var(--ov, .6) * .8)) 0%,
    rgba(8,20,42, calc(var(--ov, .6) * 1.15)) 65%,
    rgba(8,20,42, calc(var(--ov, .6) * 1.3)) 100%);
}
.hero--photo .hero-grid { grid-template-columns: minmax(0, 46rem); }

/* Achtung: keine width-Angabe hier — sonst wird die zentrierte Breite von .wrap überschrieben. */
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; padding: 4.5rem 0 8rem; margin-inline: auto; }
.hero h1 { font-size: clamp(2.4rem, 5.3vw, 4.05rem); font-weight: 900; letter-spacing: -.02em; }
.hero h1 .amber { color: var(--accent); }
.hero p.lead { color: var(--hero-soft); font-size: clamp(1.05rem, 1.7vw, 1.28rem); max-width: 34ch; margin-top: 1.3rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }
.btn-amber { background: #a86e15; color: #fff; padding: .95rem 1.7rem; border-radius: 999px; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s; }
.btn-amber:hover { background: #c1841d; transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.35); color: var(--hero-ink); padding: .95rem 1.6rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn-ghost:hover { border-color: #fff; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem 2.3rem; margin-top: 2.6rem; }
.hero-badges div { display: flex; flex-direction: column; }
.hero-badges b { font-size: 1.55rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.hero-badges span { font-size: .82rem; color: var(--hero-soft); letter-spacing: .02em; }

.hero-art { align-self: end; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 30px rgba(0,0,0,.3)); }
.hero-art img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: 0 20px 40px rgba(0,0,0,.35); }

/* landscape band at foot of hero */
.landscape { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; display: block; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; padding: 3rem 0 6.5rem; }
  .hero-art { display: none; }
}

/* ---- Sektions-Hintergruende (aus dem CMS waehlbar) ---- */
.sec { position: relative; }
.sec--light { background: var(--ground); }
.sec--tint  { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec--navy  { background: var(--brand); color: var(--hero-ink); }
.sec--navy .eyebrow { color: #a9c8ee; }
.sec--navy .sec-head p, .sec--navy .card p { color: var(--hero-soft); }
.sec--image { background-size: cover; background-position: center; color: var(--hero-ink); isolation: isolate; }
.sec--image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,20,42,.72), rgba(8,20,42,.85));
}
.sec--image .wrap { position: relative; }

/* ---- sections ---- */
section { padding: 5.5rem 0; }
.sec-head { max-width: 46ch; margin-bottom: 2.8rem; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 900; letter-spacing: -.015em; margin-top: .5rem; }
.sec-head p { color: var(--ink-soft); margin-top: .8rem; font-size: 1.08rem; }

/* services grid */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); border-color: var(--sky); }
.card .ic { width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--sky) 16%, transparent); display: grid; place-items: center; margin-bottom: 1rem; color: var(--brand); font-size: 1.3rem; }
.card h3 { font-size: 1.12rem; font-weight: 800; }
.card p { color: var(--ink-soft); font-size: .95rem; margin-top: .4rem; }

/* betrieb / energy split */
.betrieb { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.betrieb-photo { width: 100%; height: auto; border-radius: 16px; margin-bottom: 1.6rem; box-shadow: var(--shadow); }
.pill-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.pill { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-weight: 600; font-size: .92rem; }
.pill.energy { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border-color: var(--accent); color: var(--ink); }
.energy-note { display: flex; gap: 1rem; margin-top: 1.8rem; padding: 1.3rem 1.4rem; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; }
.energy-note .ic { color: var(--accent-deep); flex: none; }
.energy-note b { display: block; margin-bottom: .2rem; }
.energy-note p { color: var(--ink-soft); font-size: .95rem; }
.stat-card { background: var(--brand); color: var(--hero-ink); border-radius: 20px; padding: 2.2rem; box-shadow: var(--shadow); }
.stat-card h3 { color: #fff; font-size: 1.3rem; margin-bottom: 1.4rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; }
.stat-grid b { font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 900; color: var(--accent); display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-grid span { font-size: .85rem; color: var(--hero-soft); }

/* trust strip */
.strip { background: var(--brand); color: var(--hero-ink); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; padding: 2.2rem 0; }
.strip .item { display: flex; align-items: center; gap: .8rem; }
.strip .item .ic { color: var(--accent); flex: none; }
.strip .item span { font-weight: 600; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: .75rem .85rem; font: inherit; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 25%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-info { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-info .row { display: flex; gap: .9rem; align-items: flex-start; }
.contact-info .ic { color: var(--brand); flex: none; margin-top: 2px; }
.contact-info a { text-decoration: none; font-weight: 600; color: var(--brand-2); }
.contact-info .row span small { display: block; color: var(--ink-soft); font-weight: 400; }
.form-note { font-size: .85rem; margin-top: .6rem; }
.form-ok { color: #1a7a3c; font-weight: 600; }
.form-err { color: #b3261e; font-weight: 600; }

footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 2.4rem 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; color: var(--ink-soft); font-size: .9rem; }
.foot a { color: var(--ink-soft); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ================= Bausteine des Seitenbaukastens ================= */

/* Social-Icons im Menue */
.nav-tools { display: flex; align-items: center; gap: .5rem; }
.nav-social { display: flex; align-items: center; gap: .35rem; }
.nav-social--mobile { display: none; }
.social-link {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--ink-soft); text-decoration: none; transition: color .15s, background .15s;
}
.social-link:hover { background: var(--surface-2); }
.social-link--facebook:hover  { color: #1877F2; }
.social-link--instagram:hover { color: #E4405F; }
.social-link--youtube:hover   { color: #FF0000; }
.social-link--linkedin:hover  { color: #0A66C2; }
.social-link--whatsapp:hover  { color: #25D366; }
@media (max-width: 860px) {
  .nav-social--desktop { display: none; }
  .nav-social--mobile { display: flex; margin-top: .4rem; }
}

/* Kartenraster mit waehlbarer Spaltenzahl */
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards--2, .cards--3, .cards--4 { grid-template-columns: 1fr; } }
.card--link { text-decoration: none; color: inherit; display: block; }
.sec--navy .card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.sec--navy .card .ic { color: var(--accent); }
.sec--navy .card h3 { color: #fff; }

/* Text + Bild */
.split--left  > div:first-child { order: 2; }
.split--left  > div:last-child  { order: 1; }
.split-h2   { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 900; margin-top: .5rem; }
.split-text { color: var(--ink-soft); margin-top: .9rem; font-size: 1.08rem; }
.sec--navy .split-text { color: var(--hero-soft); }
.media-photo { width: 100%; height: auto; border-radius: 16px; margin-bottom: 1.6rem; box-shadow: var(--shadow); }

/* Zahlen als eigene Sektion */
.stat-card--wide { max-width: 100%; }
.stat-grid--auto { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Galerie */
.gallery { display: grid; gap: 1.1rem; }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .gallery--3, .gallery--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr !important; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; display: block; box-shadow: var(--shadow); }
.gallery figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; }
.news-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-body { padding: 1.3rem 1.3rem 1.5rem; }
.news-body time { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.news-body h3 { font-size: 1.15rem; font-weight: 800; margin-top: .4rem; }
.news-body p { color: var(--ink-soft); font-size: .95rem; margin-top: .5rem; }
.news-body a { display: inline-block; margin-top: .8rem; font-weight: 700; color: var(--brand-2); text-decoration: none; }
.news-empty { color: var(--ink-soft); }

/* Facebook-Einbettung */
.fb-embed { display: flex; justify-content: center; }
.fb-embed .fb-page { max-width: 100%; }
.fb-consent {
  background: var(--brand); color: var(--hero-ink); border-radius: 18px;
  padding: 3rem 1.5rem; text-align: center; box-shadow: var(--shadow);
}
.fb-consent-inner { max-width: 34rem; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.fb-consent-ic { color: #fff; }
.fb-consent b { font-size: 1.2rem; }
.fb-consent p { color: var(--hero-soft); font-size: .95rem; }
.fb-consent .btn-amber { margin-top: .5rem; border: none; cursor: pointer; font: inherit; font-weight: 800; }
.fb-consent-alt { color: var(--hero-soft); font-size: .85rem; text-decoration: underline; }

/* Zitat */
.quote { margin: 0; max-width: 52rem; margin-inline: auto; text-align: center; }
.quote-mark { color: var(--accent); display: inline-block; }
.quote blockquote { margin: .8rem 0 0; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700; line-height: 1.35; }
.quote figcaption { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.4rem; }
.quote figcaption img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote figcaption b { display: block; }
.quote figcaption small { color: var(--ink-soft); }
.sec--navy .quote figcaption small { color: var(--hero-soft); }

/* Textabschnitt */
.prose { max-width: 62ch; color: var(--ink-soft); font-size: 1.05rem; }
.sec--navy .prose { color: var(--hero-soft); }

/* Kontakt ohne Formular */
.contact-grid--single { grid-template-columns: 1fr; max-width: 34rem; }

.foot-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--brand); }
