/* Taskey Signup — die Felder in der Mitte, rundherum die Taskey-Welt.
   Farben, Schrift und Bedienelemente aus dem Dashboard v3 und dem Login
   (components/dashboard-v3/workspace/*.css, components/theme/dark-mode.css,
   components/login/DESIGN.md). Die 3D-Modelle stehen um die Karte herum. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #18181b;
  --readable: #52525b;
  --muted: #71717a;
  --surface: #ffffff;
  --media: #f6f8fa;
  --soft: #f5f4f3;
  --raised: #eeeeee;
  --line: #e4e4e7;
  --line-soft: #ececee;
  --field-line: #d9dde2;
  --field-line-hover: #9eb9c8;
  --field-focus: #d3eaf6;
  --accent: #197caf;
  --accent-ring: #3e85ab;
  --action: #197caf;
  --action-hover: #116b98;
  --action-shadow: 0 4px 9px #197caf1f;
  --tint: #eef6fb;
  --tint-line: #d6e8f3;
  --ok: #047857;
  --ok-surface: #ecfdf5;
  --danger: #b4321f;
  --danger-surface: #fff6f3;
  --danger-line: #eed0ca;
  --himmel-oben: #e9f1f7;
  --himmel-unten: #f8fafc;
  --himmel-licht: #ffffff;
  --raster: rgb(25 124 175 / .07);
  --karte-schatten: 0 1px 2px rgb(16 33 46 / .05), 0 32px 64px -32px rgb(16 33 46 / .28);
  --popover-shadow: 0 14px 30px -14px rgb(16 33 46 / .22), 0 2px 6px -2px rgb(16 33 46 / .08);
  --selection: #cfe6f4;
  --selection-ink: #173c52;
  color-scheme: light;
}

html.dark {
  --ink: #eef1f5;
  --readable: #c3c9d2;
  --muted: #b3bac5;
  --surface: #1d2025;
  --media: #191c20;
  --soft: #24282e;
  --raised: #30353d;
  --line: #3c424c;
  --line-soft: #30353d;
  --field-line: #4b535f;
  --field-line-hover: #7b91a2;
  --field-focus: #31566d;
  --accent: #7bc8f0;
  --accent-ring: #386079;
  --action: #236d95;
  --action-hover: #1e6084;
  --action-shadow: 0 4px 9px #0003;
  --tint: #23313c;
  --tint-line: #33495a;
  --ok: #6ee7b7;
  --ok-surface: #1d3329;
  --danger: #ffaba6;
  --danger-surface: #38252a;
  --danger-line: #70454c;
  --himmel-oben: #1b2630;
  --himmel-unten: #15171b;
  --himmel-licht: #1e2b36;
  --raster: rgb(123 200 240 / .06);
  --karte-schatten: 0 1px 2px rgb(0 0 0 / .3), 0 32px 64px -28px rgb(0 0 0 / .65);
  --popover-shadow: 0 14px 30px -12px rgb(0 0 0 / .55), 0 2px 6px -2px rgb(0 0 0 / .3);
  --selection: #31566d;
  --selection-ink: #ffffff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--himmel-unten); }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
  scrollbar-color: var(--raised) transparent;
}
::selection { background: var(--selection); color: var(--selection-ink); }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex-shrink: 0; }
.hidden { display: none !important; }
.unsichtbar {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------- Bühne & Welt */

