/* ════════════════════════════════════════════════════════════════
   WEGENER Tiefbau & Abbruch — Global CSS
   Design: "Schwerlast Dunkel" (vom Kunden gewählt, 2026-06-12)
   Kantig, industriell, dunkel. Logo-Rot #D32C19 als Markenfarbe.
   Keine Rundungen. Nur transform/opacity animieren.
   ════════════════════════════════════════════════════════════════ */

/* ─── Manrope — selbst gehostet (DSGVO: keine Verbindung zu Google Fonts) ─── */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─── CSS-Variablen ─── */
:root {
  /* Marke (aus Logo-Vektor: #D32C19) */
  --color-brand-main:       #D32C19;
  --color-brand-darker:     #A82114;
  --color-brand-lighter:    #E5342C;
  --color-brand-text:       #F55A51;   /* Rot für TEXT auf dunklem Grund — mind. 4.5:1 (WCAG AA) auch auf --color-bg-light */
  --color-brand-subtle:     #2B1714;
  --color-brand-glow:       rgba(211, 44, 25, .32);

  /* Flächen (dunkel) */
  --color-bg-dark:          #0F1216;   /* Haupthintergrund "Ink" */
  --color-bg-light:         #1E242D;   /* hellere Sektionen "Surface" (Kontrast erhöht für sichtbare Trenner) */
  --color-bg-card:          #171C22;
  --color-bg-accent:        #1B2128;

  /* Linien & Text */
  --color-border:           #2A313A;
  --color-heading:          #F4F6F8;
  --color-body:             #C2C9D1;
  --color-text-muted:       #9AA3AD;
  --color-off-white:        #F4F6F8;
  --color-success:          #3FB950;

  /* Typografie */
  --font-main:              'Manrope', sans-serif;
  --font-size-body:         17px;
  --line-height-body:       1.65;
  --font-size-h1:           68px;
  --font-size-h2:           46px;
  --font-size-h3:           32px;
  --font-size-h4:           22px;
  --font-size-h5:           18px;
  --font-size-small:        17px;
  --font-size-nav:          17px;
  --font-size-button:       17px;

  /* Layout */
  --max-width:              1280px;
  /* Abschnitts-Rhythmus: Desktop 168 · Tablet (768–1024) 112 · Handy (≤767) 72 — Startseiten-Sektionen nutzen
     die drei Tokens in dieser Reihenfolge der Media-Queries. --section-space* = nur der vertikale Wert (für padding-top/-bottom). */
  --section-space:          168px;
  --section-space-tablet:   112px;
  --section-space-mobile:   72px;
  --section-padding:        var(--section-space) 0;    /* seitlich 0 — die .container-Innenabstände geben die Kante vor */
  --section-padding-tablet: var(--section-space-tablet) 0;
  --section-padding-mobile: var(--section-space-mobile) 0;
  --section-padding-page-mobile: 56px 0;              /* Unterseiten-Sektionen auf dem Handy */
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* KEIN CSS-Smooth-Scroll — kollidiert mit Lenis (js/smooth-scroll.js). Lenis-Basis-CSS: */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-body);
  background: var(--color-bg-dark);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
}
h1, h2, h3 { text-wrap: balance; }   /* keine Waisen-Wörter („vor / Ort") */

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); letter-spacing: -.01em; }
h4 { font-size: var(--font-size-h4); letter-spacing: -.01em; }
h5 { font-size: var(--font-size-h5); }
p { text-wrap: pretty; }   /* keine einzelnen Wörter in der letzten Zeile */

a { color: var(--color-brand-text); text-decoration: none; }
a:hover { color: var(--color-off-white); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-brand-lighter);
  outline-offset: 3px;
}

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

::selection { background: var(--color-brand-main); color: #fff; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

/* ─── Kicker (rote Sektions-Überschrift) ─── */
.kick {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-brand-text);
}

/* ─── Buttons (kantig, kein Radius) ─── */
.btn {
  font-family: var(--font-main);
  font-size: var(--font-size-button);
  font-weight: 700;
  letter-spacing: .02em;
  padding: 17px 30px;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, border-color .25s, background .25s;
}
.btn-primary {
  background: var(--color-brand-main);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-brand-glow), 0 16px 44px rgba(211, 44, 25, .2);
}
@media (hover: hover) {
  .btn-primary:hover {
    color: #fff;
    background: var(--color-brand-lighter);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--color-brand-glow), 0 26px 60px rgba(211, 44, 25, .28);
  }
}
.btn-primary:active { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--color-heading);
  border-color: var(--color-text-muted);
}
@media (hover: hover) { .btn-ghost:hover { color: var(--color-heading); border-color: var(--color-heading); transform: translateY(-3px); } }
.btn-ghost:active { transform: translateY(-1px); }
/* Handy: Abschnitts-Buttons volle Breite, Text zentriert, gestapelt. Schmal bleiben: .btn--auto */
@media (max-width: 767px) {
  .btn { width: 100%; justify-content: center; text-align: center; padding-left: 16px; padding-right: 16px; }   /* volle Breite → Seitenluft reicht, Label bleibt ab 360 einzeilig */
  .btn.btn--auto { width: auto; }
}

