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

:root {
  --negro: #030303;
  --negro-2: #131313;
  --negro-3: #1c1c1c;
  --blanco: #ffffff;
  --oro: #28edca;
  --oro-suave: #6ff5dc;
  --gris: #8a8a8a;
  --gris-linea: #2a2a2a;
  --verde: #6fbf73;
  --rojo: #d9695f;
  --ambar: #e0a840;
  --texto-suave: #e6e6e6;
  --texto-suave-2: #d8d8d8;
  --theme-transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease;
}

/* Tema diurno automático (07:00–21:00, hora local del visitante) */
[data-theme="light"] {
  --negro: #f7f9fc;
  --negro-2: #ffffff;
  --negro-3: #eef1f6;
  --blanco: #0c0c29;
  --oro: #0bbfac;
  --oro-suave: #14d4bf;
  --gris: #5c6470;
  --gris-linea: #e2e7ef;
  --verde: #1f9d63;
  --rojo: #d94f3d;
  --ambar: #b9791a;
  --texto-suave: #1f2433;
  --texto-suave-2: #333a4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--negro);
  color: var(--blanco);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: var(--theme-transition);
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 20px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

@media (min-width: 900px) {
  .screen { max-width: 760px; padding: 32px 20px; }
  .progress-wrap { max-width: 760px; }
  .report { max-width: 820px; }
  .question-text { font-size: clamp(28px, 3vw, 38px) !important; }
  .option-btn { font-size: 20px !important; padding: 20px 22px !important; }
  .landing-sub { font-size: 20px; max-width: 560px; }
  h1.landing-title { font-size: clamp(36px, 4vw, 52px) !important; }
}

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

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  color: var(--blanco);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--theme-transition), border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--oro); }

.brand-logo {
  width: min(220px, 60vw);
  height: auto;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--oro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

h1.landing-title {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.landing-sub {
  color: var(--gris);
  text-align: center;
  font-size: 18px;
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto 40px;
}

.btn {
  appearance: none;
  border: none;
  background: var(--oro);
  color: var(--negro);
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 32px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  min-width: 220px;
}
.btn:hover { background: var(--oro-suave); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--gris);
  border: 1px solid var(--gris-linea);
  font-weight: 500;
  padding: 12px 20px;
  min-width: unset;
}
.btn-ghost:hover { background: var(--negro-3); color: var(--blanco); }

.landing-meta {
  margin-top: 28px;
  color: var(--gris);
  font-size: 13px;
  text-align: center;
}

/* Barra de progreso */
.progress-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 20px 0;
}
.progress-track {
  height: 3px;
  background: var(--gris-linea);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--oro);
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 12px;
  color: var(--gris);
  margin-top: 10px;
  text-align: right;
}
.progress-encouragement {
  font-size: 13px;
  color: var(--oro-suave);
  margin-top: 6px;
  text-align: right;
  animation: fadeIn 0.4s ease;
}

/* Pregunta */
.question-text {
  font-size: clamp(22px, 5.5vw, 34px);
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin: 4px 0 22px;
}

.multi-hint {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--oro);
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-radius: 999px;
  padding: 5px 14px;
  margin: -8px 0 16px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.option-btn {
  appearance: none;
  text-align: left;
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  color: var(--blanco);
  padding: 14px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.option-btn:hover { border-color: var(--oro); background: var(--negro-3); }
.option-btn:active { transform: scale(0.99); }
.option-btn.selected { border-color: var(--oro); background: rgba(40,237,202,0.12); }
.option-btn:disabled:not(.selected) { opacity: 0.35; }
.option-btn-other { border-style: dashed; color: var(--gris); background: transparent; }
.option-btn-other:hover { color: var(--blanco); }

.scale-row {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
}
.scale-btn {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  color: var(--blanco);
  font-family: inherit;
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.scale-btn:hover { border-color: var(--oro); }
.scale-btn.selected { border-color: var(--oro); background: var(--oro); color: var(--negro); }
.scale-btn:disabled:not(.selected) { opacity: 0.35; }
.scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--gris);
  font-size: 13px;
  margin-top: 10px;
  width: 100%;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 18px;
}

