/* ============================================
   HOME — Nueva home interactiva
   Reloj + Diagnóstico + Resultado + Lead Magnet
   ============================================ */

/* --- SISTEMA DE PANTALLAS --- */
.pantalla {
  min-height: 100vh;
  min-height: 100dvh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  color: var(--text-light);
  overflow-y: auto;
  z-index: 50;
}

/* Resultado+LM: no centrar verticalmente, dejar que fluya natural */
#pantalla-resultado {
  justify-content: flex-start;
  padding-top: 6vh;
  padding-bottom: 4rem;
}

.pantalla--active {
  display: flex;
}

/* ============================================
   PANTALLA 1: EL RELOJ
   ============================================ */
.reloj__container {
  text-align: center;
  max-width: 700px;
}

.reloj__label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.reloj__cantidad {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.reloj__valor {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  letter-spacing: -0.02em;
  /* Tabular nums para que no salte al cambiar dígitos */
  font-variant-numeric: tabular-nums;
}

.reloj__moneda {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--red);
  opacity: 0.7;
}

.reloj__sub {
  font-size: 1rem;
  color: #52525B;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.reloj__cta {
  position: absolute;
  bottom: 3rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}

.reloj__cta.visible {
  opacity: 1;
  transform: translateY(0);
  animation: pulse 2s ease infinite;
}

.reloj__cta:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ============================================
   PANTALLA 2: DIAGNÓSTICO INTERACTIVO
   ============================================ */
.quiz__container {
  max-width: 650px;
  width: 100%;
}

.quiz__typing {
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--white);
  min-height: 3rem;
  margin-bottom: 2rem;
}

.quiz__pregunta {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.quiz__opciones {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.quiz__opciones--visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz__opcion {
  background: var(--dark-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.quiz__opcion:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(235, 35, 42, 0.05);
}

.quiz__opcion--selected {
  border-color: var(--red);
  background: rgba(235, 35, 42, 0.1);
  color: var(--white);
}

.quiz__opcion-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.quiz__opcion--selected .quiz__opcion-marker {
  border-color: var(--red);
  background: var(--red);
}

/* Contador flotante del quiz */
.quiz__counter {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  z-index: 90;
  transition: all 0.5s ease;
}

.quiz__counter.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.quiz__counter-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.quiz__counter-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.quiz__counter-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ============================================
   PANTALLA 3: RESULTADO + LEAD MAGNET
   ============================================ */
.resultado-lm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 700px;
  width: 100%;
}

.resultado__container {
  text-align: center;
  max-width: 700px;
  width: 100%;
}

.resultado__divider {
  width: 60px;
  height: 1px;
  background: var(--border-subtle);
  margin: 2.5rem auto;
}

.resultado__intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.resultado__cifras {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.resultado__cifra {
  opacity: 0;
  transform: translateY(20px);
}

.resultado__cifra--visible {
  animation: cifraReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cifraReveal {
  to { opacity: 1; transform: translateY(0); }
}

.resultado__numero {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.resultado__numero--dinero {
  color: var(--red);
  font-size: clamp(3rem, 8vw, 5rem);
}

.resultado__label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.resultado__cifra--destacada {
  margin-top: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

/* Desglose del cálculo */
.resultado__desglose {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--dark-soft);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.resultado__desglose--visible {
  opacity: 1;
  transform: translateY(0);
}

.resultado__desglose-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.resultado__desglose-line strong {
  color: var(--red);
  font-size: 0.95rem;
}

.resultado__desglose-nota {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #52525B;
  font-style: italic;
}

.resultado__desglose-cierre {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  font-family: var(--font-body);
}

/* Escenario todo a 0 */
.resultado__cero {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 0;
}

.resultado__cero-titulo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.resultado__cero-texto {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   LEAD MAGNET (dentro de pantalla resultado)
   ============================================ */
.leadmagnet--hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.leadmagnet--visible {
  opacity: 1;
  transform: translateY(0);
}

.leadmagnet__container {
  text-align: center;
  max-width: 500px;
}

.leadmagnet__puente {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* Selector de perfil */
.leadmagnet__perfil {
  margin-bottom: 1.5rem;
}

.leadmagnet__perfil-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.leadmagnet__perfil-select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  background: var(--dark-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--white);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A1A1AA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.leadmagnet__perfil-select:focus {
  border-color: var(--red);
}

/* CTA alternativo (Cal.com) */
.leadmagnet__alt-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.leadmagnet__alt-texto {
  font-size: 0.85rem;
  color: #52525B;
  margin-bottom: 0.5rem;
}

.leadmagnet__alt-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.leadmagnet__alt-link:hover {
  color: var(--red);
}

.leadmagnet__intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.leadmagnet__titulo {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.leadmagnet__desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.leadmagnet__form {
  display: flex;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
}

.leadmagnet__input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--dark-soft);
  border: 1px solid var(--border-subtle);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--white);
  outline: none;
  transition: border-color 0.3s ease;
}

.leadmagnet__input:focus {
  border-color: var(--red);
}

.leadmagnet__input::placeholder {
  color: #52525B;
}

.leadmagnet__submit {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 1.5rem;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.leadmagnet__submit:hover {
  background: #d41f25;
  box-shadow: 0 4px 20px var(--red-glow);
}

.leadmagnet__legal {
  font-size: 0.75rem;
  color: #52525B;
  margin-top: 1rem;
}

/* ============================================
   FOOTER MINIMAL
   ============================================ */
.footer--minimal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  padding: 1rem 2rem;
  border-top: none;
  z-index: 10;
}

.footer--minimal .footer__bottom {
  margin: 0;
  padding: 0;
  border: none;
}

.footer--minimal .footer__bottom p {
  font-size: 0.7rem;
  color: #3F3F46;
}

.footer--minimal .footer__bottom a {
  color: #52525B;
  text-decoration: none;
}

.footer--minimal .footer__bottom a:hover {
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .pantalla {
    padding: 1.5rem;
  }

  .reloj__valor {
    font-size: 3rem;
  }

  .reloj__moneda {
    font-size: 1.8rem;
  }

  .reloj__cta {
    bottom: 2rem;
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }

  .quiz__typing {
    font-size: 1.1rem;
  }

  .quiz__opcion {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
  }

  .quiz__counter {
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.5rem 0.8rem;
  }

  .quiz__counter-value {
    font-size: 1.3rem;
  }

  .resultado__numero {
    font-size: 2.2rem;
  }

  .resultado__numero--dinero {
    font-size: 2.8rem;
  }

  .leadmagnet__form {
    flex-direction: column;
    gap: 0.8rem;
  }

  .leadmagnet__input {
    border-right: 1px solid var(--border-subtle);
    border-radius: 8px;
  }

  .leadmagnet__submit {
    border-radius: 8px;
    justify-content: center;
    padding: 1rem;
  }

  .footer--minimal {
    position: relative;
  }
}

/* ============================================
   UTILITY
   ============================================ */
.hidden {
  display: none !important;
}