/* ─── Marken-Streifen (echte Vektoren aus dem Kunden-Logo) ─── */
.stripe-h { display: block; width: 100%; height: 18px; background: url('/assets/stripe-brand-h.svg') center / 100% 100% no-repeat; }
.stripe-v { flex: 0 0 12px; align-self: stretch; background: url('/assets/stripe-brand-v.svg') center / 100% 100% no-repeat; }

/* ─── Abschnittstrenner: Doppelstreifen ─── */
/* Proportionen exakt 1:1 aus Steves Logo-PNG (oben 296 / Lücke 114 / unten 533 von 943 px).
   Als linear-gradient statt SVG-Maske: Farbe folgt der Marke, gestochen scharf, keine Datei-Abhängigkeit. */
.divider-stripes {
  display: block;
  width: 100%;
  height: 46px;
  background: linear-gradient(
    to bottom,
    var(--color-brand-main) 0 31.39%,
    transparent 31.39% 43.48%,
    var(--color-brand-main) 43.48% 100%
  );
  /* füllt sich von links nach rechts (JS toggelt .in bei jedem Viewport-Eintritt) */
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
}
.divider-stripes.in { transform: scaleX(1); }
@media (max-width: 767px) { .divider-stripes { height: 32px; } }
@media (prefers-reduced-motion: reduce) {
  .divider-stripes { transform: none; transition: none; }
}

/* ─── Abschnittstrenner: LKW-Doppelstreifen (Klasse historisch „diag-divider") ─── */
/* Wie auf den MAN-LKWs: gerader roter Doppelstreifen, oben dünn, schmale Lücke, unten dick
   (Verhältnis wie .divider-stripes, in ganze Pixel gerundet → gestochen scharfe Kanten).
   Sitzt mittig auf der Naht zweier Sections; die Fläche teilt sich gerade in bg-a (oben) / bg-b (unten).
   Vor dem Einblenden ist nur die Naht zu sehen, dann läuft der Streifen einmalig links→rechts durch
   (Observer in index.html und js/page.js setzt .in). */
