/* BD Haus & Handwerk – Stylesheet
   Layout: Vollbild-Hero mit Zollstock-Kante → helle Betonflächen im Wechsel mit Anthrazit-Bändern,
   Inhalte auf 12-Spalten-Raster, max. 1240px. Bewusst ein einziges, festes Farbschema. */

:root {
  /* Farben */
  --ink: #16181b;          /* Anthrazit – Text, dunkle Flächen */
  --graphite: #23272c;     /* dunkle Fläche 2 */
  --concrete: #ebebe7;     /* heller Grund */
  --paper: #f8f8f6;        /* Karten / helle Fläche 2 */
  --line: #d3d2cc;         /* Linien auf hell */
  --line-dark: #383d44;    /* Linien auf dunkel */
  --muted: #585d64;        /* Fließtext sekundär auf hell */
  --muted-dark: #a9adb3;   /* Fließtext sekundär auf dunkel */
  --timber: #e8b21c;       /* Akzent: Firmen-Gold wie auf dem Fahrzeug (Flächen, Linien) */
  --timber-ink: #7d5c00;   /* Akzent als Text auf hell */
  --timber-light: #f0c24a; /* Akzent als Text auf dunkel */

  /* Schrift */
  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Typo-Skala */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --t-3xl: clamp(2.75rem, 1.6rem + 5.2vw, 6rem);

  /* Raum */
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --max: 1240px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; font-weight: 750; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

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

/* ---------- Eyebrow / Überschriften ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--f-display); font-size: var(--t-xs); font-weight: 650;
  letter-spacing: .14em; text-transform: uppercase; color: var(--timber-ink);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.on-dark .eyebrow { color: var(--timber-light); }

.h-section { font-size: var(--t-2xl); font-stretch: 112%; letter-spacing: -.01em; margin-top: .9rem; }
.lead { font-size: var(--t-lg); color: var(--muted); line-height: 1.6; }
.on-dark .lead { color: var(--muted-dark); }

.section { padding-block: var(--section); }
.section-head { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 1.1fr .9fr; align-items: end; gap: 4rem; }
}

.on-dark { background: var(--ink); color: #f2f2ef; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--timber); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-display); font-weight: 650; font-size: var(--t-sm); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; border: 2px solid var(--bg); border-radius: var(--radius); cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: translateY(101%); transition: transform .35s var(--ease);
}
.btn:hover { color: #fff; border-color: var(--ink); }
.btn:hover::after { transform: translateY(0); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost { --bg: transparent; --fg: currentColor; border-color: currentColor; }
.btn--ghost::after { background: var(--timber); }
.btn--ghost:hover { color: var(--ink); border-color: var(--timber); }
.on-dark .btn::after, .hero .btn::after { background: #fff; }
.on-dark .btn:hover, .hero .btn:hover { color: var(--ink); border-color: #fff; }
.on-dark .btn--ghost::after, .hero .btn--ghost::after { background: var(--timber); }
.on-dark .btn--ghost:hover, .hero .btn--ghost:hover { border-color: var(--timber); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 650; color: var(--timber-ink);
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--f-display); font-size: var(--t-sm); letter-spacing: .04em; text-transform: uppercase;
}
.link-arrow svg { transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  color: #fff;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
}
.site-header.is-solid, .page-legal .site-header {
  background: rgba(22, 24, 27, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 2px solid currentColor; border-radius: var(--radius);
  font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; font-stretch: 115%;
}
.brand-logo { height: 52px; width: auto; flex: none; }
.brand-logo--footer { height: 64px; }
@media (max-width: 420px) { .brand-logo { height: 44px; } }
.brand-logo.is-missing { display: none; }
.brand-logo:not(.is-missing) + .brand-mark { display: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--f-display); font-weight: 750; font-size: 1.05rem; letter-spacing: .01em; white-space: nowrap; }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--timber-light); white-space: nowrap; }

.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-list a {
  position: relative; display: block; padding: .6rem .85rem; text-decoration: none;
  font-weight: 550; font-size: var(--t-sm);
}
.nav-list a:not(.btn)::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 2px;
  background: var(--timber); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-list a:not(.btn):hover::after, .nav-list a[aria-current="true"]::after { transform: scaleX(1); }
.nav-list .btn { min-height: 44px; padding: .55rem 1.1rem; margin-left: .75rem; }

.nav-toggle {
  display: none; width: 48px; height: 48px; border: 2px solid currentColor; border-radius: var(--radius);
  background: transparent; cursor: pointer; place-items: center; flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .3s var(--ease), background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: 0; z-index: -1;
    padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
    background: var(--ink); color: #fff;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
    overflow-y: auto;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--line-dark); }
  .nav-list li:last-child { border: 0; padding-top: 1.5rem; }
  .nav-list a { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; padding: 1rem 0; }
  .nav-list a:not(.btn)::after { display: none; }
  .nav-list .btn { margin: 0; width: 100%; min-height: 56px; font-size: 1rem; }
  .nav-open { overflow: hidden; }
}
@media (max-width: 420px) { .brand-sub { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff; background: var(--ink);
  min-height: clamp(600px, 92vh, 880px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(120px + env(safe-area-inset-top, 0px));
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; animation: heroZoom 14s var(--ease) both; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(22,24,27,.55) 0%, rgba(22,24,27,.15) 30%, rgba(22,24,27,.35) 55%, rgba(22,24,27,.92) 100%),
    linear-gradient(90deg, rgba(22,24,27,.78) 0%, rgba(22,24,27,.45) 45%, rgba(22,24,27,0) 75%);
}
.hero-content { padding-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.hero .eyebrow { color: var(--timber-light); }
.hero-title {
  font-size: var(--t-3xl); font-stretch: 118%; font-weight: 800; letter-spacing: -.015em; line-height: .98;
  margin-top: 1.1rem; max-width: 14ch;
}
.hero-title .amp { color: var(--timber-light); }
.hero-sub { margin-top: 1.4rem; max-width: 40rem; font-size: var(--t-lg); color: rgba(255,255,255,.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.22);
  margin-top: clamp(2.5rem, 2rem + 3vw, 4rem); list-style: none;
}
.hero-facts li { padding: 1.2rem 1.25rem 1.3rem 0; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hero-facts li + li { padding-left: 1.25rem; border-left: 1px solid rgba(255,255,255,.22); }
.hero-facts strong { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; }
.hero-facts span { font-size: var(--t-xs); color: rgba(255,255,255,.7); }
@media (max-width: 680px) {
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts li, .hero-facts li + li { padding: .8rem 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .hero-facts li:first-child { border-top: 0; }
}

/* Zollstock-Kante */
.ruler {
  height: 22px; position: relative;
  background-color: var(--timber);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 100px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 50px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px);
  background-size: 100% 12px, 100% 9px, 100% 5px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 0, 0 0;
}
.ruler::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(0,0,0,.25); }

