/* ============================================================
   Yves Kopmann — Softwareentwicklung
   Design-System
   Hell als Standard, Dark Mode über prefers-color-scheme.
   Kontraste gegen WCAG AA geprüft.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Farben — hell */
  --bg:            #ffffff;
  --bg-subtle:     #f6f8f9;
  --surface:       #ffffff;
  --border:        #e2e8ea;
  --border-strong: #cdd7da;

  --ink:           #0d1b22;
  --ink-muted:     #4e636e;
  --ink-dim:       #5a6e77;

  --accent:        #0b6b63;
  --accent-hover:  #095a54;
  --accent-soft:   #e8f4f2;
  --accent-ink:    #09534d;
  --on-accent:     #ffffff;

  --shadow-sm: 0 1px 2px rgba(13, 27, 34, .06);
  --shadow-md: 0 4px 16px -4px rgba(13, 27, 34, .10), 0 1px 3px rgba(13, 27, 34, .05);
  --shadow-lg: 0 16px 40px -12px rgba(13, 27, 34, .16);

  /* Typografie */
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --t-xs:   0.8125rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   clamp(1.0625rem, 0.4vw + 0.95rem, 1.1875rem);
  --t-lg:   clamp(1.1875rem, 0.6vw + 1.05rem, 1.375rem);
  --t-h3:   clamp(1.1875rem, 0.7vw + 1.05rem, 1.4375rem);
  --t-h2:   clamp(1.75rem, 2.4vw + 1.1rem, 2.5rem);
  --t-h1:   clamp(2.125rem, 4vw + 1.1rem, 3.5rem);

  /* Abstände */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 3rem;     --s-8: 4rem;
  --s-9: 6rem;     --s-10: 8rem;

  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 22px;

  --wrap: 1120px;
  --measure: 65ch;

  --section-y: clamp(3.5rem, 8vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0d1720;
    --bg-subtle:     #121f29;
    --surface:       #16242f;
    --border:        #26363f;
    --border-strong: #35474f;

    --ink:           #eef3f5;
    --ink-muted:     #9cb0ba;
    --ink-dim:       #7d929d;

    --accent:        #52cfc2;
    --accent-hover:  #7cdcd1;
    --accent-soft:   #13302e;
    --accent-ink:    #8fe4da;
    --on-accent:     #06231f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .55);
  }
}

:root[data-theme="dark"] {
  --bg:            #0d1720;
  --bg-subtle:     #121f29;
  --surface:       #16242f;
  --border:        #26363f;
  --border-strong: #35474f;
  --ink:           #eef3f5;
  --ink-muted:     #9cb0ba;
  --ink-dim:       #7d929d;
  --accent:        #52cfc2;
  --accent-hover:  #7cdcd1;
  --accent-soft:   #13302e;
  --accent-ink:    #8fe4da;
  --on-accent:     #06231f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .55);
}

