/* =========================================================
   Physiotherapie Tritthart – Bewerbungs-Funnel (/bewerben/)
   Ergänzt styles.css. Nur Farben und Schriften aus dessen Tokens.
   Linksbündig, keine Versalien in Überschriften.
   ========================================================= */

.bw {
  background:
    radial-gradient(120% 70% at 100% 0%, var(--dunst) 0%, transparent 60%),
    var(--papier);
  padding-block: clamp(1.6rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem);
}

.bw__raster {
  display: grid;
  gap: clamp(1.4rem, 4vw, 4.5rem);
  align-items: start;
}
@media (min-width: 960px) {
  .bw__raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .bw__seite { position: sticky; top: 6.5rem; }
}

/* ---------- Linke Spalte ---------- */
/* Die Schriftgröße richtet sich nach der Spaltenbreite, damit
   "Physiotherapeut/in" (ein langes Wort) nie über den Rand ragt. */
.bw__seite { container-type: inline-size; }
.bw__titel {
  font-size: clamp(1.9rem, 10.8cqi, 3.4rem);
  color: var(--tinte);
  margin-bottom: 0.9rem;
}
.bw__titel em {
  font-style: italic;
  font-weight: 500;
  color: var(--tuerkis);
}
.bw__lead {
  color: var(--nebel);
  max-width: 34ch;
  margin-bottom: 1.4rem;
}

.bw__fakten {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.4rem;
}
.bw__fakten li {
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--nebel);
  padding-left: 0.85rem;
  border-left: 2px solid var(--eiche);
}
.bw__fakten strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.15;
  color: var(--petrol);
}
@media (max-width: 959px) {
  .bw__fakten { grid-template-columns: repeat(4, auto); justify-content: start; }
}
@media (max-width: 560px) {
  .bw__fakten { grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; }
  .bw__fakten li { font-size: 0.82rem; }
  .bw__fakten strong { font-size: 1.05rem; }
  .bw__lead { line-height: 1.55; }
}

.bw__bild { display: none; margin: 2rem 0 0; }
.bw__bild img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}
@media (min-width: 960px) {
  .bw__bild { display: block; }
}
/* Auf dem Handy die Frage schnell ins Bild holen */
@media (max-width: 959px) {
  .bw__seite .oberzeile { margin-bottom: 0.6rem; }
  .bw__lead { margin-bottom: 1rem; font-size: 0.97rem; }
}

/* ---------- Karte ---------- */
.bw__karte {
  background: var(--weiss);
  border-radius: 20px;
  border: 1px solid var(--hauch);
  box-shadow: 0 30px 60px -40px rgba(6, 56, 74, 0.45);
  padding: clamp(1.25rem, 4vw, 2.6rem);
  scroll-margin-top: 5.5rem;
}

.bw__leiste {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2rem;
  margin-bottom: 0.7rem;
}
.bw__zaehler {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  color: var(--nebel);
}
.bw__zurueck {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.3rem 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--petrol);
  cursor: pointer;
}
.bw__zurueck:hover { color: var(--tuerkis); }

.bw__fortschritt {
  display: none;
  height: 5px;
  border-radius: 999px;
  background: var(--dunst);
  overflow: hidden;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}
.bw__fortschritt span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--tuerkis), var(--leucht));
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0.2);
  transition: transform 0.5s var(--kurve);
}

.js .bw__leiste,
.js .bw__fortschritt { display: flex; }
.js .bw__fortschritt { display: block; }
.bw__karte.ist-ende .bw__fortschritt,
.bw__karte.ist-ende .bw__leiste { visibility: hidden; }

/* ---------- Schritte ---------- */
.bw__form { margin: 0; }

.bw-schritt {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
/* Ohne JavaScript stehen alle Fragen untereinander */
.bw-schritt + .bw-schritt { margin-top: 2.4rem; }
.bw__form--ausbildung {
  margin-top: 3rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--hauch);
}

.js .bw-schritt { display: none; }
.js .bw-schritt.ist-aktiv {
  display: block;
  animation: bw-rein 0.45s var(--kurve) both;
}
.js .bw-schritt + .bw-schritt { margin-top: 0; }
.js .bw__form--ausbildung { margin-top: 0; padding-top: 0; border-top: 0; }

@keyframes bw-rein {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}
.bw__karte.zurueck .bw-schritt.ist-aktiv { animation-name: bw-rein-zurueck; }
@keyframes bw-rein-zurueck {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

.bw-schritt__frage {
  display: block;
  float: none;
  width: 100%;
  padding: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--tinte);
  margin: 0 0 1.4rem;
  text-wrap: balance;
}
/* Die Frage bekommt den Fokus nur per Skript (für Screenreader) –
   ein Rahmen darum wäre bloß störend. */
.bw-schritt__frage:focus,
.bw-schritt__frage:focus-visible { outline: none; }

.bw-schritt__hinweis {
  color: var(--nebel);
  margin: -0.7rem 0 1.3rem;
  font-size: 0.97rem;
}
.bw-schritt__klein {
  font-size: 0.85rem;
  color: var(--nebel);
  margin-top: 1rem;
  line-height: 1.55;
}

