/* MePixa! | página do Spray's Playhouse (variante INFANTIL da página de jogo)
 *
 * Carregue DEPOIS de css/style.css e css/jogo.css, com
 * class="game-page-clara game-page-infantil" no <html>.
 *
 * O jogo é para crianças de 0 a 5 anos, então a página é branca, redonda e
 * colorida. As cores vêm do logo do jogo (azul, vermelho, amarelo, verde e
 * roxo) e dos anéis dos botões de cada cômodo: verde no quintal, amarelo na
 * sala, vermelho na cozinha, roxo no quarto e azul no banheiro.
 *
 * Cada cor tem dois tons: o vivo (preenchimento, borda, enfeite) e o "tinta"
 * (escurecido para TEXTO sobre branco, 4.5:1 ou mais).
 */

html.game-page-infantil {
  --ph-navy: #2a2f6e;          /* o contorno do logo: títulos */
  --ph-blue: #3d9be9;
  --ph-blue-ink: #1763b3;
  --ph-red: #f2554a;
  --ph-red-ink: #c22d24;
  --ph-yellow: #ffc933;
  --ph-yellow-ink: #9a5b00;
  --ph-green: #5cbf4a;
  --ph-green-ink: #2c7a23;
  --ph-purple: #a274e8;
  --ph-purple-ink: #6a3fc0;
  --ph-pink: #ff86b3;

  --game-accent: var(--ph-blue-ink);
  --game-glow: rgba(61, 155, 233, 0.22);

  --mp-heading: var(--ph-navy);
  --bs-heading-color: var(--ph-navy);
}

html.game-page-infantil h1,
html.game-page-infantil h2,
html.game-page-infantil h3 {
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ph-navy);
}

/* botões em forma de pílula: nada de canto vivo numa página infantil */
html.game-page-infantil .btn-mepixa,
html.game-page-infantil .btn-outline-mepixa {
  border-radius: 999px;
}

html.game-page-infantil .btn-mepixa {
  box-shadow: 0 6px 0 #c94c00;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html.game-page-infantil .btn-mepixa:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #c94c00;
}

/* o traço laranja dos títulos vira uma fileira de bolinhas coloridas */
html.game-page-infantil .section-title::after {
  width: 92px;
  height: 12px;
  border-radius: 0;
  background:
    radial-gradient(circle at 6px 6px, var(--ph-blue) 6px, transparent 6.5px),
    radial-gradient(circle at 26px 6px, var(--ph-red) 6px, transparent 6.5px),
    radial-gradient(circle at 46px 6px, var(--ph-yellow) 6px, transparent 6.5px),
    radial-gradient(circle at 66px 6px, var(--ph-green) 6px, transparent 6.5px),
    radial-gradient(circle at 86px 6px, var(--ph-purple) 6px, transparent 6.5px);
}

/* ---------- Hero ----------
   Fundo branco. A arte fica dentro de uma "janela" arredondada, e o Spray
   pula na frente dela. Os confetes são só enfeite (aria-hidden no HTML). */
.ph-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 4rem;
  background-color: #fff;
}

.ph-hero > .container { position: relative; z-index: 1; }

html.game-page-infantil .back-link { color: var(--mp-text); }
html.game-page-infantil .back-link:hover { color: var(--mp-orange-text); }

.ph-logo {
  display: block;
  width: min(470px, 92%);
  height: auto;
  margin-left: -10px;   /* o PNG tem margem transparente: alinha a tinta com o texto */
  animation: ph-float 5s ease-in-out infinite;
}

.ph-tagline {
  max-width: 24ch;
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ph-navy);
}

/* chips coloridos: os do jogo.css nasceram para ficar sobre foto escura */
html.game-page-infantil .chip {
  border: 2px solid var(--chip, var(--ph-blue));
  background-color: #fff;
  color: var(--chip-ink, var(--ph-blue-ink));
  letter-spacing: 0.03em;
}

.chip-blue   { --chip: var(--ph-blue);   --chip-ink: var(--ph-blue-ink); }
.chip-green  { --chip: var(--ph-green);  --chip-ink: var(--ph-green-ink); }
.chip-purple { --chip: var(--ph-purple); --chip-ink: var(--ph-purple-ink); }

/* a janela com a cena do quintal */
.ph-window-wrap {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
  padding: 0 0 12% 6%;   /* espaço para o Spray sair pela borda de baixo */
}

