/* dwpbank-intro — styles.css
   Statisch, vanilla, keine externen Schriftarten, keine Tracker.
   Helles, ruhiges Theme in dwpbank-angelehnten Farben (Blau + Grau auf Hellgrau),
   bewusst keine Nachbildung des Corporate Designs. */

:root {
  --bg:           #f3f5f9;
  --bg-soft:      #e9edf5;

  --surface:      #ffffff;
  --surface-soft: #f7f9fc;
  --surface-blue: #eef2ff;

  --brand-blue:       #213a8f;
  --brand-blue-dark:  #182b6c;
  --brand-blue-hover: #2a48ad;
  --brand-blue-soft:  rgba(33, 58, 143, 0.10);

  --brand-gray: #717778;

  --amber:      #8a5e12;
  --amber-line: #c08a2e;
  --amber-soft: #f7eed9;

  --red:      #a3271d;
  --red-line: #d8a39d;
  --red-soft: #fbeae7;

  --text:        #172033;
  --text-strong: #0f172a;
  --text-muted:  #5f6878;

  --line:        #d7deea;
  --line-strong: #c4ccda;

  --focus: #213a8f;

  --radius: 12px;
  --maxw:   720px;
  --ff: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* sehr dezenter Hero-Verlauf oben, full-width, scrollt mit – kein Glow */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 480px;
  background:
    radial-gradient(circle at 80% 10%, rgba(33,58,143,0.08), transparent 35%),
    linear-gradient(180deg, #f7f9fc 0%, #f3f5f9 100%);
  pointer-events: none;
  z-index: 0;
}

main, .footer { position: relative; z-index: 1; }

/* ---------- Hinweise / Skip ---------- */
.disclaimer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  padding: 9px 16px;
  font-size: 13px;
  color: #d8deeb;
  background: #111a32;
  text-align: center;
}
.disclaimer__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #7f98ec;
  flex: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.hero,
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding-top: 88px;
  padding-bottom: 24px;
}

.section {
  padding-top: 56px;
  padding-bottom: 8px;
}

/* ---------- Hero ---------- */
.hero__name {
  margin: 0 0 22px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand-blue);
  font-weight: 600;
}
.hero__title {
  margin: 0;
  font-size: clamp(28px, 5.2vw, 42px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-strong);
  text-wrap: balance;
}
.hero__lead {
  margin: 26px 0 0;
  font-size: clamp(17px, 2.4vw, 19px);
  color: var(--text-muted);
  max-width: 60ch;
}
.hero__role {
  margin: 30px 0 0;
  font-size: 13.5px;
  letter-spacing: 0.6px;
  color: var(--brand-gray);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- Section-Titel ---------- */
.section-title {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand-blue);
  font-weight: 600;
}
.section-sub {
  margin: 0 0 30px;
  color: var(--text-muted);
  font-size: 15px;
}
.section-body {
  margin: 0 0 16px;
  color: var(--text-muted);
  max-width: 62ch;
}
.section-body--strong {
  color: var(--text-strong);
  font-weight: 500;
}

/* ---------- Timeline (grau -> blau über den Verlauf) ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--line-strong) 0%, var(--brand-blue) 100%);
}
.tl {
  position: relative;
  padding: 0 0 26px 0;
}
.tl:last-child { padding-bottom: 4px; }
.tl__node {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--brand-gray);
}
/* Knoten: operativ (grau) -> Cloud (dwpbank-Blau), ohne leuchtenden Ring */
.tl:nth-child(2) .tl__node { border-color: #8089a8; }
.tl:nth-child(3) .tl__node { border-color: #5566a8; }
.tl:nth-child(4) .tl__node { border-color: #34499a; }
.tl:nth-child(5) .tl__node { border-color: #2a3f93; }
.tl--accent .tl__node {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
}
.tl__head {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong);
}
.tl__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
}
.tl__body + .tl__body { margin-top: 10px; }
.tl__body--strong { color: var(--text-strong); }

/* Lead des Abschnitts „Mein Weg" */
.weg-headline {
  margin: 4px 0 8px;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-strong);
}
.weg-lead {
  margin: 0 0 30px;
  color: var(--text-muted);
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 60ch;
}

/* Scroll-gebundene Füllung der Timeline — reines CSS, Progressive Enhancement.
   Ohne Unterstützung bleibt die statische Linie (::before) vollständig sichtbar.
   Bei reduzierter Bewegung deaktiviert. Nur transform -> keine Layout-/Scroll-Last. */
@keyframes tl-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .timeline::after {
      content: "";
      position: absolute;
      left: 5px;
      top: 6px;
      width: 2px;
      height: calc(100% - 12px);
      background: var(--brand-blue);
      transform-origin: top center;
      transform: scaleY(0);
      will-change: transform;
      animation: tl-fill linear both;
      animation-timeline: view();
      animation-range: cover 8% cover 72%;
    }
  }
}

