/* ============================================================
   PRE-ENTRADA — "El Viaje del Arquitecto"
   Archivo:    pre-entrada.css
   Propósito:  Estilos de la pantalla de activación sensorial
   Brand:      Arquitecto de Libros de Autoridad
   Paleta:     #111111 (Negro Carbón)
               #F5F1E8 (Marfil Editorial)
               #B08D57 (Dorado Antiguo)
               #5B5B5B (Gris Pizarra)
   Tipografía: Cormorant Garamond (títulos/citas)
               Inter (cuerpo/botones)
   ============================================================ */

/* --- RESET --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- CUERPO --- */
body {
  background-color: #111111;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

/* --- CONTENEDOR PRINCIPAL --- */
.container {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  background: #111111;
}

/* --- CONTENIDO (capa superior) --- */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* --- LÍNEAS DE TEXTO CON ANIMACIÓN --- */
.text-line {
  color: #F5F1E8;
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  min-height: 1.6em;
  letter-spacing: 0.02em;
  opacity: 0; /* oculta hasta que JS la active */
}

  /* Caracter individual dentro de la línea */
  .text-line .char {
    opacity: 0;
    transition: none;
  }

  /* Carácter visible (activado por JS) */
  .text-line .char.visible {
    opacity: 1;
    transition: opacity 0.02s ease;
  }

  /* Línea 1: cita en itálica (Cormorant, tenue) */
  .text-line.line-1 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    color: rgba(245, 241, 232, 0.55);
    font-style: italic;
    margin-bottom: 24px;
  }

  /* Línea 2: título principal (Cormorant, bold, marfil) */
  .text-line.line-2 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    color: #F5F1E8;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
  }

/* --- FILA DE ÍCONOS PREMIUM --- */
.icon-line {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

  .icon-line .icon-premium {
    width: 36px;
    height: 36px;
    stroke: #B08D57;
    stroke-width: 1.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Línea 3: instrucción (Inter, light) */
  .text-line.line-3 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 300;
    color: rgba(245, 241, 232, 0.8);
    margin-bottom: 40px;
    letter-spacing: 0.08em;
  }

/* --- BOTÓN PRINCIPAL --- */
.btn-entrar {
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  background: transparent;
  border: 1px solid rgba(176, 141, 87, 0.3);
  color: rgba(245, 241, 232, 0.75);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.15em;
  padding: 16px 36px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.8s ease;
  position: relative;
}

  .btn-entrar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    /* Latido suave: doble pulsación que invita al toque.
       El retardo deja que la entrada termine antes de palpitar. */
    animation: latido 2.6s ease-in-out 0.9s infinite;
  }

  .btn-entrar:hover {
    border-color: rgba(176, 141, 87, 0.7);
    color: #F5F1E8;
    background: rgba(176, 141, 87, 0.08);
    box-shadow:
      0 0 20px rgba(176, 141, 87, 0.08),
      0 0 60px rgba(176, 141, 87, 0.04);
  }

  /* Flecha decorativa del botón */
  .btn-entrar .arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #B08D57;
  }

  .btn-entrar:hover .arrow {
    transform: translateX(4px);
  }

/* --- LATIDO DEL BOTÓN --- */
@keyframes latido {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  10% {
    transform: translateY(0) scale(1.035);
  }
  20% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(0) scale(1.02);
  }
  40% {
    transform: translateY(0) scale(1);
  }
}

/* --- GLOW PULSÁTIL DEL BOTÓN --- */
.btn-glow {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: box-shadow 2s ease;
}

  .btn-entrar.visible .btn-glow {
    animation: glowPulse 3s ease-in-out infinite;
  }

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(176, 141, 87, 0.04);
  }
  50% {
    box-shadow:
      0 0 15px rgba(176, 141, 87, 0.08),
      0 0 40px rgba(176, 141, 87, 0.03);
  }
}

/* --- MICROCOPY (pie de página) --- */
.microcopy {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #5B5B5B;
  letter-spacing: 0.08em;
  font-style: italic;
  opacity: 0;
  transition: opacity 1.5s ease;
}

  .microcopy.visible {
    opacity: 1;
  }

/* --- ACCESIBILIDAD: movimientos reducidos --- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  .btn-entrar.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