/* ---------- 2. Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

ul, ol { list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--t-sm); font-weight: 500;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  text-decoration: none; color: var(--on-accent);
}

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (max-width: 480px) {
  .wrap { padding-inline: var(--s-4); }
}

section { position: relative; }
section[id] { scroll-margin-top: 5rem; }

.band { padding-block: var(--section-y); }
.band--subtle { background: var(--bg-subtle); }
.band--bordered { border-block: 1px solid var(--border); }

.eyebrow {
  display: block;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.lead {
  font-size: var(--t-md);
  color: var(--ink-muted);
  max-width: var(--measure);
  margin-top: var(--s-4);
}

.section-head { max-width: 46rem; margin-bottom: var(--s-8); }

/* ---------- 4. Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav[data-scrolled="true"] { border-bottom-color: var(--border); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
  min-height: 4.25rem;
}

.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; }
.brand__role { font-size: var(--t-xs); color: var(--ink-muted); letter-spacing: 0.01em; }

.nav__links { display: flex; align-items: center; gap: var(--s-6); }
.nav__links a:not(.btn) {
  font-size: var(--t-sm); font-weight: 500;
  color: var(--ink-muted);
}
.nav__links a:not(.btn):hover { color: var(--ink); text-decoration: none; }
/* Mobil: Textlinks weichen, der CTA bleibt immer erreichbar */
@media (max-width: 900px) {
  .nav__links a:not(.btn) { display: none; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 0.8125rem 1.375rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: inherit; font-size: var(--t-base); font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { border-color: var(--border-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink-muted); color: var(--ink); background: var(--bg-subtle); }
.btn--sm { padding: 0.5rem 0.9375rem; font-size: var(--t-sm); border-radius: var(--r-sm); }
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }

/* ---------- 6. Hero ---------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 6rem); }
/* Kein fester Zeilenumbruch in der Überschrift: text-wrap: balance verteilt
   die Zeilen je nach Breite selbst, die Begrenzung hält sie bei zwei Zeilen */
.hero h1 { max-width: 20ch; }
.hero__inner { max-width: 54rem; }
.hero h1 { margin-bottom: var(--s-5); }
.hero__lead {
  font-size: var(--t-lg);
  color: var(--ink-muted);
  max-width: 44rem;
  line-height: 1.55;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-7);
}
.hero__facts {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  font-size: var(--t-sm);
  color: var(--ink-muted);
}
.hero__facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__facts strong { color: var(--ink); font-weight: 600; }
.dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* ---------- 7. Leistungskette ---------- */
.chain { display: grid; gap: 0; margin-top: var(--s-7); }
.phase {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 var(--s-5);
  position: relative;
  padding-bottom: var(--s-6);
}
.phase:last-child { padding-bottom: 0; }
.phase__num {
  grid-row: 1 / span 2;
  position: relative;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: var(--t-sm); font-weight: 700;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
/* Verbindungslinie: als Element der Phase, damit sie nicht im
   Stacking-Context der Nummer verschwindet */
.phase:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.375rem;
  top: 2.75rem;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}
.phase__title { font-size: var(--t-h3); margin-bottom: var(--s-2); padding-top: 0.3125rem; }
.phase__body { color: var(--ink-muted); max-width: 52ch; }

.crosscut {
  margin-top: var(--s-7);
  padding: var(--s-5) var(--s-6);
  background: var(--accent-soft);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.crosscut h3 { color: var(--accent-ink); margin-bottom: var(--s-2); font-size: var(--t-md); }
.crosscut p { color: var(--ink-muted); max-width: 60ch; font-size: var(--t-sm); }

.onehand-note {
  margin-top: var(--s-6);
  font-size: var(--t-md);
  color: var(--ink);
  max-width: 50ch;
  font-weight: 500;
  border-left: 3px solid var(--accent);
  padding-left: var(--s-4);
}

/* ---------- 8. Karten-Raster ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-3px); }
}
.card__media {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: var(--s-5) var(--s-5) 0;
}
.card__media svg { width: 100%; height: auto; display: block; }
.card__body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: var(--s-2); }
.card__body p { color: var(--ink-muted); font-size: var(--t-sm); flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.chip {
  font-size: var(--t-xs);
  color: var(--ink-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  white-space: nowrap;
}
.chip--accent {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.disclaimer {
  margin-top: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* ---------- 9. Ablauf-Schritte ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); margin-top: var(--s-7); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
}
.step__num {
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  display: block; margin-bottom: var(--s-3);
}
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--ink-muted); font-size: var(--t-sm); }
.step__tag {
  display: inline-block;
  margin-top: var(--s-4);
  font-size: var(--t-xs); font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
}

/* ---------- 10. Erstgespräch (Highlight) ---------- */
.offer {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--r-xl);
  padding: clamp(var(--s-6), 4vw, var(--s-8));
}
.offer__grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s-7);
  align-items: start;
}
@media (max-width: 860px) { .offer__grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.offer h2 { margin-bottom: var(--s-4); }
.offer p { color: var(--ink-muted); max-width: 48ch; }
.offer__list { display: grid; gap: var(--s-3); }
.offer__list li {
  display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s-3);
  font-size: var(--t-sm); color: var(--ink);
}
.check { color: var(--accent); flex: none; margin-top: 0.1875rem; }
.offer__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- 11. Über mich ---------- */
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-8); align-items: start; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.prose p + p { margin-top: var(--s-4); }
.prose p { color: var(--ink-muted); }
.prose strong { color: var(--ink); font-weight: 600; }

.facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.facts dl { display: grid; gap: var(--s-4); }
.facts dt {
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s-1);
}
.facts dd { font-size: var(--t-sm); color: var(--ink); }

/* ---------- 12. Kontakt ---------- */
.contact__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-8); align-items: start; }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; gap: var(--s-7); } }

.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--t-sm); font-weight: 500; color: var(--ink); }
.field .req { color: var(--accent); }
.field input, .field textarea, .field select {
  font: inherit; font-size: var(--t-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 0.6875rem 0.875rem;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); opacity: 1; }
.field__hint { font-size: var(--t-xs); color: var(--ink-dim); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }

.form__consent {
  display: grid; grid-template-columns: 1.125rem 1fr; gap: var(--s-3);
  font-size: var(--t-sm); color: var(--ink-muted);
  align-items: start;
}
.form__consent input { width: 1.125rem; height: 1.125rem; margin-top: 0.25rem; accent-color: var(--accent); }

.honeypot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.contact-aside { display: grid; gap: var(--s-6); }
.contact-block h3 { font-size: var(--t-md); margin-bottom: var(--s-3); }
.contact-list { display: grid; gap: var(--s-3); }
.contact-list li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s-3); font-size: var(--t-sm); }
.contact-list .label { display: block; color: var(--ink-dim); font-size: var(--t-xs); }
.contact-icon { color: var(--accent); margin-top: 0.1875rem; }

.notice {
  font-size: var(--t-sm);
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
}
.notice strong { color: var(--ink); }

/* Platzhalter, die vor dem Live-Gang ersetzt werden müssen */
.todo {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  background: #fff3cd;
  color: #664d03;
  border: 1px dashed #b38f00;
  border-radius: 4px;
  padding: 0.0625rem 0.375rem;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .todo {
    background: #3d3000; color: #ffe08a; border-color: #8a6d00;
  }
}

/* ---------- 13. Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s-7);
  background: var(--bg-subtle);
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  align-items: center; justify-content: space-between;
}
.footer__links { display: flex; flex-wrap: wrap; gap: var(--s-5); font-size: var(--t-sm); }
.footer__links a { color: var(--ink-muted); }
.footer__links a:hover { color: var(--ink); }
.footer__meta { font-size: var(--t-sm); color: var(--ink-dim); }

/* ---------- 14. Scroll-Reveal ---------- */
/* Die Einblendung wird erst aktiv, wenn JavaScript die Klasse .js gesetzt hat.
   Bleibt das Skript aus oder schlägt es fehl, ist der Inhalt sofort sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s cubic-bezier(.22,.7,.24,1), transform .7s cubic-bezier(.22,.7,.24,1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- 15. Mockup-Primitive (SVG-Hilfsklassen) ---------- */
.mk-bg      { fill: var(--surface); }
.mk-frame   { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.mk-bar     { fill: var(--border); }
.mk-bar-dim { fill: var(--border); opacity: .55; }
.mk-accent  { fill: var(--accent); }
.mk-accent-soft { fill: var(--accent); opacity: .22; }
.mk-chrome  { fill: var(--bg-subtle); }
.mk-line    { stroke: var(--border); stroke-width: 1; fill: none; }

/* ============================================================
   16. Rechtsseiten (Impressum, Datenschutz)
   ============================================================ */
.legal-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.legal-head h1 { margin-bottom: var(--s-4); }
.legal-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  font-size: var(--t-sm); color: var(--ink-dim);
}

