/* ═══════════════════════════════════════════════
   FUENTE BASE
═══════════════════════════════════════════════ */
body {
  font-family: 'Nunito', sans-serif;
}

/* ═══════════════════════════════════════════════
   PANTALLAS — show/hide con transición
═══════════════════════════════════════════════ */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen.screen-enter {
  animation: screenEnter 0.3s ease forwards;
}

.screen.screen-exit {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  animation: screenExit 0.21s ease forwards;
}

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

@keyframes screenExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}


/* ═══════════════════════════════════════════════
   TARJETAS DE HISTORIA (pantalla 1)
═══════════════════════════════════════════════ */
.story-card {
  border: 2px solid #F0E0C8;
  background: #FDF6EC;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.story-card:hover {
  border-color: #F07B2C;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240, 123, 44, 0.13);
}

.story-card:active {
  transform: translateY(0);
  box-shadow: none;
}

.story-card:focus-visible {
  outline: 2px solid #F07B2C;
  outline-offset: 2px;
}

.story-card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-weight: 900;
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.card-synopsis {
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════
   ILUSTRACIÓN DE HISTORIA (pantallas 2 y 3)
═══════════════════════════════════════════════ */
.story-img {
  aspect-ratio: 4 / 3;
  width: 100%;
}


/* ═══════════════════════════════════════════════
   BOTONES DE DECISIÓN
═══════════════════════════════════════════════ */
.decision-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 2px solid #F0E0C8;
  border-radius: 1rem;
  padding: 14px 18px;
  min-height: 52px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.decision-btn:hover {
  border-color: #F07B2C;
  background-color: #FDF6EC;
  box-shadow: 0 2px 14px rgba(240, 123, 44, 0.12);
  transform: translateY(-1px);
}

.decision-btn:active {
  transform: translateY(0);
  background-color: #F07B2C;
  border-color: #F07B2C;
  color: #ffffff;
  box-shadow: none;
}

.decision-btn:focus-visible {
  outline: none;
  border-color: #F07B2C;
  box-shadow: 0 0 0 3px rgba(240, 123, 44, 0.22);
}


/* ═══════════════════════════════════════════════
   INDICADOR DE PROGRESO
═══════════════════════════════════════════════ */
.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #F0E0C8;
  border: 2px solid #E0C8A8;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.progress-dot.active {
  background-color: #F07B2C;
  border-color: #F07B2C;
  transform: scale(1.2);
}


/* ═══════════════════════════════════════════════
   FORMULARIO DE EMAIL
═══════════════════════════════════════════════ */
#chapter-text,
#ending-text {
  white-space: pre-line;
}


#email-input:focus {
  outline: none;
  border-color: #F07B2C;
  box-shadow: 0 0 0 3px rgba(240, 123, 44, 0.15);
}


/* ═══════════════════════════════════════════════
   ACCESIBILIDAD — focus global
═══════════════════════════════════════════════ */
button:focus-visible {
  outline: 2px solid #F07B2C;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
