/* Kopf der Startseite: drei Stationen eines Ablaufs (16.10.2026). Nur Tokens aus tokens.css.
   Markup: scripts/seiten/hero.mjs. Braucht mockups.css für die Ansichten (mk-*). */

.he-kopf { overflow: hidden; padding-block: var(--luft-7) var(--luft-6); background: linear-gradient(180deg, var(--kern-hell) 0%, var(--papier) 70%); }
.he-innen { display: grid; gap: var(--luft-5); }

/* ---------- Text ---------- */
.he-text { display: grid; gap: var(--luft-3); justify-items: center; text-align: center; }
.he-eyebrow { margin: 0; color: var(--variabel-text); font-size: var(--t-notiz); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.he-kopf h1 { max-width: 22ch; margin: 0; font-family: var(--schrift-titel); font-size: var(--t-h1); line-height: 1.12; color: var(--tinte); text-wrap: balance; }
.he-titel-zwei { color: var(--kern); }

/* ---------- Stationen ---------- */
.he-stationen { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: var(--luft-3); }
.he-station { display: grid; gap: var(--luft-3); align-content: start; min-width: 0; margin: 0; }
.he-station-titel { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: var(--luft-2); }
.he-station-titel strong { display: block; font-size: var(--t-h3); line-height: 1.2; color: var(--tinte); }
.he-station-text { display: block; font-weight: 400; margin-top: 2px; color: var(--tinte-leise); font-size: var(--t-notiz); line-height: 1.4; }
.he-nr { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--kern); color: var(--auf-dunkel); font-size: var(--t-h4); font-weight: 600; }
.he-bild { display: grid; min-width: 0; }
.he-bild .mk { max-width: none; }

/* Tabelle in der schmalen Spalte nicht breiter werden lassen */
.he-bild .mk-tabelle { table-layout: fixed; }
.he-bild .mk-tabelle th, .he-bild .mk-tabelle td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.he-bild .mk-tabelle th:first-child { width: 42%; }
.he-bild .mk-tabelle th:last-child { width: 22%; }

/* ---------- Pfeile ---------- */
.he-pfeil { position: relative; display: flex; align-items: center; align-self: center; width: 56px; height: 24px; margin-top: 60px; color: var(--kern); }
.he-pfeil-linie { position: relative; flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: var(--raster); }
.he-pfeil-linie::after { content: ''; position: absolute; inset: 0; background: var(--kern); transform-origin: left center; }
.he-pfeil-spitze { width: 24px; height: 24px; margin-left: -10px; }

/* ---------- KI-Schild ---------- */
.he-art { display: grid; gap: var(--luft-2); justify-items: center; text-align: center; }
.he-schild, .he-ki { display: inline-flex; align-items: center; gap: var(--luft-2); margin: 0; }
.he-schild { padding: var(--luft-2) var(--luft-4); border: 2px solid var(--kern); border-radius: var(--ecke-plakette); background: var(--papier); color: var(--kern); font-size: var(--t-gross); font-weight: 600; }
.he-ki { max-width: 60ch; color: var(--tinte-leise); font-size: var(--t-notiz); font-weight: 400; }
.he-ki .mk-symbol { color: var(--variabel-text); }

/* ---------- Aktion und Zahlen ---------- */
.he-aktion { display: grid; gap: var(--luft-2); justify-items: center; text-align: center; }
.he-knopf { font-size: var(--t-text); }
.he-hinweis { margin: 0; font-weight: 400; color: var(--tinte-leise); font-size: var(--t-klein); }
.he-zahlen { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--luft-2) var(--luft-6); margin: 0; padding: var(--luft-4) 0 0; border-top: 1px solid var(--linie); list-style: none; color: var(--tinte-leise); font-size: var(--t-notiz); text-align: center; }
.he-zahlen strong { display: block; color: var(--kern); font-size: var(--t-h4); line-height: 1.2; }

/* ---------- Animation: Stationen nacheinander, Pfeile füllen sich, einmalig ---------- */
.he-station { animation: he-rein 600ms var(--ease-out) both; }
.he-station--2 { animation-delay: 900ms; }
.he-station--3 { animation-delay: 1800ms; }
.he-pfeil-linie::after { animation: he-fuellen 500ms var(--ease-in-out) both; }
.he-pfeil--1 .he-pfeil-linie::after { animation-delay: 450ms; }
.he-pfeil--2 .he-pfeil-linie::after { animation-delay: 1350ms; }
.he-pfeil-spitze { animation: he-spitze 200ms var(--ease-out) both; }
.he-pfeil--1 .he-pfeil-spitze { animation-delay: 850ms; }
.he-pfeil--2 .he-pfeil-spitze { animation-delay: 1750ms; }
.he-bild .mk-tabelle tr.ist-neu td { animation: he-markieren 900ms var(--ease-out) 1300ms both; }

@keyframes he-rein { from { opacity: 0; transform: translateY(14px); } }
@keyframes he-fuellen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes he-spitze { from { opacity: 0; transform: translateX(-6px); } }
@keyframes he-markieren { from { background: var(--papier); } }

/* ---------- Schmal: untereinander, Pfeile nach unten ---------- */
@media (max-width: 900px) {
  .he-kopf { padding-block: var(--luft-6) var(--luft-5); }
  .he-stationen { grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: var(--luft-2); max-width: 520px; margin-inline: auto; width: 100%; }
  .he-pfeil { justify-self: center; width: 24px; height: 48px; margin: 0; flex-direction: column; }
  .he-pfeil-linie { width: 3px; height: auto; flex: 1; }
  .he-pfeil-linie::after { transform-origin: center top; }
  .he-pfeil-spitze { margin: -10px 0 0; transform: rotate(90deg); }
  .he-pfeil--1 .he-pfeil-spitze, .he-pfeil--2 .he-pfeil-spitze { animation-name: he-spitze-unten; }
  @keyframes he-fuellen { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes he-spitze-unten { from { opacity: 0; transform: rotate(90deg) translateX(-6px); } to { transform: rotate(90deg); } }
}

@media (max-width: 520px) {
  .he-text, .he-art, .he-aktion { text-align: left; justify-items: start; }
  /* Drei Spalten statt 2+1 mit einer Zahl allein in der Zeile (Designprüfung 20.11.2026). */
  .he-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: flex-start; text-align: left; gap: var(--luft-2) var(--luft-3); }
  .he-schild { font-size: var(--t-text); padding: var(--luft-2) var(--luft-3); border-radius: var(--feld-radius); }
  .he-ki { align-items: flex-start; }
  .he-station-titel { grid-template-columns: 36px 1fr; }
  .he-nr { width: 36px; height: 36px; font-size: var(--t-text); }
  .he-station-titel strong { font-size: var(--t-h4); }
  .he-bild .mk { font-size: var(--t-klein); }
  .he-bild .mk-inhalt { padding: 10px; gap: 6px; }
  .he-bild .mk-mail { padding: 12px; }
  .he-bild .mk-mail-kopf .mk-avatar { display: none; }
  .he-bild .mk-tabelle th:last-child { width: 27%; }
  .he-bild .mk-tabelle th, .he-bild .mk-tabelle td { padding: 6px 8px; }
  .he-knopf { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .he-station, .he-pfeil-linie::after, .he-pfeil-spitze, .he-bild .mk-tabelle tr.ist-neu td { animation: none; }
  .he-pfeil-linie::after { transform: none; }
}