/* ---------- Antwort-Kacheln ---------- */
.bw-wahl {
  display: grid;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .bw-wahl--mehrfach { grid-template-columns: 1fr 1fr; }
}

.bw-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 3.6rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid rgba(6, 56, 74, 0.16);
  border-radius: 14px;
  background: var(--weiss);
  cursor: pointer;
  line-height: 1.35;
  transition: border-color 0.25s var(--kurve), background 0.25s var(--kurve),
              transform 0.25s var(--kurve), box-shadow 0.25s var(--kurve);
}
.bw-option:hover {
  border-color: var(--tuerkis);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -18px rgba(2, 85, 110, 0.7);
}
.bw-option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.bw-option span { flex: 1; }

/* Pfeil bei Einfachauswahl */
.bw-option input[type='radio'] + span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.bw-option input[type='radio'] + span::after {
  content: '→';
  flex: none;
  color: var(--tuerkis);
  opacity: 0.45;
  transition: transform 0.25s var(--kurve), opacity 0.25s var(--kurve);
}
.bw-option:hover input[type='radio'] + span::after { opacity: 1; transform: translateX(3px); }

/* Kästchen bei Mehrfachauswahl */
.bw-option input[type='checkbox'] + span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.bw-option input[type='checkbox'] + span::before {
  content: '';
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 6px;
  border: 1.5px solid rgba(6, 56, 74, 0.35);
  background: var(--weiss) center / 0.85rem no-repeat;
  transition: background-color 0.2s var(--kurve), border-color 0.2s var(--kurve);
}
.bw-option input[type='checkbox']:checked + span::before {
  border-color: var(--tuerkis);
  background-color: var(--tuerkis);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.bw-option:has(input:checked) {
  border-color: var(--tuerkis);
  background: var(--dunst);
}
.bw-option:has(input:focus-visible) {
  outline: 3px solid var(--leucht);
  outline-offset: 2px;
}

.bw-weiter { margin-top: 1.4rem; }
.js .bw-weiter[hidden] { display: inline-flex; }

/* ---------- Eingabefelder ---------- */
.bw-feld { margin-bottom: 1.05rem; scroll-margin-top: 6.5rem; }
.bw-feld input, .bw-feld select { scroll-margin-top: 7.5rem; }
.bw-feld label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.bw-feld__optional { font-weight: 400; color: var(--nebel); }
.bw-feld input,
.bw-feld select {
  width: 100%;
  font: inherit;
  font-size: 1.02rem;
  color: var(--tinte);
  background: var(--weiss);
  border: 1.5px solid rgba(6, 56, 74, 0.2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-height: 3.2rem;
  transition: border-color 0.2s var(--kurve), box-shadow 0.2s var(--kurve);
}
.bw-feld select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background: var(--weiss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2302556e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 0.9rem center / 1.1rem no-repeat;
}
.bw-feld input::placeholder { color: rgba(6, 56, 74, 0.42); }
.bw-feld input:focus,
.bw-feld select:focus {
  outline: none;
  border-color: var(--tuerkis);
  box-shadow: 0 0 0 4px rgba(0, 166, 182, 0.18);
}
.bw-feld input[aria-invalid='true'],
.bw-feld select[aria-invalid='true'] { border-color: #b3261e; }
.bw-feld__fehler {
  color: #b3261e;
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

.bw-absenden { width: 100%; margin-top: 0.6rem; }
@media (min-width: 640px) { .bw-absenden { width: auto; } }
.bw-absenden[aria-busy='true'] { opacity: 0.7; cursor: progress; }

/* ---------- Meldung bei Fehler ---------- */
.bw-meldung {
  margin-top: 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: #fbeceb;
  color: #7a1a14;
  font-size: 0.95rem;
}
.bw-meldung a { color: inherit; font-weight: 700; }

/* ---------- Endseiten ---------- */
.bw-ende p { color: var(--nebel); }
.bw-ende__zeichen {
  display: inline-grid;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1.1rem;
}
.bw-ende__zeichen svg { width: 100%; height: 100%; }
.bw-ende__zeichen circle { fill: var(--dunst); }
.bw-ende__zeichen path {
  fill: none;
  stroke: var(--tuerkis);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  animation: bw-haken 0.6s 0.2s var(--kurve) forwards;
}
@keyframes bw-haken { to { stroke-dashoffset: 0; } }

.bw-ende__kasten {
  margin-top: 1.6rem;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  background: var(--papier);
  border: 1px solid var(--hauch);
}
.bw-ende__kasten p { margin-bottom: 0.9rem; }
.bw-textlink { font-weight: 700; }

.bw__fuss {
  margin: 2rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hauch);
  font-size: 0.85rem;
  color: var(--nebel);
}

@media (prefers-reduced-motion: reduce) {
  .js .bw-schritt.ist-aktiv { animation: none !important; }
  .bw-ende__zeichen path { stroke-dashoffset: 0; animation: none !important; }
  .bw__fortschritt span { transition: none; }
}
