/* =====================================================================
   Castlebyte IT – Landingpage
   Minimalistisches Design (Okt. 2026): monochrom hell / dunkelgrau,
   Farbe ausschließlich für Statusanzeigen (ok / warn / kritisch).
   Statisches HTML/CSS, Fonts selbst-gehostet (DSGVO)
   Bewegung (Nov. 2026): Abschnitt „Bewegung" am Dateiende, Logik in menu.js
   Media-Queries: 1040px (Nav → Burger), 1024px (Grids), 768px (mobil)
   ===================================================================== */

/* ===== Selbst-gehostete Fonts (DSGVO-konform, kein Google-CDN) ===== */
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/manrope-500.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/manrope-600.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/manrope-700.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:800; font-display:swap; src:url('fonts/manrope-800.woff2') format('woff2'); }

@font-face { font-family:'IBM Plex Sans'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/ibmplexsans-400.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Sans'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/ibmplexsans-500.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Sans'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/ibmplexsans-600.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Sans'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/ibmplexsans-700.woff2') format('woff2'); }

@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/jetbrainsmono-400.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/jetbrainsmono-500.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/jetbrainsmono-600.woff2') format('woff2'); }

/* ===== Design Tokens: hell ===== */
:root {
  color-scheme: light;

  /* Flächen */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --header-bg: rgba(250,250,250,0.85);

  /* Linien */
  --border: #e5e5e5;
  --border-strong: #d4d4d4;

  /* Text */
  --text: #171717;
  --body: #525252;
  --muted: #707070;
  --faint: #a3a3a3;          /* nur Deko (Trenner, Ziffern) */

  /* Primär-Aktion: monochrom, invertiert zur Seite */
  --primary: #171717;
  --primary-hover: #3f3f3f;
  --on-primary: #ffffff;
  --ring: rgba(23,23,23,0.14);

  /* Invertierte Fläche (Kontakt-Boxen) */
  --inverse: #171717;
  --inverse-border: #171717;
  --on-inverse: #fafafa;
  --on-inverse-muted: #a3a3a3;
  --on-inverse-hover: #d4d4d4;

  /* Status – die einzige Farbe der Seite */
  --ok: #22c55e;
  --warn: #f59e0b;
  --crit: #ef4444;
  --error-text: #b91c1c;

  /* Radien */
  --r-btn: 8px;
  --r-card: 12px;
  --r-box: 16px;
  --r-pill: 100px;

  /* Schatten (sparsam) */
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.04), 0 16px 40px -24px rgba(0,0,0,0.18);

  /* Fonts */
  --font-head: 'Manrope', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1180px;
  --pad-x: 40px;
}

/* ===== Dark Mode: dunkelgrau (Tokens umdefiniert – die ganze Seite kippt mit) ===== */
html.dark {
  color-scheme: dark;

  --bg: #1c1c1e;
  --surface: #262628;
  --surface-2: #2e2e31;
  --header-bg: rgba(28,28,30,0.85);

  --border: #3a3a3c;
  --border-strong: #4d4d50;

  --text: #f2f2f2;
  --body: #b8b8bd;
  --muted: #98989d;          /* ≥ 4.5:1 auch auf --surface-2 */
  --faint: #636366;

  --primary: #f2f2f2;
  --primary-hover: #d1d1d6;
  --on-primary: #1c1c1e;
  --ring: rgba(242,242,242,0.18);

  --inverse: #262628;
  --inverse-border: #3a3a3c;
  --on-inverse: #f2f2f2;
  --on-inverse-muted: #b8b8bd;
  --on-inverse-hover: #d1d1d6;

  --ok: #4ade80;
  --warn: #fbbf24;
  --crit: #f87171;
  --error-text: #f87171;

  --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 16px 40px -24px rgba(0,0,0,0.7);
}

