:root {
  /* Theme A - Graphit + Signalorange (default) */
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-text: #1c1f24;
  --color-text-muted: #5b6169;
  --color-primary: #e8622c;
  --color-primary-dark: #c94e20;
  --color-border: #e2e4e8;
  --color-header-bg: rgba(255, 255, 255, 0.95);
  --color-hero-start: #1c1f24;
  --color-hero-mid: #33261f;
  --color-eyebrow: #f0c4a6;
  --color-hero-span: #f2a06b;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1120px;
  --radius: 10px;
}

:root[data-theme="navy"] {
  /* Theme B - Marineblau + Bernstein */
  --color-bg-alt: #f3f5f7;
  --color-text: #16324f;
  --color-text-muted: #55606b;
  --color-primary: #f2a93b;
  --color-primary-dark: #d6921f;
  --color-border: #e1e6ea;
  --color-hero-start: #16324f;
  --color-hero-mid: #1f4463;
  --color-eyebrow: #fbe2b8;
  --color-hero-span: #f2a93b;
}

:root[data-theme="petrol"] {
  /* Theme C - Anthrazit + Petrol */
  --color-bg-alt: #f4f6f6;
  --color-text: #23272b;
  --color-text-muted: #565c60;
  --color-primary: #1f8a93;
  --color-primary-dark: #176870;
  --color-border: #e2e6e6;
  --color-hero-start: #23272b;
  --color-hero-mid: #1c3a3d;
  --color-eyebrow: #b9e4e6;
  --color-hero-span: #4fd0d6;
}

:root[data-theme="beton"] {
  /* Theme D - Beton-Grau + Ziegelrot */
  --color-bg-alt: #f6f5f3;
  --color-text: #3d3a37;
  --color-text-muted: #625d58;
  --color-primary: #b3462c;
  --color-primary-dark: #95391f;
  --color-border: #e6e3df;
  --color-hero-start: #3d3a37;
  --color-hero-mid: #55362b;
  --color-eyebrow: #f0c2ae;
  --color-hero-span: #e2734f;
}

:root[data-theme="forest"] {
  /* Theme E - Waldgrün + Holzbeige */
  --color-bg-alt: #f5f4f0;
  --color-text: #2f3b2e;
  --color-text-muted: #5c655a;
  --color-primary: #a97c50;
  --color-primary-dark: #8c6540;
  --color-border: #e5e2da;
  --color-hero-start: #2f3b2e;
  --color-hero-mid: #3d4a35;
  --color-eyebrow: #d9c9a8;
  --color-hero-span: #c99a63;
}

:root[data-theme="copper"] {
  /* Theme F - Kohle + Kupfer */
  --color-bg-alt: #f6f5f4;
  --color-text: #242424;
  --color-text-muted: #5a5a5a;
  --color-primary: #c1682f;
  --color-primary-dark: #a1531f;
  --color-border: #e5e3e1;
  --color-hero-start: #1b1b1b;
  --color-hero-mid: #3a2415;
  --color-eyebrow: #f0cba0;
  --color-hero-span: #e08a45;
}

:root[data-theme="steel"] {
  /* Theme G - Stahlblau + Warmgrau */
  --color-bg-alt: #f4f5f6;
  --color-text: #2e3438;
  --color-text-muted: #5a6167;
  --color-primary: #4f7ea8;
  --color-primary-dark: #3d6488;
  --color-border: #e2e5e7;
  --color-hero-start: #232a2e;
  --color-hero-mid: #33454f;
  --color-eyebrow: #bcd7e8;
  --color-hero-span: #7fb3d5;
}

:root[data-theme="gold"] {
  /* Theme H - Tiefschwarz + Messing */
  --color-bg-alt: #f7f6f3;
  --color-text: #1a1a1a;
  --color-text-muted: #57544c;
  --color-primary: #b8944f;
  --color-primary-dark: #96742f;
  --color-border: #e8e4da;
  --color-hero-start: #0f0f0f;
  --color-hero-mid: #2b2410;
  --color-eyebrow: #e8d9b0;
  --color-hero-span: #d4af6a;
}