.diag-divider {
  --dd-h: 26px;                                 /* Gesamthöhe */
  --dd-t1: 8px;                                 /* Ende dünner Streifen */
  --dd-t2: 11px;                                /* Beginn dicker Streifen (Lücke 3px) */
  --bg-a: var(--color-bg-dark);                 /* Hintergrund der Section DARÜBER */
  --bg-b: var(--color-bg-dark);                 /* Hintergrund der Section DARUNTER */
  display: block;
  position: relative;
  height: var(--dd-h);
  margin: calc(var(--dd-h) / -2) 0;             /* sitzt mittig auf der Naht, verbraucht 0 Flow-Höhe */
  z-index: 1;                                   /* über den angrenzenden Sektionen */
  background: linear-gradient(to bottom, var(--bg-a) 50%, var(--bg-b) 50%);
}
.diag-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--color-brand-main) 0 var(--dd-t1),
    transparent var(--dd-t1) var(--dd-t2),
    var(--color-brand-main) var(--dd-t2) 100%
  );
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.2s cubic-bezier(.33, 0, .2, 1);
}
.diag-divider.in::before { clip-path: inset(0 0 0 0); }
.diag-divider.dv-dl { --bg-a: var(--color-bg-dark);  --bg-b: var(--color-bg-light); }
.diag-divider.dv-ld { --bg-a: var(--color-bg-light); --bg-b: var(--color-bg-dark);  }
.diag-divider.dv-ll { --bg-a: var(--color-bg-light); --bg-b: var(--color-bg-light); }
/* dunkel→dunkel = Default (beide --bg-a/--bg-b bereits bg-dark) */
@media (max-width: 767px) { .diag-divider { --dd-h: 18px; --dd-t1: 6px; --dd-t2: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .diag-divider::before { clip-path: none; transition: none; }
}

/* ─── Scroll-Reveal (IntersectionObserver setzt .in) ─── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ─── Responsive Typo ─── */
@media (max-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  .container { padding: 0 32px; }
}

@media (max-width: 767px) {
  .container { padding: 0 20px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
}

/* ─── Unterseiten-Hero: Kino-Intro (Standbild + Overlay → Zoom-Out aus der Mitte → Text) ─── */
/* Standard-Hero für ALLE Unterseiten. Pro Seite nur Bild + Breadcrumb + h1 + Subline tauschen. */
.hd { position: relative; min-height: max(60vh, 560px); padding-top: 123px; display: flex; align-items: flex-end; overflow: hidden; background: var(--color-bg-dark); }   /* padding-top = feste Nav (83px) + Luft, sonst rutscht die Brotkrume auf Laptops darunter */

/* 1) Bild steht erst kurz still, dann zoomt es aus der MITTE raus */
.hd-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hd-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center;
  transform: scale(1.38); transform-origin: 50% 50%;
  animation: hd-zoom 1s cubic-bezier(.2, .8, .2, 1) forwards .15s;
}
@keyframes hd-zoom { to { transform: scale(1); } }

/* 2) Verlauf liegt von Anfang an drauf (Lesbarkeit) — das Bild zoomt darunter raus */
.hd-grad {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, #0F1216 5%, rgba(15,18,22,.55) 44%, rgba(15,18,22,.12) 78%, transparent 100%),
    linear-gradient(100deg, rgba(15,18,22,.72) 0%, rgba(15,18,22,.2) 42%, transparent 64%);
}

/* 3) Text blendet gestaffelt ein — nach dem Zoom */
.hd-content {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--max-width); margin: 0 auto;
  padding: 0 48px 84px; box-sizing: border-box;
}
.hd-content > * { opacity: 0; transform: translateY(22px); animation: hd-rise .85s cubic-bezier(.22, 1, .36, 1) forwards; }
.hd-content > *:nth-child(1) { animation-delay: .9s; }
.hd-content > *:nth-child(2) { animation-delay: 1s; }
.hd-content > *:nth-child(3) { animation-delay: 1.1s; }
@keyframes hd-rise { to { opacity: 1; transform: none; } }

/* Projekt-Detailseiten: gleiches Intro auf eigenem Markup (.pj-hero > .bg img + .container > Crumb/Kategorie/h1) */
.pj-hero .bg { overflow: hidden; }
.pj-hero .bg img { transform: scale(1.38); transform-origin: 50% 50%; animation: hd-zoom 1s cubic-bezier(.2, .8, .2, 1) forwards .15s; }
.pj-hero .container > * { opacity: 0; transform: translateY(22px); animation: hd-rise .85s cubic-bezier(.22, 1, .36, 1) forwards; }
.pj-hero .container > *:nth-child(1) { animation-delay: .9s; }
.pj-hero .container > *:nth-child(2) { animation-delay: 1s; }
.pj-hero .container > *:nth-child(3) { animation-delay: 1.1s; }

/* Kennzahlen-Band direkt unter dem Hero gehört zum Intro: als Ganzes erst NACH dem Titel einblenden
   (Reihenfolge oben → unten), sonst steht während des Zooms ein leerer grauer Streifen.
   Der Text darunter startet danach — js/page.js wartet dafür auf den Start der Titel-Animation. */
.hd + .pv-band, .hd + .au-stats, .pj-hero + .pj-meta { animation: hd-band .8s cubic-bezier(.22, 1, .36, 1) 1.2s both; }
@keyframes hd-band { from { opacity: 0; } }
/* Projektseiten: die Fakten (Ort, Kategorie, …) fädeln einzeln von links nach rechts ein */
.pj-hero + .pj-meta .m { opacity: 0; transform: translateY(22px); animation: hd-rise .85s cubic-bezier(.22, 1, .36, 1) forwards; }
.pj-hero + .pj-meta .m:nth-child(1) { animation-delay: 1.2s; }
.pj-hero + .pj-meta .m:nth-child(2) { animation-delay: 1.28s; }
.pj-hero + .pj-meta .m:nth-child(3) { animation-delay: 1.36s; }
.pj-hero + .pj-meta .m:nth-child(4) { animation-delay: 1.44s; }