/* Ergänzung + Überleitung */
.aside {
  margin: 30px 0 0;
  padding: 16px 20px;
  border-left: 2px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 15.5px;
  background: var(--surface-soft);
  border-radius: 0 8px 8px 0;
}
.bridge {
  margin: 22px 0 0;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 500;
}

/* ---------- Hervorgehobene Aussagen ---------- */
.section--quote { padding-top: 64px; }
.pull {
  margin: 0;
  font-size: clamp(20px, 3.4vw, 26px);
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
  padding: 22px 26px;
  background: var(--surface-blue);
  border-left: 4px solid var(--brand-blue);
  border-radius: 0 12px 12px 0;
  text-wrap: balance;
}
.pull--inline {
  font-size: clamp(18px, 2.8vw, 21px);
  margin-bottom: 28px;
}
.section--quote .section-body { margin-top: 22px; }

/* ---------- Karten ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover {
  border-color: rgba(33, 58, 143, 0.30);
  box-shadow: 0 10px 28px rgba(33, 58, 143, 0.08);
}
.card__head {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 650;
  color: var(--text-strong);
}
.card__body {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 15px;
  flex: 1;
}
.card__key {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-style: italic;
}

/* ---------- Lab / CTA ---------- */
.section--lab {
  margin: 48px auto 8px;
  padding-top: 40px;
  padding-bottom: 36px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 22px;
  border: 1px solid var(--brand-blue);
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  background: var(--brand-blue);
  transition: background .15s ease, border-color .15s ease;
}
.cta:hover {
  background: var(--brand-blue-hover);
  border-color: var(--brand-blue-hover);
}
.cta__arrow { transition: transform .15s ease; }
.cta:hover .cta__arrow { transform: translateX(3px); }

/* ---------- Incident Decision Console ---------- */
.section--sim { padding: 56px 24px 8px; }
.sim-head { max-width: var(--maxw); margin: 0 auto; }

