/* ============================================================
   Anfrage-Assistent — multi-step wizard
   Reuses tokens + .btn/.field--float/.dropzone from styles.css
   ============================================================ */
.wizard-page { background: var(--surface-darker); }

.nav-back {
  color: var(--muted-on-dark-strong); text-decoration: none; font-size: 0.95rem;
  font-family: var(--font-display); font-weight: 500;
  transition: color var(--transition-default);
}
.nav-back:hover { color: #fff; }

.wizard-main {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 60px);
  display: grid; place-items: center;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem;
}
.wizard-bg { position: absolute; inset: 0; pointer-events: none; }
.wizard-grid {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(rgba(82,183,136,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,183,136,0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(110% 90% at 50% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(110% 90% at 50% 0%, #000, transparent 70%);
  will-change: transform;
}

.wizard-shell {
  position: relative; width: min(100%, 620px);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-default);
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

/* ---------- Progress ---------- */
.wizard-progress { margin-bottom: 2rem; }
.wp-track { height: 4px; border-radius: 4px; background: var(--border-default); overflow: hidden; }
.wp-fill {
  height: 100%; width: 50%; border-radius: 4px; background: var(--color-primary);
  transition: width 0.5s var(--ease-assemble);
}
.wp-steps { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; gap: 2rem; }
.wp-step {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  transition: color var(--transition-default);
}
.wp-dot {
  width: 12px; height: 11px; background: var(--border-strong);
  clip-path: var(--triangle-clip); transition: background var(--transition-default), transform var(--transition-default);
}
.wp-step.is-active { color: var(--color-primary); }
.wp-step.is-active .wp-dot { background: var(--color-primary); transform: scale(1.15); }
.wp-step.is-done .wp-dot { background: var(--color-primary); }

/* ---------- Steps / slide transitions ---------- */
.wizard-viewport { position: relative; }
.wstep { display: none; }
.wstep.is-current { display: block; }
.wstep.anim-in { animation: stepIn 0.5s var(--ease-assemble) both; }
.wstep.anim-out { animation: stepOut 0.32s var(--ease-assemble) both; }

@keyframes stepIn  { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes stepOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-34px); } }

/* staggered field entrance within a step */
.wstep.anim-in .field, .wstep.anim-in .dropzone,
.wstep.anim-in .checkbox, .wstep.anim-in .wstep-actions,
.wstep.anim-in .form-microcopy {
  opacity: 0; animation: fieldIn 0.5s var(--ease-assemble) forwards;
}
.wstep.anim-in > *:nth-child(4) { animation-delay: 0.08s; }
.wstep.anim-in > *:nth-child(5) { animation-delay: 0.14s; }
.wstep.anim-in > *:nth-child(6) { animation-delay: 0.20s; }
.wstep.anim-in > *:nth-child(7) { animation-delay: 0.26s; }
.wstep.anim-in > *:nth-child(8) { animation-delay: 0.32s; }
@keyframes fieldIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.wstep-kicker {
  font-family: var(--font-display); font-size: var(--text-eyebrow); font-weight: 600;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--color-primary); margin: 0 0 0.6rem;
}
.wstep-title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; margin: 0 0 0.4rem; }
.wstep-sub { color: var(--text-muted); margin: 0 0 1.6rem; font-size: 1.02rem; }

.wstep .field { margin-bottom: 1.1rem; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }

/* select styled like float input */
.field--float select {
  width: 100%; font: inherit; appearance: none;
  padding: 1.35rem 0.95rem 0.55rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-input);
  background: var(--surface-page);
  background-image: linear-gradient(45deg, transparent 50%, var(--color-primary) 50%),
                    linear-gradient(135deg, var(--color-primary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 1.35rem, calc(100% - 12px) 1.35rem;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color var(--transition-default), box-shadow var(--transition-default);
}
.field--float select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,127,79,0.14); }
.field--float select + label {
  position: absolute; left: 0.95rem; top: 0.4rem;
  transform: scale(0.76); transform-origin: left top; color: var(--color-primary);
  font-size: 1rem; pointer-events: none;
}

.dropzone { margin-bottom: 1.1rem; }
.checkbox { margin-bottom: 1.4rem; }

.wstep-actions { margin-top: 0.4rem; }
.wstep-actions--split { display: flex; gap: 0.8rem; align-items: center; }
.wstep-actions--split .btn-primary { flex: 1; }
.btn-ghost--dark { --btn-fg: var(--text-body); color: var(--btn-fg); border-color: var(--border-strong); }
.btn-ghost--dark:hover { --btn-fg: var(--anthracite-900); background: var(--surface-tint); border-color: var(--anthracite-700); color: var(--btn-fg); transform: translateY(-2px); }

.form-microcopy {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin: 1rem 0 0; font-size: 0.82rem; color: var(--text-muted); text-align: center;
}
.form-microcopy svg { width: 12px; height: auto; fill: var(--color-primary); flex-shrink: 0; }

/* ---------- Success ---------- */
.wsuccess { text-align: center; padding: 1rem 0.5rem 0.5rem; }
.check-wrap { display: grid; place-items: center; margin-bottom: 1.4rem; }
.check-svg { width: 84px; height: 84px; }
.check-circle {
  fill: none; stroke: var(--color-primary); stroke-width: 4;
  stroke-dasharray: 208; stroke-dashoffset: 208;
  animation: drawCircle 0.6s var(--ease-assemble) forwards;
}
.check-mark {
  fill: none; stroke: var(--color-primary); stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: drawMark 0.4s var(--ease-assemble) 0.5s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawMark   { to { stroke-dashoffset: 0; } }

.wsuccess-title {
  font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; margin: 0 0 0.6rem;
  opacity: 0; animation: fieldIn 0.5s var(--ease-assemble) 0.7s forwards;
}
.wsuccess-text { font-size: 1.05rem; max-width: 30rem; margin: 0 auto 1rem; opacity: 0; animation: fieldIn 0.5s var(--ease-assemble) 0.82s forwards; }
.wsuccess-note { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 1.6rem; opacity: 0; animation: fieldIn 0.5s var(--ease-assemble) 0.94s forwards; }
.wsuccess .btn { opacity: 0; animation: fieldIn 0.5s var(--ease-assemble) 1.06s forwards; }

@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .wstep.anim-in, .wstep.anim-out,
  .wstep.anim-in .field, .wstep.anim-in .dropzone, .wstep.anim-in .checkbox,
  .wstep.anim-in .wstep-actions, .wstep.anim-in .form-microcopy,
  .check-circle, .check-mark,
  .wsuccess-title, .wsuccess-text, .wsuccess-note, .wsuccess .btn {
    animation: none !important; opacity: 1 !important; transform: none !important;
    stroke-dashoffset: 0 !important;
  }
  .wp-fill { transition: none; }
}

/* ============================================================
   FORMULAR-ZUSTÄNDE — Fehler, Versand, Honeypot
   ============================================================ */

/* Honeypot: unsichtbar, aber nicht display:none — manche Bots
   überspringen versteckte Felder, wenn sie ausgeblendet sind. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--anthracite-900);
  background: var(--surface-warn);
  border-left: 3px solid var(--anthracite-700);
  border-radius: var(--radius-default);
}
.form-error[hidden] { display: none; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.62;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.btn:disabled:hover { transform: none; box-shadow: none; }