.hd-crumb { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 17px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hd-crumb a { color: #c2cad2; transition: color .2s; }
.hd-crumb a:hover { color: #fff; }
.hd-crumb a, .crumb a { display: inline-block; }
.hd-crumb .sep { width: 16px; height: 1px; background: rgba(255,255,255,.55); }
/* Aktuelles Glied: weiß mit rotem Unterstrich (rot auf roten Maschinen war unlesbar) */
.hd-crumb .cur, .crumb b {
  color: var(--color-off-white);
  text-decoration-line: underline; text-decoration-color: var(--color-brand-main);
  text-decoration-thickness: 2px; text-underline-offset: 7px;
}
.hd-crumb a, .crumb a { padding: 12px 4px; margin: -12px -4px; }   /* Tippfläche ≥ 44 px breit, gleiche Optik */
.hd h1 { font-size: clamp(48px, 6vw, 92px); line-height: 1.0; letter-spacing: -.04em; color: #fff; text-shadow: 0 2px 34px rgba(0,0,0,.45); }
.hd-sub { margin-top: 24px; font-size: 20px; line-height: 1.6; color: #DCE1E7; max-width: 52ch; }

/* Bildausschnitt pro Seite für Tablet/Handy: style="--hd-pos: …" am .hd (Desktop bleibt 60% center) */
@media (max-width: 1024px) { .hd-bg img { object-position: var(--hd-pos, 60% center); } }

@media (max-width: 767px) {
  /* kleiner + fluid, damit lange Komposita wie „Ansprechpartner" auch auf schmalen Phones passen */
  .hd { min-height: max(78svh, 560px); padding-top: 100px; }
  /* Verlauf nur unten (Text), oben bleibt das Motiv sichtbar — max. .35 Deckkraft */
  .hd-grad { background: linear-gradient(to top, #0F1216 6%, rgba(15,18,22,.82) 28%, rgba(15,18,22,.35) 55%, rgba(15,18,22,.18) 100%); }
  .hd h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.08; }
  .hd-content { padding: 0 20px 52px; }
  .hd-sub { font-size: 18px; }
}
/* Folgt auf den Seitenkopf direkt eine Inhalts-Sektion, hat der Kopf unten schon Luft — Sektion oben knapper, sonst klafft eine Lücke
   (Leistungen, Kontakt). Projekte/Über uns starten mit einem Kennzahlen-Band ohne Innenabstand. */
@media (max-width: 1024px) { .hd + .pg-sec { padding-top: 16px; } }
@media (max-width: 767px) { .hd + .pg-sec { padding-top: 8px; } }   /* Text → Inhalt ≈ 38 px, wie Projekte (Kopf → Kennzahlen-Band) */

@media (prefers-reduced-motion: reduce) {
  .hd-bg img, .pj-hero .bg img { animation: none; transform: scale(1); }
  .pj-hero .container > * { animation: none; opacity: 1; transform: none; }
  .hd + .pv-band, .hd + .au-stats, .pj-hero + .pj-meta { animation: none; }
  .pj-hero + .pj-meta .m { animation: none; opacity: 1; transform: none; }
  .hd-content > * { animation: none; opacity: 1; transform: none; }
}

/* ─── Kennzahlen-Bänder: .why (Leistungen), .pv-band (Projekte), .au-stats (Über uns) ───
   Gemeinsames Verhalten nur ≤1024 (Desktop-Regeln bleiben im Seiten-CSS). Raster = .stat-band__grid
   (darf das .stat-band-Element selbst sein), Kennzahl = .stat-band__item mit .v (Wert).
   Standard 2 Spalten, .stat-band--3: drei nebeneinander. Werte 26–30 px, Trennlinien oben statt rechts. */
@media (max-width: 1024px) {
  :is(.stat-band .stat-band__grid, .stat-band.stat-band__grid) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band--3 .stat-band__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.stat-band .stat-band__grid, .stat-band.stat-band__grid) > .stat-band__item { min-width: 0; margin: 0; border-right: none; }
  .stat-band .stat-band__item .v { font-size: 30px; }
}
@media (max-width: 767px) {
  .stat-band .stat-band__item .v { font-size: 26px; }
}

/* ─── Karten-Einwilligung: Google Maps erst nach Klick laden (Datenschutz + Performance) ─── */
.map-consent {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(ellipse at 28% 36%, rgba(211, 44, 25, .12) 0%, transparent 60%),
    linear-gradient(135deg, var(--color-bg-light), var(--color-bg-dark));
}
.map-consent__box { max-width: 480px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.map-consent__box strong { color: var(--color-heading); font-size: 21px; font-weight: 800; }
.map-consent__box p { color: var(--color-body); line-height: 1.55; }
.map-consent__box p a { text-decoration: underline; text-underline-offset: 3px; }
.map-consent__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
@media (max-width: 1024px) { .map-consent__actions .btn { flex: 1 1 220px; justify-content: center; } }   /* Tablet/Handy: beide Buttons gleich breit; Desktop unverändert */

/* ─── Projekt-Detailseiten: Vorlage (vorher in allen 10 Seitenköpfen kopiert) ───
   Varianten bleiben im jeweiligen Seitenkopf: .vgrid (gasthof, kropff), .press/.press-tag (brandruine). */
.pj-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--color-bg-dark); }
.pj-hero .bg { position: absolute; inset: 0; }
.pj-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1024px) { .pj-hero .bg img { object-position: var(--hero-pos, center); } }   /* Bildausschnitt pro Seite: style="--hero-pos: …" am .pj-hero */
.pj-hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, #0F1216 6%, rgba(15,18,22,.55) 52%, rgba(15,18,22,.5) 100%),
    radial-gradient(ellipse at 78% 25%, rgba(211,44,25,.16), transparent 55%);
}
.pj-hero .container { position: relative; z-index: 2; width: 100%; padding-top: 190px; padding-bottom: 54px; }
.pj-hero .crumb { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.pj-hero .crumb a { color: var(--color-text-muted); }
.pj-hero .crumb a:hover { color: var(--color-brand-lighter); }
.pj-hero .crumb span { color: rgba(255,255,255,.55); }
.pj-hero .cat { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(8,10,12,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.16); padding: 7px 13px; margin-bottom: 18px; }
.pj-hero .cat::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--color-brand-main); }
.pj-hero h1 { font-size: clamp(36px, 4.2vw, 58px); max-width: 22ch; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.pj-stripe { height: 14px; background: url('/assets/stripe-brand-h.svg') center / 100% 100% no-repeat; }

/* Meta-Band */
.pj-meta { background: var(--color-bg-light); border-bottom: 1px solid var(--color-border); }
.pj-meta .container { display: flex; gap: 0; flex-wrap: wrap; }
.pj-meta .m { padding: 24px 36px 24px 0; margin-right: 36px; border-right: 1px solid var(--color-border); }
.pj-meta .m:last-child { border-right: none; }
.pj-meta .k { font-size: 17px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-muted); }
.pj-meta .v { font-size: 19px; font-weight: 800; color: var(--color-heading); margin-top: 2px; }
/* Roter Teil des Werts: exakt gleich groß wie der weiße, wirkt aber kleiner, sobald die Schrift klein gerendert wird
   (Browser-Zoom raus) — dunkles Rot verliert die halbtransparenten Kantenpixel. Helleres Text-Rot + macOS-Glättung
   (gibt einen festen Bruchteil Pixel Strich dazu, wirkt also vor allem klein) gleichen das aus. */
.pj-meta .v span { color: var(--color-brand-text); -webkit-font-smoothing: auto; }
/* Fakten-Band: ≥1024 eine Reihe aus Spalten (vorher brach es auf 1024–1160 als 3+1). Spalten nach Inhalt,
   Restbreite gleichmäßig verteilt — strikt gleich breite Spalten ließen auf 1440 lange Werte zweizeilig umbrechen */
@media (min-width: 1024px) {
  .pj-meta .container { display: grid; grid-auto-flow: column; grid-auto-columns: auto; }
  .pj-meta .m { margin-right: 0; padding-right: 16px; }
  .pj-meta .m + .m { padding-left: 24px; }
}

/* Beschreibung */
.pj-body { padding: 88px 0; }
.pj-body .grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 64px; align-items: start; }
.pj-body .prose p { font-size: 17px; line-height: 1.75; color: var(--color-body); margin-bottom: 18px; }
.pj-body .prose p a { text-decoration: underline; text-underline-offset: 3px; }
.pj-body .prose p:first-child { font-size: 20px; line-height: 1.65; color: var(--color-heading); font-weight: 500; }
.pj-side { position: sticky; top: 110px; display: grid; gap: 18px; }
.pj-side .box { border: 1px solid var(--color-border); border-left: 3px solid var(--color-brand-main); background: var(--color-bg-card); padding: 26px 28px; }
.pj-side .box b { display: block; color: var(--color-heading); font-size: 18px; margin-bottom: 10px; }
.pj-side .box ul { list-style: none; display: grid; gap: 9px; }
.pj-side .box li { display: flex; gap: 11px; align-items: flex-start; color: var(--color-body); font-size: 17px; }
.pj-side .box li::before { content: "✓"; flex: 0 0 20px; height: 20px; background: var(--color-brand-main); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.pj-side .cta-box { background: var(--color-bg-card); border: 1px solid var(--color-border); padding: 26px 28px; }
.pj-side .cta-box b { display: block; color: var(--color-heading); font-size: 18px; }
.pj-side .cta-box p { color: var(--color-text-muted); font-size: 17px; margin: 6px 0 16px; }

/* Video-Facade (YouTube erst nach Klick laden) */
.pj-video { padding: 0 0 88px; }
.pj-video .vframe { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--color-border); overflow: hidden; background: var(--color-bg-card); cursor: pointer; }
.pj-video .vframe img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (hover: hover) { .pj-video .vframe:hover img { transform: scale(1.03); } }
.pj-video .vframe::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,18,22,.55), transparent 50%); pointer-events: none; }
.pj-video .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 86px; height: 60px; background: var(--color-brand-main); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px var(--color-brand-glow); transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .25s;
}
@media (hover: hover) { .pj-video .vframe:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--color-brand-lighter); } }
.pj-video .play::before { content: ""; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 4px; }
.pj-video .vlabel { position: absolute; left: 20px; bottom: 16px; z-index: 2; color: #fff; font-weight: 700; font-size: 17px; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.pj-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Galerie */
.pj-gal { padding: 0 0 88px; }
.pj-gal .gal { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 280px; gap: 16px; }
.pj-gal figure { position: relative; overflow: hidden; border: 1px solid var(--color-border); margin: 0; }
.pj-gal figure.wide { grid-column: span 2; }
.pj-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
@media (hover: hover) { .pj-gal figure:hover img { transform: scale(1.05); } }

@media (max-width: 980px) {
  .pj-hero .container { padding-top: 150px; }
  .pj-body .grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .pj-body .prose { max-width: 68ch; }
  .pj-side { position: static; }
  .pj-side .cta-box { display: none; }   /* doppelt zur Abschluss-CTA eine Scrollhöhe später */
  .pj-gal .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 260px; }
  .pj-gal figure.span-all { grid-column: 1 / -1; }   /* letzte Kachel füllt die Reihe (sonst Lücke) */
}
@media (max-width: 1024px) and (min-width: 768px) {
  .pj-hero h1 { font-size: 48px; }
  .pj-body { padding-top: 44px; }   /* oben halbiert wie auf dem Handy: Fakten-Band → Text (Wunsch 30.10.) */
  .pj-video { padding-bottom: 44px; }   /* Video → Galerie halbiert (Wunsch 30.10.) */
}
@media (max-width: 1023px) and (min-width: 768px) {
  .pj-meta .container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .pj-meta .m { margin-right: 0; padding: 20px 0; border-right: none; }
  .pj-meta .m:nth-child(n+3) { border-top: 1px solid var(--color-border); }
}
@media (max-width: 980px) and (min-width: 768px) {
  .pj-side .box ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}