/* Lade-Animation Hero */
.hero .anim { animation: rise .9s var(--ease) both; }
.hero .anim-1 { animation-delay: .1s; }
.hero .anim-2 { animation-delay: .22s; }
.hero .anim-3 { animation-delay: .34s; }
.hero .anim-4 { animation-delay: .46s; }
.hero .anim-5 { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Bild-Platzhalter (falls Bilddatei fehlt) ---------- */
.media { position: relative; overflow: hidden; background: var(--graphite); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing img { opacity: 0; }
.media.is-missing {
  background-color: var(--graphite);
  background-image:
    repeating-linear-gradient(115deg, rgba(232,178,28,.10) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 1px, transparent 1px 38px);
}
.media.is-missing::after {
  content: attr(data-label); position: absolute; left: 14px; bottom: 12px; right: 14px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55);
}

/* ---------- Intro ---------- */
.intro-grid { display: grid; gap: clamp(2.5rem, 2rem + 4vw, 6rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .intro-grid { grid-template-columns: 1.05fr .95fr; } }
.intro-text { display: grid; gap: 1.4rem; min-width: 0; }
.intro-text p { color: var(--muted); max-width: 62ch; }
.intro-text .lead { color: var(--ink); }
.intro-figure { position: relative; margin: 0; padding: 0 0 22px 22px; }
.intro-figure::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: 62%; height: 70%;
  border: 2px solid var(--timber); border-radius: var(--radius);
}
.intro-figure .media { aspect-ratio: 4 / 5; border-radius: var(--radius); max-width: 100%; }
.intro-sign { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.intro-sign div { display: flex; flex-direction: column; padding-top: 1rem; }
.intro-sign strong { font-family: var(--f-display); font-weight: 700; }
.intro-sign span { font-size: var(--t-xs); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Leistungen ---------- */
.services { background: var(--paper); }
.svc-grid { display: grid; gap: clamp(1rem, .5rem + 1.5vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); list-style: none; }
.svc-card {
  position: relative; display: flex; flex-direction: column; background: var(--concrete);
  border-radius: var(--radius); overflow: hidden; min-width: 0;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(22,24,27,.35); }
.svc-card .media { aspect-ratio: 6 / 4.4; }
.svc-card .media img { transition: transform .8s var(--ease); }
.svc-card:hover .media img { transform: scale(1.05); }
.svc-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.5rem 1.5rem 1.6rem; flex: 1; }
.svc-body h3 { font-size: var(--t-xl); font-stretch: 108%; }
.svc-body p { color: var(--muted); font-size: var(--t-sm); flex: 1; }
.svc-body .link-arrow { margin-top: .6rem; align-self: flex-start; }
.svc-body .link-arrow::before { content: ""; position: absolute; inset: 0; } /* ganze Karte klickbar */
.svc-detail { display: none; }

/* ---------- Dialog (Leistung + Lightbox) ---------- */
dialog { border: 0; padding: 0; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(14,15,17,.82); backdrop-filter: blur(3px); }
dialog[open] { animation: dlgIn .35s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.svc-dialog {
  width: min(980px, calc(100vw - 2 * 16px)); max-height: calc(100dvh - 32px);
  background: var(--paper); border-radius: var(--radius); overflow: auto;
}
.svc-dialog-inner { display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px) { .svc-dialog-inner { grid-template-columns: 1fr 1fr; } }
.svc-dialog .media { aspect-ratio: 4 / 3; min-height: 100%; }
@media (max-width: 819px) { .svc-dialog .media { min-height: 0; } }
.svc-dialog-body { padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.svc-dialog-body h2 { font-size: var(--t-2xl); font-stretch: 110%; }
.svc-dialog-body p { color: var(--muted); }
.checklist { list-style: none; display: grid; gap: .6rem; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.05rem; height: 1.05rem; border-radius: 2px;
  background: var(--timber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%2316181b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.dlg-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--ink); color: #fff; border: 0; border-radius: var(--radius); cursor: pointer; transition: background .2s;
}
.dlg-close:hover { background: var(--timber); color: var(--ink); }
.svc-dialog-body .btn { align-self: flex-start; margin-top: .5rem; }

/* ---------- Individuelle Projekte ---------- */
.custom-grid { display: grid; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .custom-grid { grid-template-columns: 1fr 1fr; } }
.custom-grid .media { min-height: 340px; }
.custom-text { padding: clamp(2.5rem, 2rem + 4vw, 6rem) var(--gutter); display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; max-width: 640px; }
.custom-text p { color: var(--muted-dark); }
.custom-text .btn { align-self: flex-start; margin-top: .6rem; }

/* ---------- Galerie ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
  border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: .5rem 1.05rem; cursor: pointer;
  font-size: var(--t-sm); font-weight: 600; min-height: 42px; transition: background .25s, border-color .25s, color .25s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery { display: grid; gap: clamp(.6rem, .4rem + .6vw, 1rem); grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; list-style: none; }
.gallery li { grid-column: span 4; min-width: 0; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.gallery li.wide { grid-column: span 8; }
.gallery li.is-hidden { display: none; }
@media (max-width: 900px) { .gallery li, .gallery li.wide { grid-column: span 6; } }
@media (max-width: 560px) { .gallery li, .gallery li.wide { grid-column: span 12; } }
.g-item {
  position: relative; display: block; width: 100%; border: 0; padding: 0; cursor: zoom-in; background: none; text-align: left;
  border-radius: var(--radius); overflow: hidden;
}
.g-item .media { display: block; aspect-ratio: 4 / 5; }
.gallery li.wide .g-item .media { aspect-ratio: 8 / 5; }
.gallery li.wide .g-item { height: 100%; }
.g-item img { transition: transform .8s var(--ease), filter .5s; }
.g-item:hover img { transform: scale(1.05); }
.g-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1rem .9rem; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(22,24,27,.85));
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
  font-family: var(--f-display); font-weight: 650; font-size: var(--t-sm);
  transform: translateY(8px); opacity: .92; transition: transform .4s var(--ease), opacity .4s;
}
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { transform: none; opacity: 1; }
.g-cap svg { flex: none; }

.lightbox { width: 100vw; height: 100dvh; background: transparent; }
.lightbox[open] { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.lb-stage { position: relative; width: min(1200px, 100vw - 32px); display: flex; flex-direction: column; gap: .9rem; }
.lb-stage .media { width: 100%; max-height: calc(100dvh - 170px); aspect-ratio: 3 / 2; background: #000; border-radius: var(--radius); }
.lb-stage .media img { object-fit: contain; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #fff; }
.lb-cap { font-family: var(--f-display); font-weight: 650; min-width: 0; }
.lb-count { font-size: var(--t-xs); color: var(--muted-dark); font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.lb-nav { display: flex; gap: .5rem; flex: none; }
.lb-btn {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius);
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); cursor: pointer; transition: background .2s, color .2s;
}
.lb-btn:hover { background: var(--timber); color: var(--ink); border-color: var(--timber); }
.lightbox .dlg-close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }

/* ---------- Vorteile ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--line-dark); list-style: none; }
.why-grid li { padding: 2rem 1.75rem 2.2rem 0; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
@media (min-width: 600px) { .why-grid li + li { padding-left: 1.75rem; border-left: 1px solid var(--line-dark); } }
@media (max-width: 599px) { .why-grid li + li { border-top: 1px solid var(--line-dark); } }
.why-ico { width: 46px; height: 46px; display: grid; place-items: center; color: var(--timber-light); border: 1.5px solid var(--line-dark); border-radius: var(--radius); }
.why-grid h3 { font-size: 1.3rem; font-stretch: 108%; }
.why-grid p { color: var(--muted-dark); font-size: var(--t-sm); }

/* ---------- Über uns ---------- */
.about-grid { display: grid; gap: clamp(2.5rem, 2rem + 4vw, 6rem); grid-template-columns: 1fr; }
@media (min-width: 960px) { .about-grid { grid-template-columns: .85fr 1.15fr; } }
.about-aside { display: flex; flex-direction: column; gap: 1.6rem; min-width: 0; }
@media (min-width: 960px) { .about-aside { position: sticky; top: 110px; align-self: start; } }
.about-text { display: grid; gap: 1.2rem; min-width: 0; }
.about-text p { color: var(--muted); max-width: 64ch; }
.about-text .strong { color: var(--ink); font-weight: 600; font-size: var(--t-lg); }
.quote {
  margin: 1rem 0 0; padding: 1.8rem 0 0; border-top: 2px solid var(--ink);
  font-family: var(--f-display); font-size: var(--t-xl); font-weight: 700; font-stretch: 105%; line-height: 1.25;
}
.quote::before { content: "„"; color: var(--timber); }
.quote::after { content: "“"; color: var(--timber); }
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.team div { background: var(--paper); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; min-width: 0; }
.team strong { font-family: var(--f-display); font-weight: 700; }
.team span { font-size: var(--t-xs); color: var(--muted); }
.badge-note { font-size: var(--t-sm); color: var(--muted); border-left: 2px solid var(--timber); padding-left: 1rem; }

/* ---------- Ablauf ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(1rem, .5rem + 1.5vw, 1.75rem); list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; background: var(--paper); border-radius: var(--radius); padding: 2rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--f-display); font-weight: 800; font-stretch: 120%;
  font-size: 2.4rem; line-height: 1; color: var(--timber); font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.3rem; font-stretch: 108%; }
.steps p { color: var(--muted); font-size: var(--t-sm); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 980px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1.6rem; min-width: 0; }
.contact-list { list-style: none; display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.contact-list li { background: var(--graphite); }
.contact-row { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; text-decoration: none; min-width: 0; transition: background .25s; }
a.contact-row:hover { background: #2c3137; }
.contact-row .ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius); background: var(--ink); color: var(--timber-light); }
.contact-row div { display: flex; flex-direction: column; min-width: 0; }
.contact-row small { font-size: var(--t-xs); color: var(--muted-dark); letter-spacing: .06em; text-transform: uppercase; }
.contact-row strong { font-family: var(--f-display); font-weight: 650; font-size: 1.08rem; overflow-wrap: anywhere; }

.form { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); display: grid; gap: 1.1rem; min-width: 0; }
.form h3 { font-size: var(--t-xl); font-stretch: 108%; }
.form-intro { color: var(--muted); font-size: var(--t-sm); }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label { font-weight: 600; font-size: var(--t-sm); }
.field label .req { color: var(--timber-ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; min-height: 50px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(232,178,28,.4); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #a23a25; }
.field .err { color: #a23a25; font-size: var(--t-xs); min-height: 0; }
.drop {
  position: relative; border: 1.5px dashed #b9b8b1; border-radius: var(--radius); background: #fff;
  padding: 1.2rem; display: flex; gap: 1rem; align-items: center; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.is-over { border-color: var(--timber); background: #fdf8e8; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--concrete); border-radius: var(--radius); color: var(--timber-ink); }
.drop p { font-size: var(--t-sm); color: var(--muted); }
.drop p strong { color: var(--ink); }
.file-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.file-list li { font-size: var(--t-xs); background: var(--concrete); border-radius: 999px; padding: .3rem .75rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-note { font-size: var(--t-xs); color: var(--muted); }
.form-note a { color: var(--timber-ink); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form .btn::after { background: var(--ink); }
.form .btn:hover { color: #fff; border-color: var(--ink); }
.form-status { border-radius: var(--radius); padding: 1rem 1.1rem; font-size: var(--t-sm); background: #eef3ea; border: 1px solid #b8cfa9; color: #23401a; }
.form-status.is-error { background: #f8ece9; border-color: #e0b3a8; color: #6c2416; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1113; color: #d9dad7; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-block: clamp(3.5rem, 3rem + 3vw, 5.5rem) 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h2 { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--timber-light); margin-bottom: 1rem; font-weight: 650; }
.footer-grid ul { list-style: none; display: grid; gap: .45rem; }
.footer-grid a { text-decoration: none; color: #d9dad7; transition: color .2s; }
.footer-grid a:hover { color: var(--timber-light); }
.footer-grid p { color: var(--muted-dark); font-size: var(--t-sm); max-width: 36ch; }
.footer-brand { display: flex; flex-direction: column; gap: 1.2rem; }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-block: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: var(--t-xs); color: var(--muted-dark); }
.footer-bottom a { color: var(--muted-dark); }
.footer-bottom nav { display: flex; gap: 1.2rem; }

/* Mobile Anfrage-Leiste */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(22,24,27,.96); box-shadow: 0 -1px 0 var(--line-dark);
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { width: 100%; }
@media (max-width: 760px) { .mobile-cta { display: block; } body:not(.page-legal) .site-footer { padding-bottom: 76px; } }

/* ---------- Rechtliche Seiten ---------- */
.legal-hero { background: var(--ink); color: #fff; padding: calc(140px + env(safe-area-inset-top, 0px)) 0 3.5rem; }
.legal-hero h1 { font-size: var(--t-2xl); font-stretch: 112%; margin-top: .9rem; }
.legal { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.legal-body { max-width: 760px; background: var(--paper); border-radius: var(--radius); padding: clamp(1.4rem, 1rem + 3vw, 3.5rem); }
.legal-body > * + * { margin-top: 1rem; }
.legal-body h2 { font-size: var(--t-xl); font-stretch: 106%; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.12rem; margin-top: 1.8rem; }
.legal-body h4 { font-size: 1rem; margin-top: 1.4rem; }
.legal-body p, .legal-body li { color: #33373c; }
.legal-body ul, .legal-body ol { padding-left: 1.3rem; display: grid; gap: .25rem; }
.legal-body a { color: var(--timber-ink); overflow-wrap: anywhere; }

/* ---------- Scroll-Einblendung ---------- */
.reveal-pending { opacity: 0; transform: translateY(26px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-pending { opacity: 1; transform: none; }
}
.g-item .media.is-missing::after { display: none; }

.about-figure { margin: 0; }
.about-figure .media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.about-figure img { object-position: 50% 45%; }
@media (max-width: 560px) { .gallery li.wide .g-item .media { aspect-ratio: 4 / 3; height: auto; } }
.hero-media.media { position: absolute; inset: 0; }

/* ---------- Referenzprojekt ---------- */
.ref-grid { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4.5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .ref-grid { grid-template-columns: .8fr 1.2fr; } }
.ref-hero { margin: 0; min-width: 0; }
@media (min-width: 900px) { .ref-hero { position: sticky; top: 110px; } }
.ref-hero-list, .ref-thumbs { list-style: none; }
.ref-hero .media { aspect-ratio: 4 / 5; }
.ref-steps { list-style: none; counter-reset: ref; display: grid; gap: 0; min-width: 0; }
.ref-steps > li { counter-increment: ref; position: relative; padding: 0 0 2.4rem 4.2rem; display: grid; gap: .8rem; }
.ref-steps > li::before {
  content: counter(ref, decimal-leading-zero); position: absolute; left: 0; top: -.2rem;
  width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: var(--radius);
  background: var(--ink); color: var(--timber-light); font-family: var(--f-display); font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.ref-steps > li::after { content: ""; position: absolute; left: 1.45rem; top: 3rem; bottom: .4rem; width: 2px; background: var(--line); }
.ref-steps > li:last-child { padding-bottom: 0; }
.ref-steps > li:last-child::after { display: none; }
.ref-steps h3 { font-size: var(--t-xl); font-stretch: 108%; }
.ref-steps p { color: var(--muted); max-width: 58ch; }
.ref-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: .3rem; max-width: 560px; }
.ref-thumbs .media { aspect-ratio: 1 / 1; }
.ref-thumbs .g-cap { padding: 1.5rem .6rem .5rem; justify-content: flex-end; }
@media (max-width: 480px) { .ref-steps > li { padding-left: 3.6rem; } .ref-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Leistungs-Dialog: Bild und Text sauber nebeneinander, nie übereinander */
@media (min-width: 820px) { .svc-dialog-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.svc-dialog-inner > * { min-width: 0; }
.svc-dialog .media { position: relative; overflow: hidden; }
.svc-dialog .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 820px) { .svc-dialog .media { aspect-ratio: auto; width: 100%; min-height: 420px; height: 100%; } }

/* Lange deutsche Wörter: sauber umbrechen statt seitlich zu scrollen */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.svc-dialog { overflow-x: hidden; }
.svc-dialog-body h2 { font-size: min(var(--t-2xl), 8.4vw); }
.svc-body h3 { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.85rem); }

/* Einblenden beim Scrollen nur noch als leichte Bewegung – Inhalte sind immer sichtbar */
.reveal-pending { opacity: 1; }
/* Titelbild Kran (Hochformat): Ausschnitt auf Holzbau und Kran */
.hero-media img { object-position: 55% 58%; }

/* Referenzprojekte: Projekt-Auswahl */
.ref-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.ref-tabs .chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ref-panel[hidden] { display: none; }
.ref-panel { animation: rise .45s var(--ease) both; }
.ref-lead { font-size: var(--t-lg); color: var(--muted); margin-bottom: 1.6rem; max-width: 60ch; }
.ref-steps { margin: 0; padding: 0; }
.ref-steps .link-arrow { justify-self: start; }
.ref-steps--single > li { padding-left: 0; }
.ref-steps--single > li::before, .ref-steps--single > li::after { display: none; }
.ref-steps--single > li + li { padding-top: 1.6rem; border-top: 1px solid var(--line); }
.ref-steps--single > li { padding-bottom: 1.6rem; }
.ref-steps--single > li:last-child { border-top: 0; padding-top: 0; }
@media (min-width: 600px) { #ref-terrassen .ref-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 100%; } }
.ref-label { font-family: var(--f-display); font-size: var(--t-xs); font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--timber-ink); margin-top: .4rem; }
@media (min-width: 600px) { #ref-naturtheater .ref-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 100%; } }
.gallery li.is-collapsed { display: none; }
.gallery-more { display: flex; justify-content: center; margin-top: 2rem; }
.gallery-more[hidden] { display: none; }
.hero-slogan { margin-top: 1.2rem; font-family: var(--f-display); font-weight: 700; font-stretch: 112%; font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.4rem); line-height: 1.15; color: var(--timber-light); letter-spacing: -.005em; }
