/* CrediFlow — Landingpage
   Palette (Frachtdokument-Welt): Papier #F7F8F6, Tinte #101E33,
   Dokumentenblau #23508F, Prüfrot #B3261E, Stempelgrün #1E6B3C */

@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-semicondensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/barlow-semicondensed-700.woff2") format("woff2");
}

:root {
  --paper: #F7F8F6;
  --ink: #101E33;
  --ink-soft: #5A6472;
  --doc-blue: #23508F;
  --doc-red: #B3261E;
  --stamp-green: #1E6B3C;
  --line: #C9D2DE;
  --card: #FFFFFF;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); max-width: 18em; }
h3 { font-size: 1.15rem; margin-bottom: 0.35em; }

p { margin: 0 0 1em; }

a { color: var(--doc-blue); }
a:focus-visible {
  outline: 3px solid var(--doc-blue);
  outline-offset: 2px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4.5rem 0; }
.section-quiet { background: #EDF0EC; }
.section-dark { background: var(--ink); color: #F2F5F1; }
.section-dark h2 { color: #fff; }
.section-dark .section-intro { color: #C4CCD9; }
.section-dark .section-intro a { color: #fff; }

.section-intro {
  max-width: 44em;
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin-bottom: 2.2rem;
}

/* ---------- Kopfzeile ---------- */

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.wordmark-sep {
  width: 1px;
  height: 1.05rem;
  background: var(--line);
  align-self: center;
}

.wordmark-module { color: var(--doc-blue); }

.site-nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Schaltflächen ---------- */

.button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--stamp-green);
  color: #fff;
}
.button-primary:hover { background: #175530; }
.button-primary:focus-visible { outline-color: #fff; }

.button-small { padding: 0.65rem 1.1rem; font-size: 0.95rem; }
.button-large { padding: 1.05rem 2rem; font-size: 1.1rem; }

.section-dark .button-primary:focus-visible { outline-color: var(--paper); }

.link-quiet {
  color: var(--doc-blue);
  font-weight: 500;
}
.link-quiet:hover { text-decoration: underline; }

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

.hero { padding: 4.5rem 0 5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 3.5rem;
  align-items: center;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

/* ---------- Prüfprotokoll-Artefakt ---------- */

.hero-artifact { position: relative; }

.protocol {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(16, 30, 51, 0.10);
  padding: 1.4rem 1.5rem 1.6rem;
  overflow: hidden; /* Stempel-Optik bleibt innerhalb der Karte */
}

.protocol-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.55rem;
  margin-bottom: 0.8rem;
}

.protocol-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.protocol-id {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.protocol-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.4rem 1.6rem;
  margin: 0 0 1rem;
}

.protocol-meta div { display: contents; }
.protocol-meta dt { font-weight: 500; color: var(--ink-soft); }
.protocol-meta dd { margin: 0; font-weight: 600; }

.protocol-positions {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.protocol-positions th,
.protocol-positions td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.protocol-positions thead th {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--line);
}

.protocol-positions .num { text-align: right; white-space: nowrap; }

.position-flagged td { background: #FBF0EF; }
.position-flagged td:first-child { box-shadow: inset 3px 0 0 var(--doc-red); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 500;
}
.status-ok { color: var(--stamp-green); }
.status-flag { color: var(--doc-red); }

.protocol-hint {
  font-size: 0.92rem;
  color: var(--doc-red);
  margin: 0.5rem 0 0.8rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--doc-red);
}

.protocol-checks {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.protocol-checks li { padding: 0.18rem 0; }
.protocol-checks li::before {
  content: "—";
  color: var(--doc-blue);
  margin-right: 0.5rem;
}

.protocol-decision {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  border-top: 2px solid var(--line);
  padding-top: 0.9rem;
}

.decision-caption {
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}

.decision-note {
  font-style: italic;
  color: var(--ink-soft);
}

/* Der Stempel: das eine kühne Element der Seite. */
.stamp {
  position: absolute;
  right: 1.2rem;
  bottom: 3.6rem;
  transform: rotate(-6deg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp-green);
  padding: 0.35rem 0.8rem;
  border: 3px solid var(--stamp-green);
  box-shadow: inset 0 0 0 2px var(--card);
  border-radius: 3px;
  opacity: 0.9;
  pointer-events: none;
}

/* Stempel setzt sich beim Laden einmal aufs Protokoll. */
@media (prefers-reduced-motion: no-preference) {
  .stamp {
    animation: stamp-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) 0.9s backwards;
  }
}

@keyframes stamp-in {
  from { transform: rotate(-6deg) scale(1.7); opacity: 0; }
  70%  { transform: rotate(-6deg) scale(0.94); opacity: 0.95; }
  to   { transform: rotate(-6deg) scale(1); opacity: 0.9; }
}

.artifact-caption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- Vergleichstabelle ---------- */

.table-wrap { overflow-x: auto; }

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
}

.compare th, .compare td {
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th {
  font-family: var(--font-display);
  font-size: 1.05rem;
  border-bottom: 2px solid var(--ink);
}

.compare thead th:not(:first-child) { width: 34%; }

.compare tbody th[scope="row"] {
  font-weight: 600;
  white-space: nowrap;
  background: #EDF0EC;
}

.compare tbody td:first-of-type { color: var(--ink-soft); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }

/* ---------- Ablauf ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem 3rem;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.2rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--doc-blue);
  border-bottom: 3px solid var(--doc-blue);
  line-height: 1.1;
  min-width: 1.6rem;
}

.steps p { margin: 0; color: var(--ink-soft); }
.steps h3 { margin-bottom: 0.35em; }

/* ---------- Funktionen ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem 3rem;
  margin: 0;
}

.features > div {
  border-top: 2px solid var(--line);
  padding-top: 1.1rem;
}

.features dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.features dd {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Demo-Band ---------- */

.section-dark .button-large { margin-top: 0.4rem; }

/* ---------- Fußzeile ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
}

.footer-inner {
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

.footer-nav { display: flex; gap: 1.2rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }

.footer-legal { margin: 0 0 0 auto; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Hilfsklassen ---------- */

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

/* ---------- Responsiv ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-artifact { max-width: 560px; }
  .steps, .features { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0.8rem 1.4rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .header-inner .button { margin-left: auto; }
  .protocol-meta { grid-template-columns: 1fr 1fr; }
  .section { padding: 3.2rem 0; }
  .stamp { right: 0.8rem; bottom: 4.4rem; font-size: 1rem; }
}

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