/* ============================================================
   Landing "game" — Homeblox one page interativa
   (parallax em camadas, mascote robô voxel, mapa de aventura,
   baú 3D e wizard em modal)
   ============================================================ */

body.landing {
  overflow-x: hidden;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 234, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(109, 69, 201, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}

.nav-links a:hover {
  color: var(--color-primary);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 17px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 16px 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 999px;
}

.btn-ghost:hover {
  background: rgba(109, 69, 201, 0.08);
}

/* ---------------- HERO com parallax em camadas ---------------- */
.hero-game {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  inset: -20% 0 0 0;
  pointer-events: none;
  will-change: transform;
}

.layer-sky {
  background: linear-gradient(180deg, #8ECBFF 0%, #BFE3FF 55%, #EAF4FF 100%);
}

.sun {
  position: absolute;
  top: 26%;
  left: 5%;
  width: 110px;
  height: 110px;
  border-radius: 28px; /* sol "bloco" arredondado, na vibe voxel */
  background: radial-gradient(circle at 35% 35%, #FFE28A, #FFC93C 70%);
  box-shadow: 0 0 60px 18px rgba(255, 201, 60, 0.45);
  animation: sun-spin 40s linear infinite;
}

@keyframes sun-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bird {
  position: absolute;
  font-size: 20px;
  animation: bird-fly 16s linear infinite;
  opacity: 0.8;
}

.bird.b1 { top: 14%; animation-delay: 0s; }
.bird.b2 { top: 26%; animation-delay: 7s; font-size: 15px; }

@keyframes bird-fly {
  from { left: -5%; }
  to { left: 105%; }
}

.hill-tree {
  position: absolute;
  bottom: 26%;
  font-size: 46px;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.12));
}

.hill-tree.t1 { left: 8%; }
.hill-tree.t2 { left: 20%; font-size: 34px; bottom: 32%; }
.hill-tree.t3 { right: 6%; font-size: 40px; bottom: 30%; }

.cloud {
  position: absolute;
  width: 140px;
  height: 44px;
  background: #fff;
  border-radius: 999px;
  opacity: 0.9;
  box-shadow: 30px -18px 0 6px #fff, 66px -8px 0 2px #fff;
}

.layer-clouds-far .cloud { opacity: 0.55; transform: scale(0.7); }
.cloud.c1 { top: 18%; left: 8%; }
.cloud.c2 { top: 10%; left: 55%; }
.cloud.c3 { top: 30%; left: 82%; }
.cloud.c4 { top: 16%; left: 30%; }
.cloud.c5 { top: 38%; left: 68%; }

.layer-hills {
  top: auto;
  bottom: -6%;
  height: 46%;
  background:
    radial-gradient(58% 88% at 18% 100%, #7BC96A 0%, #7BC96A 60%, transparent 61%),
    radial-gradient(70% 100% at 78% 100%, #8FD97F 0%, #8FD97F 55%, transparent 56%),
    radial-gradient(45% 70% at 50% 100%, #6BBF5A 0%, #6BBF5A 62%, transparent 63%);
}

.hero-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  /* studs no chão, estilo baseplate de bloquinhos */
  background:
    radial-gradient(circle at 23px 16px, rgba(255, 255, 255, 0.28) 8px, transparent 9px),
    repeating-linear-gradient(90deg, #5FAE4F 0 46px, #6BBF5A 46px 92px);
  background-size: 46px 46px, auto;
  border-top: 6px solid #4E9A3F;
  z-index: 2;
}

.hero-game-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 90px;
  min-height: 80vh;
}

.hero-copy h1 {
  font-size: 44px;
  line-height: 1.12;
  color: var(--color-primary-dark);
  margin: 12px 0 16px;
}

.hero-copy h1 .hl {
  color: var(--color-accent-dark);
}

.hero-copy p {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: 24px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.floaty {
  animation: floaty 3.2s ease-in-out infinite;
}

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

.hero-canvas-wrap {
  position: relative;
  height: 480px;
}

#robot-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.canvas-hint {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.75);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
}

/* HUD flutuante estilo jogo, ao redor do mascote */
.hud-chip {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-white);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 0 rgba(109, 69, 201, 0.18), var(--shadow-card);
  pointer-events: none;
  animation-delay: var(--delay, 0s);
}

.chip-level { top: 2%; left: -4%; color: var(--color-primary-dark); }
.chip-xp { top: 16%; right: -2%; color: #B8860B; }
.chip-coin { bottom: 30%; left: -8%; color: #1F8C3C; }
.chip-streak { bottom: 12%; right: -4%; color: #C2410C; }

.chip-bar {
  width: 54px;
  height: 8px;
  background: #E4DBF7;
  border-radius: 999px;
  overflow: hidden;
}

.chip-bar span {
  display: block;
  width: 82%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

/* Barra de progresso de hoje (espelha o app) */
.hero-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
  max-width: 420px;
}

.hp-flag {
  font-weight: 800;
  font-size: 13px;
  color: var(--color-primary);
  white-space: nowrap;
}

.hp-track {
  display: flex;
  gap: 4px;
  flex: 1;
}

.hp-seg {
  flex: 1;
  height: 10px;
  border-radius: 4px;
  background: #E4DBF7;
}

.hp-seg.done { background: var(--color-success); }

.hp-count {
  font-weight: 800;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---------------- Faixa de stats estilo HUD ---------------- */
.stats-strip {
  background: var(--color-white);
  border-top: 6px solid var(--color-accent);
  padding: 28px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 16px 12px;
}

.stat-tile .stat-icon { font-size: 26px; }
.stat-tile strong { font-size: 22px; color: var(--color-text); }
.stat-tile span:not(.stat-icon) { font-size: 13px; color: var(--color-text-muted); }

.tile-green { background: #E1F7E6; }
.tile-yellow { background: #FFF1CC; }
.tile-purple { background: #EDE4FB; }
.tile-red { background: #FDE7E7; }

/* ---------------- Divisor de blocos ---------------- */
.block-divider {
  height: 26px;
  background:
    radial-gradient(circle at 20px 9px, rgba(255, 255, 255, 0.55) 6px, transparent 7px),
    repeating-linear-gradient(90deg, #E4DBF7 0 40px, #EDE4FB 40px 80px);
  background-size: 40px 26px, auto;
  border-top: 4px solid #D6C9F2;
  border-bottom: 4px solid #D6C9F2;
}

/* ---------------- Mapa de aventura 3D ---------------- */
.map-section {
  position: relative;
  background: linear-gradient(180deg, #BFE3FF 0%, #DCEFFD 45%, var(--color-bg) 100%);
}

.map3d-wrap {
  position: relative;
  max-width: 1040px;
  height: 560px;
}

#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

#map-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map3d-label {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 14px;
  color: var(--color-primary-dark);
  background: var(--color-white);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 0 4px 0 rgba(109, 69, 201, 0.25), var(--shadow-card);
  white-space: nowrap;
  animation: node-pulse 2.4s ease-in-out infinite;
}

.map3d-label:hover {
  animation-play-state: paused;
  background: #FFF6DC;
}

.map3d-label.active {
  background: var(--color-accent);
  box-shadow: 0 4px 0 var(--color-accent-dark), var(--shadow-card);
}

@keyframes node-pulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.07; }
}

@media (max-width: 720px) {
  .map3d-wrap { height: 400px; }
  .map3d-label { font-size: 12px; padding: 5px 10px; }
}

.map-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 86%);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(43, 33, 64, 0.25);
  padding: 24px;
  text-align: center;
  z-index: 5;
  animation: card-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-pop {
  from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.map-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.map-card-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

/* ---------------- Como funciona / missões ---------------- */
.how-section {
  background:
    radial-gradient(70% 50% at 50% 0%, #EAF4FF 0%, transparent 60%),
    var(--color-bg);
}

.how-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.how-step {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-align: center;
  position: relative;
}

.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 20px;
  color: var(--color-white);
  margin-bottom: 10px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.how-num.n1 { background: var(--color-primary); }
.how-num.n2 { background: var(--color-accent-dark); }
.how-num.n3 { background: var(--color-success); }

.how-step h3 { margin: 0 0 6px; color: var(--color-primary-dark); }
.how-step p { margin: 0; color: var(--color-text-muted); font-size: 14px; }

.how-arrow {
  align-self: center;
  font-size: 26px;
  color: var(--color-accent-dark);
}

.mission-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  max-width: 760px;
}

.mission-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.mission-card:hover { transform: translateY(-3px) rotate(-0.5deg); }
.mission-card.done { border-color: var(--color-success); background: #F4FBF5; }

.mission-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mi-blue { background: #E3F0FF; }
.mi-purple { background: #EDE4FB; }
.mi-green { background: #E1F7E6; }
.mi-orange { background: #FFEBD6; }

.mission-info { flex: 1; }
.mission-info strong { display: block; margin-bottom: 4px; }

.mission-rewards { display: flex; gap: 8px; }

.rw {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.rw-xp { background: #FFF1CC; color: #B8860B; }
.rw-coin { background: #E1F7E6; color: #1F8C3C; }

.mission-status {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-success);
  white-space: nowrap;
}

.mission-status.todo { color: #D6C9F2; font-size: 22px; }

.daily-reward {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin-top: 20px;
  background: linear-gradient(90deg, #FFF1CC, #FFE7A8);
  border: 2px dashed var(--color-accent-dark);
  border-radius: var(--radius-md);
  padding: 16px 22px;
}

.daily-reward .dr-gift { font-size: 38px; }
.daily-reward .dr-chest { font-size: 38px; margin-left: auto; }
.daily-reward p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 14px; }

/* ---------------- Baú 3D + planos (painel noturno) ---------------- */
.chest-section {
  text-align: center;
}

.chest-panel {
  position: relative;
  background:
    radial-gradient(80% 70% at 50% 100%, #3A2A66 0%, #241A44 60%, #1B1333 100%);
  border-radius: var(--radius-lg);
  padding: 48px 24px 56px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(27, 19, 51, 0.35);
}

.section-title.light { color: #fff; }
.section-subtitle.light { color: #C9BCEB; }

.star {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle 2.4s ease-in-out infinite;
}

.st1 { top: 12%; left: 8%; }
.st2 { top: 22%; left: 22%; width: 4px; height: 4px; animation-delay: 0.4s; }
.st3 { top: 10%; left: 46%; animation-delay: 0.9s; }
.st4 { top: 18%; left: 70%; width: 4px; height: 4px; animation-delay: 1.3s; }
.st5 { top: 8%; left: 88%; animation-delay: 0.6s; }
.st6 { top: 42%; left: 5%; width: 4px; height: 4px; animation-delay: 1.7s; }
.st7 { top: 38%; left: 93%; animation-delay: 0.2s; }
.st8 { top: 55%; left: 14%; width: 3px; height: 3px; animation-delay: 1.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.chest-canvas-wrap {
  max-width: 640px;
  margin: 0 auto;
  height: 380px;
}

#chest-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.chest-panel .plan-card {
  background: var(--color-white);
}

.plan-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  color: #E8E0FA;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  max-width: 560px;
  margin-inline: auto;
}

.plans-reveal {
  margin-inline: auto;
  max-width: 640px;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.plans-reveal.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.plan-note {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------------- CTA final + footer ricos ---------------- */
.cta-final {
  position: relative;
  overflow: hidden;
}

.cta-mascot {
  font-size: 56px;
  margin-bottom: 8px;
  animation: floaty 3s ease-in-out infinite;
}

.cta-small {
  margin-top: 14px;
  font-size: 13px;
  opacity: 0.75;
}

.cta-block {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  opacity: 0.35;
  animation: floaty 4s ease-in-out infinite;
}

.cb1 { background: var(--color-accent); top: 18%; left: 7%; transform: rotate(12deg); }
.cb2 { background: #9B7BE0; bottom: 16%; left: 14%; width: 22px; height: 22px; animation-delay: 1s; }
.cb3 { background: var(--color-success); top: 24%; right: 9%; width: 26px; height: 26px; animation-delay: 0.5s; }
.cb4 { background: var(--color-accent-dark); bottom: 12%; right: 16%; transform: rotate(-10deg); animation-delay: 1.6s; }

.footer-rich {
  background: #241A44;
  color: #C9BCEB;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 24px 32px;
}

.footer-brand .logo { color: #fff; font-size: 22px; font-weight: 800; }
.footer-brand p { font-size: 14px; margin-top: 10px; max-width: 30ch; }

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col strong { color: #fff; margin-bottom: 4px; }

.footer-col a {
  color: #C9BCEB;
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 18px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------- Modal do wizard ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(43, 33, 64, 0.55);
  backdrop-filter: blur(6px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  padding: 32px;
  animation: card-pop-center 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-pop-center {
  from { transform: scale(0.85) translateY(24px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: rgba(109, 69, 201, 0.08);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  color: var(--color-primary-dark);
}

.step-hint {
  color: var(--color-text-muted);
  margin: 4px 0 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.child-form {
  background: var(--color-bg-sky);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.modal-success {
  text-align: center;
  padding: 16px 0;
}

.pix-copy-paste {
  width: 100%;
  min-height: 70px;
  resize: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border, #ddd);
  padding: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* ---------------- Responsivo / acessibilidade ---------------- */
@media (max-width: 860px) {
  .hero-game-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 70px;
  }
  .hero-copy p { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .hero-canvas-wrap { height: 340px; }
  .hero-copy h1 { font-size: 32px; }
  .sun { width: 60px; height: 60px; top: 21%; left: 3%; border-radius: 16px; }
  .hud-chip { font-size: 12px; padding: 6px 10px; }
  .chip-level { left: 0; }
  .chip-coin { left: 0; }
  .chip-xp { right: 0; }
  .chip-streak { right: 0; }
  .hero-progress { margin-inline: auto; }
  .how-arrow { display: none; }
  .d-castle { font-size: 36px; }
  .map-deco { font-size: 24px; }
  .map-node .node-icon { width: 48px; height: 48px; font-size: 20px; border-radius: 16px; }
  .map-node .node-label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .floaty,
  .map-node .node-icon {
    animation: none;
  }
}
