/* =========================================================
   Schritt-für-Schritt-Formulare (Kontakt + Energie-Check)
   Eine Frage pro Schritt, damit es sich leicht anfühlt.
   Farben über Variablen: .sf-light (Personal Training), .sf-dark (Athletik)
   ========================================================= */

.sf {
  --sf-bg: #fff; --sf-ink: #0E1525; --sf-ink-2: #3D4559; --sf-muted: #6A7184; --sf-line: #E3E6EE;
  --sf-chip: #F6F7F9; --sf-accent: #2D49E0; --sf-accent-ink: #fff; --sf-accent-soft: #DCE2F5;
  --sf-done-bg: #0E1525; --sf-done-ink: #fff;
  --sf-font-h: 'Plus Jakarta Sans', system-ui, sans-serif; --sf-font-b: 'Poppins', system-ui, sans-serif;
  --sf-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; background: var(--sf-bg); color: var(--sf-ink); font-family: var(--sf-font-b);
  border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 0 0 1px var(--sf-line), 0 30px 60px -40px rgba(14,21,37,.45);
  display: flex; flex-direction: column; min-height: 460px;
}
.sf-dark {
  --sf-bg: #111; --sf-ink: #fff; --sf-ink-2: #CCC; --sf-muted: #888; --sf-line: #2a2a2a;
  --sf-chip: #181818; --sf-accent: #00FF88; --sf-accent-ink: #0D0D0D; --sf-accent-soft: rgba(0,255,136,.12);
  --sf-done-bg: #00FF88; --sf-done-ink: #0D0D0D;
  --sf-font-h: 'Montserrat', sans-serif;
  box-shadow: 0 0 0 1px var(--sf-line), 0 30px 60px -30px rgba(0,0,0,.8);
}

