/* Niemietz Digital Consulting – handgeschriebenes CSS, kein Build-Schritt. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #0d1f36;          /* Text, tiefes Marineblau statt Schwarz */
  --ink-soft: #46586e;
  --brand: #1b5aa6;        /* Logo-Blau */
  --brand-deep: #123f78;
  --agent: #0f9f8f;        /* Türkis = übernimmt ein KI-Agent */
  --agent-soft: #d9f2ee;
  --paper: #ffffff;
  --mist: #edf2f7;
  --line: #c8d3df;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
  --step-4: clamp(2.3rem, 1.7rem + 3vw, 4.1rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 74rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--agent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-stretch: 118%;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: var(--step-4); hyphens: manual; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-stretch: 108%; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 680; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 48rem; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 40ch; }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  background: var(--brand); color: #fff;
  font-weight: 650; font-stretch: 105%;
  text-decoration: none; border-radius: var(--radius);
  border: 2px solid var(--brand);
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-small { padding: 0.5rem 0.9rem; font-size: var(--step--1); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-light { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn-light:hover { background: var(--agent-soft); border-color: var(--agent-soft); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--brand); text-decoration: none; }
.brand:hover { color: var(--brand); }
.brand-name { display: flex; flex-direction: column; line-height: 1.02; color: var(--ink); font-stretch: 122%; font-weight: 800; font-size: 0.98rem; letter-spacing: 0.01em; }
.brand-name span + span { font-weight: 500; font-stretch: 110%; font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.menu-btn { display: none; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav ul { list-style: none; display: flex; gap: 1.35rem; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 520; font-size: 0.97rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover, .nav a[aria-current] { border-bottom-color: var(--agent); }

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; }
  .js .menu-btn {
    display: grid; place-items: center; width: 2.75rem; height: 2.75rem; cursor: pointer;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block; width: 1.2rem; height: 2px; background: var(--ink); position: relative; content: ""; transition: transform .2s;
  }
  .menu-btn span::before { position: absolute; top: -6px; }
  .menu-btn span::after { position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] span { background: transparent; }
  .menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 0 0 1.25rem;
  }
  .js .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .js .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a:not(.btn) { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--mist); font-size: 1.05rem; }
  .nav .btn { justify-content: center; }
}

/* Brotkrumen */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 1.1rem 0 0; margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.crumbs a { color: var(--ink-soft); }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-mist { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem); font-stretch: 120%; font-weight: 800; letter-spacing: -0.025em; }
.hero h1 .h1-sub { display: block; font-stretch: 100%; font-weight: 400; color: var(--brand); letter-spacing: -0.01em; margin-top: 0.15em; }
.hero-note { margin-top: 1.5rem; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Prozessbaum (Signatur-Element, abgeleitet vom Logo) */
.flow {
  position: relative; margin: 0; padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.flow-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1rem; font-size: var(--step--1); color: var(--ink-soft); }
.flow-title strong { color: var(--ink); font-size: var(--step-0); }
.flow ol { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
.flow ol::before { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.9rem; width: 2px; background: var(--brand); }
.flow li { position: relative; margin: 0 0 0.6rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--mist); border: 1px solid transparent;
  transition: background-color .5s ease, border-color .5s ease; }
.flow li::before { content: ""; position: absolute; left: -1.15rem; top: 50%; width: 1.15rem; height: 2px; background: var(--brand); }
.flow .step { font-weight: 560; line-height: 1.3; }
.flow .who { font-size: 0.78rem; font-weight: 650; font-stretch: 110%; padding: 0.2rem 0.55rem; border-radius: 99px; background: #fff; color: var(--ink-soft); white-space: nowrap; }
.flow li.is-agent { background: var(--agent-soft); border-color: rgba(15,159,143,.35); }
.flow li.is-agent::before { background: var(--agent); }
.flow li.is-agent .who { background: var(--agent); color: #fff; }
.flow li.is-human .who { background: var(--brand); color: #fff; }
.flow-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); font-size: var(--step--1); color: var(--ink-soft); }
.flow-foot .k { display: inline-flex; align-items: center; gap: 0.4rem; }
.flow-foot .k::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--agent); }
.flow-foot .k-human::before { background: var(--brand); }
/* Animation: Schritte wechseln nacheinander auf Agent. Nur mit JS und ohne reduced motion. */
.js .flow.animate li.will-agent { background: var(--mist); border-color: transparent; }
.js .flow.animate li.will-agent .who { background: #fff; color: var(--ink-soft); }
.js .flow.animate li.will-agent::before { background: var(--brand); }

/* Leistungsliste: Zeilen am Prozessbaum statt Kartenraster */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service-list li { margin: 0; border-bottom: 1px solid var(--line); }
.service-list a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.25rem; align-items: baseline; padding: 1.6rem 0.25rem; color: var(--ink); text-decoration: none; }
.service-list a:hover { background: linear-gradient(90deg, var(--mist), transparent); }
.service-list a:hover h3, .service-list a:hover .h3-like { color: var(--brand); }
.service-list .node { width: 1rem; height: 1rem; border-radius: 3px; background: var(--brand); transform: translateY(0.2rem); }
.service-list li:nth-child(2) .node { background: var(--agent); }
.service-list h3, .service-list .h3-like { margin: 0; font-size: var(--step-2); font-stretch: 115%; font-weight: 720; line-height: 1.15; }
.service-list p { margin: 0; color: var(--ink-soft); }
.service-list a > * { min-width: 0; }
@media (max-width: 760px) {
  .service-list a { grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem 1rem; }
  .service-list p { grid-column: 2; }
  .service-list h3, .service-list .h3-like { font-size: var(--step-1); }
}

