:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #eef2f6;
  --text: #15202b;
  --muted: #566475;
  --line: #dde3ea;
  --accent: #1d7289;
  --accent-hover: #155a6d;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1f5;
  --hero-from: #0e1a24;
  --hero-to: #1a5568;
  --footer-bg: #0e1a24;
  --hero-text: #f2f8fa;
  --warn-bg: #fff3c4;
  --warn-text: #5c4600;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 30, 45, .06), 0 6px 20px rgba(15, 30, 45, .06);
  --max: 1080px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131a;
    --surface: #151e28;
    --surface-alt: #1b2631;
    --text: #e7edf3;
    --muted: #9eabbb;
    --line: #253241;
    --accent: #4cc3d6;
    --accent-hover: #7bd6e5;
    --accent-ink: #06222a;
    --accent-soft: #14323a;
    --hero-from: #08111a;
    --hero-to: #123f4c;
    --footer-bg: #060c12;
    --warn-bg: #4a3b00;
    --warn-text: #ffe9a3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .01em;
  text-decoration: none;
}
.brand small {
  color: var(--muted);
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  align-self: center;
  display: block;
  width: 62px;
  height: 46px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 8px;
}
.brand-mark img { display: block; width: 96px; max-width: none; height: auto; margin: 0 0 0 -1px; }

.site-nav ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.nav-cta {
  padding: 6px 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
}
.site-nav a.nav-cta:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
  padding: 72px 0 56px;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-logo {
  justify-self: end;
  margin: 0;
  padding: 22px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.hero-logo img { display: block; width: 240px; max-width: 100%; height: auto; }
.hero h1 em { font-style: normal; color: #86dcea; }
.hero h1 {
  margin: 0 0 20px;
  max-width: 20ch;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.hero .lead {
  margin: 0 0 32px;
  max-width: 60ch;
  font-size: 1.15rem;
  opacity: .92;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: #ffffff; color: #0f2a3d; }
.btn-primary:hover { background: #dff3f7; color: #0f2a3d; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #ffffff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #ffffff; }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--accent-hover); color: var(--accent-ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.stats li {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
}
.stats strong { display: block; font-size: 1.7rem; line-height: 1.15; }
.stats span { font-size: .88rem; opacity: .85; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--surface-alt); }

.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.section-head p { margin: 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.3; }
.card p { margin: 0 0 10px; color: var(--muted); }
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.card li + li { margin-top: 4px; }

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.icon svg { width: 24px; height: 24px; }

/* ---------- Ablauf ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 20px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .9rem;
}
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .92rem; }

/* ---------- Projekte ---------- */
.case {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.case-meta {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.case h3 { margin: 0 0 12px; font-size: 1.45rem; line-height: 1.25; }
.case > p { margin: 0 0 20px; max-width: 70ch; color: var(--muted); }

.case-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
.case-cols h4 {
  margin: 0 0 8px;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-cols ul { margin: 0 0 8px; padding-left: 1.1em; }
.case-cols li + li { margin-top: 5px; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}
.facts div {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: 10px;
}
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.25rem; font-weight: 700; }

.timeline { margin: 32px 0 0; padding: 0; list-style: none; }
.timeline li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.timeline time { color: var(--muted); font-size: .92rem; font-weight: 600; }
.timeline h3 { margin: 0 0 2px; font-size: 1.12rem; }
.timeline .org { margin: 0 0 8px; color: var(--muted); font-size: .95rem; }
.timeline ul { margin: 0; padding-left: 1.1em; }
.timeline li li { display: list-item; padding: 0; border: 0; margin-top: 4px; }

/* ---------- Technologien ---------- */
.tech-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tech-groups h3 { margin: 0 0 10px; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
}

/* ---------- Profil ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.about p { margin: 0 0 16px; }
.about h3 { margin: 0 0 8px; font-size: 1.05rem; }
.about dl { margin: 0 0 24px; }
.about dt { font-weight: 600; }
.about dd { margin: 0 0 12px; color: var(--muted); }

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact address { font-style: normal; }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list span { display: inline-block; min-width: 80px; color: var(--muted); font-size: .9rem; }
.contact-list a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0 40px;
  background: var(--footer-bg);
  color: #b8c4d0;
  font-size: .92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer a { color: #b8c4d0; }
.site-footer a:hover { color: #ffffff; }
.site-footer nav a + a { margin-left: 18px; }

/* ---------- Rechtstexte ---------- */
.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 760px; }
.legal h1 { margin: 0 0 24px; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; }
.legal h2 { margin: 36px 0 8px; font-size: 1.25rem; line-height: 1.3; }
.legal h3 { margin: 24px 0 6px; font-size: 1.05rem; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; }
.legal address { font-style: normal; margin: 0 0 14px; }
.back { display: inline-block; margin-bottom: 20px; font-size: .95rem; }
mark.todo {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-text);
}

/* ---------- Herausforderung / Lösung ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
.risks { margin: 0; padding: 0; list-style: none; }
.risks li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.risks li:first-child { padding-top: 0; border-top: 0; }
.risks strong { display: block; color: var(--text); }

.answer {
  padding: 28px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.answer h3 { margin: 0 0 4px; font-size: 1.2rem; }
.answer ul { margin: 0; padding: 0; list-style: none; }
.answer li { position: relative; margin-top: 14px; padding-left: 30px; }
.answer li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details {
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1.2; }
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-logo { justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .case-cols, .about, .contact { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 40px; }
  section { padding: 48px 0; }
  .case { padding: 22px 18px; }
  .steps { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .site-header { position: static; }
  html { scroll-padding-top: 12px; }
  .site-nav ul { gap: 2px 12px; }
  .site-nav a { font-size: .9rem; }
}

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

@media print {
  .site-header, .cta { display: none; }
  .hero { background: none; color: #000; padding: 0; }
  section { padding: 24px 0; }
}
