/* =================================================================
   Venture Clienting für den Staat – Stylesheet
   Keine externen Ressourcen. Keine geladenen Schriften.
   Farbwerte sind auf WCAG-2.2-AA-Kontraste geprüft (siehe docs/).
   ================================================================= */

:root {
  /* Grundfarben */
  --petrol-900: #04202a;
  --petrol-800: #072b36;
  --petrol-700: #0a3a47;
  --petrol-600: #10505f;
  --petrol-300: #7fb3bd;

  /* Flächen */
  --paper: #fbf8f3;
  --paper-2: #f3eee5;
  --paper-3: #e8e0d3;

  /* Akzente */
  --coral: #e6431c;
  --coral-bright: #ff6a3d;
  --teal: #9fe3dd;
  --teal-ink: #06424a;

  /* Text */
  --ink: #10222a;
  --ink-muted: #43575f;
  --on-dark: #f4f1ea;
  --on-dark-muted: #c2d3d7;

  /* Linien und Fokus */
  --line: #d8cfc0;
  --line-dark: #1d4b57;
  --focus: #ffb200;

  /* Typografie: verlässlicher System-Font-Stack, lokal vorhanden.
     Optional selbst gehostete Schriften: siehe assets/fonts/README.md */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  /* Maße */
  --measure: 68ch;
  --wrap: 74rem;
  --radius: 4px;
  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.94rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
  --step-4: clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --space: clamp(1rem, 0.7rem + 1.5vw, 1.75rem);
  --section: clamp(3rem, 2rem + 5vw, 6.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  font-weight: 700;
}
h2 {
  font-size: var(--step-3);
  font-weight: 700;
}
h3 {
  font-size: var(--step-1);
  font-weight: 700;
}
h4 {
  font-size: var(--step-0);
  font-weight: 700;
}

p,
li {
  max-width: var(--measure);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--petrol-700);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--coral);
}

a:hover {
  color: var(--coral);
}

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

img,
svg {
  max-width: 100%;
  height: auto;
}

/* ---------- Layout-Bausteine ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--section);
}

.section--tight {
  padding-block: calc(var(--section) * 0.6);
}

.section--paper2 {
  background: var(--paper-2);
}

.section--dark {
  background: var(--petrol-800);
  color: var(--on-dark);
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section--dark a {
  color: var(--teal);
  text-decoration-color: var(--coral-bright);
}

.section--dark a:hover {
  color: var(--coral-bright);
}

.section--dark .lead,
.section--dark .muted {
  color: var(--on-dark-muted);
}

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--petrol-600);
  margin-bottom: 0.9rem;
  border-left: 4px solid var(--coral);
  padding-left: 0.7rem;
}

.section--dark .eyebrow {
  color: var(--teal);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 58ch;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: var(--step--1);
}

.prose > * + h2 {
  margin-top: 2.2em;
}
.prose > * + h3 {
  margin-top: 1.8em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
  max-width: var(--measure);
}
.prose li {
  margin-bottom: 0.45em;
}
.prose blockquote {
  margin: 2rem 0;
  padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 5px solid var(--coral);
  font-size: var(--step-1);
  line-height: 1.45;
}
.prose blockquote p {
  margin-bottom: 0.4em;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
.prose code {
  background: var(--paper-3);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

.btn--primary:hover {
  background: #c3350f;
  border-color: #c3350f;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--petrol-800);
  border-color: var(--petrol-700);
}

.btn--secondary:hover {
  background: var(--petrol-800);
  color: #fff;
}

.section--dark .btn--secondary,
.hero .btn--secondary {
  color: var(--on-dark);
  border-color: var(--petrol-300);
}

.section--dark .btn--secondary:hover,
.hero .btn--secondary:hover {
  background: var(--on-dark);
  color: var(--petrol-900);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

/* ---------- Kopfbereich ---------- */

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100%;
  z-index: 100;
  background: var(--coral);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.site-header {
  background: var(--petrol-900);
  color: var(--on-dark);
  border-bottom: 1px solid var(--line-dark);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.15;
}

.brand:hover {
  color: var(--teal);
}