/* Zwei-Spalten-Text */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Vergleich vorher / nachher */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.compare > div { padding: 1.5rem; }
.compare > div + div { border-left: 1px solid var(--line); background: linear-gradient(180deg, var(--agent-soft), #fff 60%); }
.compare h3 { margin-bottom: 0.75rem; }
.compare ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 680px) { .compare { grid-template-columns: 1fr; } .compare > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* Echte Abfolgen: Vorgehen */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem 0; border-top: 1px solid var(--line); margin: 0; }
.steps > li::before { content: counter(s); font-size: var(--step-3); font-weight: 800; font-stretch: 125%; color: var(--brand); line-height: 1; }
.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin: 0; color: var(--ink-soft); }
.steps .dur { display: inline-block; margin-top: 0.5rem; font-size: var(--step--1); color: var(--ink); font-weight: 600; }

/* Fakten / Belege */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2.5rem; margin: 0; }
.facts div { border-top: 3px solid var(--brand); padding-top: 0.9rem; }
.facts dt { font-weight: 720; font-stretch: 112%; font-size: var(--step-1); line-height: 1.25; margin-bottom: 0.35rem; }
.facts dd { margin: 0; color: var(--ink-soft); }

/* Porträt */
.portrait { border-radius: 10px; overflow: hidden; background: var(--brand-deep); aspect-ratio: 1; max-width: 30rem; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-caption { margin-top: 0.75rem; font-size: var(--step--1); color: var(--ink-soft); }

/* Werdegang */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0.3rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--line); }
.timeline li { position: relative; margin: 0 0 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -1.5rem; top: 0.45rem; width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--brand); }
.timeline li:first-child::before { background: var(--agent); }
.timeline .when { font-size: var(--step--1); color: var(--ink-soft); }
.timeline h3 { margin: 0.1rem 0 0.3rem; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 640; font-size: var(--step-1); line-height: 1.35; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; font-size: 1.6rem; font-weight: 400; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 1.25rem; color: var(--ink-soft); }

/* CTA */
.cta-band { background: var(--brand-deep); color: #fff; padding-block: clamp(3rem, 7vw, 5rem); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem; align-items: end; }
.cta-band h2 { color: #fff; margin-bottom: 0.4em; }
.cta-band p { color: rgba(255,255,255,.82); margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; } }

/* Fließtext-Seiten und Artikel */
.prose { max-width: 44rem; }
.page-head .prose h1 { font-size: var(--step-3); max-width: none; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { max-width: 66ch; }
.prose blockquote { margin: 1.5em 0; padding: 0.25em 0 0.25em 1.25rem; border-left: 3px solid var(--agent); color: var(--ink-soft); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; background: var(--mist); }
.table-scroll { overflow-x: auto; }
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; }
.article-meta { font-size: var(--step--1); color: var(--ink-soft); margin-top: -0.5rem; }
.answer { background: var(--mist); border-left: 4px solid var(--brand); padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 2rem; }
.answer p { margin: 0; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 2.5rem; font-size: 0.97rem; }
.toc h2 { font-size: var(--step-0); margin: 0 0 0.5rem; font-stretch: 100%; }
.toc ol { margin: 0; }

/* Insights-Liste */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--line); margin: 0; }
.post-list a { display: block; padding: 1.5rem 0; text-decoration: none; color: var(--ink); }
.post-list h2, .post-list h3 { font-size: var(--step-2); margin: 0 0 0.4rem; font-stretch: 112%; }
.post-list a:hover h2, .post-list a:hover h3 { color: var(--brand); }
.post-list p { margin: 0; color: var(--ink-soft); }

/* Regionen */
.cities { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 3rem; }
.cities section { border-top: 3px solid var(--brand); padding-top: 1rem; }
.cities h2 { font-size: var(--step-2); }

/* Selbstcheck */
.check { border: 1px solid var(--line); border-radius: 10px; padding: clamp(1rem, 3vw, 2rem); background: #fff; margin: 2rem 0; }
.check fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.check legend { font-weight: 720; font-stretch: 112%; font-size: var(--step-1); margin-bottom: 0.5rem; }
.check label { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; align-items: start; padding: 0.55rem 0; border-bottom: 1px solid var(--mist); cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; accent-color: var(--agent); }
.check-result { position: sticky; bottom: 0; background: var(--ink); color: #fff; padding: 1rem 1.25rem; border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; align-items: center; }
.check-result .score { font-size: var(--step-3); font-weight: 800; font-stretch: 125%; line-height: 1; grid-row: span 2; }
.check-result p { margin: 0; color: rgba(255,255,255,.85); }
.check-result strong { color: #fff; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding-top: clamp(3rem, 6vw, 4.5rem); font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-h { font-size: 1rem; font-stretch: 110%; color: #fff; margin-bottom: 0.8rem; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
.brand-footer .brand-name, .brand-footer .brand-name span + span { color: #fff; }
.footer-about p { max-width: 34ch; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); padding-block: 1.25rem; font-size: var(--step--1); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .cta-band { display: none; }
}
