/* Califica · Protege a tu Familia — azul marino oscuro, dorado y verde azulado */
/* Sin fuentes externas: solo fuentes del sistema, para que cargue siempre. */
:root {
  --navy: #0f2040;
  --navy-deep: #081426;
  --navy-2: #16294d;
  --gold: #c5a880;
  --gold-bright: #d9bc8f;
  --teal: #2ab5a0;
  --teal-dark: #1e8f7d;
  --bg: #081426;
  --surface: #10233f;
  --surface-2: #16294d;
  --ink: #f5f1e8;
  --muted: #a9b4c8;
  --line: rgba(197, 168, 128, 0.35);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }

/* ── Logo arriba ── */
.topbar {
  padding: 22px 16px 6px;
  display: flex;
  justify-content: center;
}
.logo {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 0 0 2px var(--gold), 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ── Contenedor ── */
.quiz {
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 18px 40px;
}

/* ── Progreso ── */
.progress-wrap { margin: 14px 0 6px; }
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 12.5%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transition: width 0.3s ease;
}
.progress-text {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Preguntas ── */
h1 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 18px 0 6px;
  font-weight: 800;
}
.sub { color: var(--muted); margin: 0 0 18px; font-size: 0.98rem; }
.note {
  background: rgba(42, 181, 160, 0.12);
  border: 1px solid rgba(42, 181, 160, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: #cdeee8;
  margin: 0 0 18px;
}
.note strong { color: #fff; }

.options { display: grid; gap: 12px; margin-top: 20px; }
.opt {
  width: 100%;
  min-height: 58px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 600;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.opt:active { transform: scale(0.99); }
.opt:hover { border-color: var(--gold); }
.opt.selected {
  border-color: var(--gold);
  background: var(--navy-2);
  box-shadow: 0 0 0 2px var(--gold);
}
.opt .dot {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--navy);
}
.opt.selected .dot { background: var(--gold); }
.opt.selected .dot::after { content: "✓"; font-weight: 800; }

/* Estados: grupo prioritario + resto */
.group-label {
  margin: 22px 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.group-label:first-of-type { margin-top: 20px; }

/* ── Formulario final ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field label .req { color: #ff8a7a; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  width: 100%;
}
.field input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.field input::placeholder { color: #7c8aa3; }
.field .help { font-size: 0.85rem; color: var(--muted); }
.honeypot { display: none !important; }
.err-msg {
  color: #ffb3a7;
  font-size: 0.95rem;
  min-height: 1.2em;
  margin-bottom: 8px;
}
.err-msg:empty { display: none; }

.btn-submit {
  width: 100%;
  min-height: 58px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(197, 168, 128, 0.35);
}
.btn-submit:disabled { opacity: 0.6; }
.fineprint {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* ── Atrás ── */
.btn-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 12px 4px;
  margin-top: 10px;
  text-decoration: underline;
}
#backFromFinal { margin-top: 4px; }

/* ── Confirmación ── */
.done-card { text-align: center; padding: 34px 8px 10px; }
.done-check {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy-deep);
  font-size: 2.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(42, 181, 160, 0.4);
}
.done-card h1 { margin-bottom: 10px; }
.done-card p { color: var(--muted); font-size: 1.05rem; margin: 0; }

footer {
  text-align: center;
  color: #5f6f8a;
  font-size: 0.82rem;
  padding: 0 16px 28px;
}

@media (max-width: 380px) {
  h1 { font-size: 1.4rem; }
  .logo { width: 100px; height: 100px; }
  .opt { font-size: 1rem; min-height: 54px; }
}