.ph-window {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 38px;
  border: 10px solid #fff;
  overflow: hidden;
  transform: rotate(2deg);
  background: var(--ph-blue) center / cover no-repeat;
  box-shadow:
    0 0 0 5px var(--ph-yellow),
    0 22px 0 -4px rgba(255, 201, 51, 0.35),
    0 30px 60px rgba(42, 47, 110, 0.18);
}

.ph-window video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-spray {
  position: absolute;
  left: -4%;
  bottom: -2%;
  width: 46%;
  height: auto;
  filter: drop-shadow(0 12px 14px rgba(42, 47, 110, 0.22));
  animation: ph-hop 2.6s ease-in-out infinite;
  transform-origin: 50% 90%;
}

/* confetes do fundo: bolinhas e estrelas soltas em volta do hero */
.ph-confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.ph-confetti i {
  position: absolute;
  display: block;
  width: var(--s, 18px);
  height: var(--s, 18px);
  border-radius: 50%;
  background-color: var(--c, var(--ph-yellow));
  opacity: 0.85;
  animation: ph-float 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.ph-confetti i.star {
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ph-confetti i.ring {
  background-color: transparent;
  border: 4px solid var(--c, var(--ph-blue));
}

@keyframes ph-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

@keyframes ph-hop {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ---------- Faixa de números: três balões ---------- */
.ph-stats { padding: 1rem 0 3.5rem; background-color: #fff; }

.ph-stat {
  height: 100%;
  padding: 1.6rem 1.2rem 1.4rem;
  border-radius: 28px;
  text-align: center;
  background-color: var(--soft);
  border: 3px solid var(--tone);
  box-shadow: 0 8px 0 var(--tone);
}

.ph-stat b {
  display: block;
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.ph-stat span {
  display: block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--ph-navy);
}

.tone-blue   { --tone: var(--ph-blue);   --ink: var(--ph-blue-ink);   --soft: #eef6fe; }
.tone-red    { --tone: var(--ph-red);    --ink: var(--ph-red-ink);    --soft: #fff0ee; }
.tone-yellow { --tone: var(--ph-yellow); --ink: var(--ph-yellow-ink); --soft: #fff8e1; }
.tone-green  { --tone: var(--ph-green);  --ink: var(--ph-green-ink);  --soft: #effaec; }
.tone-purple { --tone: var(--ph-purple); --ink: var(--ph-purple-ink); --soft: #f5effe; }

/* ---------- Sinopse ---------- */
/* sem capitular aqui: o "O" gigante da Fredoka parece um anel solto no texto */
html.game-page-infantil .synopsis p:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  padding: 0;
  color: inherit;
}

html.game-page-infantil .synopsis p { font-size: 1.12rem; color: var(--mp-text); }

.ph-cover {
  display: block;
  width: min(400px, 82%);
  height: auto;
  margin-inline: auto;
  border-radius: 22%;
  border: 8px solid #fff;
  transform: rotate(-3deg);
  box-shadow:
    0 0 0 5px var(--ph-blue),
    0 26px 50px rgba(42, 47, 110, 0.2);
}

/* ---------- Cômodos ----------
   Um bloco por lugar da casa. A cor do bloco é a mesma do anel dos botões
   daquele cômodo dentro do jogo. */
.ph-room { padding: 3.5rem 0; background-color: #fff; }

.ph-room + .ph-room { padding-top: 1.5rem; }

.ph-room-tag {
  display: inline-block;
  padding: 0.2rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background-color: var(--soft);
  border: 2px solid var(--tone);
}

html.game-page-infantil .ph-room h2 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  color: var(--ink);
}

.ph-room-text { font-size: 1.1rem; line-height: 1.8; }

/* a captura do cômodo, grande, com moldura da cor dele */
html.game-page-infantil .shot {
  border-radius: 26px;
  border: 0;
  background-color: #fff;
  box-shadow: none;
  overflow: visible;
}

/* height:auto é obrigatório: os atributos width/height do <img> entram como
   dica de apresentação e, sem isto, a imagem sai com a altura crua do arquivo */
html.game-page-infantil .shot img { height: auto; }

.ph-room-shot img {
  border-radius: 26px;
  border: 8px solid #fff;
  box-shadow:
    0 0 0 4px var(--tone),
    0 12px 0 0 var(--soft),
    0 24px 44px rgba(42, 47, 110, 0.14);
}

@media (min-width: 992px) {
  .ph-room:nth-of-type(odd) .ph-room-shot img { transform: rotate(-1.2deg); }
  .ph-room:nth-of-type(even) .ph-room-shot img { transform: rotate(1.2deg); }
}

html.game-page-infantil .shot:hover img { transform: none; }

/* o card de cada brincadeira: a captura em cima, o botão do jogo saindo
   pela borda dela, o nome e uma frase */
.ph-game {
  position: relative;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background-color: #fff;
  border: 3px solid var(--tone);
  box-shadow: 0 7px 0 var(--tone);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html.game-page-infantil .ph-game {
  border: 3px solid var(--tone);
  border-radius: 24px;
  overflow: visible;
}

.ph-game:hover {
  transform: translateY(-4px);
  box-shadow: 0 11px 0 var(--tone);
}

.ph-game > img:first-child {
  border-radius: 20px 20px 0 0;
  border-bottom: 3px solid var(--tone);
}

.ph-game .ph-game-icon {
  position: absolute;
  top: -22px;
  right: -12px;
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  cursor: default;
  filter: drop-shadow(0 4px 6px rgba(42, 47, 110, 0.25));
  animation: ph-float 4s ease-in-out infinite;
  pointer-events: none;
}

html.game-page-infantil .ph-game figcaption {
  flex: 1 1 auto;
  padding: 0.9rem 1.05rem 1.1rem;
  border-radius: 0 0 20px 20px;
  background-color: #fff;
  color: var(--mp-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ph-game figcaption b {
  display: block;
  margin-bottom: 0.2rem;
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

/* o banheiro: um recado curto, com a captura ao lado */
.ph-soon {
  border-radius: 30px;
  padding: 1.6rem;
  background-color: var(--soft);
  border: 3px dashed var(--tone);
}

html.game-page-infantil .ph-soon h2 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); color: var(--ink); }

.ph-soon .shot img {
  border-radius: 20px;
  border: 6px solid #fff;
  box-shadow: 0 0 0 3px var(--tone);
}

/* ---------- A turma ---------- */
html.game-page-infantil .cast-card {
  border: 3px solid var(--tone);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--tone);
  background-color: #fff;
}

html.game-page-infantil .cast-card:hover { border-color: var(--tone); }

html.game-page-infantil .cast-art-box {
  padding: 1.6rem 1rem 0.6rem;
  background: var(--soft);
  border-radius: 22px 22px 0 0;
}

html.game-page-infantil .cast-art {
  height: clamp(170px, 20vw, 230px);
  filter: drop-shadow(0 10px 12px rgba(42, 47, 110, 0.2));
  transition: transform 0.3s ease;
}

html.game-page-infantil .cast-card:hover .cast-art { transform: translateX(8px) rotate(-2deg); }

html.game-page-infantil .cast-body { border-top: 3px solid var(--tone); }
html.game-page-infantil .cast-role { color: var(--ink); }
html.game-page-infantil .cast-body h3 { font-size: 1.5rem; color: var(--ph-navy); }

/* ---------- Para quem cuida ---------- */
html.game-page-infantil .feature {
  display: block;
  border: 0;
  border-radius: 24px;
  background-color: var(--soft);
  border-top: 8px solid var(--tone);
}

html.game-page-infantil .feature h3 { font-size: 1.25rem; color: var(--ink); }
html.game-page-infantil .feature p { color: var(--ph-navy); }
html.game-page-infantil .feature:hover { border-color: var(--tone); }

/* ---------- Faixa de chamada ---------- */
html.game-page-infantil .game-cta {
  background: #fff8e1;
  border-top: 0;
}

/* ---------- Celular ---------- */
@media (max-width: 991.98px) {
  .ph-hero { padding-top: 112px; text-align: center; }
  .ph-logo { margin-inline: auto; }
  .ph-tagline { margin-inline: auto; }
  .ph-hero .d-flex { justify-content: center; }
  .ph-window-wrap { margin-top: 2.5rem; }
  /* com tudo centralizado, os confetes cairiam em cima do texto */
  .ph-confetti { display: none; }
}

@media (max-width: 575.98px) {
  .ph-window { border-width: 7px; border-radius: 28px; }
  .ph-game .ph-game-icon { width: 62px; height: 62px; top: -18px; right: -8px; }
  .ph-room-shot img { border-width: 6px; }
  /* no celular a janela mostra só o quadro parado, para não gastar dado */
  .ph-window video { display: none; }
}

/* quem pede menos movimento recebe a página parada */
@media (prefers-reduced-motion: reduce) {
  .ph-logo, .ph-spray, .ph-confetti i, .ph-game-icon { animation: none; }
  .ph-window video { display: none; }
}