@media (max-width: 767px) {
  .pj-hero { min-height: max(78svh, 560px); }
  .pj-hero .bg::after { background: linear-gradient(to top, #0F1216 6%, rgba(15,18,22,.82) 28%, rgba(15,18,22,.35) 55%, rgba(15,18,22,.18) 100%); }
  .pj-hero .container { padding-bottom: 40px; }
  .pj-hero .cat { display: none; }   /* steht ohnehin im Fakten-Band darunter */
  .pj-hero h1 { font-size: clamp(30px, 8.4vw, 36px); }
  .pj-hero .crumb b, .pj-hero .crumb span:last-of-type { display: none; }   /* nur „Start › Projekte" — sonst zweizeilig */
  .pj-body { padding: 28px 0 56px; }   /* oben halbiert: Fakten-Band → Text (Wunsch 30.10.) */
  /* Fakten untereinander wie die Hero-Kennzahlen: Label oben, Wert darunter, Linie dazwischen —
     neben einer Label-Spalte brachen die Werte um („Neubau / Seniorenresidenz") */
  .pj-meta .container { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 8px; padding-bottom: 8px; }
  .pj-meta .m { padding: 16px 0; margin-right: 0; border-right: none; }
  .pj-meta .m + .m { border-top: 1px solid var(--color-border); }
  .pj-meta .k { line-height: 1.35; }
  .pj-meta .v { margin-top: 2px; font-size: 18px; line-height: 1.35; }
  /* Abstände: Video → Galerie 24, Galerie unten 56 */
  .pj-video { padding-bottom: 24px; }
  .pj-gal { padding-bottom: 56px; }
  /* Galerie: 2-spaltiges Mosaik — normale Kacheln quadratisch, breite über 2 Spalten 16:10 */
  .pj-gal .gal { grid-auto-rows: auto; gap: 10px; }
  .pj-gal figure { aspect-ratio: 1; }
  .pj-gal figure.wide, .pj-gal figure.span-all { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  /* Video-Fassade: kleinerer Play-Button, kein zweites Play-Label */
  .pj-video .play { width: 64px; height: 44px; }
  .pj-video .play::before { border-left-width: 17px; border-top-width: 10px; border-bottom-width: 10px; margin-left: 3px; }
  .pj-video .vlabel { display: none; }
}
@media (max-width: 340px) {
  .pj-hero h1 { font-size: 8.4vw; }   /* 320 → 27 px: das lange Wort „„Schulte‑Schüppen“," passt sonst nicht in die Zeile */
}

/* ─── Projekt-Navigation: Vorheriges / Nächstes als schlanke Leiste am Ende der Galerie (kein eigener Abschnitt) ─── */
.pj-pager {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px;
  margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--color-border);
}
.pj-pager__link { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.pj-pager__link.next { justify-content: flex-end; text-align: right; }
.pj-pager__text { min-width: 0; }
.pj-pager__arrow {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border: 1px solid var(--color-border); color: var(--color-heading);
  transition: background-color .25s, border-color .25s, transform .2s;
}
.pj-pager__arrow svg { width: 22px; height: 22px; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pj-pager__dir { display: block; font-size: 17px; font-weight: 600; color: var(--color-text-muted); }
.pj-pager__t { display: block; margin-top: 2px; font-size: var(--font-size-h4); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--color-heading); text-wrap: balance; }
@media (hover: hover) {
  .pj-pager__link:hover .pj-pager__arrow { background: var(--color-brand-main); border-color: var(--color-brand-main); }
  .pj-pager__link.prev:hover .pj-pager__arrow svg { transform: translateX(-4px); }
  .pj-pager__link.next:hover .pj-pager__arrow svg { transform: translateX(4px); }
}
.pj-pager__link:active .pj-pager__arrow { transform: scale(.94); }
.pj-pager a:focus-visible { outline: 3px solid var(--color-brand-lighter); outline-offset: 4px; }
.pj-pager__nums { display: none; }   /* Nummern nur auf dem Handy (s. u.) */
@media (max-width: 980px) {
  .pj-pager { margin-top: 56px; gap: 24px; }
  .pj-pager__link { gap: 16px; }
}
@media (max-width: 767px) {
  /* eine Zeile: ← 1 … 3 … 10 → (Wunsch 30.10.). Projektnamen an den Pfeilen bleiben für Screenreader lesbar */
  .pj-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 40px; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
  .pj-pager__link { min-height: 0; }
  .pj-pager__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pj-pager__arrow { width: 44px; height: 44px; }
  .pj-pager__nums { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
  .pj-pager__nums a, .pj-pager__nums [aria-current] {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid transparent;
    font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text-muted);
    transition: border-color .25s, color .25s;
  }
  .pj-pager__nums [aria-current] { background: var(--color-brand-main); color: #fff; }
  .pj-pager__nums a:active { border-color: var(--color-brand-main); color: var(--color-heading); }
  .pj-pager__nums .gap { width: 16px; text-align: center; color: var(--color-text-muted); }
}

/* ─── Seiten-CTA: Abschluss jeder Unterseite (zentriert zwischen den LKW-Streifen, Button zur Kontaktseite) ─── */
.pg-cta { background: var(--color-bg-dark); }
.pg-cta .container {
  display: flex; flex-direction: column; align-items: center; gap: 40px;
  text-align: center; padding-top: 120px; padding-bottom: 128px;
}
.pg-cta h2 { margin: 14px auto 0; max-width: 22em; font-size: clamp(32px, 2.9vw, 48px); line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.pg-cta__sub { margin: 20px auto 0; max-width: 52ch; text-wrap: pretty; font-size: 18px; line-height: 1.6; color: var(--color-text-muted); }
/* Button(s) (kontakt.html statt Kontakt-Link: Leistungen/Projekte) */
.pg-cta__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 980px) {
  .pg-cta .container { padding-top: 88px; padding-bottom: 96px; }
}
@media (max-width: 767px) {
  .pg-cta .container { gap: 32px; padding-top: 64px; padding-bottom: 72px; }
  .pg-cta h2 { font-size: 30px; }
  .pg-cta__links { align-self: stretch; }
}

/* ─── „Nach oben" (lange Rechtstexte) ─── */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--color-bg-card); border: 1px solid var(--color-border); color: var(--color-heading);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden;   /* versteckt = nicht per Tab erreichbar */
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), border-color .25s, visibility 0s linear .3s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), border-color .25s, visibility 0s; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .to-top:hover { border-color: var(--color-brand-main); } }
.to-top:active { transform: scale(.95); }
.to-top:focus-visible { outline: 2px solid var(--color-brand-lighter); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ─── Schnellkontakt-Leiste (Handy, auch quer): Markup + Script in sections/footer.html ───
   56 px + Safe-Area, beide Ziele 44 px hoch. Unsichtbar per visibility, damit sie nicht fokussierbar ist. */
.callbar { display: none; }
@media (max-width: 767px), (pointer: coarse) and (max-height: 500px) {
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    padding: 5px 12px calc(6px + env(safe-area-inset-bottom));   /* + 1 px Linie = 56 px */
    background: var(--color-bg-dark); border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
    transform: translateY(110%); visibility: hidden;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .35s;
  }
  .callbar.is-on { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
  html.nav-open .callbar { transform: translateY(110%); visibility: hidden; }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px;
    font-size: 17px; font-weight: 700; letter-spacing: .02em;
  }
  .callbar__call { background: var(--color-brand-main); color: #fff; }
  .callbar__call svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .callbar__ask { border: 1.5px solid var(--color-text-muted); color: var(--color-heading); }
  .callbar a:active { transform: scale(.98); }
  .callbar a:focus-visible { outline: 2px solid var(--color-brand-lighter); outline-offset: 2px; }
  html.callbar-on body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }   /* nichts wird verdeckt */
  html.callbar-on .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .callbar, .callbar.is-on { transition: none; } }

