/*
 * Maná Kids — Tela de introdução da história (historia.css)
 *
 * Estilo da arte oficial (tela "Moisés e o Mar Vermelho"): cena ilustrada no topo
 * (céu/sol/nuvens/colinas em CSS), o personagem (emoji/ilustração) em destaque, e
 * um card branco com título, descrição, recompensa e o CTA verde "Assistir agora".
 * Mobile-first; respeita prefers-reduced-motion.
 */

#historiaIntro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  overflow-y: auto;
  background: var(--brand-creme);
  color: var(--cor-texto);
}
#historiaIntro.active { display: block; animation: introEntra 280ms ease both; }
#historiaIntro.saindo { animation: introSai 200ms ease both; }

/* Botão voltar flutuante */
.intro-voltar {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 3;
  min-height: var(--toque-min);
  min-width: var(--toque-min);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--cor-primaria);
  font-weight: 800;
  padding: 0 1rem;
  cursor: pointer;
  box-shadow: var(--sombra-card);
  backdrop-filter: blur(4px);
}

/* ---------------- Cena ilustrada (céu) ---------------- */
.intro-cena {
  position: relative;
  height: clamp(220px, 42vh, 360px);
  overflow: hidden;
  background: linear-gradient(180deg, #a9c2f5 0%, #c9d6f7 55%, #e9e3f8 100%);
}
.intro-cena .sol {
  position: absolute;
  top: 12%; right: 14%;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffe79a, #ffc24d);
  box-shadow: 0 0 50px 14px rgba(255, 200, 80, 0.55);
  animation: sol-brilha 4s ease-in-out infinite;
}
.intro-cena .nuvem {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.9;
  filter: blur(0.3px);
  animation: nuvem-anda 18s linear infinite;
}
.intro-cena .nuvem::before,
.intro-cena .nuvem::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%;
}
.intro-cena .n1 { width: 90px; height: 26px; top: 22%; left: 12%; }
.intro-cena .n1::before { width: 42px; height: 42px; top: -18px; left: 14px; }
.intro-cena .n1::after  { width: 30px; height: 30px; top: -12px; left: 46px; }
.intro-cena .n2 { width: 70px; height: 20px; top: 38%; left: 60%; animation-duration: 24s; }
.intro-cena .n2::before { width: 32px; height: 32px; top: -14px; left: 10px; }
.intro-cena .n2::after  { width: 24px; height: 24px; top: -8px; left: 36px; }

/* Colinas em camadas */
.intro-cena .colina {
  position: absolute; left: -10%; right: -10%; bottom: -40%;
  height: 70%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.intro-cena .c1 { background: #bcd9a6; bottom: -34%; }
.intro-cena .c2 { background: #a6c98c; bottom: -46%; left: -25%; right: 40%; }
.intro-cena .c3 { background: #93bd78; bottom: -50%; left: 45%; right: -25%; }

/* Personagem/assunto em destaque */
.intro-cena .heroi {
  position: absolute;
  left: 50%; bottom: 8%;
  transform: translateX(-50%);
  font-size: clamp(4.5rem, 22vw, 7rem);
  line-height: 1;
  filter: drop-shadow(0 12px 14px rgba(80, 70, 130, 0.28));
  animation: heroi-flutua 3.2s ease-in-out infinite;
}
.intro-cena .heroi img { width: clamp(120px, 40vw, 200px); height: auto; }

/* Badge GRÁTIS / Kids Plus sobre a cena */
.intro-badge {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  font-weight: 800; font-size: 0.78rem;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  box-shadow: var(--sombra-card);
}
.intro-badge.gratis { background: var(--cor-acento); color: #06351f; }
.intro-badge.plus { background: var(--cor-primaria); color: #fff; }

/* ---------------- Card de conteúdo ---------------- */
.intro-card {
  position: relative;
  margin: -28px auto 0;
  max-width: 640px;
  background: #fff;
  border-radius: var(--raio-grande) var(--raio-grande) 0 0;
  padding: 1.6rem 1.25rem 2.4rem;
  box-shadow: 0 -10px 30px rgba(120, 110, 200, 0.12);
  min-height: 50vh;
}
.intro-card h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); margin-bottom: 0.3rem; }
.intro-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  color: var(--cor-texto-suave); font-weight: 700; font-size: 0.9rem;
  margin-bottom: 1rem;
}
.intro-meta .chip {
  background: #f3edfb; color: var(--cor-primaria);
  padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.82rem;
}
.intro-desc { color: var(--cor-texto); line-height: 1.65; margin-bottom: 1.4rem; }
.intro-recompensa {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fff7e6; color: #8a5a00; font-weight: 800;
  padding: 0.5rem 0.9rem; border-radius: 999px; margin-bottom: 1.4rem;
}

.intro-cta { display: grid; gap: 0.6rem; }
.intro-cta .btn { width: 100%; }
.intro-cta .btn-assistir {
  min-height: 58px; font-size: 1.15rem;
}

@keyframes introEntra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes introSai { from { opacity: 1; } to { opacity: 0; } }
@keyframes sol-brilha { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes nuvem-anda { 0% { transform: translateX(0); } 100% { transform: translateX(40px); } }
@keyframes heroi-flutua { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  #historiaIntro.active, #historiaIntro.saindo { animation: none; }
  .intro-cena .sol, .intro-cena .nuvem, .intro-cena .heroi { animation: none; }
}
