/* Loopwise - Design-Grundlage in der Voith-Marketing-CI (Entscheidung E19).
   Dunkles Design als Standard, Navy #08182B, Orange #ED7029, Schrift Montserrat (lokal, SIL OFL). */

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-latin-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #08182B;
  --navy-deep: #061321;
  --surface: #0E2238;
  --surface-2: #12294A;
  --line: #1E3350;
  --line-strong: #2B4266;
  --orange: #ED7029;
  --orange-hover: #F38A4F;
  --text: #F2F4F7;
  --text-2: #C9D2DE;
  --text-3: #B4BFCD;
  --muted: #9AA6B8;
  --success: #3FB98A;
  --danger: #F2685B;
  --radius: 14px;
  --radius-lg: 22px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--orange); }
a:hover { color: var(--orange-hover); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Schriftzug */
.wordmark { color: var(--text); text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -0.5px; }
.wordmark:hover { color: var(--text); }
.wordmark span { color: var(--orange); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-hover); color: var(--navy); }
.btn-outline { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn-outline:hover { background: rgba(237, 112, 41, .1); color: var(--orange-hover); }
.btn-ghost { border-color: #3A5175; color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-3); color: var(--text); }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }

.eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--orange); }

/* ---------- Öffentliche Startseite ---------- */
.site-header { padding: 24px 0; }
.site-header .container { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn) { color: var(--text-2); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav .btn { min-height: 44px; padding: 0 22px; font-size: 15px; }

.hero { padding: 56px 0 40px; }
.hero .container { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-size: clamp(38px, 6vw, 58px); line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; }
.hero p.lead { margin: 0; font-size: 19px; color: var(--text-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions .btn { min-height: 52px; padding: 0 28px; }
.hero-visual { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; }

/* Kreislauf-Animation: ein Punkt umkreist fünf Schritte, der jeweilige Schritt leuchtet auf */
.loop { position: relative; width: min(520px, 100%); aspect-ratio: 1; }
.loop-ring { position: absolute; inset: 7.7%; border-radius: 50%; border: 2px dashed #24395A; }
.loop-orbit { position: absolute; inset: 7.7%; animation: loop-orbit 12s linear infinite; }
.loop-orbit::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border-radius: 50%; background: var(--orange); box-shadow: 0 0 24px rgba(237, 112, 41, .7);
}
.loop-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.loop-center strong { font-size: clamp(22px, 5.5vw, 30px); font-weight: 800; }
.loop-center strong span { color: var(--orange); }
.loop-center small { font-size: 14px; color: var(--muted); }
.loop-steps { margin: 0; padding: 0; list-style: none; }
.loop-step {
  position: absolute; width: 27%; transform: translate(-50%, -50%);
  padding: 10px 6px; border-radius: 14px; border: 2px solid #24395A; background: var(--surface);
  text-align: center; font-size: clamp(11px, 2.6vw, 14px); font-weight: 600; line-height: 1.3;
  animation: loop-glow 12s linear infinite;
}
.loop-step:nth-of-type(1) { left: 50%;   top: 7.7%;  animation-delay: 0s; }
/* Rechts und links etwas nach innen gezogen, damit nichts über den Rand ragt */
.loop-step:nth-of-type(2) { left: 86.5%; top: 36.9%; animation-delay: 2.4s; }
.loop-step:nth-of-type(3) { left: 74.9%; top: 84.2%; animation-delay: 4.8s; }
.loop-step:nth-of-type(4) { left: 25.1%; top: 84.2%; animation-delay: 7.2s; }
.loop-step:nth-of-type(5) { left: 13.5%; top: 36.9%; animation-delay: 9.6s; }
@keyframes loop-orbit { to { transform: rotate(360deg); } }
@keyframes loop-glow {
  0%, 12% { border-color: var(--orange); box-shadow: 0 0 0 6px rgba(237, 112, 41, .18); }
  20%, 100% { border-color: #24395A; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .loop-orbit, .loop-step { animation: none; }
  html { scroll-behavior: auto; }
}

.section { padding: 72px 0; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin-bottom: 40px; }
.section-head h2 { margin: 0; font-size: clamp(30px, 4.5vw, 38px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.15; }
.section-head p { margin: 0; font-size: 17px; color: var(--text-2); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.step { padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.step svg { width: 32px; height: 32px; stroke: var(--orange); }
.step h3 { margin: 0; font-size: 18px; font-weight: 700; }
.step p { margin: 0; font-size: 15px; color: var(--text-3); }

.control { padding: 48px 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.control > div:first-child { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.control h2 { margin: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 800; letter-spacing: -0.6px; line-height: 1.2; }
.control p { margin: 0; font-size: 17px; color: var(--text-2); }
.control ul { flex: 0 1 360px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; font-weight: 600; }
.control li { display: flex; gap: 12px; align-items: center; }
.control li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }

@media (max-width: 640px) {
  .site-header .container { flex-wrap: nowrap; }
  .site-nav a:not(.btn) { display: none; }
  .control { padding: 32px 22px; }
  .hero { padding-top: 32px; }
}

/* ---------- Anmeldung ---------- */
.auth-main { padding: 32px 16px 56px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.2; }
.auth-card .text { margin: 0; font-size: 15px; color: var(--text-2); }
.auth-note { margin: 0; max-width: 440px; text-align: center; font-size: 13px; color: #8494AA; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input {
  height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-strong);
  background: var(--navy); color: var(--text); font: inherit; font-size: 16px;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(237, 112, 41, .2); }
.code-input { font-size: 24px !important; font-weight: 700; letter-spacing: 6px; text-align: center; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.alert { margin: 0; padding: 12px 14px; border-radius: 10px; background: rgba(242, 104, 91, .12); border: 1px solid rgba(242, 104, 91, .5); color: #FFC9C3; font-size: 14px; }
.setup-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--text-2); }
.qr { align-self: center; width: 220px; max-width: 100%; border-radius: 12px; overflow: hidden; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.secret summary { cursor: pointer; font-size: 14px; color: var(--text-2); min-height: 44px; display: flex; align-items: center; }
.secret code { display: block; margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--navy); font-size: 15px; letter-spacing: 1px; word-break: break-all; }
.codes { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { display: block; padding: 10px; border-radius: 8px; background: var(--navy); border: 1px solid var(--line); text-align: center; font-size: 15px; font-weight: 600; letter-spacing: 1px; }