/* ─── Intro-Loader: Logo blendet beim Einstieg in die Seite weich ein und wieder aus ───
   Das Kopf-Snippet jeder Seite setzt html.wg-intro nur, wenn man von außen kommt (kein Referrer von der eigenen Domain,
   kein Neuladen/Zurück) — ohne Cookie/Storage, also nichts, was in die Datenschutzerklärung müsste.
   index.html bzw. js/page.js setzen .wg-intro-out, sobald der Inhalt steht, und räumen danach ab.
   Ohne Markup: Fläche = body::before, Logo = body::after (sichtbar auch, solange body.is-loading versteckt ist). */
html.wg-intro body::before,
html.wg-intro body::after { content: ""; position: fixed; z-index: 10000; visibility: visible; }
html.wg-intro body::before {
  inset: 0; background: var(--color-bg-dark);
  transition: opacity .45s ease .1s;                    /* nach .55 s weg — das Script räumt bei 600 ms ab, dann startet der Hero */
  animation: wg-intro-failsafe .5s ease 6s forwards;   /* falls nie ein Script „fertig" meldet */
}
html.wg-intro body::after {
  top: 50%; left: 50%; width: 240px; height: 80px; margin: -40px 0 0 -120px;
  background: url('/assets/logo-wegener-stripes.svg') center / contain no-repeat;
  animation:
    wg-logo-in .8s cubic-bezier(.33, 0, .2, 1) both,
    wg-logo-breathe 1.4s ease-in-out .8s infinite alternate,
    wg-intro-failsafe .5s ease 6s forwards;
  transition: filter .45s ease;                         /* Ausblenden über filter, damit es nicht mit der Atem-Animation (opacity) kollidiert */
}
html.wg-intro-out body::before { opacity: 0; }
html.wg-intro-out body::after { filter: opacity(0); }
html.wg-intro-out body::before,
html.wg-intro-out body::after { pointer-events: none; }
/* Heros (Startseite, Unterseiten, Projektseiten) samt Kennzahlen-Band pausieren, bis der Loader komplett weg ist
   (html.wg-intro wird erst nach dem Ausblenden entfernt) — erst Logo, dann freie Sicht, dann das Intro von oben nach unten. */
html.wg-intro :is(.sk-hero, .hd, .pj-hero) *,
html.wg-intro :is(.hd + .pv-band, .hd + .au-stats, .pj-hero + .pj-meta),
html.wg-intro .pj-hero + .pj-meta .m { animation-play-state: paused !important; }
@keyframes wg-logo-in { from { opacity: 0; transform: scale(.94); } }
@keyframes wg-logo-breathe { to { opacity: .4; } }
@keyframes wg-intro-failsafe { to { opacity: 0; visibility: hidden; } }
@media (max-width: 767px) {
  html.wg-intro body::after { width: 180px; height: 60px; margin: -30px 0 0 -90px; }
}
@media (prefers-reduced-motion: reduce) {
  html.wg-intro body::after { animation: wg-intro-failsafe .5s ease 6s forwards; }
}
