/* ==========================================================
   team projekt – Ingenieurbüro Dipl.-Ing. Franciska Klügel
   Farben & Schriften zentral hier anpassen (:root)
   ========================================================== */

/* Schriften lokal (keine Verbindung zu Google) */
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Helle Darstellung */
  --bg: #ffffff;           /* Seitenhintergrund */
  --surface: #ffffff;      /* Karten */
  --paper: #f6f8fa;        /* abgesetzte Sektionen */
  --text: #0f1a24;
  --text-2: #1b2a38;
  --muted: #5b6b7a;
  --line: #dde3e9;
  --header-bg: rgba(255,255,255,.92);
  --shadow: 0 1px 2px rgba(15,26,36,.06), 0 8px 24px rgba(15,26,36,.06);
  --shadow-hover: 0 2px 4px rgba(15,26,36,.06), 0 20px 40px rgba(15,26,36,.1);

  /* Dunkle Flächen (Hero, Kontakt) – in beiden Modi dunkel */
  --dark: #0f1a24;
  --dark-2: #1b2a38;

  /* Akzentfarben */
  --accent: #e8622c;       /* Brandschutz-Orange */
  --accent-2: #2c8ce8;     /* Planung/Blau */
  --green: #2fa36b;        /* Energie */
  --yellow: #c99a1d;       /* SiGeKo */

  --radius: 14px;
  --max: 1200px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

/* Dunkle Darstellung: automatisch nach Systemeinstellung … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b131b; --surface: #121e29; --paper: #0e1821;
    --text: #e7edf2; --text-2: #c9d3dc; --muted: #93a3b2; --line: #24323f;
    --header-bg: rgba(11,19,27,.9);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-hover: 0 2px 4px rgba(0,0,0,.3), 0 20px 40px rgba(0,0,0,.4);
    --dark: #0d1720; --dark-2: #142230;
    --yellow: #e0b23a;
    color-scheme: dark;
  }
}
/* … oder per Schalter gewählt */
:root[data-theme="dark"] {
  --bg: #0b131b; --surface: #121e29; --paper: #0e1821;
  --text: #e7edf2; --text-2: #c9d3dc; --muted: #93a3b2; --line: #24323f;
  --header-bg: rgba(11,19,27,.9);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.3), 0 20px 40px rgba(0,0,0,.4);
  --dark: #0d1720; --dark-2: #142230;
  --yellow: #e0b23a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: .6em; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.on-dark .eyebrow { color: #ff9a6b; }