/* Sanfter Übergang beim Theme-Wechsel */
body,
.site-header, .band, .card, .report-card, .teaser, .check-group, .faq-item,
.form-card, .cta, .page-cta, .field input, .field select, .field textarea {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ===== Layout-Helfer ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section { padding-top: 96px; padding-bottom: 96px; }
/* Zwei Abschnitte ohne Band dazwischen: Abstand nicht verdoppeln */
main > .container.section + .container.section { padding-top: 0; }
/* Anker-Ziele wegen Sticky-Header freistellen */
[id] { scroll-margin-top: 90px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.soft { color: var(--muted); }

/* Inline-Links: ohne Akzentfarbe nur über die Unterstreichung erkennbar */
.text-link,
.legal a.link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.text-link:hover,
.legal a.link:hover { text-decoration-color: currentColor; }

/* Gemeinsamer Stil der Abschnitts-Überschriften */
.section-head h2,
.section-intro h2,
.about-body h2,
.teaser h2,
.cta h2,
.page-cta h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 28px; height: 28px; color: var(--text); flex-shrink: 0; }
.brand-logo svg { display: block; width: 100%; height: 100%; }
.wordmark {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
  white-space: nowrap;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 8px; }

/* Burger (nur mobil sichtbar) */
.burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; }

/* Header-Actions (Sprache + Theme + Burger) – nur mobil sichtbar */
.header-actions { display: none; align-items: center; gap: 8px; }

/* Icon-Button (Theme) und Sprach-Toggle */
.icon-btn,
.lang-toggle {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  color: var(--body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn { width: 36px; }
.lang-toggle {
  min-width: 36px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.icon-btn:hover,
.lang-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* Sprachumschaltung: jeweils inaktive Sprache ausblenden */
html[data-lang="en"] .lang-de,
html[data-lang="de"] .lang-en { display: none; }

/* Mobile-Dropdown */
.mobile-menu { display: none; }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  padding-top: 104px;
  padding-bottom: 96px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero h1 .line { display: block; }
.hero-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
  margin-bottom: 36px;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Beispiel-Karte „IT-Check" */
.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-box);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.report-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.report-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}
.report-body { list-style: none; padding: 6px 22px; }
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}
.report-row:last-child { border-bottom: 0; }
.report-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--body);
  white-space: nowrap;
}
.report-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-ok .dot { background: var(--ok); }
.status-warn .dot { background: var(--warn); }
.status-crit .dot { background: var(--crit); }
.report-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}

/* ===== Abschnitts-Köpfe ===== */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head p { font-size: 17px; line-height: 1.6; color: var(--body); margin-top: 16px; }

/* ===== Leistungen ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover { border-color: var(--border-strong); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-icon svg { width: 20px; height: 20px; }
.card-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.card p { font-size: 15px; line-height: 1.6; color: var(--body); }
.card-list {
  list-style: none;
  padding: 18px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.card-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}
.card-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 1px;
  background: var(--muted);
}

/* ===== Wechsel-Band (leicht abgesetzter Hintergrund) ===== */
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ===== Vorgehen ===== */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
/* Linie als ::before statt border-top – sie wird beim Einblenden gezeichnet */
.step { position: relative; padding-top: 21px; }
.step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--step-line, var(--text));
  transform-origin: left center;
}
.step .num { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.step h3 { font-family: var(--font-head); font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; margin-bottom: 8px; }
.step p { font-size: 14.5px; line-height: 1.6; color: var(--body); }

/* ===== IT-Check-Teaser ===== */
.teaser-section { padding-top: 0; }
.teaser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-box);
  padding: 52px 56px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.teaser h2 { font-size: 32px; margin-bottom: 14px; }
.teaser p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  max-width: 520px;
  margin-bottom: 28px;
}

/* Check-Listen (Startseite + IT-Check) */
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--body); line-height: 1.55; }
.check-row .ic { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; }
.check-row .ic.ok { color: var(--text); }
.check-row .ic.no { color: var(--faint); }
.check-row.muted { color: var(--muted); }

/* ===== Rahmen: was ich biete und was nicht ===== */
.scope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.scope-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 30px;
}
.scope-col h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* ===== Über mich ===== */
.about { border-top: 1px solid var(--border); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  border-radius: var(--r-box);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo img { width: 100%; height: auto; }
.about-body h2 { margin-bottom: 22px; }
.about-body p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 16px;
  max-width: 560px;
}
.about-body p strong { color: var(--text); font-weight: 600; }
.creds {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.cred {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  border: 1px solid var(--border-strong);
  padding: 7px 13px;
  border-radius: var(--r-pill);
}
.cred .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text); flex-shrink: 0; }

/* ===== CTA ===== */
.cta {
  background: var(--inverse);
  border: 1px solid var(--inverse-border);
  border-radius: var(--r-box);
  padding: 56px;
}
.cta h2 { font-size: 34px; color: var(--on-inverse); margin-bottom: 12px; }
.cta p { font-size: 16px; line-height: 1.6; color: var(--on-inverse-muted); max-width: 520px; }