.brand__mark {
  flex: none;
}

.brand__text {
  font-size: 1.02rem;
}

.brand__text span {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--on-dark);
  border: 2px solid var(--petrol-300);
  border-radius: var(--radius);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.5rem);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 1.3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  max-width: none;
}

.nav a {
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
  display: inline-block;
}

.nav a:hover {
  color: #fff;
  border-bottom-color: var(--coral-bright);
}

.nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--coral-bright);
}

.nav a[aria-current="page"]::before {
  content: "";
}

.nav__cta {
  background: var(--coral);
  color: #fff !important;
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem !important;
  border-bottom: 0 !important;
}

.nav__cta:hover {
  background: #c3350f;
}

@media (max-width: 62rem) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    display: none;
    width: 100%;
  }
  .site-header__inner {
    flex-wrap: wrap;
  }
  .nav[data-open="true"] {
    display: block;
    padding-bottom: 1rem;
  }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav li {
    border-top: 1px solid var(--line-dark);
  }
  .nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 0;
  }
  .nav__cta {
    margin-top: 0.9rem;
    text-align: center;
  }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding-block: 0.7rem;
}

.breadcrumbs li {
  max-width: none;
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--ink-muted);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--petrol-900);
  color: var(--on-dark);
  background-image: radial-gradient(circle at 82% 18%, rgba(159, 227, 221, 0.14), transparent 55%);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 {
  color: #fff;
}

.hero .lead {
  color: var(--on-dark-muted);
}

.hero__trust {
  margin-top: 1.8rem;
  font-size: var(--step--1);
  color: var(--on-dark-muted);
  border-top: 1px solid var(--line-dark);
  padding-top: 1rem;
  max-width: 46ch;
}

/* ---------- Karten und Raster ---------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.8rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid > li {
  max-width: none;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  margin-bottom: 0;
  color: var(--ink-muted);
  max-width: none;
}

.section--dark .card {
  background: var(--petrol-700);
  border-color: var(--line-dark);
  border-top-color: var(--teal);
}

.section--dark .card p {
  color: var(--on-dark-muted);
}

.card--plain {
  border-top-color: var(--line);
}

/* Gegenüberstellung */
.triad {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.triad li {
  max-width: none;
  border-left: 5px solid var(--coral);
  padding: 0.6rem 0 0.6rem 1rem;
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
}

/* Definitionsliste Abgrenzung */
.defs {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.2rem;
}

.defs > div {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: grid;
  gap: 0.3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .defs > div {
    grid-template-columns: 15rem 1fr;
    gap: 1.5rem;
  }
}

.defs dt {
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.25;
}

.defs dd {
  margin: 0;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* Schrittliste */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.4rem;
}

.steps > li {
  max-width: none;
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.steps > li::before {
  content: counter(step);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.step__body h3 {
  margin-bottom: 0.35em;
}

.step__meta {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: var(--step--1);
}

.step__meta li {
  max-width: var(--measure);
  padding-left: 0;
}

.step__meta strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--petrol-600);
}

.section--dark .step__meta strong {
  color: var(--teal);
}

.section--dark .steps > li {
  border-top-color: var(--line-dark);
}

.section--dark .steps > li::before {
  color: var(--coral-bright);
}

/* Tag-Liste */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
}

.tags li {
  max-width: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: var(--step--1);
  font-weight: 600;
}

.section--dark .tags li {
  background: var(--petrol-700);
  border-color: var(--line-dark);
}

/* ---------- Akkordeon (details/summary, funktioniert ohne JS) ---------- */

.accordion {
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
  max-width: 58rem;
}

.accordion details {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  cursor: pointer;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 1.1rem 0;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.3;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::before {
  content: "+";
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--coral);
  color: var(--coral);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  margin-top: 0.2rem;
}

.accordion details[open] summary::before {
  content: "–";
}

.accordion__body {
  padding: 0 0 1.3rem 2.3rem;
}

.accordion__body p:last-child {
  margin-bottom: 0;
}

.accordion__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--petrol-600);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* ---------- Hinweiskästen ---------- */