/* Captura de lead */
.leadgate-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
}
.lead-input {
  width: 100%;
  max-width: 360px;
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  color: var(--blanco);
  font-family: inherit;
  font-size: 17px;
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 12px;
  transition: border-color 0.15s ease;
}
.lead-input::placeholder { color: var(--gris); }
.lead-input:focus { outline: none; border-color: var(--oro); }
.lead-error {
  display: none;
  color: var(--rojo);
  font-size: 13px;
  margin-top: 10px;
}
.lead-error.visible { display: block; }
#leadSubmit { margin-top: 24px; }

/* Celebración de hito */
.celebration {
  position: relative;
  overflow: hidden;
}
.celebration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.celebration-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: celebrationPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.celebration-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 18px;
  filter: drop-shadow(0 4px 18px rgba(40, 237, 202, 0.35));
}
.celebration-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--blanco);
  text-align: center;
  max-width: 320px;
}
@keyframes celebrationPop {
  from { opacity: 0; transform: scale(0.7) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .celebration-canvas { display: none; }
  .celebration-inner { animation: none; }
}

/* Análisis */
.analysis-line {
  font-size: 18px;
  color: var(--gris);
  text-align: center;
  min-height: 28px;
  transition: opacity 0.3s ease;
}
.analysis-line.active { color: var(--blanco); }
.analysis-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  transition: opacity 0.3s ease;
}
.analysis-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--oro);
  display: inline-block; margin: 0 5px; animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse { 0%,100%{opacity:0.3; transform:scale(0.85)} 50%{opacity:1; transform:scale(1)} }

/* Informe */
.report {
  width: 100%;
  padding: 40px 20px 80px;
  max-width: 680px;
  margin: 0 auto;
}
.report-unlock {
  animation: unlockIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes unlockIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.report-section {
  animation: fadeIn 0.5s ease both;
}
.report-section:nth-of-type(1) { animation-delay: 0.05s; }
.report-section:nth-of-type(2) { animation-delay: 0.1s; }
.report-section:nth-of-type(3) { animation-delay: 0.15s; }
.report-section:nth-of-type(4) { animation-delay: 0.2s; }
.report-section:nth-of-type(5) { animation-delay: 0.25s; }
.report-section:nth-of-type(6) { animation-delay: 0.3s; }
.report-section:nth-of-type(7) { animation-delay: 0.35s; }
.report-eyebrow {
  color: var(--oro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.report-headline {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 8px;
}
.report-name {
  text-align: center;
  color: var(--oro-suave);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 40px;
}
.report-section {
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.report-section summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.report-section summary::-webkit-details-marker { display: none; }
.report-section summary:hover { background: var(--negro-3); }
.report-section summary::after {
  content: '+';
  flex: none;
  margin-left: 12px;
  color: var(--gris);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}
.report-section[open] summary::after { content: '−'; }
.report-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--oro);
  font-weight: 700;
}
.report-section-body {
  padding: 0 22px 22px;
  animation: fadeIn 0.25s ease both;
}
.report-section p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--texto-suave);
  margin: 0 0 12px;
}
.report-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.report-list li {
  padding-left: 22px;
  position: relative;
  font-size: 17px;
  line-height: 1.6;
  color: var(--texto-suave-2);
}
.report-list.evidence li::before { content: '→'; position: absolute; left: 0; color: var(--oro); }
.report-list.symptoms li::before { content: '•'; position: absolute; left: 0; color: var(--gris); }
.report-list.strengths li::before { content: '✓'; position: absolute; left: 0; color: var(--verde); }
.secondary-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--gris-linea);
  font-size: 16px;
}
.secondary-item:last-child { border-bottom: none; }