.console {
  max-width: 1040px;
  margin: 24px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.console__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.console__phase {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  color: var(--brand-blue); background: var(--surface-blue);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.console__controls { display: none; gap: 10px; flex-wrap: wrap; }
.console.is-js .console__controls { display: flex; }

.incident-button {
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font: inherit; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.incident-button--primary {
  border: 1px solid var(--brand-blue); background: var(--brand-blue); color: #ffffff;
  box-shadow: 0 8px 20px rgba(33, 58, 143, 0.16);
}
.incident-button--primary:hover { background: var(--brand-blue-hover); border-color: var(--brand-blue-hover); }
.incident-button--secondary {
  border: 1px solid var(--line-strong); background: #ffffff; color: var(--text); font-weight: 650;
}
.incident-button--secondary:hover { border-color: var(--brand-blue); }
.incident-button:disabled {
  cursor: default; background: var(--surface-soft); border-color: var(--line);
  color: var(--brand-gray); box-shadow: none;
}
.incident-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* 1. Systemstrecke */
.flow { margin-bottom: 16px; }
.flow__row { display: flex; align-items: stretch; }
.node {
  flex: 1 1 0; min-width: 0;
  background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
  transition: background .25s ease, border-color .25s ease;
}
.node__head { display: flex; align-items: center; gap: 8px; }
.node__icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: var(--brand-blue); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s ease;
}
.node__name { font-weight: 600; font-size: 13.5px; color: var(--text-strong); flex: 1; min-width: 0; }
.node__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-blue); flex: none; transition: background .25s ease; }
.node__value { font-size: 14px; color: var(--text); font-weight: 600; }
.node__state { font-size: 12.5px; color: var(--text-muted); }
.node__bar { height: 6px; border-radius: 4px; background: #e3e8f1; overflow: hidden; margin-top: 4px; }
.node__bar-fill { display: block; height: 100%; width: 0; background: var(--brand-blue); transition: width .4s ease; }

.node.is-impaired { background: var(--amber-soft); border-color: var(--amber-line); }
.node.is-impaired .node__icon { stroke: var(--amber); }
.node.is-impaired .node__dot { background: var(--amber-line); }
.node.is-impaired .node__state { color: var(--amber); font-weight: 600; }

.flow__link { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; }
.flow__branch { display: flex; justify-content: center; }
.conn { width: 34px; height: 16px; }
.conn--v { width: 16px; height: 28px; }
.conn line { stroke: var(--brand-gray); stroke-width: 2; }
.conn path { fill: var(--brand-gray); }

.node--mon { max-width: 320px; margin: 0 auto; }

.console__signal { margin: 6px 0 0; font-size: 14.5px; color: var(--text); min-height: 1.3em; }

/* Entscheidungspunkt */
.decision { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-blue); }
.decision[hidden] { display: none; }
.decision__title { margin: 0 0 12px; font-size: 16px; color: var(--text-strong); }
.decision__options { display: grid; gap: 10px; }
.decision__opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #ffffff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.decision__opt:hover { border-color: var(--brand-blue); }
.decision__opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.decision__opt--rec { border-color: var(--brand-blue); }
.decision__opt[aria-pressed="true"] { background: var(--surface-blue); border-color: var(--brand-blue); }
.decision__key {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  background: var(--surface-blue); color: var(--brand-blue); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.decision__opt--rec .decision__key { background: var(--brand-blue); color: #ffffff; }
.decision__label { flex: 1; }
.decision__badge {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--brand-blue); background: var(--surface); border: 1px solid var(--brand-blue);
  border-radius: 999px; padding: 3px 9px;
}
.decision__feedback { margin: 12px 0 0; font-size: 14px; color: var(--text); }
.decision__feedback:empty { margin: 0; }
.decision__feedback.is-risk { color: var(--red); }
.decision__feedback.is-ok { color: var(--brand-blue); }
.decision__apply { margin-top: 12px; }
.decision__apply[hidden] { display: none; }

/* 2 + 3: Statuskarte + Entscheidungsprotokoll */
.console__grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 16px; }
.statuscard, .decisionlog { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #ffffff; }
.statuscard__title, .decisionlog__title {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--brand-gray); font-weight: 600;
}
.statuscard__state { margin: 6px 0 14px; font-size: 20px; font-weight: 700; color: var(--brand-blue); }
.statuscard.is-impaired .statuscard__state { color: var(--amber); }
.statuscard__metrics { margin: 0; display: grid; gap: 8px; }
.metric { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.metric:last-child { border-bottom: 0; padding-bottom: 0; }
.metric dt { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.metric dd { margin: 0; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.metric dd.is-warn { color: var(--amber); }

.decisionlog__title { margin-bottom: 10px; }
.decisionlog__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dlog { display: flex; gap: 12px; }
.dlog--idle { display: block; color: var(--text-muted); font-size: 13.5px; }
.dlog__time { flex: none; color: var(--brand-blue); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 1px; }
.dlog__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dlog__kind {
  align-self: flex-start; font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; font-weight: 700;
  color: var(--brand-blue); background: var(--surface-blue); border-radius: 999px; padding: 2px 8px;
}
.dlog__kind--decide { color: #ffffff; background: var(--brand-blue); }
.dlog__head { font-weight: 600; color: var(--text-strong); font-size: 14px; }
.dlog__text { color: var(--text-muted); font-size: 13.5px; }

.console__learn {
  margin-top: 16px; padding: 14px 16px; border-left: 4px solid var(--brand-blue);
  background: var(--surface-soft); border-radius: 0 10px 10px 0; font-size: 13.5px; color: var(--text);
}
.console__learn[hidden] { display: none; }
.console__learn strong { color: var(--text-strong); }
.console__noscript { margin-top: 14px; font-size: 14px; color: var(--text-muted); }

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

/* ---------- Footer / Kontakt ---------- */
.footer {
  max-width: var(--maxw);
  margin: 72px auto 0;
  padding: 26px 24px 56px;
  border-top: 1px solid var(--line);
}
.footer__line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
}
.footer__name { color: var(--text-strong); font-weight: 600; }
.footer__sep { color: var(--brand-gray); }
.footer__link { color: var(--brand-blue); text-decoration: none; }
.footer__link:hover { text-decoration: underline; }
.footer__link--todo { color: var(--brand-gray); cursor: default; }
.footer__link--todo em { font-style: normal; font-size: 13px; opacity: .8; }

/* ---------- Fokus ---------- */
a:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .flow__row { flex-direction: column; }
  .flow__link { flex: 0 0 26px; }
  .flow__link .conn { transform: rotate(90deg); }
  .console__grid { grid-template-columns: 1fr; }
  .node--mon { max-width: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding-top: 60px; }
  .cards { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(25px, 7vw, 32px); }
  .section--lab { border-radius: 12px; }
  .console { padding: 18px; }
  .console__bar { flex-direction: column; align-items: flex-start; }
  .incident-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .cta__arrow, .card { transition: none; }
  .node, .node__icon, .node__dot, .node__bar-fill, .incident-button, .decision__opt { transition: none; }
}
