/* ══════════════════════════════════════════════════════════════════════
   Ladebildschirm beim Start (29.11.2026) – steht in index.html und erscheint sofort,
   noch bevor das Programm geladen ist (ohne JavaScript, deshalb eigene kleine Datei).
   html.lade-oe     → öffentliche Seiten (Anmeldungen, Unterschriften): Webseiten-CI, schwarz/grün
   html.lade-intern → Manager: Manager-CI, hell/blau
   Fortschritt: #lade.s1 = Programm geladen, .s2 = Daten geladen, .s3 = fertig (blendet aus) – setzt src/lib/ladebildschirm.js
   ══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Anton"; src: url("/lade/anton.woff2") format("woff2"); font-display: swap; }

#lade {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: opacity .45s ease .5s;
}
#lade.s3 { opacity: 0; pointer-events: none; }
.lade-oeffentlich, .lade-manager { display: none; flex-direction: column; align-items: center; text-align: center; }
html.lade-oe #lade { background: #0c0c0c; color: #fff; }
html.lade-oe .lade-oeffentlich { display: flex; gap: 28px; }
html.lade-intern #lade { background: #f8fafc; color: #0f172a; }
html.lade-intern .lade-manager { display: flex; gap: 18px; }

/* Ladebalken: .auto füllt sich von selbst (schnell bis ~1/3, dann langsam bis 90 %), .stufe springt bei echten Schritten */
.lade-balken { position: relative; overflow: hidden; border-radius: 99px; width: min(300px, 72vw); height: 10px; }
.lade-balken i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; }
.lade-balken .auto { animation: lade-fuellen 16s cubic-bezier(.12, .65, .3, 1) forwards; }
.lade-balken .stufe { transition: width .5s ease; }
#lade.s1 .stufe { width: 60%; }
#lade.s2 .stufe { width: 88%; }
#lade.s3 .stufe { width: 100%; }
@keyframes lade-fuellen { 0% { width: 0; } 12% { width: 32%; } 100% { width: 90%; } }

/* Hinweis für langsame Verbindungen: erst nach 6 Sekunden */
.lade-langsam { margin: 0; max-width: 32ch; font-size: .9rem; line-height: 1.45; opacity: 0; animation: lade-einblenden .6s ease 6s forwards; }
@keyframes lade-einblenden { to { opacity: 1; } }

/* ── öffentlich: Webseiten-CI ── */
.lade-oeffentlich img { width: 150px; height: auto; }
.lade-titel { font-family: "Anton", Impact, "Arial Narrow", sans-serif; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1; text-transform: uppercase; }
.lade-titel em { font-style: normal; color: #b9e200; }
html.lade-oe .lade-balken { background: #2a2a27; }
html.lade-oe .lade-balken i { background: #b9e200; }
html.lade-oe .lade-langsam { color: #b5b5ae; }

/* ── intern: Manager-CI ── */
.lade-p { width: 56px; height: 56px; border-radius: 16px; background: #2563eb; color: #fff; font-size: 28px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 99, 235, .25); }
.lade-name { font-size: 1.1rem; font-weight: 600; color: #1e293b; }
.lade-unter { margin-top: -12px; font-size: .85rem; color: #94a3b8; }
html.lade-intern .lade-balken { background: #e2e8f0; height: 6px; width: min(240px, 64vw); }
html.lade-intern .lade-balken i { background: #2563eb; }
html.lade-intern .lade-langsam { color: #64748b; }

@media (prefers-reduced-motion: reduce) {
  .lade-balken .auto { animation-duration: 0s; animation-delay: 0s; }
}