.legal { padding-block: var(--s-8) var(--s-9); }
.legal__inner { max-width: 48rem; }

.legal-section { padding-top: var(--s-7); }
.legal-section:first-child { padding-top: 0; }
.legal-section__num {
  display: block;
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
}
.legal-section h2 {
  font-size: var(--t-h3);
  margin-bottom: var(--s-4);
}
.legal-section h3 {
  font-size: var(--t-md);
  margin: var(--s-5) 0 var(--s-3);
}
.legal-section p,
.legal-section li { color: var(--ink-muted); }
.legal-section p + p { margin-top: var(--s-4); }
.legal-section strong { color: var(--ink); font-weight: 600; }

.legal-list { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.legal-list li {
  position: relative;
  padding-left: var(--s-5);
  font-size: var(--t-sm);
}
.legal-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.6875em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

.legal-box {
  margin-top: var(--s-4);
  padding: var(--s-5);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  line-height: 1.75;
}
.legal-box dl { display: grid; gap: var(--s-4); }
.legal-box dt {
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s-1);
}
.legal-box dd { color: var(--ink); }

.legal-note {
  margin-top: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--t-sm);
}
.legal-note p { color: var(--ink-muted); }
.legal-note strong { color: var(--accent-ink); }

.legal-toc {
  margin-top: var(--s-6);
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.legal-toc h2 {
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s-3);
}
.legal-toc ol {
  display: grid; gap: var(--s-2);
  grid-template-columns: repeat(2, 1fr);
  font-size: var(--t-sm);
  counter-reset: toc;
}
@media (max-width: 640px) { .legal-toc ol { grid-template-columns: 1fr; } }
.legal-toc li { counter-increment: toc; }
.legal-toc li::before {
  content: counter(toc, decimal-leading-zero) " ";
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   17. 404-Seite
   ============================================================ */
.notfound {
  display: flex; align-items: center;
  min-height: calc(100vh - 4.25rem - 10rem);
  padding-block: var(--s-8);
}
.notfound__inner { max-width: 40rem; }
.notfound__code {
  display: inline-block;
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: var(--s-5);
  font-variant-numeric: tabular-nums;
}
.notfound h1 { margin-bottom: var(--s-4); }
.notfound__lead { font-size: var(--t-md); color: var(--ink-muted); max-width: 44ch; }
.notfound__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.notfound__links {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.notfound__links h2 {
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s-3);
}
.notfound__links ul {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  font-size: var(--t-sm);
}

/* ============================================================
   18. Rückmeldung zum Kontaktformular
   ============================================================ */

/* Fehler- und Statusmeldung im Formular */
.form__status {
  font-size: var(--t-sm);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  border: 1px solid;
}
.form__status:empty { display: none; }
.form__status[data-state="error"] {
  color: #8a1c1c;
  background: #fdeaea;
  border-color: #f3c2c2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form__status[data-state="error"] {
    color: #ffb4b4; background: #3a1414; border-color: #6b2424;
  }
}

/* Absende-Zustand */
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* Bestätigungsdialog */
.dialog {
  border: none;
  padding: 0;
  /* Der Reset oben setzt margin:0 auf alle Elemente und hebt damit die
     Zentrierung auf, die Browser für dialog vorsehen — hier zurückgeholt. */
  margin: auto;
  max-width: 30rem;
  width: calc(100% - 2rem);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop {
  background: rgba(13, 27, 34, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.dialog__inner { padding: var(--s-7) var(--s-6) var(--s-6); text-align: center; }
.dialog__icon {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.dialog h2 { font-size: var(--t-h3); margin-bottom: var(--s-3); }
.dialog p { color: var(--ink-muted); font-size: var(--t-sm); max-width: 32ch; margin-inline: auto; }
.dialog__actions { margin-top: var(--s-6); }
.dialog__actions .btn { min-width: 10rem; }

@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: dialog-in .28s cubic-bezier(.2, .7, .2, 1); }
  .dialog[open]::backdrop { animation: backdrop-in .28s ease; }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
