/* dg-Solutions – Farben, Abstände und Schrift als Token */
:root {
  --blue: #2E8FD4;
  --blue-strong: #1F74B3;
  --blue-soft: #E8F3FB;
  --ink: #414042;

  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --text: #232325;
  --text-2: #5E5D61;
  --line: #E4E3E6;
  --accent: var(--blue-strong);
  --accent-soft: var(--blue-soft);

  --v-bg: #EEF5FB;
  --v-frame: #FFFFFF;
  --v-stroke: #D6E2EC;
  --v-row: #F1F4F7;
  --v-text: #3A3A3D;
  --v-dim: #C9D2DA;

  --hero-bg: #1E1E20;
  --hero-text: #F4F4F5;
  --hero-text-2: #A9A9AF;
  --trace: #2E8FD4;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px; --s9: 128px;
  --radius: 14px;
  --max: 1120px;

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --surface: #1F1F22;
    --text: #EDEDEF;
    --text-2: #A3A3AA;
    --line: #2E2E33;
    --accent: #5AAEE6;
    --accent-soft: #16293A;
    --v-bg: #18222C;
    --v-frame: #23262B;
    --v-stroke: #333941;
    --v-row: #2C3036;
    --v-text: #DADDE2;
    --v-dim: #4A5059;
    --hero-bg: #111113;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

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

/* Typografie: vier Größen */
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
.small { font-size: 0.875rem; }
.muted { color: var(--text-2); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 var(--s3);
}

/* Kopfzeile */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--hero-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--hero-text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { height: 24px; width: auto; }
.nav { display: flex; gap: var(--s2); }
.nav a {
  color: var(--hero-text-2); text-decoration: none; font-size: 0.95rem;
  padding: var(--s3) var(--s3); border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--hero-text); background: rgba(255,255,255,0.06); }
.nav a.nav-cta { color: #fff; background: var(--blue); }
.nav a.nav-cta:hover { background: var(--blue-strong); }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: var(--hero-text);
  padding: var(--s9) 0 var(--s8);
}
.hero-traces { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; pointer-events: none; }
.hero-traces path { fill: none; stroke: var(--trace); stroke-width: 2; stroke-linecap: round; opacity: 0.35; }
.hero-traces circle { fill: var(--hero-bg); stroke: var(--trace); stroke-width: 2; opacity: 0.6; }
.hero-traces .pulse { stroke: #8CCBF5; stroke-width: 2.5; opacity: 1; stroke-dasharray: 40 1400; animation: flow 6s linear infinite; }
.hero-traces .pulse.d2 { animation-delay: -2s; animation-duration: 7.5s; }
.hero-traces .pulse.d3 { animation-delay: -4s; animation-duration: 9s; }
@keyframes flow { from { stroke-dashoffset: 1440; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-traces .pulse { animation: none; opacity: 0; } }
@media (max-width: 720px) { .hero-traces { opacity: 0.35; } .hero { padding-top: var(--s8); } }

.hero-content { position: relative; max-width: 760px; }
.hero h1 span { color: var(--blue); }
.hero .lead { font-size: 1.2rem; color: var(--hero-text-2); max-width: 600px; margin: var(--s5) 0 var(--s6); }
.hero .eyebrow { color: #8CCBF5; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-strong); }
.btn-ghost { color: var(--hero-text); border-color: rgba(255,255,255,0.2); background: transparent; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); }

.hero-facts {
  position: relative; display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7);
  margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--mono); font-size: 0.875rem; color: var(--hero-text-2);
}
.hero-facts b { color: var(--hero-text); font-weight: 500; }