:root[data-theme="sandstein"] {
  /* Theme I - Sandstein + Kobalt */
  --color-bg-alt: #f7f5f1;
  --color-text: #3a3530;
  --color-text-muted: #6b6259;
  --color-primary: #2e5fa3;
  --color-primary-dark: #234a80;
  --color-border: #e9e4dc;
  --color-hero-start: #3a3530;
  --color-hero-mid: #2c3a52;
  --color-eyebrow: #c9d6ea;
  --color-hero-span: #5b8fd4;
}

:root[data-theme="olive"] {
  /* Theme J - Olive + Terrakotta */
  --color-bg-alt: #f6f5ee;
  --color-text: #33351f;
  --color-text-muted: #5f6350;
  --color-primary: #c1663f;
  --color-primary-dark: #a05132;
  --color-border: #e5e3d5;
  --color-hero-start: #33351f;
  --color-hero-mid: #4a3c25;
  --color-eyebrow: #f0d2ba;
  --color-hero-span: #d98652;
}

:root[data-theme="lime"] {
  /* Theme K - Schiefer + Limette */
  --color-bg-alt: #f4f6f2;
  --color-text: #2b2f33;
  --color-text-muted: #5b6167;
  --color-primary: #6ea315;
  --color-primary-dark: #587f10;
  --color-border: #e0e5db;
  --color-hero-start: #22262a;
  --color-hero-mid: #2c3b1f;
  --color-eyebrow: #dcead0;
  --color-hero-span: #9ed94a;
}

:root[data-theme="espresso"] {
  /* Theme L - Espresso + Elfenbein-Gold */
  --color-bg-alt: #f8f5f0;
  --color-text: #2b1f18;
  --color-text-muted: #6b5d52;
  --color-primary: #a3833f;
  --color-primary-dark: #846a30;
  --color-border: #ece5d8;
  --color-hero-start: #241a13;
  --color-hero-mid: #3d2a1a;
  --color-eyebrow: #ecdcb8;
  --color-hero-span: #cba861;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

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

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header-bar {
  background: var(--color-text);
}
.header-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 24px;
  padding: 6px 20px;
}
.header-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e7e8ea;
  font-size: 0.82rem;
  font-weight: 500;
}
.header-bar a:hover { color: #fff; text-decoration: none; }
.header-bar svg { width: 15px; height: 15px; flex-shrink: 0; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}
.logo span { color: var(--color-text-muted); font-weight: 400; }
.logo:hover { text-decoration: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.primary-nav a:not(.btn) {
  color: var(--color-text);
  font-weight: 500;
}
.primary-nav a:not(.btn):hover { color: var(--color-primary); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-ghost {
  border-color: var(--color-text);
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-text); color: #fff; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }

/* Hero */
.hero {
  position: relative;
  padding: 108px 0 84px;
  background: linear-gradient(160deg, var(--color-hero-start) 0%, var(--color-hero-mid) 45%, var(--color-primary) 130%);
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 26px);
}
.hero-inner { position: relative; max-width: 720px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--color-eyebrow);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}
.hero h1 span { color: var(--color-hero-span); }
.hero-lead {
  font-size: 1.1rem;
  color: #dcdde0;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero .btn-ghost { border-color: #fff; color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--color-text); }

.hero-trust {
  list-style: none;
  margin: 36px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #e7e5e2;
}
.hero-trust svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-hero-span);
}

/* Trust bar */
.trustbar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
}
.trustbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}
.trustbar-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.trustbar-logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.trustbar-logos li {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  opacity: 0.75;
  letter-spacing: 0.01em;
}

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-lead {
  color: var(--color-text-muted);
  max-width: 65ch;
  margin-bottom: 32px;
}

