/* Gestaltung angelehnt an hansewerkstatt.de: weiß, schwarz, kantig,
   breite Großbuchstaben für Überschriften, helle Grotesk für Text. */

@font-face { font-family: "Mulish"; font-weight: 300; font-display: swap; src: url("fonts/mulish-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 400; font-display: swap; src: url("fonts/mulish-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 600; font-display: swap; src: url("fonts/mulish-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 700; font-display: swap; src: url("fonts/mulish-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("fonts/archivo-latin-standard-normal.woff2") format("woff2"); }

:root {
  --ink: #111111;
  --paper: #ffffff;
  --mist: #f3f3f1;
  --line: #d6d6d3;
  --muted: #5d5d5a;
  --night: #161616;
  --ok: #2c7a3a;
  --font-head: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Mulish", "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 17px/1.6 var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--ink); }
strong, b { font-weight: 700; }

.wrap { max-width: 980px; margin: 0 auto; padding-inline: 16px; width: 100%; }

/* Überschriften wie „DAS SIND WIR“ */
h1, h2 {
  font-family: var(--font-head);
  font-stretch: 125%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 12px;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: 1.15rem; }

/* Kopfzeile */
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; flex-wrap: wrap; padding-block: 12px; }
.brands { display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-sep { width: 1px; height: 44px; background: var(--line); }
.dev-logo { height: 22px; width: auto; display: block; }
.brand img { height: 72px; width: auto; display: block; }
.nav { display: flex; align-items: flex-end; gap: 6px 22px; flex-wrap: wrap; }
.nav a, .nav .link {
  font: 600 1.05rem var(--font-body);
  text-decoration: none;
  color: var(--ink);
  border-top: 2px solid var(--line);
  padding: 12px 6px 4px;
  min-width: 90px;
  text-align: center;
  background: none;
  cursor: pointer;
}
.nav a:hover, .nav .link:hover, .nav a[aria-current="page"] { border-top-color: var(--ink); }
.inline { display: inline; margin: 0; }

/* Titelbild */
.hero {
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), url("img/motor.jpg") center / cover no-repeat, var(--night);
  color: #fff;
  text-align: center;
  padding: 56px 16px 104px;
}
.hero h1 {
  font-family: var(--font-body);
  font-stretch: normal;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 8px;
}
.hero p { margin: 0 auto; max-width: 34em; font-size: 1.1rem; }

main.wrap { padding-block: 40px 56px; flex: 1; }
.stack > * + * { margin-top: 24px; }

/* Flächen */
.card { border: 1px solid var(--line); background: var(--paper); padding: 28px; margin-bottom: 24px; }
.card-mist { background: var(--mist); border-color: var(--mist); }
.narrow { max-width: 480px; margin-inline: auto; }
.lift { margin-top: -88px; position: relative; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; margin: 0; }
.motto { font-family: var(--font-body); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95em; }
.code-big { font-family: var(--font-head); font-stretch: 125%; font-size: 1.6rem; font-weight: 700; letter-spacing: .2em; }

