:root {
  --ceu-topo: #6ec6ff;
  --ceu-base: #2b59c3;
  --tinta: #1d2b5c;
  --amarelo: #ffca28;
  --rosa: #f06292;
  --roxo: #7e57c2;
  --verde: #43a047;
  --cartao: rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  min-height: 100dvh;
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  color: var(--tinta);
  background: radial-gradient(circle at 50% 25%, var(--ceu-topo), var(--ceu-base) 80%) fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#cena {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: pan-y;
}

/* ---------- formas estáticas (fallback sem 3D) ---------- */
.formas-estaticas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body.has-3d .formas-estaticas { display: none; }

.f {
  position: absolute;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.25));
  animation: flutua 4s ease-in-out infinite;
}
.f-bola {
  width: clamp(130px, 34vw, 230px);
  aspect-ratio: 1;
  left: 50%;
  top: 14%;
  translate: -50% 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.45), transparent 30%),
    linear-gradient(-14deg, transparent 47%, #fff 47% 57%, transparent 57%),
    radial-gradient(circle at 30% 70%, #fff 1.5%, transparent 2%),
    radial-gradient(circle at 62% 76%, #fff 1.2%, transparent 1.7%),
    radial-gradient(circle at 45% 84%, #fff 1%, transparent 1.5%),
    #002776;
}
.f-cubo {
  display: grid;
  place-items: center;
  width: clamp(52px, 12vw, 88px);
  aspect-ratio: 1;
  border-radius: 18%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  outline: 4px solid var(--cor);
  background: var(--cor);
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 1;
}
.f-s { --cor: #ff5a5f; left: 6%;  top: 20%; rotate: -12deg; animation-delay: -1s; }
.f-d { --cor: #2f80ed; right: 6%; top: 30%; rotate: 10deg;  animation-delay: -2s; }

.f-icone { width: clamp(52px, 13vw, 96px); }
.i-balanca { left: 50%; top: 1%; translate: -50% 0; width: clamp(60px, 15vw, 104px); }
.i-livros  { right: 8%;  top: 8%;  animation-delay: -0.5s; }
.i-crianca { right: 24%; top: 44%; animation-delay: -2.5s; }
.i-casa    { left: 10%;  top: 42%; animation-delay: -3s; }
.i-estrela { left: 30%;  top: 4%;  width: clamp(36px, 9vw, 64px); animation-delay: -1.5s; }
.i-coracao { left: 6%;   top: 4%;  width: clamp(40px, 10vw, 72px); animation-delay: -3.5s; }
.i-lapis   { right: 30%; top: 5%;  width: clamp(36px, 9vw, 64px); animation-delay: -2s; }

@keyframes flutua {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- conteúdo ---------- */
.conteudo {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 8px;
  pointer-events: none;
}

.cartao {
  pointer-events: auto;
  width: min(560px, 100%);
  margin-top: 52vh;
  padding: 20px 24px 22px;
  text-align: center;
  background: var(--cartao);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(17, 38, 99, 0.35), inset 0 -6px 0 rgba(43, 89, 195, 0.12);
  backdrop-filter: blur(6px);
}

.selo {
  display: inline-block;
  margin: 0 0 4px;
  padding: 2px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5d3a00;
  background: var(--amarelo);
  border-radius: 999px;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(90deg, var(--roxo), var(--rosa) 55%, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.texto {
  margin: 8px 0 0;
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.35;
}

.destaque {
  margin: 8px 0 0;
  font-size: clamp(1.2rem, 4.4vw, 1.5rem);
  font-weight: 800;
  color: var(--verde);
}

#ativar-movimento {
  margin-top: 14px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--roxo), var(--rosa));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(126, 87, 194, 0.4);
  cursor: pointer;
}
#ativar-movimento[hidden] { display: none; }
#ativar-movimento:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; }

.rodape {
  position: relative;
  z-index: 1;
  padding: 4px 16px calc(6px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}
.rodape a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .f { animation: none; }
}