/* Checklist de prioridades por urgencia */
.checklist-priority {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: 10px;
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-left: 3px solid var(--gris);
}
.checklist-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checklist-badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 20px;
}
.checklist-text {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--texto-suave);
}
.checklist-title {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--blanco);
  margin-top: 2px;
}
.checklist-why {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gris);
  margin: 0;
}
.checklist-substeps {
  margin: 4px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist-substeps li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto-suave);
}
.checklist-example {
  background: var(--negro-2);
  border: 1px solid var(--gris-linea);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
}
.section-example {
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-left: 3px solid var(--oro);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
}
.section-example-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--oro);
  margin-bottom: 6px;
}
.section-example p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto-suave-2);
  margin: 0;
}
.checklist-example-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--oro);
  margin-bottom: 6px;
}
.checklist-example p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto-suave-2);
  margin: 0;
}
.numbers-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.numbers-block-item {
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-left: 3px solid var(--oro);
  border-radius: 8px;
  padding: 14px 16px;
}
.numbers-block-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--oro);
  margin-bottom: 6px;
}
.numbers-block-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto-suave-2);
  margin: 0;
}
.checklist-done {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  background: rgba(111, 191, 115, 0.08);
  border: 1px solid rgba(111, 191, 115, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
}
.checklist-done-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--verde);
}
.checklist-done span:last-child {
  font-size: 16px;
  color: var(--texto-suave-2);
  line-height: 1.6;
}
.checklist-critico { border-left-color: var(--rojo); }
.checklist-critico .checklist-badge { background: rgba(217, 105, 95, 0.16); color: var(--rojo); }
.checklist-importante { border-left-color: var(--ambar); }
.checklist-importante .checklist-badge { background: rgba(224, 168, 64, 0.16); color: var(--ambar); }
.checklist-cuando_puedas { border-left-color: var(--verde); }
.checklist-cuando_puedas .checklist-badge { background: rgba(111, 191, 115, 0.16); color: var(--verde); }
.tier-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 20px; color: var(--gris); border: 1px solid var(--gris-linea);
}
.stage-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-radius: 16px;
  padding: 12px 22px;
  margin: 0 auto 32px;
  width: fit-content;
  max-width: 92%;
}
.stage-pill-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris);
}
.stage-pill-name { color: var(--oro); font-weight: 700; font-size: 15px; }
.stage-pill-desc { color: var(--gris); font-size: 14px; }

.hypothesis-card {
  background: linear-gradient(145deg, rgba(40,237,202,0.10), rgba(40,237,202,0.02));
  border: 1px solid var(--oro);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.hypothesis-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--oro);
  margin-bottom: 10px;
}
.hypothesis-card p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--blanco);
  margin: 0;
}

.report-toolbar {
  display: flex;
  justify-content: center;
  margin: 0 0 28px;
}
.btn-pdf { font-size: 13px; padding: 9px 16px; }

.checklist-step {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gris);
}

.report-cta-card {
  background: var(--negro-3);
  border: 1px solid var(--gris-linea);
  border-radius: 16px;
  padding: 30px 24px;
  text-align: center;
  margin-top: 8px;
}
.report-cta-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.report-cta-sub { color: var(--gris); font-size: 16px; margin-bottom: 20px; max-width: 420px; margin-left: auto; margin-right: auto; }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.report-cta {
  margin-top: 20px;
  text-align: center;
}
.report-footer-note {
  text-align: center;
  color: var(--gris);
  font-size: 12px;
  margin-top: 24px;
}

@media (max-width: 420px) {
  .scale-row { gap: 6px; }
  .scale-btn { font-size: 17px; }
}

@media (max-height: 700px) {
  .screen { padding: 12px 20px; }
  .question-text { margin: 2px 0 14px; }
  .option-btn { padding: 11px 16px; }
  .options { gap: 6px; }
  .progress-wrap { padding-top: 8px; }
  .nav-row { margin-top: 10px; }
}

/* Impresión / "Descargar PDF" — fondo claro fijo, tarjetas sin cortar entre páginas */
@media print {
  .no-print { display: none !important; }
  html, body { background: #ffffff !important; }
  .report {
    --negro: #ffffff;
    --negro-2: #ffffff;
    --negro-3: #f4f6f8;
    --blanco: #14181f;
    --gris: #5c6470;
    --gris-linea: #dfe3ea;
    --oro: #0bbfac;
    --oro-suave: #0bbfac;
    --texto-suave: #2a2f3a;
    --texto-suave-2: #333a4a;
    max-width: 100%;
    padding: 10px 4px;
  }
  .report-section,
  .checklist-item,
  .report-cta-card,
  .stage-pill {
    break-inside: avoid;
    box-shadow: none;
  }
  .report-section { border: 1px solid var(--gris-linea); }
  /* El PDF debe mostrar todas las secciones abiertas, aunque en pantalla
     estuvieran plegadas por el acordeón. */
  .report-section-body { display: block !important; }
  .report-section summary { cursor: default; }
  .report-section summary::after { display: none; }
  a.btn-whatsapp {
    color: #072e29 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