/* Hinweise */
.flash { border: 1px solid var(--ink); padding: 12px 16px; margin-bottom: 20px; font-weight: 400; }
.flash-error { border-color: #b3261e; color: #b3261e; }
.flash-success { border-color: var(--ok); color: var(--ok); }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 16px; }
.form.grid { display: grid; grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
input, textarea {
  font: 400 1rem var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 12px 14px;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: #8a8a86; }
input:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Code-Feld: vier graue Kästchen zeigen das Format */
.code-input {
  --cell: 2ch;
  font: 700 2.2rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 1ch;
  width: calc(4 * var(--cell));
  box-sizing: content-box;
  padding: 6px 0 6px .5ch;
  margin-inline: auto;
  border: 0;
  background: repeating-linear-gradient(90deg, #e4e4e1 0 1.6ch, transparent 1.6ch var(--cell)) .2ch 0 / calc(4 * var(--cell)) 100% no-repeat;
  caret-color: var(--ink);
}
.code-input::placeholder { color: #a9a9a4; }
.code-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.hint { font-weight: 400; font-size: .85rem; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Knöpfe wie „Alles Klar!“ */
.btn {
  display: inline-block;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  padding: 12px 22px;
}
.btn:hover { background: var(--mist); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-small { padding: 7px 14px; font-size: .92rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Kennzeichen (SVG, siehe plate.py) */
.plate-svg { display: block; max-width: 100%; height: auto; }
.plate-link { display: inline-block; }
.plate-link:hover .plate-svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }

/* Status */
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.status-text { font-size: 1.2rem; font-weight: 400; margin: 20px 0; }
.badge {
  display: inline-block;
  font: 700 .8rem var(--font-body);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.badge-in_arbeit, .badge-pruefung { background: var(--ink); color: #fff; }
.badge-abholbereit { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge-abgeholt { color: var(--muted); border-color: var(--line); }
.badge-warten_teile { border-style: dashed; }

.progress { height: 8px; background: var(--mist); overflow: hidden; }
.progress-bar { height: 100%; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .progress-bar { transition: width .4s; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 32px; margin: 24px 0 0; }
.facts dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Verlauf für Kunden */
.timeline { list-style: none; padding: 0; margin: 0; }
.step { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.dot { width: 16px; height: 16px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); flex: none; z-index: 1; }
.step-done .dot { background: var(--ink); border-color: var(--ink); }
.step-done:not(:last-child)::after { background: var(--ink); }
.step-current .dot { background: var(--paper); border: 5px solid var(--ink); }
.step-next .dot { border-color: var(--ink); border-style: dashed; }
.step-label { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.step-next .step-label, .step-todo .step-label { color: var(--muted); font-weight: 400; }
.step-event p { margin-top: 2px; }
.note { border-left: 3px solid var(--ink); padding-left: 10px; font-weight: 400; }
.tag { font: 700 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; background: var(--ink); color: #fff; }
.tag-muted { background: none; color: var(--ink); border: 1px solid var(--ink); }

/* Anruf-Hinweis */
.call { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.call p { margin: 0; }

/* Werkstatt */
.toolbar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-weight: 400; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--mist); }
.table tr:last-child td { border-bottom: 0; }
/* Status-Auswahl: Kacheln in Reihenfolge, die gewählte ist schwarz */
.status-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pick { flex-direction: row; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font-weight: 600; position: relative; }
.pick:hover { border-color: var(--ink); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick-num { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.pick-label { flex: 1; min-width: 0; }
.pick-now { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.pick-done { color: var(--muted); }
.pick-done .pick-num { border-color: var(--line); }
.pick:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick:has(input:checked) .pick-num { border-color: #fff; }
.pick:has(input:checked) .pick-now { color: #ccc; }
.pick:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 12px 0; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; padding-top: 0; }
.event-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.events p { margin-top: 6px; }

/* Rechtstexte */
.legal { max-width: 46rem; }
.legal h2 { margin-top: 28px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 4px; }

/* Fußzeile wie „Kontaktieren Sie uns“ */
.footer { background: var(--night); color: #f2f2f2; padding-block: 40px; }
.footer a { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: flex-start; }
.footer img { height: 64px; width: auto; display: block; }
.footer h2 { font-family: var(--font-body); font-stretch: normal; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 1.15rem; color: #d8d2c4; }
.footer address { font-style: normal; }
.footer p { margin: 0 0 10px; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; padding-top: 16px; border-top: 1px solid #333; font-size: .92rem; }
.footer-dev { margin-left: auto; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; color: #a9a9a4; font-size: .8rem; }
.footer-dev-row { display: inline-flex; align-items: center; gap: 8px; }
.footer-dev img { height: 14px; width: auto; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .form.grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .topbar-inner { min-height: 0; }
  .brand img { height: 56px; }
  .brands { gap: 12px; }
  .brand-sep { height: 34px; }
  .dev-logo { height: 16px; }
  .nav { gap: 6px 12px; }
  .nav a, .nav .link { min-width: 0; font-size: .98rem; }
  .card { padding: 20px; }
}

/* ---------- Dunkelblaue Akzente: Fortschritt, aktueller Schritt, Hinweise ---------- */

:root {
  --blue: #12306b;        /* Dunkelblau */
  --blue-mid: #1f56c2;
  --blue-light: #5aa0ff;
  --blue-soft: #eaf1fc;
}

/* Fortschrittsbalken: blauer Verlauf mit Glanz */
.progress { height: 12px; border-radius: 999px; background: var(--blue-soft); }
.progress-bar {
  border-radius: 999px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 60%, var(--blue-light) 100%);
  animation: fill 1.2s cubic-bezier(.2,.7,.2,1) both;
}
.progress-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine 2.8s 1.2s ease-in-out infinite;
}

/* Aktueller Status oben in der Karte */
.card:has(.status-text) .badge {
  background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 999px; padding: 6px 14px;
}

/* Verlauf */
.step:not(:last-child)::after { left: 9px; top: 26px; }
.dot { width: 20px; height: 20px; margin-top: 3px; }
.step-done .dot { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 4px #fff; }
.step-current .dot {
  border: 0; background: var(--blue-mid);
  box-shadow: 0 0 0 6px rgba(31,86,194,.22); animation: pulse 1.8s ease-in-out infinite;
}
.step-current .step-label { font-size: 1.15rem; }
.tag { border-radius: 999px; padding: 3px 10px; }
.step-current .tag { background: var(--blue); color: #fff; }
.tag-muted { color: var(--blue); border-color: var(--blue); background: none; }
.step-next .dot { border-color: var(--blue-mid); }
.note { border-left: 0; padding: 10px 14px; margin-top: 8px; background: var(--blue-soft); color: var(--blue); border-radius: 10px; }

/* Werkstatt: gewählter Status */
.pick:has(input:checked) .pick-num { background: var(--blue-mid); border-color: var(--blue-mid); color: #fff; }
.badge-in_arbeit, .badge-pruefung { background: var(--blue); border-color: var(--blue); }

@keyframes fill { from { width: 0; } }
@keyframes shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(31,86,194,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