.sf-head { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1.4rem, 3vw, 2rem); }
.sf-kicker { font-size: .8rem; color: var(--sf-muted); }
.sf-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--sf-line); overflow: hidden; }
.sf-bar i { display: block; height: 100%; width: 100%; background: var(--sf-accent); transform-origin: left; transform: scaleX(var(--sf-p, 0)); transition: transform .6s var(--sf-ease); }
.sf-count { font-size: .8rem; color: var(--sf-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-count b { color: var(--sf-ink); font-weight: 600; }

.sf-form { flex: 1; display: flex; flex-direction: column; }
.sf-step { border: 0; margin: 0; padding: 0; min-width: 0; flex: 1; }
.sf-step[hidden] { display: none; }
.sf-step.is-in { animation: sf-in .5s var(--sf-ease) both; }
.sf-step.is-in-back { animation: sf-in-back .5s var(--sf-ease) both; }
@keyframes sf-in { from { opacity: 0; transform: translateX(24px); filter: blur(4px); } }
@keyframes sf-in-back { from { opacity: 0; transform: translateX(-24px); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) { .sf-step.is-in, .sf-step.is-in-back { animation: none; } }

.sf-q { display: block; padding: 0; font-family: var(--sf-font-h); font-weight: 700; color: var(--sf-ink);
  font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5rem; text-wrap: balance; }
.sf-hint { margin: 0 0 1.4rem; font-size: .9rem; color: var(--sf-muted); }

/* Auswahl-Chips */
.sf-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.sf-chips.col { flex-direction: column; align-items: stretch; }
.sf-chip { position: relative; cursor: pointer; }
.sf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-chip > span {
  display: flex; align-items: center; gap: .6rem; padding: .75rem 1.05rem; border-radius: 999px;
  background: var(--sf-chip); color: var(--sf-ink); box-shadow: inset 0 0 0 1px var(--sf-line);
  font-size: .95rem; line-height: 1.3; transition: background-color .2s, color .2s, box-shadow .2s, transform .2s var(--sf-ease);
}
.sf-chips.col .sf-chip > span { border-radius: 14px; padding: .9rem 1.1rem; }
.sf-chip small { display: block; color: var(--sf-muted); font-size: .8rem; margin-top: .1rem; }
.sf-chip .sf-ico { flex: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sf-line); transition: box-shadow .2s, background-color .2s; }
.sf-chip input[type="checkbox"] + span .sf-ico { border-radius: 5px; }
.sf-chip:hover > span { box-shadow: inset 0 0 0 1px var(--sf-muted); }
.sf-chip input:focus-visible + span { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-chip input:checked + span { background: var(--sf-accent); color: var(--sf-accent-ink); box-shadow: none; }
.sf-chip input:checked + span small { color: inherit; opacity: .8; }
.sf-chip input:checked + span .sf-ico { background: var(--sf-accent-ink); box-shadow: inset 0 0 0 4px var(--sf-accent); }
.sf-chip:active > span { transform: scale(.98); }

/* Eingabefelder */
.sf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sf-field { display: grid; gap: .35rem; }
.sf-field.full { grid-column: 1 / -1; }
.sf-field label { font-size: .82rem; font-weight: 500; color: var(--sf-ink-2); }
.sf-field label .opt { color: var(--sf-muted); font-weight: 400; margin-left: .25rem; }
.sf input[type="text"], .sf input[type="email"], .sf input[type="tel"], .sf textarea {
  font: inherit; font-size: 1rem; color: var(--sf-ink); width: 100%; background: transparent;
  border: 0; border-bottom: 1.5px solid var(--sf-line); border-radius: 0; padding: .65rem 0; transition: border-color .2s;
}
.sf textarea { min-height: 130px; resize: vertical; line-height: 1.55; border: 1.5px solid var(--sf-line); border-radius: 12px; padding: .8rem .9rem; }
.sf input:focus, .sf textarea:focus { outline: none; border-color: var(--sf-accent); }
.sf input::placeholder, .sf textarea::placeholder { color: var(--sf-muted); opacity: .8; }
.sf .is-invalid { border-color: #E5484D !important; }
.sf-consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.2rem; font-size: .82rem; color: var(--sf-ink-2); cursor: pointer; line-height: 1.5; }
.sf-consent input { margin-top: .2rem; accent-color: var(--sf-accent); width: 1rem; height: 1rem; flex: none; }
.sf-consent a { color: inherit; }
.sf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Navigation */
.sf-nav { display: flex; align-items: center; gap: .6rem; margin-top: 2rem; }
.sf-back { padding: .85rem 1.2rem; border-radius: 999px; border: 0; background: var(--sf-chip); color: var(--sf-ink); font: inherit; font-size: .92rem; cursor: pointer; box-shadow: inset 0 0 0 1px var(--sf-line); }
.sf-back[hidden] { display: none; }
.sf-next { flex: 1; padding: .95rem 1.4rem; border-radius: 999px; border: 0; background: var(--sf-accent); color: var(--sf-accent-ink);
  font-family: var(--sf-font-h); font-weight: 700; font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: transform .2s var(--sf-ease), box-shadow .25s, opacity .2s; }
.sf-next:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px var(--sf-accent); }
.sf-next:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.sf-skip { border: 0; background: none; color: var(--sf-muted); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sf-skip[hidden] { display: none; }
.sf-status { min-height: 1.2em; margin: .8rem 0 0; font-size: .85rem; color: #E5484D; }
.sf-trust { margin: 1rem 0 0; font-size: .78rem; color: var(--sf-muted); line-height: 1.5; }

/* Abschluss */
.sf-done { flex: 1; display: flex; flex-direction: column; justify-content: center; border-radius: 16px; padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--sf-done-bg); color: var(--sf-done-ink); animation: sf-in .6s var(--sf-ease) both; }
.sf-done[hidden] { display: none; }
.sf-done h3 { font-family: var(--sf-font-h); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.03em; margin: 0 0 .6rem; color: inherit; }
.sf-done p { margin: 0 0 1.6rem; opacity: .8; max-width: 32rem; }
.sf-done .sf-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sf-done a.sf-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .8rem 1.2rem; border-radius: 999px; text-decoration: none; font-family: var(--sf-font-h); font-weight: 700; font-size: .92rem; }
.sf-light .sf-done a.sf-btn.primary { background: #F2722B; color: #fff; }
.sf-light .sf-done a.sf-btn.ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.sf-dark .sf-done a.sf-btn.primary { background: #0D0D0D; color: #00FF88; }
.sf-dark .sf-done a.sf-btn.ghost { color: #0D0D0D; box-shadow: inset 0 0 0 1.5px rgba(13,13,13,.35); }

@media (max-width: 560px) {
  .sf { min-height: 0; border-radius: 18px; }
  .sf-fields { grid-template-columns: 1fr; }
}
.sf-head[hidden], .sf-nav[hidden], .sf-form[hidden] { display: none; }
.sf-chip > span > span { display: block; }
