/* ==========================================================================
   marktrecherche.vergabejunkie.de — Stylesheet
   Tokens aus dem Design-Export; Sekundär- und Mono-Labelfarben gegenüber
   dem Export abgedunkelt, damit alle Texte WCAG 2.1 AA erfüllen.
   ========================================================================== */

/* --- Fonts (self-hosted, SIL OFL 1.1 — siehe /assets/fonts/OFL.txt) ------- */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-600.woff2") format("woff2");
}

/* --- Design-Tokens -------------------------------------------------------- */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-alt: #f3f5f8;
  --surface-accent: #e9eff9;
  --surface-soft: #f8f9fa;

  --ink: #14171c;
  --text: #1b1e24;
  --text-2: #3f4650;
  --text-3: #4b525c;
  --muted: #565c66;   /* Export: #6b7380/#8a919c — für AA abgedunkelt */
  --label: #525a66;   /* Mono-Sekundärlabels, Export: #6b7380 */

  --accent: #274d9f;
  --accent-strong: #1e3d80;

  --border: #e6e8ec;
  --border-2: #e0e3e8;
  --border-3: #d5dae1;
  --border-btn: #c6cdd8;
  --border-dash: #b9c3d4;

  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", "Consolas", monospace;

  --radius: 6px;
  --radius-s: 4px;
}

/* --- Basis ---------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--accent-strong);
}

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

.container {
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
}

/* --- Skip-Link ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 50;
  transform: translateY(-150%);
  background: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.125rem;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
  color: #ffffff;
}

/* --- Header --------------------------------------------------------------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem 1.75rem;
  padding-block: 1.125rem;
}

.brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

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

.brand-suffix {
  color: var(--muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.625rem;
}

.site-nav a,
.header-link {
  font-size: 0.90625rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
}

.site-nav a:hover,
.header-link:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-s);
  padding: 0.9375rem 1.5rem;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-btn);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-surface {
  background: var(--surface);
  border-color: var(--border-dash);
  color: var(--text);
}

.btn-surface:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-nav {
  font-size: 0.90625rem;
  padding: 0.6875rem 1.125rem;
}

.btn-large {
  font-size: 1.0625rem;
  padding: 1.0625rem 1.875rem;
}

/* --- Sektionen, Eyebrows, Überschriften ----------------------------------- */

.section {
  padding-block: 4.75rem;
}

.section--alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--line {
  border-top: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  max-width: 45rem;
  margin: 0 0 1.375rem;
  font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-copy p {
  max-width: 47.5rem;
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-2);
}

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

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

.hero {
  padding-block: clamp(3rem, 7vw, 4.75rem) 3.25rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.125rem, 1.35rem + 3.9vw, 3.375rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.hero-sub {
  max-width: 35rem;
  margin: 0 0 2rem;
  font-size: 1.1875rem;
  line-height: 1.62;
  color: var(--text-3);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

.hero-note {
  margin: 1.625rem 0 0;
  font-size: 0.90625rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 64em) {
  .hero-grid {
    grid-template-columns: 1.12fr 1fr;
    gap: 3.75rem;
  }
}

/* --- Screenshot-Platzhalter ----------------------------------------------- */

.placeholder-img {
  width: 100%;
  border-radius: var(--radius);
}

/* --- Drei Säulen ---------------------------------------------------------- */

.pillars {
  padding-bottom: 3.5rem;
}

.pillars ul {
  display: grid;
  gap: 1.5rem 2.5rem;
  list-style: none;
  padding-top: 1.625rem;
  border-top: 1px solid var(--border);
}

.pillar-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.pillars p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-3);
}