.su {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 44px 24px 24px;
  overflow: hidden;
}
/* Tageslicht aus dem Login: eisblau oben, hell in der Mitte. */
.su::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(62% 52% at 50% 44%, var(--himmel-licht) 0%, transparent 72%),
    linear-gradient(180deg, var(--himmel-oben) 0%, var(--himmel-unten) 78%);
}
/* Ein feines Isometrie-Raster verbindet die Modelle zu einer Fläche. */
.su::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(30deg, var(--raster) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(150deg, var(--raster) 0 1px, transparent 1px 52px);
  -webkit-mask-image: radial-gradient(80% 75% at 50% 46%, transparent 30%, #000 58%, transparent 96%);
  mask-image: radial-gradient(80% 75% at 50% 46%, transparent 30%, #000 58%, transparent 96%);
}

.su-welt { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.su-modell {
  position: absolute;
  width: var(--groesse);
  height: var(--groesse);
  opacity: .42;
  filter: saturate(.45);
  transform: translateY(12px) scale(.93);
  transition: opacity .7s ease, filter .7s ease, transform 1s cubic-bezier(.16, 1, .3, 1);
}
.su-modell[data-aktiv] { opacity: 1; filter: none; transform: none; }
.su-modell .szene { position: absolute; inset: 0; }
.su-modell.m1 { --groesse: clamp(250px, 24vw, 390px); right: calc(50% + 300px); top: 3vh; }
.su-modell.m2 { --groesse: clamp(270px, 27vw, 440px); left: calc(50% + 285px); top: 1vh; }
.su-modell.m3 { --groesse: clamp(230px, 21vw, 340px); right: calc(50% + 315px); bottom: 4vh; }
.su-modell.m4 { --groesse: clamp(220px, 19vw, 320px); left: calc(50% + 320px); bottom: 6vh; }

.su-mitte {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-block: auto;
}

/* ---------------------------------------------------------------- Karte */

.su-karte {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--karte-schatten);
}
.su-karte-innen { padding: 30px 38px 32px; }
.su-kopfszene { display: none; }

.su-marke {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
}
.su-marke img { width: 26px; height: 26px; object-fit: contain; }
.su-marke span { font-size: 26px; font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.su-marke b { font-weight: inherit; color: var(--accent); }
html.dark .su-marke img { filter: brightness(0) invert(1); }

/* Fortschritt: ein Balken je Schritt, die Bestätigungsmail gestrichelt dahinter. */
.su-schritte {
  display: grid;
  grid-template-columns: repeat(var(--anzahl, 4), minmax(0, 1fr));
  gap: 6px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}
.su-schritt > * {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.su-schritt > button { cursor: pointer; }
.su-schritt > button:disabled { cursor: default; }
.su-schritt > button:not(:disabled):hover { color: var(--ink); }
.su-schritt > *::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  transition: background-color .35s ease;
}
.su-schritt[data-zustand="fertig"] > *::before,
.su-schritt[data-zustand="aktiv"] > *::before { background: var(--accent); }
.su-schritt[data-zustand="aktiv"] > * { color: var(--ink); font-weight: 600; }
.su-schritt[data-art="warten"] > *::before {
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px);
}
.su-schritt[data-art="warten"][data-zustand="aktiv"] > *::before {
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px);
  animation: su-puls 1.8s ease-in-out infinite;
}
.su-schritt[data-art="warten"][data-zustand="fertig"] > *::before { background: var(--accent); }
@keyframes su-puls { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.su-karte h2,
.su-karte h1:not(.unsichtbar) {
  font-size: 30px;
  line-height: 1.14;
  font-weight: 550;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.su-karte :is(h1, h2) em { display: block; font-style: normal; color: var(--accent); }
.su-karte :is(h1, h2):focus { outline: none; }
.su-marke + h1, .su-marke + .su-fehlerkopf { margin-top: 28px; }
.su-fehlerkopf .su-symbol { margin-bottom: 18px; }
.ws-lead { margin-top: 12px; color: var(--readable); font-size: 15px; line-height: 1.6; }

.step { animation: su-auftritt .38s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes su-auftritt { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.su-unter { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.su-unter a { color: var(--accent); font-weight: 550; text-decoration: none; }
.su-unter a:hover { text-decoration: underline; }

.su-fuss {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 36px;
  font-size: 13px;
  color: var(--muted);
}
.su-fuss a { text-decoration: none; }
.su-fuss a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------ Bedienung */

.ws-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.ws-knopf svg { transition: transform .18s ease; }
.ws-knopf:active:not(:disabled) { transform: translateY(1px); }
.ws-knopf.primaer { background: var(--action); color: #fff; box-shadow: var(--action-shadow); }
.ws-knopf.primaer:hover:not(:disabled) { background: var(--action-hover); }
.ws-knopf:hover:not(:disabled) svg.vor { transform: translateX(3px); }
.ws-knopf:hover:not(:disabled) svg.zurueck { transform: translateX(-3px); }
.ws-knopf.sekundaer { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ws-knopf.sekundaer:hover:not(:disabled) { background: var(--soft); }
.ws-knopf.breit { width: 100%; }
.ws-knopf:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.ws-knopf[aria-busy="true"] { opacity: .8; cursor: progress; }

.ws-dreher {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: ws-dreh .8s linear infinite;
}
@keyframes ws-dreh { to { transform: rotate(360deg); } }

.ws-felder { display: grid; gap: 18px; margin-top: 26px; }
.ws-reihe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ws-reihe.plz { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); }
.ws-feld { display: flex; flex-direction: column; gap: 7px; min-width: 0; position: relative; }
.ws-feld > label { font-size: 14px; font-weight: 550; line-height: 1.35; color: var(--ink); }
.ws-feld > label small { font-size: 13px; font-weight: 400; color: var(--muted); }
.ws-eingabe {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--field-line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  box-shadow: 0 1px 2px #17394c05;
  transition: border-color .18s ease, background .18s ease;
}
.ws-eingabe::placeholder { color: var(--muted); opacity: .78; }
.ws-eingabe:hover { border-color: var(--field-line-hover); }
.ws-eingabe:focus-visible { outline: 3px solid var(--field-focus); outline-offset: 1px; border-color: var(--accent); }
.ws-eingabe[data-zustand="fehler"] { border-color: var(--danger); }
.ws-eingabe[data-zustand="ok"] { border-color: var(--ok); }
.ws-passwort { position: relative; }
.ws-passwort .ws-eingabe { padding-right: 48px; }
.ws-passwort button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.ws-passwort button:hover { background: var(--soft); color: var(--ink); }
.ws-rueckmeldung { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 13px; color: var(--muted); }
.ws-rueckmeldung:empty { min-height: 0; }
.ws-rueckmeldung.fehler { color: var(--danger); }
.ws-rueckmeldung.ok { color: var(--ok); }

.ws-vorschlaege {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--popover-shadow);
}
.ws-vorschlag {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.ws-vorschlag svg { margin-top: 2px; color: var(--muted); }
.ws-vorschlag:hover { background: var(--soft); }

.ws-haken { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.ws-haken input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin: 0;
  border: 1px solid var(--field-line);
  border-radius: 5px;
  background: var(--surface) no-repeat center / 13px 13px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.ws-haken input:hover { border-color: var(--field-line-hover); }
.ws-haken input:checked {
  border-color: var(--action);
  background-color: var(--action);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.ws-haken a { color: var(--accent); font-weight: 550; text-decoration: none; }
.ws-haken a:hover { text-decoration: underline; }
.ws-haken-liste { display: grid; gap: 12px; }

.ws-hinweis {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px 15px;
  border: 1px solid var(--tint-line);
  border-radius: 11px;
  background: var(--tint);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.ws-hinweis > svg { margin-top: 1px; color: var(--accent); }
.ws-hinweis strong { font-weight: 600; }
.ws-leise { color: var(--muted); font-size: 14px; line-height: 1.55; }

.ws-pruefung { min-height: 65px; }
.ws-pruefung-fehler { margin-top: 8px; font-size: 13px; color: var(--danger); }

.ws-aktionen { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.ws-aktionen.rechts { justify-content: flex-end; }
.ws-aktionen .primaer { min-width: 150px; }
.ws-aktionen.abschluss .primaer { flex: 1; }

/* ------------------------------------------------------------- 3D-Szene */

.szene { position: relative; overflow: hidden; }
.szene-flaeche { position: absolute; inset: 0; transition: opacity .5s cubic-bezier(.16, 1, .3, 1); }
.szene-flaeche canvas { display: block; width: 100%; height: 100%; }
.szene-ersatz { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .3s ease; }
.szene-ersatz svg { stroke-width: .8; }
.szene[data-zustand="ersatz"] .szene-ersatz { opacity: .35; }
.szene:not([data-zustand="bereit"]) .szene-flaeche { opacity: 0; }

/* ---------------------------------------------------- Ergebnis-Seiten */

.su-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 13px;
  border: 1px solid var(--tint-line);
  background: var(--tint);
  color: var(--accent);
}
.su-symbol.ok { border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-surface); color: var(--ok); }
.su-symbol.fehler { border-color: var(--danger-line); background: var(--danger-surface); color: var(--danger); }
.ws-mailadresse { margin-top: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ws-anleitung { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 4px; }
.ws-anleitung li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--media);
  font-size: 14px;
  line-height: 1.5;
}
.ws-anleitung li > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent);
}
.ws-anleitung strong { font-weight: 600; }
.ws-anleitung + .ws-leise { margin-top: 18px; }
.ws-vorgang { margin-top: 14px; font-size: 13px; color: var(--muted); }
.ws-vorgang code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 2px 6px; border-radius: 5px; background: var(--soft); color: var(--ink); }
.ws-formular { display: grid; gap: 16px; margin-top: 24px; }

/* -------------------------------------------------------- Bildschirme */

@media (max-width: 1180px) {
  .su-welt { display: none; }
  .su-kopfszene {
    display: block;
    position: relative;
    height: 190px;
    background: var(--media);
    border-bottom: 1px solid var(--line-soft);
  }
  .su-kopfszene .szene { position: absolute; inset: 0; }
}

@media (max-width: 560px) {
  .su { padding: 14px 12px 20px; }
  .su-karte { border-radius: 18px; }
  .su-karte-innen { padding: 24px 20px 24px; }
  .su-kopfszene { height: 170px; }
  .su-karte h2, .su-karte h1:not(.unsichtbar) { font-size: 27px; }
  .ws-eingabe { font-size: 16px; }
  .ws-aktionen .primaer { min-width: 0; flex: 1; }
  .su-schritt > * { font-size: 11px; }
  .ws-mailadresse { font-size: 17px; }
}

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