/* Bewerbungsformular — Nachbau des bisherigen Typeform-Ablaufs.
   Aufbau, Reihenfolge und Optik entsprechen dem, was Bewerber bisher gesehen haben:
   ein Bildschirm pro Frage, Hintergrundfoto, Fortschrittsbalken oben.
   Farben kommen als CSS-Variablen aus der Seite (je Kanzlei unterschiedlich). */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--frage);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--flaeche) var(--foto) center / cover no-repeat fixed;
}
/* Das Foto wird aufgehellt, damit der Text darauf ruhig lesbar bleibt —
   im bisherigen Formular war es genauso. */
body::before {
  content: ""; position: fixed; inset: 0;
  background: rgba(255, 255, 255, .86);
  pointer-events: none; z-index: 0;
}

/* --- Fortschritt ------------------------------------------------------- */
.fortschritt {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  background: rgba(0, 0, 0, .06); z-index: 20;
}
.fortschritt i {
  display: block; height: 100%; width: 0;
  background: var(--akzent); transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* --- Logo -------------------------------------------------------------- */
.marke {
  position: fixed; top: 22px; left: 30px; z-index: 20;
  height: 44px; width: auto;
}

/* --- Bildschirme ------------------------------------------------------- */
.buehne { position: relative; z-index: 1; min-height: 100%; }

.schritt {
  display: none;
  min-height: 100vh; min-height: 100dvh;
  padding: 90px 30px 120px;
  align-items: center;
}
.schritt.aktiv { display: flex; animation: auftauchen .4s ease both; }
@keyframes auftauchen {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.inhalt { width: 100%; max-width: 740px; margin: 0 auto; }
.schritt[data-mitte="1"] .inhalt { text-align: center; }
.schritt[data-mitte="1"] .knopf { margin-left: auto; margin-right: auto; }

/* --- Texte ------------------------------------------------------------- */
.titel {
  font-size: clamp(26px, 3.4vw, 34px); font-weight: 700;
  line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em;
}
.frage {
  font-size: clamp(21px, 2.4vw, 26px); font-weight: 500;
  line-height: 1.35; margin: 0 0 26px; display: flex; gap: 12px; align-items: baseline;
}
.frage .nr {
  flex: 0 0 auto; background: var(--akzent); color: #fff;
  font-size: 12px; font-weight: 700; border-radius: 4px;
  padding: 2px 6px; position: relative; top: -3px;
}
.frage .pflicht { color: var(--akzent); }
.hinweis { font-size: 17px; line-height: 1.5; color: #444; margin: 0 0 24px; }
.klein { font-size: 14px; color: #555; margin-top: 14px; }
.klein svg { vertical-align: -2px; margin-right: 5px; }

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* --- Knopf ------------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--knopf); color: #fff; border: 0; border-radius: 999px;
  font: inherit; font-size: 18px; font-weight: 700;
  padding: 13px 30px; cursor: pointer;
  transition: filter .15s, transform .08s;
}
.knopf:hover { filter: brightness(1.12); }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .45; cursor: default; filter: none; }
.knopf .tipp { font-size: 12px; font-weight: 600; opacity: .8; }

/* --- Eingaben ---------------------------------------------------------- */
.feld {
  width: 100%; border: 0; border-bottom: 2px solid rgba(0, 0, 0, .22);
  background: transparent; font: inherit; font-size: clamp(20px, 2.2vw, 24px);
  color: var(--antwort); padding: 8px 2px 12px; outline: none;
}
.feld::placeholder { color: rgba(0, 0, 0, .28); }
.feld:focus { border-bottom-color: var(--akzent); }
.zeile { display: flex; gap: 10px; align-items: flex-end; }
.vorwahl {
  border: 0; border-bottom: 2px solid rgba(0, 0, 0, .22); background: transparent;
  font: inherit; font-size: clamp(20px, 2.2vw, 24px); color: var(--antwort);
  padding: 8px 2px 12px; outline: none; flex: 0 0 auto;
}

/* --- Auswahl ----------------------------------------------------------- */
.optionen { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.option {
  display: flex; align-items: center; gap: 12px; width: fit-content; min-width: 260px;
  max-width: 100%; padding: 11px 20px 11px 12px; cursor: pointer;
  border: 1.5px solid var(--antwort); border-radius: 8px;
  background: color-mix(in srgb, var(--antwort) 8%, transparent);
  color: var(--antwort); font-size: 19px;
  transition: background .15s;
}
.option:hover { background: color-mix(in srgb, var(--antwort) 16%, transparent); }
.option.gewaehlt { background: color-mix(in srgb, var(--antwort) 26%, transparent); }
.option .taste {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 5px;
  border: 1.5px solid var(--antwort); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .55);
}
.option input { position: absolute; opacity: 0; pointer-events: none; }

/* --- Skala ------------------------------------------------------------- */
.skala { margin-bottom: 12px; }
.skala .werte { display: flex; flex-wrap: wrap; gap: 8px; }
.skala .wert {
  width: 52px; height: 52px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--antwort); color: var(--antwort);
  background: color-mix(in srgb, var(--antwort) 8%, transparent);
  font: inherit; font-size: 18px; font-weight: 600;
  transition: background .15s;
}
.skala .wert:hover { background: color-mix(in srgb, var(--antwort) 16%, transparent); }
.skala .wert.gewaehlt { background: var(--antwort); color: #fff; }
.skala .enden {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-size: 14px; color: #555; max-width: 660px;
}

/* --- Datei ------------------------------------------------------------- */
.datei {
  display: block; border: 2px dashed rgba(0, 0, 0, .25); border-radius: 10px;
  padding: 26px; text-align: center; cursor: pointer; margin-bottom: 22px;
  background: rgba(255, 255, 255, .5); font-size: 17px; color: #444;
}
.datei:hover { border-color: var(--akzent); }
.datei input { display: none; }
.datei b { display: block; color: var(--antwort); font-size: 18px; margin-bottom: 4px; }

/* --- Fehler ------------------------------------------------------------ */
.fehler {
  display: none; background: #c0392b; color: #fff; border-radius: 6px;
  padding: 9px 14px; font-size: 15px; margin-bottom: 16px; max-width: 520px;
}
.fehler.an { display: block; }

/* --- Blättern ---------------------------------------------------------- */
.blaettern {
  position: fixed; right: 26px; bottom: 24px; z-index: 20; display: flex; gap: 2px;
}
.blaettern button {
  width: 42px; height: 38px; border: 0; cursor: pointer; color: #fff;
  background: var(--knopf); display: grid; place-items: center;
}
.blaettern button:first-child { border-radius: 6px 0 0 6px; }
.blaettern button:last-child  { border-radius: 0 6px 6px 0; }
.blaettern button:disabled { opacity: .45; cursor: default; }

/* --- Fusszeile --------------------------------------------------------- */
.fuss {
  position: fixed; left: 30px; bottom: 26px; z-index: 20;
  font-size: 12.5px; color: #555;
}
.fuss a { color: inherit; }

/* --- Danke-Seite ------------------------------------------------------- */
.danke { display: flex; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 90px 30px; }
.danke .inhalt { text-align: center; }
.haken {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 22px;
  background: var(--knopf); display: grid; place-items: center;
}

/* --- Handy ------------------------------------------------------------- */
@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .marke { top: 16px; left: 18px; height: 34px; }
  .schritt { padding: 74px 20px 110px; }
  .fuss { left: 18px; bottom: 18px; font-size: 11.5px; }
  .blaettern { right: 16px; bottom: 16px; }
  .skala .wert { width: 44px; height: 44px; font-size: 16px; }
  .option { min-width: 0; width: 100%; }
}

/* Wer Bewegung reduziert haben will, bekommt keine Animation. */
@media (prefers-reduced-motion: reduce) {
  .schritt.aktiv { animation: none; }
  .fortschritt i { transition: none; }
}