.note {
  border: 1px solid var(--line);
  border-left: 5px solid var(--petrol-600);
  background: #fff;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  max-width: 58rem;
}

.note > *:last-child {
  margin-bottom: 0;
}

.note--legal {
  border-left-color: var(--coral);
}

.note--privacy {
  border-left-color: var(--teal-ink);
  background: #f2fbfa;
}

.note__title {
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}

.placeholder {
  background: #fff3d6;
  border: 1px dashed #a06800;
  color: #6b4400;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

/* ---------- Formularartige Werkzeuge (Check, Canvas) ---------- */

.tool {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 2rem);
  margin-top: 2rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  counter-reset: q;
}

.checklist li {
  max-width: none;
  counter-increment: q;
  border-bottom: 1px solid var(--paper-3);
}

.checklist label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 0.8rem 0.2rem;
  cursor: pointer;
}

.checklist input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.1rem 0 0;
  accent-color: var(--petrol-700);
  flex: none;
}

.checklist label span::before {
  content: counter(q) ". ";
  font-weight: 700;
  color: var(--petrol-600);
}

.tool__status {
  margin-top: 1.2rem;
  font-weight: 700;
  border-top: 2px solid var(--line);
  padding-top: 1rem;
}

.canvas-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 700;
}

.field .hint {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.field input,
.field textarea {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  width: 100%;
}

.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--petrol-600);
}

.tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.tool__message {
  margin-top: 1rem;
  font-weight: 700;
}

/* ---------- Beitragsliste ---------- */

.posts {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 2rem;
}

.posts > li {
  max-width: none;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.post-meta {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: var(--step-2);
  margin-bottom: 0.4em;
}

.post-title a {
  text-decoration: none;
  color: var(--petrol-800);
}

.post-title a:hover {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: var(--coral);
}

.article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.sources {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 1.2rem;
}

.sources > li {
  max-width: 58rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: var(--step--1);
}

.sources strong {
  display: block;
  font-size: var(--step-0);
}

/* ---------- Illustration ---------- */

.figure {
  margin: 0;
}

.figure figcaption {
  font-size: var(--step--1);
  color: var(--on-dark-muted);
  margin-top: 0.8rem;
  max-width: 44ch;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--petrol-900);
  color: var(--on-dark-muted);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  font-size: var(--step--1);
}

.site-footer a {
  color: var(--on-dark);
  text-decoration-color: var(--coral-bright);
}

.site-footer a:hover {
  color: var(--coral-bright);
}

.site-footer h2 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer li,
.site-footer p {
  max-width: 34ch;
}

.footer-bottom {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.footer-disclaimer {
  font-weight: 700;
  color: var(--on-dark);
  max-width: 60ch;
}

/* ---------- 404 ---------- */

.page-error main,
.page-404 {
  min-height: 50vh;
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Druckansicht ---------- */

@media print {
  :root {
    --measure: 100%;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.4;
  }

  .site-header,
  .site-footer,
  .breadcrumbs,
  .nav-toggle,
  .skip-link,
  .btn,
  .btn-row,
  .tool__actions,
  .no-print {
    display: none !important;
  }

  .section,
  .section--dark,
  .hero {
    background: #fff !important;
    color: #000 !important;
    padding-block: 0.6cm;
  }

  .section--dark h2,
  .section--dark h3,
  .hero h1 {
    color: #000 !important;
  }

  .card,
  .tool,
  .note {
    border: 1px solid #999;
    break-inside: avoid;
  }

  .steps > li,
  .accordion details,
  .posts > li {
    break-inside: avoid;
  }

  .accordion details {
    display: block;
  }

  .accordion__body {
    display: block !important;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }

  .field input,
  .field textarea {
    border: 1px solid #666;
    background: #fff;
  }

  .print-only {
    display: block !important;
  }
}

.print-only {
  display: none;
}

/* Abstandshilfen. Ersetzen Inline-Styles, damit die Content-Security-Policy
   ohne 'unsafe-inline' fuer Styles auskommt. */
.mt-xs { margin: 0.5rem 0 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 2.5rem; }
.h-step-1 { font-size: var(--step-1); }