/* ===== Kontakt (Formular + Infos) ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  margin-top: 28px;
  align-items: start;
}
.honeypot { display: none; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-box);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  padding: 12px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--ring);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.form-submit { width: 100%; margin-top: 4px; }
.form-note { font-size: 13px; text-align: center; }
.form-note.error { color: var(--error-text); }
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px 8px;
}
.form-success .check {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.form-success .check svg { width: 24px; height: 24px; }
.form-success .title { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.form-success .sub { font-size: 14px; color: var(--muted); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 6px 4px;
}
.info-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--body);
  margin-top: 16px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
  flex-shrink: 0;
}
.info-note { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.info-divider { height: 1px; background: var(--border); }
.info-contacts { display: flex; flex-direction: column; gap: 14px; }
.info-row {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  color: var(--body);
}
.info-row svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.info-row a { transition: color .15s ease; }
.info-row a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 34px;
  padding-bottom: 34px;
  color: var(--muted);
  font-size: 13.5px;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner .wordmark { font-size: 16px; }
.footer-links { display: flex; align-items: center; gap: 8px; }
.footer-links a { transition: color .15s ease; }
.footer-links a:hover { color: var(--text); }
.footer-sep { color: var(--faint); }

/* ===== Unterseiten-Header (IT-Check / Impressum / Datenschutz) ===== */
.subnav { display: flex; align-items: center; gap: 8px; }
.subnav .nav-link { white-space: nowrap; margin-right: 16px; }

/* ===== Rechtsseiten (Prosa) ===== */
.subpage { padding-top: 64px; padding-bottom: 96px; }
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.legal h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}
.legal h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  margin: 24px 0 8px;
}
.legal p { color: var(--body); line-height: 1.7; margin-bottom: 14px; font-size: 15.5px; }
.legal ul { margin: 0 0 14px 1.25rem; color: var(--body); }
.legal li { line-height: 1.7; margin-bottom: 6px; font-size: 15.5px; }
.legal a.link { font-weight: 500; }
.legal strong { color: var(--text); font-weight: 700; }
.legal em { color: var(--muted); }
.legal code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ===== Detailseite: IT-Check ===== */
.page-hero { text-align: center; padding-top: 88px; padding-bottom: 72px; }
.page-hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 24px auto 20px;
  max-width: 840px;
}
.page-hero .lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
  max-width: 640px;
  margin: 0 auto 32px;
}
/* Der Hero bringt schon Abstand nach unten mit */
.page-hero + .section { padding-top: 0; }

/* Schmale Lesespalte – linksbündig an der gemeinsamen Kante */
.narrow { max-width: 800px; }

/* Section-Intros der Detailseite (linksbündig wie auf der Startseite) */
.section-intro { max-width: 720px; margin: 0 0 48px; }
.section-intro h2 { margin-bottom: 12px; }
.section-intro p { font-size: 16.5px; line-height: 1.6; color: var(--body); }