/* Abschnitte */
section { padding: var(--s8) 0; }
.section-head { max-width: 640px; margin-bottom: var(--s6); }
.section-head p { color: var(--text-2); margin: var(--s4) 0 0; font-size: 1.1rem; }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
@media (max-width: 820px) { .services { grid-template-columns: 1fr; } }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.service:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .service:hover { transform: none; } }
.service-visual {
  background:
    radial-gradient(circle at 50% 110%, color-mix(in srgb, var(--blue) 22%, transparent), transparent 65%),
    radial-gradient(color-mix(in srgb, var(--blue) 18%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--v-bg);
  padding: var(--s6) var(--s5) 0;
  border-bottom: 1px solid var(--line);
}
.service-visual svg { width: 100%; height: auto; max-height: 240px; margin: 0 auto; overflow: visible; }
.v-frame { fill: var(--v-frame); stroke: var(--v-stroke); stroke-width: 1; filter: drop-shadow(0 10px 18px rgba(20, 60, 100, 0.14)); }
.v-row { fill: var(--v-row); }
.v-line { stroke: var(--v-stroke); stroke-width: 1; }
.v-text { fill: var(--v-text); }
.v-dim { fill: var(--v-dim); }
.v-accent { fill: var(--blue); }
.v-btn { fill: var(--blue); }
.v-trace { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.v-pad { fill: var(--v-bg); stroke: var(--blue); stroke-width: 2; }
.service-body { padding: var(--s6); }
.service-body h3 { font-size: 1.5rem; margin-bottom: var(--s2); }
.service-body p { margin: 0 0 var(--s5); color: var(--text-2); }
.checks { list-style: none; margin: 0; padding: var(--s5) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s3); }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s2); align-items: center; }
.checks li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%232E8FD4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.hosting {
  margin-top: var(--s5); display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5) var(--s6);
  background: var(--surface);
}
.hosting h3 { margin-bottom: var(--s1); }
.hosting p { margin: 0; color: var(--text-2); }
.hosting-icon { width: 48px; height: 48px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.hosting-icon .fill { fill: var(--accent); stroke: none; }
@media (max-width: 600px) { .hosting { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s6);
}


/* Projekte */
.projects { display: grid; gap: var(--s5); }
.project {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s6);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s6); transition: border-color .2s;
}
.project:hover { border-color: var(--accent); }
@media (max-width: 820px) { .project { grid-template-columns: 1fr; } }
.project h3 { font-size: 1.5rem; margin-bottom: var(--s3); }
.project p { color: var(--text-2); margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: var(--s3) var(--s5); margin: 0; align-content: start;
  padding-left: var(--s6); border-left: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); padding-top: 3px; }
.facts dd { margin: 0; }
@media (max-width: 820px) { .facts { padding: var(--s5) 0 0; border-left: 0; border-top: 1px solid var(--line); } }

/* Werdegang */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 var(--s6) var(--s7); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline .when { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.timeline h3 { margin: var(--s1) 0; }
.timeline p { margin: 0; color: var(--text-2); }

/* Anfrage */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s7); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-aside p { color: var(--text-2); }
.contact-aside .mail { font-size: 1.1rem; font-weight: 600; }
form.card { padding: var(--s6); display: grid; gap: var(--s5); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s2); }
.field label, fieldset legend { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-weight: 400; color: var(--text-2); }
input[type=text], input[type=email], textarea, select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: var(--s3) var(--s4); min-height: 48px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.chips label {
  position: relative; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 var(--s4); border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem;
  transition: border-color .15s, background .15s, color .15s;
}
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:hover { border-color: var(--accent); }
.chips input:checked + span { color: var(--accent); font-weight: 600; }
.chips label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chips label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); font-size: 0.9rem; color: var(--text-2); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue); }
.form-note { margin: 0; font-size: 0.875rem; color: var(--text-2); }
.form-error { margin: 0; color: #C2412D; font-size: 0.9rem; }
.form-error:empty { display: none; }
form .btn-primary { justify-self: start; }
form .btn-primary:disabled { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-done { align-self: start; padding: var(--s6); }
.form-done h3 { margin-bottom: var(--s2); }
.form-done p { margin: 0; color: var(--text-2); }

/* Fußzeile */
.site-footer { background: var(--hero-bg); color: var(--hero-text-2); padding: var(--s7) 0; font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); align-items: center; }
.site-footer a { color: var(--hero-text-2); text-decoration: none; margin-left: var(--s5); }
.site-footer a:hover { color: var(--hero-text); }
.site-footer nav a:first-child { margin-left: 0; }

/* Rechtsseiten */
.legal { padding: var(--s8) 0; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: var(--s6); }
.legal h2 { font-size: 1.3rem; margin: var(--s7) 0 var(--s3); }
.legal p, .legal li { color: var(--text-2); }
.legal dl { display: grid; grid-template-columns: 220px 1fr; gap: var(--s3) var(--s5); margin: 0; }
.legal dt { font-weight: 600; color: var(--text); }
.legal dd { margin: 0; color: var(--text-2); }
@media (max-width: 600px) { .legal dl { grid-template-columns: 1fr; gap: var(--s1); } .legal dd { margin-bottom: var(--s3); } }
.todo { background: #FFF4CC; color: #6B5300; padding: 0 var(--s1); border-radius: 4px; font-family: var(--mono); font-size: 0.85em; }
.hero-full { min-height: 100vh; display: grid; align-items: center; }
