/* ============================================================
   Formulario de cualificación · hereda el design system v3
   (liquid glass blanco, neutros fríos, cero amarillos)
   ============================================================ */

.fm-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 20px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.fm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.fm-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(22, 23, 27, 0.08);
  overflow: hidden;
  margin-bottom: 18px;
}
.fm-bar span {
  display: block;
  height: 100%;
  width: 16.6%;
  border-radius: 999px;
  background: var(--ink);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fm-card {
  padding: 32px 30px 26px;
  border-radius: var(--r-l);
}

.fm-done { display: none; text-align: center; }
.fm-done.on { display: block; }
.fm-card.off { display: none; }

.fm-step { display: none; animation: fmIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fm-step.on { display: block; }
@keyframes fmIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.fm-card h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(25px, 5vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
.fm-sub {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

.fm-opts { display: grid; gap: 9px; margin-top: 24px; }

.fm-opt {
  text-align: left;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 15px 17px;
  border-radius: var(--r);
  border: 1px solid var(--glass-line);
  background: var(--glass-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(28, 32, 40, 0.05);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}
.fm-opt:hover { transform: translateY(-1px); background: var(--glass); }
.fm-opt.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 8px 22px -10px rgba(22, 23, 27, 0.7);
}

.fm-fields { display: grid; gap: 14px; margin-top: 24px; }
.fm-field { display: block; }
.fm-field > span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 7px;
  font-family: var(--mono);
}
.fm-field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.75; }

.fm-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fm-input::placeholder { color: var(--ink-4); }
.fm-input:focus {
  border-color: rgba(22, 23, 27, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 3px rgba(22, 23, 27, 0.06);
}
.fm-area { margin-top: 24px; resize: vertical; line-height: 1.5; }

.fm-err {
  color: var(--bad);
  font-size: 13.5px;
  font-weight: 500;
  min-height: 20px;
  margin-top: 14px;
}

.fm-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.fm-nav .btn { flex: 1; justify-content: center; }
.fm-back {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 4px;
  visibility: hidden;
  transition: color 0.2s ease;
}
.fm-back:hover { color: var(--ink); }
.fm-back.on { visibility: visible; }

/* ---- éxito ---- */

.fm-code {
  font-family: var(--mono);
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 22px 18px;
  margin: 22px 0 0;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  word-break: break-all;
}
.fm-cta { display: grid; gap: 10px; margin-top: 26px; }
.fm-cta .btn { justify-content: center; }
.fm-fine { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }

.fm-foot {
  margin-top: auto;
  padding-top: 34px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--ink-4);
}

.fm-load { opacity: 0.55; pointer-events: none; }

@media (max-width: 560px) {
  .fm-card { padding: 26px 20px 22px; }
  .fm-wrap { padding: 18px 14px 40px; }
}

/* ---- opción "Otro" con texto libre ---- */
.fm-otro-input { display: none; margin-top: 10px; }
.fm-otro-input.on { display: block; }
.fm-opt-otro { color: var(--ink-2); }