/* Prüfbereiche in drei Gruppen */
.check-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.check-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
}
.check-group h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.015em;
  margin: 18px 0 14px;
}
.area-list { list-style: none; padding: 0; }
.area-list li { padding: 14px 0; border-top: 1px solid var(--border); }
.area-list li:last-child { padding-bottom: 0; }
.area-name { display: block; font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.area-desc { display: block; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* Nummerierte Schritte */
.numsteps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.numstep .n {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.numstep h3 { font-family: var(--font-head); font-weight: 700; font-size: 19px; margin-bottom: 10px; letter-spacing: -0.01em; }
.numstep p { font-size: 15px; line-height: 1.6; color: var(--body); }

/* FAQ (native <details>) */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 800px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); transition: transform .2s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item[open] { border-color: var(--border-strong); }
.faq-answer { padding: 0 20px 18px; color: var(--body); font-size: 15px; line-height: 1.7; }

/* Zentrierte Abschluss-Box */
.page-cta {
  background: var(--inverse);
  border: 1px solid var(--inverse-border);
  border-radius: var(--r-box);
  padding: 64px 40px;
  text-align: center;
}
.page-cta h2 { font-size: 32px; color: var(--on-inverse); margin-bottom: 14px; }
.page-cta .lead { color: var(--on-inverse-muted); font-size: 16px; line-height: 1.6; max-width: 560px; margin: 0 auto 28px; }
.page-cta .btn-primary { background: var(--on-inverse); border-color: var(--on-inverse); color: var(--inverse); }
.page-cta .btn-primary:hover { background: var(--on-inverse-hover); border-color: var(--on-inverse-hover); }
.page-cta-actions { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.page-cta-actions .alt { color: var(--on-inverse-muted); font-size: 14.5px; transition: color .15s ease; }
.page-cta-actions .alt:hover { color: var(--on-inverse); }
.page-cta .foot { color: var(--on-inverse-muted); font-size: 13.5px; margin-top: 26px; }

/* =====================================================================
   Schmaler Desktop (≤ 1180px) – Hero-Zeilen brauchen mehr Luft
   ===================================================================== */
@media (max-width: 1180px) {
  .hero h1 { font-size: 50px; }
}

/* =====================================================================
   Tablet (≤ 1040px) – Desktop-Nav passt nicht mehr in eine Zeile → Burger
   ===================================================================== */
@media (max-width: 1040px) {
  .nav { display: none; }
  .header-actions { display: flex; }
  .burger { display: flex; }

  .mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    padding: 8px 14px 16px;
    background: var(--surface);
    flex-direction: column;
    gap: 2px;
  }
  .site-header.is-open .mobile-menu { display: flex; }
  .mobile-menu a {
    color: var(--body);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 10px;
    border-radius: var(--r-btn);
  }
  .mobile-menu a:hover { background: var(--surface-2); color: var(--text); }
  .mobile-menu a.cta-link {
    margin-top: 6px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    text-align: center;
  }
}

/* =====================================================================
   Zwischenbreite (≤ 1024px) – Grids ausdünnen, bevor mobil einspaltig
   ===================================================================== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 72px; }
  .hero .report-card { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
  .teaser { grid-template-columns: 1fr; gap: 32px; }
  .scope-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* =====================================================================
   Mobile (≤ 768px) – einspaltig
   ===================================================================== */
@media (max-width: 768px) {
  :root { --pad-x: 22px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  [id] { scroll-margin-top: 76px; }

  .section-head h2,
  .section-intro h2,
  .about-body h2,
  .teaser h2,
  .page-cta h2 { font-size: 27px; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 15.5px; }

  /* Unterseiten: Home-Link ausblenden (Logo führt zur Startseite) */
  .subnav .nav-link { display: none; }
  .legal h1 { font-size: 30px; }
  .legal h2 { font-size: 20px; }
  .subpage { padding-top: 36px; padding-bottom: 56px; }

  /* Hero einspaltig */
  .hero { gap: 36px; padding-top: 40px; padding-bottom: 48px; }
  /* skaliert mit der Breite, damit jede Aussage auch bei 360px auf eine Zeile passt */
  .hero h1 { font-size: clamp(30px, 8.6vw, 44px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 20px; }
  .hero-lead { font-size: 16px; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .report-head, .report-foot { padding-left: 18px; padding-right: 18px; }
  .report-body { padding: 4px 18px; }
  .report-row { font-size: 14px; }

  /* Leistungen gestapelt */
  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 24px; }

  /* Vorgehen als Liste */
  .steps { grid-template-columns: 1fr; gap: 0; }
  /* Nummer links, Titel + Text gestapelt rechts daneben */
  .step {
    --step-line: var(--border-strong);
    padding: 19px 0 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
  }
  .step:last-child { border-bottom: 1px solid var(--border-strong); }
  .step .num { grid-row: span 2; margin-bottom: 0; padding-top: 3px; }
  .step h3 { margin-bottom: 4px; }

  .scope-col { padding: 24px; }

  /* IT-Check-Teaser einspaltig */
  .teaser { padding: 28px 22px; gap: 24px; }
  .teaser .btn { width: 100%; }

  /* Über mich einspaltig */
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 420px; }
  .about-body p { font-size: 15.5px; }

  /* CTA + Kontakt kompakter */
  .cta { padding: 34px 26px; }
  .cta h2 { font-size: 26px; }
  .cta p { font-size: 15px; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .form-card { padding: 22px; }

  /* Detailseite IT-Check */
  .page-hero { padding-top: 40px; padding-bottom: 40px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero .lead { font-size: 16px; }
  .check-groups { grid-template-columns: 1fr; gap: 14px; }
  .check-group { padding: 24px; }
  .numsteps { grid-template-columns: 1fr; gap: 28px; }
  .page-cta { padding: 40px 24px; }

  .footer-inner { flex-direction: column; text-align: center; gap: 8px; }
}

/* =====================================================================
   Bewegung (Nov. 2026)
   – Zustandsklassen setzt menu.js: .is-in (eingeblendet), .is-instant
     (liegt beim Laden schon oberhalb, ohne Animation), .is-running
     (IT-Check-Karte läuft durch), .is-scrolled (Header), .is-active (Nav-Punkt).
   – html.motion setzt head-init.js nur, wenn Bewegung erwünscht ist und
     IntersectionObserver existiert. Ohne diese Klasse (kein JS, reduzierte
     Bewegung, Druck) ist alles sofort sichtbar.
   – Animationen füllen nur rückwärts (backwards): Nach dem Ende gelten
     wieder die normalen Regeln, Hover-Effekte bleiben also möglich.
   ===================================================================== */
:root { --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1); }

/* ----- Hover-Feedback ----- */
.card,
.check-group {
  transition: transform .25s var(--ease-out), box-shadow .25s ease,
              border-color .2s ease, background-color .3s ease, color .3s ease;
}
.card-icon { transition: background-color .2s ease, color .2s ease; }
.card-num { transition: color .2s ease; }
@media (hover: hover) {
  .card:hover,
  .check-group:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-soft);
  }
  .card:hover .card-icon,
  .check-group:hover .card-icon { background: var(--text); color: var(--bg); }
  .card:hover .card-num { color: var(--muted); }
}
.btn {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease,
              transform .15s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-arrow { width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ----- Header: kompakter nach dem Scrollen -----
   Der Header wird 12px flacher und bekommt 12px Außenabstand dazu.
   Die Seitenhöhe bleibt gleich, der Inhalt springt nicht. */
.site-header {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease,
              margin-bottom .25s var(--ease-out);
}
.header-inner { transition: padding .25s var(--ease-out); }
.site-header.is-scrolled { margin-bottom: 12px; }
.site-header.is-scrolled .header-inner { padding-top: 8px; padding-bottom: 8px; }

/* ----- Nav: Unterstrich bei Hover und aktivem Abschnitt ----- */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1.5px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text); }

/* ----- Theme-Wechsel: Überblendung per View Transition (menu.js) ----- */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after { transition: none !important; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .4s; animation-timing-function: ease; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes draw-line { from { transform: scaleX(0); } }
@keyframes photo-in { from { transform: scale(1.08); } }
@keyframes block-in { from { opacity: 0; transform: translateY(-5px) scale(0.6); } }
@keyframes ping {
  0% { transform: scale(1); opacity: .55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}
/* IT-Check-Karte */
@keyframes row-in { from { opacity: 0; transform: translateX(-10px); } }
@keyframes dot-pending { from { background-color: var(--faint); } }
@keyframes dot-pop { 40% { transform: scale(1.9); } }
@keyframes label-in { from { opacity: 0; transform: translateX(-4px); } }
@keyframes scan {
  0% { transform: scaleX(0); opacity: 1; }
  85% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@media screen and (prefers-reduced-motion: no-preference) {

  /* ----- Verfügbarkeits-Punkt pulsiert ----- */
  .status-dot { position: relative; }
  .status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ok);
    animation: ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  }

  /* ----- Einblenden beim Scrollen -----
     [data-reveal] blendet das Element selbst ein,
     [data-reveal-children] seine direkten Kinder (gestaffelt über --i). */
  html.motion :is([data-reveal], [data-reveal-children=""] > *):not(.is-in) { opacity: 0; }
  html.motion :is([data-reveal], [data-reveal-children=""] > *).is-in {
    animation: rise .7s var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 80ms);
  }
  html.motion .about-photo.is-in img { animation: photo-in 1.1s var(--ease-out) backwards; }

  /* ----- Auftakt beim Laden (reines CSS, kein Warten auf menu.js) ----- */
  html.motion .hero .badge,
  html.motion .hero h1 .line,
  html.motion .hero-lead,
  html.motion .hero-actions,
  html.motion .page-hero > * { animation: rise .7s var(--ease-out) backwards; }
  html.motion .hero .badge { animation-delay: .05s; }
  html.motion .hero h1 .line:nth-child(1) { animation-delay: .15s; }
  html.motion .hero h1 .line:nth-child(2) { animation-delay: .27s; }
  html.motion .hero h1 .line:nth-child(3) { animation-delay: .39s; }
  html.motion .hero-lead { animation-delay: .55s; }
  html.motion .hero-actions { animation-delay: .67s; }
  html.motion .page-hero > :nth-child(1) { animation-delay: .05s; }
  html.motion .page-hero > :nth-child(2) { animation-delay: .15s; }
  html.motion .page-hero > :nth-child(3) { animation-delay: .3s; }
  html.motion .page-hero > :nth-child(4) { animation-delay: .42s; }
  html.motion .legal { animation: rise .6s var(--ease-out) backwards; }

  /* ----- IT-Check-Karte „läuft durch" -----
     Die Karte selbst blendet wie alles andere ein (.is-in). Der Durchlauf
     startet erst mit .is-running, wenn sie fast ganz im Bild ist – sonst
     liefe er auf dem Handy ab, bevor man die Zeilen sieht.
     Zeile n erscheint bei .6s + n × .38s, ihr Status löst .45s später auf:
     Der Punkt springt von grau auf seine Farbe, das Etikett blendet ein. */
  html.motion .hero .report-card.is-in { animation-delay: .3s; }
  html.motion .report-row:nth-child(1) { --n: 0; }
  html.motion .report-row:nth-child(2) { --n: 1; }
  html.motion .report-row:nth-child(3) { --n: 2; }
  html.motion .report-row:nth-child(4) { --n: 3; }
  html.motion .report-card:not(.is-running) :is(.report-row, .report-foot) { opacity: 0; }
  html.motion .report-card.is-running .report-row {
    animation: row-in .5s var(--ease-out) backwards;
    animation-delay: calc(.6s + var(--n, 0) * .38s);
  }
  html.motion .report-card.is-running .report-status .dot {
    animation:
      dot-pending calc(1.05s + var(--n, 0) * .38s) steps(1, end) backwards,
      dot-pop .45s var(--ease-out) calc(1.05s + var(--n, 0) * .38s) backwards;
  }
  html.motion .report-card.is-running .report-label {
    display: inline-block;
    animation: label-in .35s var(--ease-out) backwards;
    animation-delay: calc(1.05s + var(--n, 0) * .38s);
  }
  html.motion .report-card.is-running .report-foot { animation: fade-in .5s ease 2.5s backwards; }
  html.motion .report-head { position: relative; }
  html.motion .report-head::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
  }
  html.motion .report-card.is-running .report-head::after { animation: scan 2.1s linear .6s; }

  /* ----- Vorgehen: Linie zeichnet sich, Schritte folgen ----- */
  html.motion .step:not(.is-in) > * { opacity: 0; }
  html.motion .step:not(.is-in)::before { transform: scaleX(0); }
  html.motion .step.is-in::before {
    animation: draw-line .5s ease-in-out backwards;
    animation-delay: calc(var(--i, 0) * 280ms);
  }
  html.motion .step.is-in > * {
    animation: rise .6s var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 280ms + 140ms);
  }

  /* ----- Logo baut sich auf (nur beim ersten Seitenaufruf der Sitzung) -----
     Reihen von unten nach oben: 18–21, 14–17, 9–13, 4–8, zuletzt die Zinnen 1–3. */
  html.motion.first-visit .site-header .brand-logo rect {
    transform-box: fill-box;
    transform-origin: center;
    animation: block-in .45s var(--ease-out) backwards;
  }
  html.motion.first-visit .site-header .brand-logo rect:nth-child(n+18) { animation-delay: .1s; }
  html.motion.first-visit .site-header .brand-logo rect:nth-child(n+14):nth-child(-n+17) { animation-delay: .2s; }
  html.motion.first-visit .site-header .brand-logo rect:nth-child(n+9):nth-child(-n+13) { animation-delay: .3s; }
  html.motion.first-visit .site-header .brand-logo rect:nth-child(n+4):nth-child(-n+8) { animation-delay: .4s; }
  html.motion.first-visit .site-header .brand-logo rect:nth-child(-n+3) { animation-delay: .54s; }
  html.motion.first-visit .site-header .wordmark { animation: fade-in .6s ease .35s backwards; }

  /* Beim Laden schon oberhalb des Sichtfelds: ohne Animation zeigen */
  html.motion .is-instant,
  html.motion .is-instant > *,
  html.motion .is-instant::before,
  html.motion .report-card.is-instant * ,
  html.motion .report-card.is-instant *::after { animation: none !important; }
}