.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.4em; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: .95rem; border: 2px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #d4531f; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; color: #fff; transition: background .25s, box-shadow .25s, color .25s; }
.header.scrolled { background: var(--header-bg); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); color: var(--text); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent); flex: none;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: #fff; font-size: .95rem;
}
.logo-text { line-height: 1.1; min-width: 0; }
.logo-text strong { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.logo-text span { font-size: .75rem; opacity: .7; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.nav { display: flex; gap: 1.8rem; align-items: center; margin-right: 1rem; }
.nav a { text-decoration: none; color: inherit; opacity: .85; font-weight: 600; font-size: .93rem; }
.nav a:hover { opacity: 1; color: var(--accent); }
.nav .btn { color: #fff !important; opacity: 1; padding: .6em 1.1em; }
.icon-btn {
  background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; border-radius: 10px; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(127,127,127,.15); }
.icon-btn svg { width: 22px; height: 22px; }
.burger { display: none; }
/* Sonne im Dunkelmodus, Mond im Hellmodus */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
@media (max-width: 900px) {
  .burger { display: grid; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--surface); padding: 8px 16px 20px; box-shadow: 0 12px 24px rgba(0,0,0,.12);
    transform: translateY(-140%); transition: transform .25s;
  }
  .nav.open { transform: none; }
  .nav a { color: var(--text) !important; opacity: 1; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; justify-content: center; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--dark); overflow: hidden; padding: 160px 0 110px; }
.hero::before { /* Blaupausen-Raster */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; width: 700px; height: 700px; right: -200px; top: -200px;
  background: radial-gradient(circle, rgba(232,98,44,.28), transparent 65%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: 1.2rem; color: rgba(255,255,255,.75); max-width: 36em; margin: 1.2rem 0 2rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.4rem; }
.hero-tags span {
  font-family: var(--mono); font-size: .75rem; padding: .4em .8em; border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px; color: rgba(255,255,255,.75);
}
.hero-visual svg { width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero { padding: 120px 0 70px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { max-width: 420px; }
}

/* ---------- Kennzahlen ---------- */
.facts { background: var(--dark-2); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 20px; border-left: 1px solid rgba(255,255,255,.08); min-width: 0; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font-size: 1.6rem; font-weight: 800; }
.fact span { font-size: .85rem; color: rgba(255,255,255,.6); }
@media (max-width: 800px) {
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
}
@media (max-width: 500px) {
  .facts .wrap { grid-template-columns: 1fr; }
  .fact { padding: 16px 0; }
  .fact strong { font-size: 1.3rem; }
}

/* ---------- Sektionen ---------- */
section { padding: 110px 0; }
@media (max-width: 700px) { section { padding: 72px 0; } }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.bg-paper { background: var(--paper); }

/* ---------- Leistungen ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.services > * { min-width: 0; }
@media (max-width: 800px) { .services { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s, background-color .25s; position: relative;
}
.card:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--shadow-hover); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface)); color: var(--c, var(--accent));
}
.icon svg { width: 26px; height: 26px; }
.num { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.card p { color: var(--muted); }
.list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.list li { position: relative; padding-left: 26px; font-size: .96rem; }
.list li::before { content: ""; position: absolute; left: 0; top: .75em; width: 14px; height: 2px; background: var(--c, var(--accent)); }
.badge {
  display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .35em .7em; border-radius: 6px; background: var(--paper); color: var(--text-2); border: 1px solid var(--line);
}

/* Bilder in den Leistungskarten */
.card.has-img { padding-top: 0; overflow: hidden; }
.card-img { margin: 0 -32px 24px; height: 170px; overflow: hidden; background: var(--paper); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img.tape { /* Warnband-Motiv für SiGe-Koordination */
  background:
    linear-gradient(180deg, transparent 0 60%, rgba(15,26,36,.85) 60%),
    repeating-linear-gradient(-45deg, #f2b705 0 26px, #0f1a24 26px 52px);
}
:root[data-theme="dark"] .card-img img { filter: brightness(.88); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-img img { filter: brightness(.88); } }

/* Eigenständige Fachbereiche (eigene Webseiten) */
.partners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.partners > * { min-width: 0; }
@media (max-width: 800px) { .partners { grid-template-columns: 1fr; } }
.partner {
  border-radius: var(--radius); padding: 32px; color: #fff; text-decoration: none; position: relative; overflow: hidden;
  background: var(--dark); display: flex; flex-direction: column; min-height: 300px; transition: transform .2s;
  border: 1px solid rgba(255,255,255,.06);
}
.partner:hover { transform: translateY(-3px); }
.partner::after {
  content: ""; position: absolute; inset: auto -80px -80px auto; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%);
}
.partner-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28;
  transition: opacity .3s, transform .6s;
}
.partner:hover .partner-bg { opacity: .38; transform: scale(1.03); }
.partner > *:not(.partner-bg) { position: relative; z-index: 1; }
.partner .icon { background: rgba(255,255,255,.1); color: #fff; }
.partner p { color: rgba(255,255,255,.75); }
.partner .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 24px; }
.partner .chips span { font-size: .78rem; padding: .3em .7em; border-radius: 6px; background: rgba(255,255,255,.1); }
.partner .more { margin-top: auto; font-weight: 700; display: inline-flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.partner .more small { font-family: var(--mono); font-weight: 400; opacity: .6; }
.partner .badge { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.15); }

/* ---------- Ablauf ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.flow::before {
  content: ""; position: absolute; top: 27px; left: 10%; right: 10%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.step { text-align: center; padding: 0 12px; position: relative; }
.step .dot {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--c, var(--accent)); color: var(--c, var(--accent)); position: relative;
}
.step .dot svg { width: 24px; height: 24px; }
.step h3 { font-size: 1.02rem; margin-bottom: .3em; }
.step p { font-size: .88rem; color: var(--muted); }
.step .tag { font-family: var(--mono); font-size: .68rem; color: var(--c, var(--accent)); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow::before { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px); }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; text-align: left; padding: 0; }
  .step .dot { margin: 0; grid-row: span 3; }
}

/* ---------- Aktuelles ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .news { grid-template-columns: 1fr; } }
.news-item { display: flex; flex-direction: column; }
.news-item time { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.news-item h3 { margin: .6em 0 .4em; font-size: 1.12rem; }
.news-item p { font-size: .95rem; flex: 1; }
.news-item a.more { font-weight: 700; color: var(--accent); text-decoration: none; font-size: .92rem; }

/* ---------- Über mich ---------- */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
.about > * { min-width: 0; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 32px; } }
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); background: var(--dark); position: relative; overflow: hidden; max-width: 460px;
  box-shadow: var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait::after { /* Akzent-Ecke */
  content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 6px; background: var(--accent);
}
.quals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
@media (max-width: 600px) { .quals { grid-template-columns: 1fr; } }
.qual { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: .92rem; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); }
.qual svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.ee-logo { margin-top: 28px; max-width: 280px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* ---------- Kontakt ---------- */
.contact { background: var(--dark); color: #fff; }
.contact .section-head p { color: rgba(255,255,255,.65); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.contact-grid > * { min-width: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.cbox { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px; }
.cbox.primary { background: var(--accent); border-color: var(--accent); }
.cbox h3 { font-size: 1.05rem; }
.cbox p, .cbox a { color: rgba(255,255,255,.8); text-decoration: none; }
.cbox.primary p, .cbox.primary a { color: #fff; }
.cbox a:hover { text-decoration: underline; }
.cbox .big { font-size: 1.3rem; font-weight: 800; display: block; color: #fff; margin: .2em 0; overflow-wrap: anywhere; }
.cbox .tel { display: block; font-size: 1.15rem; font-weight: 700; color: #fff; margin: .2em 0 .8em; }
.cbox .label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }

/* ---------- Footer ---------- */
.footer { background: #080e14; color: rgba(255,255,255,.55); padding: 40px 0; font-size: .88rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer a { color: rgba(255,255,255,.75); text-decoration: none; margin-left: 20px; }
.footer a:first-child { margin-left: 0; }
.footer a:hover { color: #fff; }

/* ---------- Ein- und Ausblenden beim Scrollen ----------
   Verschoben wird über "translate" (nicht "transform"), damit der Hover-Effekt der Karten erhalten bleibt.
   1) Moderne Browser: Animation direkt an die Scrollposition gekoppelt (flüssig, auch beim Zurückscrollen).
   2) Andere Browser: Ein-/Ausblenden per JavaScript (Klasse "in"). */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .6s ease, translate .6s ease; }
.js .reveal.in { opacity: 1; translate: none; }

@supports (animation-timeline: view()) {
  /* Zwei Animationen mit festen Strecken – unabhängig von der Elementhöhe:
     Einblenden auf den ersten 160 px beim Hereinkommen (unten),
     Ausblenden auf den letzten 160 px beim Verlassen (oben). */
  .js .reveal, .js .reveal.in {
    opacity: 1; translate: none; transition: none;
    animation: reveal-in linear backwards, reveal-out linear forwards;
    animation-timeline: view(), view();
    animation-range: entry 0% entry 160px, exit calc(100% - 160px) exit 100%;
  }
  @keyframes reveal-in  { from { opacity: 0; translate: 0 44px; scale: .97; } to { opacity: 1; translate: none; scale: 1; } }
  @keyframes reveal-out { from { opacity: 1; translate: none; scale: 1; } to { opacity: 0; translate: 0 -28px; scale: .97; } }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.in { opacity: 1; translate: none; scale: none; transition: none; animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Unterseiten (Impressum/Datenschutz) ---------- */
.page { padding: 140px 0 80px; }
.page .wrap { max-width: 820px; }
.page h1 { font-size: 2.4rem; }
.page h2 { font-size: 1.35rem; margin-top: 2em; }
.page h3 { font-size: 1.08rem; margin-top: 1.5em; }
.page p, .page li { color: var(--text-2); }
.page a { color: var(--accent); }
.page .stand { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.back-link { text-decoration: none; font-weight: 600; font-size: .93rem; margin-right: .5rem; white-space: nowrap; }
.back-link:hover { color: var(--accent); }
@media (max-width: 420px) { .back-link span { display: none; } .back-link { font-size: 1.3rem; } }

/* ---------- Social Media (nur Links, keine eingebetteten Inhalte) ---------- */
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18); color: #fff !important; text-decoration: none !important; transition: background .2s, border-color .2s;
}
.social a:hover { background: var(--accent); border-color: var(--accent); }
.social a[href=""] { display: none; }
.social svg { width: 20px; height: 20px; }

/* ---------- Nach oben ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #d4531f; }
.to-top svg { width: 22px; height: 22px; }
@media (max-width: 600px) { .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; } }

/* ---------- Standort Dresden / Südheide ---------- */
.loc-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -24px 0 24px; }
.loc-switch__label { font-size: .92rem; color: rgba(255,255,255,.65); margin-right: 6px; }
.loc-switch button {
  font: inherit; font-size: .93rem; font-weight: 600; min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.25); background: transparent; color: #fff; display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, border-color .2s;
}
.loc-switch button:hover { border-color: #fff; }
.loc-switch button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--dark); }
.loc-switch button:disabled { opacity: .6; cursor: wait; }
.loc-switch__geo svg { width: 16px; height: 16px; }
.office { position: relative; transition: border-color .25s, background .25s; }
.office::before {
  content: "Ihr Standort"; position: absolute; top: -11px; right: 20px; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 3px 9px; border-radius: 6px;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
[data-active-region="dd"] .office[data-loc="dd"], [data-active-region="sh"] .office[data-loc="sh"] {
  border-color: var(--accent); background: rgba(232,98,44,.08);
}
[data-active-region="dd"] .office[data-loc="dd"]::before, [data-active-region="sh"] .office[data-loc="sh"]::before { opacity: 1; transform: none; }
@media (max-width: 600px) { .loc-switch__label { width: 100%; } .loc-switch { margin-top: -32px; } }

/* ==========================================================
   Verfeinerung Oktober 2026
   ========================================================== */

/* Weiche Seitenübergänge (moderne Browser, sonst ohne Wirkung) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* ---------- Hero-Animation ---------- */
/* Wärmehülle: wird jedes Mal neu gezeichnet, wenn das Startbild ins Bild kommt (Klasse "is-visible" per JavaScript).
   Ohne JavaScript ist die Linie einfach vollständig sichtbar. */
.hero-visual .envelope { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .hero-visual .envelope { stroke-dashoffset: 1; }
.js .hero-visual.is-visible .envelope { animation: draw 2.2s .3s ease-out forwards; }
.hero-visual .escape { animation: flow 1.2s linear infinite; }
.hero-visual .exit { transform-box: fill-box; transform-origin: center; animation: pulse 2s ease-in-out infinite; }
.hero-visual .drone { animation: hover 5s ease-in-out infinite; }
.hero-visual .scan { animation: scan 2.5s ease-in-out infinite; }
.hero-visual .rotor { transform-box: fill-box; transform-origin: center; animation: rotor .18s linear infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { to { stroke-dashoffset: -26; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .55; } }
@keyframes hover { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-14px, 5px); } 65% { transform: translate(8px, -4px); } }
@keyframes scan { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes rotor { 50% { transform: scaleX(.35); } }
@media (prefers-reduced-motion: reduce) {
  .hero-visual * { animation: none !important; }
  .hero-visual .envelope, .js .hero-visual .envelope { stroke-dashoffset: 0; }
}

/* ---------- Leistungen als Bento-Raster ---------- */
.services.bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento .wide { grid-column: span 2; padding: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.bento .wide .card-img { margin: 0; height: 100%; min-height: 280px; }
.bento .wide .card-body { padding: 32px; }
.bento .tall { grid-row: span 2; display: flex; flex-direction: column; }
.bento .tall .card-img { height: 240px; flex: none; }
.card-link { margin-top: auto; padding-top: 20px; font-weight: 700; font-size: .92rem; color: var(--c, var(--accent)); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
@media (max-width: 1000px) {
  .services.bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .tall { grid-row: auto; }
}
@media (max-width: 700px) {
  .services.bento { grid-template-columns: 1fr; }
  .bento .wide { grid-column: auto; display: block; }
  .bento .wide .card-img { height: 170px; min-height: 0; }
  .bento .wide .card-body { padding: 0 32px 32px; }
  .bento .tall .card-img { height: 170px; }
}

/* ---------- Nachweise (verlinkt) ---------- */
a.qual { color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
a.qual:hover { border-color: var(--accent); transform: translateY(-1px); }
a.qual span::after { content: " ↗"; color: var(--accent); }
.ee-link { display: inline-block; }

/* ---------- Referenzen ---------- */
.refs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .refs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .refs { grid-template-columns: 1fr; } }
.ref { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ref-img { aspect-ratio: 3 / 2; background: var(--paper); overflow: hidden; }
.ref-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ref:hover .ref-img img { transform: scale(1.04); }
.ref-body { padding: 22px 24px 26px; }
.ref-meta { font-family: var(--mono); font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ref h3 { margin: .5em 0 .4em; font-size: 1.1rem; }
.ref p { font-size: .94rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--c, var(--accent)); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative; display: grid; gap: 6px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--c, var(--accent)); }
.faq-tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--accent)); }
.faq-q { font-weight: 700; line-height: 1.35; }
.faq-item p { padding: 0 20px 20px; margin: 0; color: var(--muted); font-size: .96rem; }
.section-head a { color: var(--accent); }

/* ---------- Kontakt mit Formular ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-side { display: grid; gap: 16px; }
.contact-side .loc-switch { margin: 0 0 4px; }
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .offices { grid-template-columns: 1fr; } }
.offices .cbox { padding: 22px; }
.offices .cbox .tel { font-size: 1.05rem; }
.form {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px;
  display: grid; gap: 14px;
}
.form h3 { margin: 0 0 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.8); }
.field .opt { font-weight: 400; opacity: .6; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; padding: 11px 13px; width: 100%; min-height: 46px; transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select option { color: #0f1a24; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.1); }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.4); }
.field.invalid input { border-color: #ff7a59; }
.consent { display: flex; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.75); align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.consent a { color: #fff; }
.form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form-note { font-size: .8rem; color: rgba(255,255,255,.5); margin: 0; }
.form-status { margin: 0; font-size: .92rem; min-height: 1.2em; }
.form-status.err { color: #ffb199; }
.form-status.ok { color: #8fe0b5; }

/* ---------- Anrufleiste (nur Handy) ---------- */
.callbar { display: none; }
@media (max-width: 700px) {
  .callbar {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45;
    padding: 8px; border-radius: 16px; background: rgba(15,26,36,.92); backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translateY(140%); transition: transform .3s;
  }
  .callbar.show { transform: none; }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 10px;
    font-weight: 700; font-size: .95rem; text-decoration: none; color: #fff;
  }
  .callbar svg { width: 20px; height: 20px; }
  .callbar-tel { background: var(--accent); }
  .callbar-mail { border: 1px solid rgba(255,255,255,.25); }
  .to-top { bottom: 92px; }
  .footer { padding-bottom: 100px; }
}

/* Fußzeilen-Links umbrechen statt abschneiden */
.footer .wrap > span:last-child { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { margin-left: 0; }
/* ---------- Ablauf: Verbindungslinie läuft von Schritt 1 zu Schritt 5 ---------- */
.flow::before {
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, var(--line)) 0 8px, transparent 8px 14px);
  animation: flow-run .9s linear infinite;
}
@keyframes flow-run { to { background-position: 14px 0; } }
@media (max-width: 900px) {
  .flow::before {
    background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--accent) 55%, var(--line)) 0 8px, transparent 8px 14px);
    animation-name: flow-run-down;
  }
  @keyframes flow-run-down { to { background-position: 0 14px; } }
}
@media (prefers-reduced-motion: reduce) { .flow::before { animation: none; } }
/* ---------- 3D-Aufmaß: volle Breite, Zeichnung als Bild ---------- */
.bento .wide.full { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.scan-img { background: #0f1a24; }
.scan-img .scan-art { width: 100%; height: 100%; display: block; }
.scan-art .beam { animation: beam 3s ease-in-out infinite; }
@keyframes beam { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
.list.two-col { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
@media (max-width: 1000px) { .bento .wide.full { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .list.two-col { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .bento .wide.full .card-img { height: 200px; } }
@media (prefers-reduced-motion: reduce) { .scan-art .beam { animation: none; } }
/* ---------- 3D-Aufmaß: Bildband oben, Text und Liste nebeneinander ---------- */
.bento .full { grid-column: 1 / -1; padding: 0; display: block; }
.bento .full .card-img { margin: 0; height: auto; aspect-ratio: 1592 / 470; position: relative; }
.bento .full .card-img img { height: 100%; }
.card-img figcaption {
  position: absolute; right: 12px; bottom: 10px; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: rgba(15,26,36,.6); padding: 3px 8px; border-radius: 6px;
}
.bento .full .card-body { padding: 28px 32px 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; }
.bento .full .card-body > .list { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .bento .full .card-body { display: block; }
  .bento .full .card-body > .list { margin-top: 16px; }
}
@media (max-width: 700px) {
  .bento .full .card-img { aspect-ratio: auto; height: 210px; }
  .bento .full .card-img img { object-position: 22% center; }
  .bento .full .card-body { padding: 24px 32px 32px; }
}
/* Bildhinweis ("Symbolbild") in allen Karten */
.card-img { position: relative; }
figure.card-img img { width: 100%; height: 100%; object-fit: cover; }
/* Hervorgehobene Qualifikation über beide Spalten */
.qual-top { grid-column: 1 / -1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
/* Portrait läuft am Desktop neben der Qualifikationsliste mit */
@media (min-width: 901px) { .about .portrait { position: sticky; top: 100px; } }
/* ---------- Hintergrundbild Startbereich ----------
   Dresden: img/hero-dresden(.jpg | -hoch.jpg), Südheide-Seite: img/hero-suedheide(...) – Bilder einfach austauschen.
   Die Verläufe darüber sorgen für Lesbarkeit (links dunkler) und einen weichen Übergang zur Kennzahlenleiste. */
.hero {
  --hero-img: url("../img/hero-dresden.jpg");
  --hero-img-hoch: url("../img/hero-dresden-hoch.jpg");
  background:
    linear-gradient(180deg, rgba(13,22,31,0) 65%, rgba(20,34,48,.95) 100%),
    linear-gradient(90deg, rgba(13,22,31,.95) 0%, rgba(13,22,31,.86) 38%, rgba(13,22,31,.6) 68%, rgba(13,22,31,.7) 100%),
    var(--hero-img) right center / cover no-repeat,
    #0f1a24;
}
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(13,22,31,.72) 0%, rgba(13,22,31,.88) 45%, rgba(13,22,31,.97) 100%),
      var(--hero-img-hoch) center top / cover no-repeat,
      #0f1a24;
  }
}/* Südheide-Seite: eigene Hintergrundbilder (Heide statt Stadt) */
[data-region="sh"] .hero { --hero-img: url("../img/hero-suedheide.jpg"); --hero-img-hoch: url("../img/hero-suedheide-hoch.jpg"); }