/* Grids */
.grid { display: grid; gap: 24px; }
.grid-services { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid-services { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-services { grid-template-columns: repeat(3, 1fr); }
}
.grid-usp { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid-usp { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-usp { grid-template-columns: repeat(4, 1fr); }
}
.grid-projects { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid-projects { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-projects { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
}
.card .icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  margin-bottom: 14px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.05rem; }
.card p { color: var(--color-text-muted); margin: 0; }

.usp h3 { font-size: 1.05rem; }
.usp p { color: var(--color-text-muted); margin: 0; }

/* Project placeholders */
.project-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  position: relative;
}
.project-card figcaption {
  padding: 16px;
  width: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
}
.project-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.85);
  color: var(--color-text);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.project-card p { margin: 0; font-size: 0.9rem; }
.ph-1 { background: linear-gradient(135deg, #5c6570, #33393f); }
.ph-2 { background: linear-gradient(135deg, #d4562a, #8a3a1e); }
.ph-3 { background: linear-gradient(135deg, #3b4a5a, #1c2530); }
.ph-4 { background: linear-gradient(135deg, #6b7a5e, #3c4634); }
.ph-5 { background: linear-gradient(135deg, #7a5c3b, #4a3521); }
.ph-6 { background: linear-gradient(135deg, #4a4a52, #24242a); }

/* About */
.about-inner p { max-width: 70ch; color: var(--color-text-muted); }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 620px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.steps li {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--color-text-muted); margin: 0; }

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.3rem;
  color: var(--color-primary);
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  max-width: 80ch;
  margin: 0 0 18px;
  color: var(--color-text-muted);
}

/* Kontakt */
.kontakt-inner {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
.kontakt-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}
.kontakt-card address { font-style: normal; color: var(--color-text-muted); }
.kontakt-card strong { color: var(--color-text); }

/* Footer */
.site-footer {
  background: #16181c;
  color: #c7c9cd;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 20px;
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner nav a { color: #c7c9cd; }
.footer-inner nav a:hover { color: #fff; }
.footer-inner p { margin: 0; font-size: 0.9rem; }

.legal-section {
  padding: 40px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #c7c9cd;
}
.legal-section h2 { color: #fff; }
.legal-section h3 { color: #fff; font-size: 1rem; margin-top: 1.6em; }
.legal-section a { color: #f2a06b; }

/* Standalone legal pages (Impressum, Datenschutz, Barrierefreiheit) */
.legal-page-inner {
  max-width: 74ch;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 600;
}
.legal-page h1 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 0.6em;
}
.legal-page h2 {
  font-size: 1.05rem;
  margin-top: 1.8em;
}
.legal-page p, .legal-page li {
  color: var(--color-text-muted);
}
.legal-page ul { padding-left: 1.2em; }
.legal-page li { margin-bottom: 0.4em; }

/* Back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-text);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--color-primary); }

/* Responsive */
@media (max-width: 560px) {
  .header-bar-inner { justify-content: center; gap: 16px; flex-wrap: wrap; }
  .header-bar a span { display: none; }
}

@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 14px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav .btn { text-align: center; }
}

@media (max-width: 780px) {
  .kontakt-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Dev-only theme switcher - remove before going live */
:root { --dev-bar-height: 44px; }

body { padding-top: var(--dev-bar-height); }

.theme-switcher {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--dev-bar-height);
  z-index: 2000;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  background: #16181c;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  padding: 4px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.theme-switcher-label { flex-shrink: 0; }
.theme-swatch { flex-shrink: 0; }

@media (min-width: 900px) {
  .theme-switcher { justify-content: center; }
}

.site-header { top: var(--dev-bar-height); }
.theme-switcher-label {
  color: #c7c9cd;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}
.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  font-size: 0;
  background: linear-gradient(135deg, var(--sw-a) 50%, var(--sw-b) 50%);
}
.theme-swatch:hover { border-color: #fff; }
.theme-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px #16181c, 0 0 0 4px #fff; }

@media (max-width: 560px) {
  .theme-switcher-label { display: none; }
  .theme-swatch { width: 24px; height: 24px; }
}
