/* ============================================================
   ANZUELO 1 · GAFI 2026 — Wizard styles
   ============================================================
   Reusa CSS variables de tokens.css. Mobile-first.
   Breakpoints: 360px, 768px, 1024px.
*/

.diagnostico-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  color: var(--text-primary, #FAFAFA);
  font-family: var(--font-sans, 'Geist', system-ui, sans-serif);
}

.diagnostico-container .vista {
  display: none;
}

.diagnostico-container .vista.activa {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============== Vista 1 · Landing ============== */

.diagnostico-container .vista--landing h1 {
  font-family: var(--font-display, 'Geist', sans-serif);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text-primary, #FAFAFA);
}

.diagnostico-container .vista--landing .lead {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary, #A3A3A3);
  margin: 0 0 32px;
}

.diagnostico-container .beneficios {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.diagnostico-container .beneficios li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 15.5px;
  border-bottom: 1px solid var(--border-subtle, #1F1F1F);
}

.diagnostico-container .beneficios li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 11px;
  color: var(--accent, #C9A24A);
  font-weight: 600;
}

/* ============== Buttons ============== */

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s, color 0.2s;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent, #C9A24A);
  color: #0A0A0A;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover, #D4B260);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary, #FAFAFA);
  border-color: var(--border-strong, #404040);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent, #C9A24A);
  color: var(--accent, #C9A24A);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============== Vista 2 · Wizard ============== */

.progress-bar {
  position: relative;
  height: 6px;
  background: var(--bg-elevated, #141414);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 10%;
  background: var(--accent, #C9A24A);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-text {
  display: block;
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary, #525252);
  margin-bottom: 32px;
}

.pregunta h3 {
  font-family: var(--font-display, 'Geist', sans-serif);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 24px;
  color: var(--text-primary, #FAFAFA);
}

.opciones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}

.opcion {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-elevated, #141414);
  border: 1px solid var(--border-default, #2A2A2A);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
}

.opcion:hover {
  border-color: var(--border-strong, #404040);
  background: var(--bg-overlay, #1F1F1F);
}

.opcion input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong, #404040);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.opcion input[type="radio"]:checked {
  border-color: var(--accent, #C9A24A);
  background: radial-gradient(circle, var(--accent, #C9A24A) 35%, transparent 40%);
}

.opcion:has(input:checked) {
  border-color: var(--accent, #C9A24A);
  background: var(--accent-subtle, rgba(201, 162, 74, 0.1));
}

.opcion span {
  font-size: 15px;
  color: var(--text-primary, #FAFAFA);
}

.wizard-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ============== Vista 3 · Captura ============== */

.diagnostico-container .vista--captura h2 {
  font-family: var(--font-display, 'Geist', sans-serif);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}

.diagnostico-container .vista--captura > p {
  color: var(--text-secondary, #A3A3A3);
  margin: 0 0 28px;
  font-size: 15.5px;
}

#form-captura {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#form-captura input[type="text"],
#form-captura input[type="email"],
#form-captura input[type="tel"] {
  padding: 14px 16px;
  background: var(--bg-elevated, #141414);
  border: 1px solid var(--border-default, #2A2A2A);
  border-radius: 8px;
  color: var(--text-primary, #FAFAFA);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}

#form-captura input:focus {
  outline: none;
  border-color: var(--accent, #C9A24A);
  background: var(--bg-overlay, #1F1F1F);
}

#form-captura input::placeholder {
  color: var(--text-tertiary, #525252);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary, #A3A3A3);
  margin: 4px 0 8px;
}

.checkbox-label a {
  color: var(--accent, #C9A24A);
  text-decoration: underline;
}

#form-captura button[type="submit"] {
  margin-top: 8px;
  width: 100%;
}

.legal-note {
  font-size: 13px;
  color: var(--text-tertiary, #525252);
  margin-top: 16px;
  line-height: 1.4;
}

/* ============== Vista 4 · Resultado ============== */

.score-display {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-elevated, #141414);
  border: 1px solid var(--border-default, #2A2A2A);
  border-radius: 16px;
  margin-bottom: 36px;
}

.score-number {
  font-family: var(--font-display, 'Geist', sans-serif);
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent, #C9A24A);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.score-zone {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  font-family: var(--font-mono, 'Geist Mono', monospace);
}

.score-zone--rojo {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.score-zone--amarillo {
  background: rgba(234, 179, 8, 0.15);
  color: #FDE68A;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.score-zone--verde {
  background: rgba(34, 197, 94, 0.15);
  color: #86EFAC;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.hallazgos {
  margin-bottom: 36px;
}

.hallazgos h3 {
  font-family: var(--font-display, 'Geist', sans-serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text-primary, #FAFAFA);
}

#hallazgos-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: hallazgo;
}

#hallazgos-lista li {
  counter-increment: hallazgo;
  position: relative;
  padding: 16px 16px 16px 56px;
  background: var(--bg-elevated, #141414);
  border: 1px solid var(--border-default, #2A2A2A);
  border-left: 3px solid var(--accent, #C9A24A);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary, #A3A3A3);
}

#hallazgos-lista li::before {
  content: counter(hallazgo);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--accent, #C9A24A);
  color: #0A0A0A;
  border-radius: 50%;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-resultado {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cta-resultado .btn-primary,
.cta-resultado .btn-secondary {
  text-align: center;
  width: 100%;
}

.email-confirmacion {
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary, #525252);
}

.email-confirmacion span {
  color: var(--accent, #C9A24A);
  font-weight: 500;
}

/* ============== Loading state ============== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.loading-overlay.activa {
  opacity: 1;
  pointer-events: auto;
}

.loading-overlay .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default, #2A2A2A);
  border-top-color: var(--accent, #C9A24A);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============== Responsive ============== */

@media (min-width: 768px) {
  .diagnostico-container {
    padding: 140px 32px 100px;
  }

  .cta-resultado {
    flex-direction: row;
  }

  .cta-resultado .btn-primary,
  .cta-resultado .btn-secondary {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .diagnostico-container {
    padding: 100px 16px 60px;
  }

  .opcion {
    padding: 14px 16px;
  }
}
