/* =========================================================
   EL RETO DE LIDERAR — styles.css
   Mobile-first. Marca: Carlos Castillo Leadership
   Tema claro: el navy pasa a ser color de texto/acento,
   no el fondo. El fondo es claro en toda la app.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* Fondo y superficies (claro) */
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-warm: #FFF7E8; /* superficie de la consecuencia, tono cálido sutil */
  --border: rgba(20, 33, 61, 0.12);
  --border-strong: rgba(20, 33, 61, 0.25);

  /* Marca — el navy ahora es texto/acento, no fondo */
  --navy: #14213D;
  --navy-soft: #3A4A72;
  --red: #C1272D;
  --red-soft: #E14750;
  --red-tint: rgba(193, 39, 45, 0.08);
  --gold: #C9932F;
  --gold-deep: #8C6A1E;
  --white: #FFFFFF;

  --ink: #14213D;         /* texto principal (= navy) */
  --ink-muted: #55607A;   /* texto secundario */
  --ink-faint: #838EA6;   /* labels terciarios */

  --font-display: "Gotham Condensed", "Oswald", "Poppins", sans-serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 22px rgba(20, 33, 61, 0.08);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 28px 20px 32px;
  animation: fadeIn 0.35s ease;
}

.screen.active { display: flex; }

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

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition: none !important; animation-duration: 0.001ms !important; }
}

/* ---------- Tipografía ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 12px;
  text-transform: none;
  color: var(--navy);
}

h1 { font-size: clamp(28px, 8vw, 40px); font-weight: 700; }
h2 { font-size: clamp(22px, 6.5vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }

p { line-height: 1.55; color: var(--ink-muted); margin: 0 0 14px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.brand-logo {
  width: 220px;
  height: auto;
  max-width: 100%;
  display: block;
  margin-bottom: 18px;
}

.accent-red {
  color: var(--red);
  font-weight: 700;
}

/* ---------- Layout helpers ---------- */

.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }
.center-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Botones ---------- */

.btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(193, 39, 45, 0.28);
}

.btn-primary:hover { background: var(--red-soft); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-strong);
}

.btn-secondary:active { background: rgba(20, 33, 61, 0.05); }

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Cards de opción / rol ---------- */

.option-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow);
}

.option-card .option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(20, 33, 61, 0.08);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}

.option-card:active { transform: scale(0.985); }
.option-card:hover { border-color: var(--border-strong); }

.option-card.selected {
  border-color: var(--navy);
  background: rgba(20, 33, 61, 0.06);
}

.option-card.selected .option-letter {
  background: var(--navy);
  color: var(--white);
}

.option-card.option-dismissed {
  display: none;
}

.role-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
  font-family: var(--font-body);
  color: var(--navy);
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow);
}

.role-card:active { transform: scale(0.985); }
.role-card:hover { border-color: var(--border-strong); }

.role-card .role-label {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--navy);
}

.role-card .role-hint {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- Progreso (camino de 6 nodos) ---------- */

.progress-path {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}

.progress-node {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(20, 33, 61, 0.12);
  position: relative;
  overflow: hidden;
}

.progress-node.done { background: var(--red); }

.progress-node.current::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red-soft);
  animation: pulseNode 1.4s ease-in-out infinite;
}

@keyframes pulseNode {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.progress-label {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

/* ---------- Escenario ---------- */

.scenario-context-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.scenario-context {
  background: var(--surface);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 18px;
  font-size: 15.5px;
  color: var(--navy);
  line-height: 1.65;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.scenario-context p { color: var(--navy); margin-bottom: 10px; }
.scenario-context p:last-child { margin-bottom: 0; }
.scenario-context strong { color: var(--red); font-weight: 700; }

.scenario-question {
  font-family: var(--font-display);
  font-size: clamp(19px, 5.5vw, 23px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--navy);
}

/* ---------- Consecuencia ----------
   Superficie cálida (crema) + borde dorado — distinta tanto de las
   opciones (blancas, borde gris) como del contexto (blanco, borde
   rojo), para que se lea como "esto ya no es una opción más". */

.consequence-card {
  background: var(--surface-warm);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.consequence-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}

.consequence-text {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 0;
  line-height: 1.55;
}

.insight-card {
  border-top: 1.5px dashed rgba(20, 33, 61, 0.18);
  padding-top: 14px;
  margin-top: 16px;
}

.insight-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.insight-text {
  font-style: italic;
  font-size: 14.5px;
  color: var(--navy-soft);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Procesando ---------- */

.processing-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(20, 33, 61, 0.15);
  border-top-color: var(--red);
  animation: spin 0.9s linear infinite;
  margin-bottom: 20px;
}

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

/* ---------- Formulario de lead ---------- */

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 14px;
  font-size: 16px;
  color: var(--navy);
  font-family: var(--font-body);
}

.field input:focus {
  outline: none;
  border-color: var(--red);
}

.field input::placeholder { color: var(--ink-faint); }

.field-error {
  font-size: 12.5px;
  color: var(--red-soft);
  margin-top: 5px;
  display: none;
}

.field.invalid input { border-color: var(--red-soft); }
.field.invalid .field-error { display: block; }

/* ---------- Resultado ---------- */

.result-score {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-bottom: 22px;
}

.result-score strong {
  color: var(--navy);
  font-size: 20px;
}

.profile-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 42px);
  font-weight: 800;
  color: var(--red);
  margin-bottom: 12px;
  line-height: 1.05;
}

.profile-headline {
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 34px 0 12px;
}

.tag-list { display: flex; flex-direction: column; gap: 10px; }

.tag-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.tag-dot.green { background: #2FA968; }
.tag-dot.red { background: var(--red); }
.tag-dot.orange { background: #C97A1E; }

.tag-row p { margin: 0; color: var(--navy); font-size: 14.5px; }
.tag-row .tag-name { font-weight: 700; display: block; margin-bottom: 2px; }

.consequence-list { display: flex; flex-direction: column; gap: 8px; }
.consequence-list .item { font-size: 14.5px; color: var(--ink-muted); }
.consequence-list .item b { color: var(--navy); }

/* Único bloque de la app con fondo navy — la marca se conserva
   como acento en el momento más importante del resultado, no
   como color de fondo general. */
.philosophy-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}

.philosophy-card p {
  font-size: 16px;
  color: var(--white);
  font-style: italic;
  margin: 0;
}

.final-cta { margin-top: 8px; }
.final-cta .cta-question {
  font-size: 15px;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 12px;
}

/* ---------- Utilidades ---------- */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }

.logo-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Desktop (progressive enhancement, sigue mobile-first) ---------- */

@media (min-width: 640px) {
  .screen { padding: 40px 0; align-items: center; }
  .screen > * { width: 100%; max-width: 480px; }
  .option-card, .role-card { font-size: 16px; }
}
