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

:root {
  color-scheme: light dark;

  --bg:        #ffffff;
  --bg-soft:   #f6f7f9;
  --card:      #ffffff;
  --text:      #1b2430;
  --text-soft: #36414f;
  --text-soft2:#46515f;
  --muted:     #5f6b7a;
  --border:    #e1e5ea;
  --accent:    #1f3a5f;   /* Buttons, Flächen */
  --accent-hover: #162b47;
  --accent-text: #1f3a5f; /* Überschriften, Links */
  --on-accent: #ffffff;
  --todo-bg:   #fff8e1;
  --todo-border: #f0d98a;
  --serif:   'Source Serif 4', Georgia, serif;
  --sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0f141b;
    --bg-soft:   #151c26;
    --card:      #151c26;
    --text:      #e6eaf0;
    --text-soft: #c3ccd8;
    --text-soft2:#aeb9c7;
    --muted:     #98a3b3;
    --border:    #263040;
    --accent:    #3b6bb0;
    --accent-hover: #335e9e;
    --accent-text: #8fb3e6;
    --on-accent: #ffffff;
    --todo-bg:   #2a2410;
    --todo-border: #6b5a1f;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #0f141b;
  --bg-soft:   #151c26;
  --card:      #151c26;
  --text:      #e6eaf0;
  --text-soft: #c3ccd8;
  --text-soft2:#aeb9c7;
  --muted:     #98a3b3;
  --border:    #263040;
  --accent:    #3b6bb0;
  --accent-hover: #335e9e;
  --accent-text: #8fb3e6;
  --on-accent: #ffffff;
  --todo-bg:   #2a2410;
  --todo-border: #6b5a1f;
}

:root[data-theme="light"] { color-scheme: light; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.5rem; }

/* ── HEADER ───────────────────────────────────── */
header { border-bottom: 1px solid var(--border); }
.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 600; font-size: 0.95rem; text-decoration: none; letter-spacing: 0.01em; }
nav { display: flex; gap: 1.75rem; }
nav a { font-size: 0.9rem; color: var(--muted); text-decoration: none; transition: color 0.15s; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-text); }

/* ── SCHMALE SEITEN (Start, Rechtliches, 404) ─── */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) 1.5rem;
}

.role, .eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin-bottom: 1.5rem;
}

.lead { max-width: 580px; font-size: 1.05rem; color: var(--text-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--accent);
  transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--accent-text); border-color: var(--accent-text); }
.btn-secondary:hover { background: var(--bg-soft); }

/* ── STARTSEITE: ABSCHNITTE ───────────────────── */
.home-section {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}
.home-section h2 { margin-bottom: 0.5rem; }
.home-section .section-intro { margin-bottom: 1.5rem; }
.home-section > p:not(.section-intro) { max-width: 600px; color: var(--text-soft); }

.card .more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.card .more:hover { border-bottom-color: var(--accent-text); }

.contact-links h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.contact-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.contact-links a {
  font-size: 0.95rem;
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.contact-links a:hover { border-bottom-color: var(--accent-text); }

/* ── LEISTUNGEN ───────────────────────────────── */
.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.2; max-width: 680px; margin-bottom: 1.25rem; }
.hero .btn-primary { margin-top: 2rem; }

.facts { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem 2rem;
  padding: 1.75rem 0;
}
.fact-key {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.fact-val { font-size: 0.98rem; font-weight: 500; }

section.block { padding: clamp(3rem, 7vw, 4.5rem) 0; }
section.block + section.block { border-top: 1px solid var(--border); }

h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}
.section-intro { color: var(--muted); max-width: 560px; margin-bottom: 2rem; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.card { border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; background: var(--card); }
.card h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.5rem; }
.card p { font-size: 0.92rem; color: var(--text-soft2); }
.card .meta { margin-top: 1rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); }

.steps { list-style: none; counter-reset: step; border-top: 1px solid var(--border); }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-text);
  line-height: 1.2;
}
.steps h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.steps p { font-size: 0.92rem; color: var(--text-soft2); max-width: 600px; }

.contact { background: var(--bg-soft); border-top: 1px solid var(--border); }
.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 3rem 0;
}
.contact h2 { margin-bottom: 0.25rem; }
.contact p { color: var(--muted); }

/* ── RECHTLICHES ──────────────────────────────── */
.legal h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.legal h2 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; color: var(--text); margin: 2rem 0 0.4rem; }
.legal p, .legal ul { max-width: 620px; font-size: 0.95rem; color: var(--text-soft); }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 0.75rem; }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--accent-text); }
.todo {
  background: var(--todo-bg);
  border: 1px solid var(--todo-border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 620px;
}

/* ── FOOTER ───────────────────────────────────── */
footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--accent-text); }
.footer-links { display: flex; gap: 1.25rem; }

@media (max-width: 520px) { nav { gap: 1.1rem; } }

/* ── THEME-UMSCHALTER ─────────────────────────── */
.header-inner { flex-wrap: wrap; gap: 0.5rem 1rem; }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--bg-soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }

/* Mond im hellen, Sonne im dunklen Modus */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
