/* The asesoría application form (/asesoria/aplicar/). Uses the tokens,
   type and .button of ../landing.css; everything else is here. The question
   markup is built by the page's script (.step, .q, .opts, .opt...). */

.apply-top { display: flex; justify-content: space-between; align-items: center; padding: 1.6rem var(--gutter); }
.apply-top a { text-decoration: none; color: var(--ink); }
.apply-top .name { font-family: var(--display); font-size: 1.2rem; }
.apply-top .back { font-size: 0.88rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--rule); }

.apply { max-width: 660px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.apply h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); line-height: 1.1; }
.apply .intro { margin-top: 1rem; font-size: 1.05rem; color: var(--text); }
.apply .price-note { margin-top: 1.4rem; padding: 1.1rem 1.25rem; background: var(--bg-soft); border-radius: 3px; font-size: 0.95rem; line-height: 1.6; color: var(--ink); }
.apply .price-note a { color: var(--green-dark); }

#apply { margin-top: 2.6rem; }

/* Progress and step heading */
.progress { display: flex; gap: 0.35rem; margin-bottom: 0.7rem; }
.progress span { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--green); }
.step-label { font-size: 0.85rem; color: var(--faint); }
.step-title { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--ink); margin: 0.2rem 0 0.3rem; }
.step-intro { font-size: 0.95rem; color: var(--text); }

/* Questions */
.q { margin-top: 1.7rem; border: none; }
.q legend, .q > label { display: block; font-size: 1rem; font-weight: 400; color: var(--ink); line-height: 1.45; margin-bottom: 0.3rem; }
.q .req { color: var(--green); }
.q .help { display: block; font-size: 0.86rem; color: var(--faint); margin-bottom: 0.4rem; }
.q input[type=text], .q input[type=email], .q input[type=tel], .q textarea {
  width: 100%; margin-top: 0.3rem; padding: 0.8rem 0.95rem;
  font-family: var(--body); font-size: 1rem; font-weight: 300; color: var(--ink);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 3px; outline: none;
  transition: border-color 0.15s ease; -webkit-appearance: none;
}
.q textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.q input:focus, .q textarea:focus { border-color: var(--green); }
.q .err { display: none; margin-top: 0.4rem; font-size: 0.85rem; color: #A4472F; }
.q.invalid .err { display: block; }
.q.invalid input, .q.invalid textarea, .q.invalid .opt span { border-color: #A4472F; }

/* Options */
.opts { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.opts.inline { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.opts.scale { grid-template-columns: repeat(10, 1fr); gap: 0.35rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: flex; align-items: center; gap: 0.6rem; min-height: 46px; padding: 0.65rem 0.9rem;
  border: 1px solid var(--rule); border-radius: 3px; background: var(--bg);
  font-size: 0.96rem; line-height: 1.4; color: var(--ink); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.opts.scale .opt span { justify-content: center; padding: 0.6rem 0; }
.opt span:hover { border-color: var(--green); }
.opt input:checked + span { border-color: var(--green); background: #EEF2EA; color: var(--green-dark); font-weight: 500; }
.opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; margin-top: 0.3rem; font-size: 0.8rem; color: var(--faint); }
.opt.check span { align-items: flex-start; border: none; padding-left: 0; background: none; }
.opt.check span::before { content: ''; flex: none; width: 20px; height: 20px; margin-top: 0.1rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); }
.opt.check input:checked + span { background: none; font-weight: 400; color: var(--ink); }
.opt.check input:checked + span::before {
  border-color: var(--green); background: var(--green) center / 14px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.other-input { margin-top: 0.5rem; }

/* Navigation, errors, legal */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 2.2rem; }
.form-nav #next { margin-left: auto; border: none; cursor: pointer; font-family: var(--body); }
.form-nav #next:disabled { opacity: 0.6; cursor: default; }
.button.ghost { background: none; color: var(--ink); border: 1px solid var(--rule); cursor: pointer; font-family: var(--body); padding: 0.95rem 1.8rem; }
.button.ghost:hover { background: none; border-color: var(--ink); }
.form-error { margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: 3px; background: #F6E6E0; color: #A4472F; font-size: 0.92rem; }
.form-legal { margin-top: 1.2rem; font-size: 0.82rem; color: var(--faint); text-align: center; }

/* Sent */
.sent { padding: 1.5rem 0; text-align: center; }
.sent .ok { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #EEF2EA; color: var(--green); margin-bottom: 1rem; }
.sent h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--ink); }
.sent p { margin-top: 0.8rem; color: var(--text); line-height: 1.7; }
.sent .next { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--ink); }

@media (max-width: 560px) {
  .opts.scale { grid-template-columns: repeat(5, 1fr); }
  .apply-top .back { font-size: 0.8rem; }
}