@media (min-width: 48em) {
  .pillars ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Zeitachse (Signatur-Element) ----------------------------------------- */

.timeline {
  margin-top: 3.25rem;
}

.timeline-marker {
  margin: 0;
}

.timeline-marker span {
  display: inline-block;
  padding: 0.375rem 0.625rem;
  border-radius: 3px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-marker::after {
  content: "";
  display: block;
  width: 2px;
  height: 0.75rem;
  margin-left: 1.5rem;
  background: var(--accent);
}

.timeline-phases {
  display: grid;
  list-style: none;
  border: 1px solid var(--border-3);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.timeline-phases li {
  padding: 1.375rem 1.625rem;
}

.timeline-phases li + li {
  border-top: 1px solid var(--border-3);
}

.timeline-phases .is-current {
  background: var(--surface-accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.timeline-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.timeline-label {
  display: block;
  margin-top: 0.4375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}

.is-current .timeline-label {
  font-weight: 600;
  color: var(--accent);
}

@media (min-width: 48em) {
  .timeline-phases {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-phases li + li {
    border-top: none;
    border-left: 1px solid var(--border-3);
  }
}

.timeline--compact {
  margin-top: 2.5rem;
}

.timeline--compact .timeline-phases li {
  padding: 0.875rem 1.125rem;
}

.timeline--compact .timeline-title {
  font-size: 0.90625rem;
  line-height: 1.35;
}

.timeline--compact .timeline-label {
  margin-top: 0.25rem;
  font-size: 0.65625rem;
  letter-spacing: 0.05em;
}

.timeline--compact .timeline-marker span {
  font-size: 0.6875rem;
  padding: 0.3125rem 0.5625rem;
}

.timeline--compact .timeline-marker::after {
  height: 0.625rem;
  margin-left: 1.25rem;
}

/* --- Karten (Schmerzpunkte, Anwendungsfall) ------------------------------- */

.card-grid {
  display: grid;
  gap: 1.125rem;
  max-width: 62.5rem;
  margin-top: 2.75rem;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1.375rem 1.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.card p {
  font-size: 0.96875rem;
  line-height: 1.6;
  color: var(--text-3);
}

@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Ablauf: Vier Schritte ------------------------------------------------ */

.steps {
  margin-top: 2.25rem;
}

.step {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding-block: 2.25rem;
  border-top: 1px solid var(--border);
}

.step-num {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.step h3 {
  margin: 0 0 0.625rem;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.step-copy p {
  max-width: 28.75rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-3);
}

@media (min-width: 64em) {
  .step {
    grid-template-columns: 1fr 1.1fr;
    gap: 3.5rem;
  }

  .step:nth-of-type(even) {
    grid-template-columns: 1.1fr 1fr;
  }

  .step:nth-of-type(even) .step-media {
    order: -1;
  }
}

/* --- Sicherheit ----------------------------------------------------------- */

.security-grid {
  display: grid;
  gap: 1.125rem;
  margin-top: 2.25rem;
  list-style: none;
}

.security-card {
  background: var(--surface);
  border: 1px solid var(--border-3);
  border-radius: var(--radius);
  padding: 1.625rem 1.75rem;
}

.spec {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.security-card h3 {
  margin: 0 0 0.625rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
}

.security-card p {
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-3);
}

@media (min-width: 48em) {
  .security-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.section-footnote {
  max-width: 48.75rem;
  margin: 1.875rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-3);
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-3);
}

/* --- Open Source ---------------------------------------------------------- */

.opensource-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.opensource-copy p {
  max-width: 35rem;
  margin: 0 0 1.875rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-2);
}

.facts {
  border: 1px solid var(--border-3);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 0.5rem 1.625rem;
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

.facts > div:last-child {
  border-bottom: none;
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}

.facts dd {
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  color: var(--ink);
}

@media (min-width: 64em) {
  .opensource-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
  }
}

/* --- Teaser: Für eingeladene Unternehmen ---------------------------------- */

.teaser {
  background: var(--surface-accent);
  border-top: 1px solid var(--border-3);
  border-bottom: 1px solid var(--border-3);
  padding-block: 3.75rem;
}

.teaser .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem 3rem;
}

.teaser h2 {
  margin: 0 0 0.875rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.teaser p {
  max-width: 42.5rem;
  font-size: 1.03125rem;
  line-height: 1.65;
  color: var(--text-2);
}

/* --- Kontakt -------------------------------------------------------------- */

.kontakt {
  padding-block: 5.5rem;
}

.kontakt-inner {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.kontakt-inner .section-title,
.kontakt-inner .section-copy p {
  margin-inline: auto;
}

.kontakt .btn {
  margin-top: 2rem;
}

.placeholder-note {
  margin: 1.125rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}

/* --- FAQ ------------------------------------------------------------------ */

.faq-list {
  max-width: 53.75rem;
  margin-top: 1.75rem;
}

.faq-item {
  border-top: 1px solid var(--border-2);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border-2);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
}

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

.faq-item summary h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.125rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
}

.faq-icon::before {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}

.faq-item[open] .faq-icon::before {
  content: "−";
}

.faq-item > p {
  max-width: 50rem;
  padding: 0 3rem 1.25rem 0;
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-3);
}

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

.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-2);
  padding-block: 2.25rem 2.75rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.footer-brand {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.375rem;
}

.footer-nav a {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-3);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 1.375rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-2);
}

.footer-note {
  font-size: 0.84375rem;
  line-height: 1.5;
  color: var(--muted);
}

.footer-placeholder {
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}

/* --- Unterseiten (Bieter, Pflichtseiten, 404) ----------------------------- */

.page {
  max-width: 51.25rem;
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) 5.5rem;
}

.page h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.875rem, 1.4rem + 2.4vw, 2.625rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.page-lede {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-2);
}

.page section {
  margin-top: 3rem;
}

.page h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.page h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.03125rem;
  font-weight: 600;
  line-height: 1.45;
}

.page p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
}

.page ul,
.page ol {
  margin: 0 0 1rem;
  padding-left: 1.375rem;
  color: var(--text-2);
  line-height: 1.7;
}

.page li {
  margin-bottom: 0.375rem;
}

.page address {
  font-style: normal;
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--text-2);
}

.placeholder {
  font-family: var(--font-mono);
  font-size: 0.84375em;
  font-weight: 500;
  color: var(--accent-strong);
  background: var(--surface-accent);
  border: 1px dashed var(--border-dash);
  border-radius: 3px;
  padding: 0.0625rem 0.375rem;
}

/* --- Bieter-Seite: Mini-Schritte, Hinweiskasten, statisches FAQ ----------- */

.ministeps {
  display: grid;
  gap: 1.125rem;
  list-style: none;
  counter-reset: ministep;
}

.ministeps li {
  counter-increment: ministep;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  font-size: 0.96875rem;
  line-height: 1.55;
  color: var(--text-2);
}

.ministeps li::before {
  content: counter(ministep);
  display: block;
  margin-bottom: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--accent);
}

@media (min-width: 48em) {
  .ministeps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.notice {
  background: var(--surface-alt);
  border: 1px solid var(--border-3);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.625rem 1.875rem;
}

.notice h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.notice p {
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.68;
}

.domain {
  font-family: var(--font-mono);
  font-size: 0.84375em;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-3);
  border-radius: 3px;
  padding: 0.1875rem 0.4375rem;
  white-space: nowrap;
}

.static-faq > div {
  border-top: 1px solid var(--border-2);
  padding-block: 1.25rem;
}

.static-faq > div:last-child {
  border-bottom: 1px solid var(--border-2);
}

.static-faq h3 {
  margin: 0 0 0.5rem;
}

.static-faq p {
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-3);
}

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

.error-page {
  text-align: center;
  padding-block: clamp(4rem, 10vw, 7rem);
}

.error-page h1 {
  margin-bottom: 1rem;
}

.error-page p {
  margin-bottom: 2rem;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
