/* Site do Mondoj com a cara da tela inicial do app: papel creme pontilhado, letreiro colorido,
   cartões brancos com borda bege e sombra dura embaixo, faixas e ícones nas cores de cada mundo. */
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  --cream: #FCF2DB;
  --card: #FFFDF5;
  --ink: #3B2B21;
  --ink-soft: rgba(59, 43, 33, .62);
  --teal: #176B78;
  --maia: #0FA37F;
  --orange: #F27333;
  --line: #E6D1AD;
  --shadow: #D9BD8F;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html[data-lang-pending] body { visibility: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--cream);
  /* Pontinhos do fundo do menu do app (3×3 a cada 36×18, linhas alternadas) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect x='12' y='12' width='3' height='3' fill='%23D9B880' fill-opacity='.25'/%3E%3Crect x='30' y='30' width='3' height='3' fill='%23D9B880' fill-opacity='.25'/%3E%3C/svg%3E");
  font: 600 17px/1.5 "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); font-weight: 800; text-underline-offset: 3px; }
h1 { font-size: 2.1rem; font-weight: 900; line-height: 1.1; margin: 4px 0 6px; }
h2 { font-size: 1.5rem; font-weight: 900; line-height: 1.2; margin: 0 0 6px; }
.doc .card h2, .doc section.card h2 { font-size: 1.15rem; }
p { margin: 0 0 .7em; }
ul { margin: 0; padding: 0; list-style: none; }
.ico { width: 22px; height: 22px; flex: none; }

/* Cartão do app: branco, borda na cor da seção (ou bege), cantos de 22 e sombra dura de 4px */
.card {
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--sc, var(--line)) 45%, var(--line));
  border-radius: 22px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--sc, var(--shadow)) 32%, var(--shadow));
  padding: 16px;
}

/* Topo: letreiro vivo (queda bloco a bloco, passeio da capivara e foco de luz) e seletor de idioma */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1040px; margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 16px 6px;
}
.logo { position: relative; display: inline-flex; align-items: flex-end; text-decoration: none; user-select: none; }
.letters { display: flex; align-items: flex-end; gap: 2px; }
.letters .letter {
  display: inline-flex; line-height: 0;
  filter: brightness(var(--b, 1)) drop-shadow(0 3px 0 rgba(59, 43, 33, .25));
  transform-origin: bottom center;
  transform: translateY(var(--sink, 0px));
  animation: fall .45s calc(var(--i) * .09s) cubic-bezier(.5, 0, 1, 1) both, land .3s calc(var(--i) * .09s + .45s) ease-out;
}
.letters .letter.m-letter {
  animation: fall .45s 0s cubic-bezier(.5, 0, 1, 1) both, land .3s .45s ease-out, mwobble .6s .9s ease-out;
}
.letters .letter svg { height: clamp(34px, 9.2vw, 48px); width: auto; display: block; }
.letters .letter.m-letter svg { height: clamp(43px, 11.5vw, 60px); }
.lmask path { opacity: 0; animation: bpop .01s var(--bd, 0s) linear forwards; }
.logo.wave .letters .letter { animation: hop .4s calc(var(--i) * .07s) ease-out; }
.logo-stage {
  position: absolute; inset: 0; pointer-events: none; overflow: visible;
  opacity: 0;
}
.logo-stage.on { opacity: 1; }
.logo-spot {
  position: absolute; left: 0; top: 0; width: 96px; height: 140px;
  transform: translate3d(-48px, -110px, 0);
  will-change: transform, opacity;
}
.logo-critter {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  transform: translate3d(-14px, -28px, 0);
  will-change: transform;
  filter: drop-shadow(0 2px 0 rgba(59, 43, 33, .3));
}
.logo-capy { width: 100%; height: 100%; display: block; }
@keyframes bpop { to { opacity: 1; } }
@keyframes fall { from { transform: translateY(-70px); } to { transform: translateY(0); } }
@keyframes land { 50% { transform: translateY(-8px); } }
@keyframes hop { 50% { transform: translateY(-14px); } }
@keyframes mwobble { 25% { transform: rotate(9deg) scale(1.08); } 50% { transform: rotate(0) scale(1.12); } 75% { transform: rotate(-9deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .letters .letter, .letters .letter.m-letter, .logo.wave .letters .letter { animation: none; }
  .lmask path { opacity: 1; animation: none; }
  .logo-stage { display: none; }
}

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; align-content: center;
  background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--shadow);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary .ico { width: 18px; height: 18px; color: var(--teal); }
.lang summary b { font-size: .7rem; font-weight: 900; line-height: 1; }
.lang-menu {
  position: absolute; right: 0; top: 60px; z-index: 5; min-width: 160px;
  display: grid; padding: 6px;
  background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--shadow);
}
.lang-menu a { padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.lang-menu a[aria-current] { background: var(--teal); color: #fff; }

/* Abas embaixo, como um app (no computador viram botões no topo) */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 2px solid var(--line);
}
.tabs a {
  flex: 1; max-width: 140px; display: grid; justify-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 16px; text-decoration: none; color: var(--ink-soft); font-size: .78rem; font-weight: 800;
}
.tabs a .ico { width: 26px; height: 26px; }
.tabs a[aria-current] { color: var(--teal); background: rgba(23, 107, 120, .1); }

main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 24px; }
main > section { margin-top: 22px; }

/* Cabeçalho de seção com cubinhos 3D extrudados e barra na cor do desafio (--sc) */
.sec-head {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 8px; padding: 4px 14px 4px 8px;
  background: color-mix(in srgb, var(--sc, var(--orange)) 16%, var(--card));
  border: 2px solid color-mix(in srgb, var(--sc, var(--orange)) 55%, var(--line));
  border-radius: 18px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--sc, var(--orange)) 35%, var(--shadow));
}
.sec-cubes { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 2px 0 rgba(59, 43, 33, .2)); }
.lead { color: var(--ink-soft); }

/* Divisores entre seções feitos de cubinhos 3D chapados nas cores da paleta */
.block-divider {
  display: flex; align-items: flex-end; justify-content: center; gap: 10px;
  margin: 26px auto 6px; overflow: hidden;
}
.div-cube {
  width: 30px; height: 30px; flex: none;
  filter: drop-shadow(0 3px 0 rgba(59, 43, 33, .22));
}

/* Início */
.hero { margin-top: 14px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-copy { flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.1rem); max-width: 17ch; letter-spacing: -.01em; }
.hero .lead { font-size: 1.1rem; max-width: 52ch; }
.hero-mascot {
  flex: none; width: clamp(140px, 22vw, 220px); aspect-ratio: 1; border-radius: 32px; overflow: hidden;
  display: grid; place-items: center;
  background: color-mix(in srgb, #FABD2E 22%, var(--card));
  border: 2px solid color-mix(in srgb, #FABD2E 65%, var(--line));
  box-shadow: 0 4px 0 color-mix(in srgb, #FABD2E 40%, var(--shadow));
}
.hero-capy { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 560px) {
  .hero-mascot { width: 84px; border-radius: 22px; align-self: flex-start; margin-top: 6px; }
}
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.stores .soon { text-decoration: none; margin: 0; }
.soon.off { background: var(--line); color: var(--ink-soft); box-shadow: 0 3px 0 var(--shadow); }
.soon { display: inline-block; margin: 4px 0 0; padding: 8px 14px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 900; box-shadow: 0 3px 0 #C9561F; }
.install {
  display: block; margin-top: 12px; font: inherit; font-weight: 900; color: #fff; background: var(--maia);
  border: 0; border-radius: 999px; padding: 10px 22px; min-height: 46px; cursor: pointer; box-shadow: 0 3px 0 #096B53;
}
.install[hidden] { display: none; }

/* Cartão de desafio do app: faixa colorida, ícone num quadrado da cor do mundo, título e descrição */
.cgrid { display: grid; gap: 14px; margin-top: 14px; }
.ccard {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 104px; padding: 12px 12px 12px 20px;
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--c) 45%, var(--line));
  border-radius: 22px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 35%, var(--shadow));
  overflow: hidden;
}
.ccard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c); }
.ctile {
  flex: none; width: 78px; height: 78px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid color-mix(in srgb, var(--c) 60%, transparent);
}
.ctile img { width: 62px; height: 62px; }
.cbody { display: grid; gap: 3px; min-width: 0; }
.cbody b { font-size: 1.08rem; font-weight: 900; }
.cbody > span:not(.stars) { color: var(--ink-soft); font-size: .92rem; line-height: 1.35; }
.stars { display: flex; gap: 2px; color: #FFC21A; }
.stars .ico { width: 17px; height: 17px; }

/* Cartão de mundo do app: foto em cima, borda colorida e resumo embaixo */
.wgrid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.wcard {
  position: relative; background: var(--card);
  border: 2px solid color-mix(in srgb, var(--wc, var(--line)) 50%, var(--line));
  border-top: 6px solid var(--wc, var(--orange));
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--wc, var(--shadow)) 32%, var(--shadow));
}
.wcard.featured { border-top-width: 8px; }
.wcard img { display: block; width: 100%; height: 110px; object-fit: cover; }
.wbody { display: grid; gap: 4px; padding: 12px; }
.wbody b { font-size: 1.05rem; font-weight: 900; }
.wbody span { color: var(--ink-soft); font-size: .9rem; line-height: 1.35; }

/* Galeria de bichos e robô em blocos 3D (modelos de caixas do jogo, sem texturas) */
.critter-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
}
.critter-card {
  display: grid; justify-items: center; gap: 6px; padding: 12px 10px;
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--cc) 55%, var(--line));
  border-radius: 20px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--cc) 35%, var(--shadow));
  text-align: center;
}
.critter-box {
  width: 84px; height: 84px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cc) 18%, transparent);
  border: 2px solid color-mix(in srgb, var(--cc) 48%, transparent);
}
.critter-svg { width: 72px; height: 72px; filter: drop-shadow(0 3px 0 rgba(59, 43, 33, .22)); }
.critter-card b { font-size: .92rem; font-weight: 900; line-height: 1.2; }

/* Ajuda e privacidade */
.doc { max-width: 760px; }
.rows { display: grid; gap: 14px; }
.rows li { display: flex; gap: 12px; align-items: flex-start; }
.rows li > span:last-child { display: grid; gap: 1px; }
.rows b { font-weight: 900; }
.rows li > span:last-child > span { color: var(--ink-soft); line-height: 1.4; }
.rico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--ink);
  background: color-mix(in srgb, var(--sc, var(--teal)) 26%, var(--card));
  border: 2px solid color-mix(in srgb, var(--sc, var(--teal)) 55%, var(--line));
}
.list { padding-left: 34px; list-style: disc; }
.list li { margin: 4px 0; }
.list li::marker { color: var(--sc, var(--orange)); }
.faq { display: grid; gap: 10px; }
.faq details { padding: 12px 16px; }
.faq summary { font-weight: 900; cursor: pointer; min-height: 28px; }
.faq details p { margin: 8px 0 0; color: var(--ink-soft); }
.summary { display: flex; gap: 12px; align-items: center; background: var(--maia); color: #fff; border-radius: 22px; padding: 14px 16px; box-shadow: 0 4px 0 #096B53; font-weight: 800; }
.summary .ico { width: 30px; height: 30px; }
.doc > section.card { margin-top: 14px; position: relative; padding-left: 22px; overflow: hidden; }
.doc > section.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--sc, var(--maia)); }
.doc > section.card p:last-child { margin-bottom: 0; }

/* Cartão de contato */
.contact-card a { color: var(--maia); }
.contact-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Telas maiores: duas ou três colunas de desafios e abas no topo */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .tabs {
    position: static; max-width: 1040px; margin: 4px auto 0; padding: 0 16px;
    justify-content: flex-start; gap: 8px; background: none; border: 0;
  }
  .tabs a { flex: none; max-width: none; display: flex; align-items: center; gap: 6px; font-size: .95rem; padding: 8px 14px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--shadow); color: var(--ink); }
  .tabs a .ico { width: 20px; height: 20px; }
  .tabs a[aria-current] { background: var(--maia); border-color: var(--maia); color: #fff; box-shadow: 0 3px 0 #096B53; }
  .cgrid { grid-template-columns: repeat(2, 1fr); }
  .critter-grid { grid-template-columns: repeat(6, 1fr); }
  h1 { font-size: 2.6rem; }
}
@media (min-width: 1000px) { .cgrid { grid-template-columns: repeat(3, 1fr); } }

/* Celular deitado na entrada, passando as telas do jogo */
.phone { margin: 20px auto 14px; max-width: 700px; }
.phone figcaption, .phone .dots { padding: 0 8px; }
@media (min-width: 720px) { .phone { margin: 24px auto 16px; } .phone figcaption, .phone .dots { padding: 0; } }
.device {
  position: relative; padding: 10px 14px; border-radius: 34px;
  background: linear-gradient(145deg, #3A2E26, #1E1712);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--sc, var(--shadow)) 40%, var(--shadow)), inset 0 0 0 2px #4A3C31;
}
.device::before { /* câmera, na lateral como no celular deitado */
  content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 26px; margin-top: -13px; border-radius: 4px; background: #0D0A08;
}
.device::after { /* botão de volume, em cima */
  content: ""; position: absolute; top: -4px; left: 22%; width: 54px; height: 4px; border-radius: 4px 4px 0 0; background: #2A211B;
}
.screen { position: relative; aspect-ratio: 1020 / 506; border-radius: 22px; overflow: hidden; background: #8FC9F2; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.screen img.on { opacity: 1; animation: drift 5s ease-out both; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1); } }
.phone figcaption { margin-top: 12px; font-weight: 800; min-height: 1.5em; }
.dots { display: flex; gap: 6px; margin-top: 6px; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.dots button[aria-current] { background: var(--orange); width: 24px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .screen img { transition: none; } .screen img.on { animation: none; } }
.parents p { max-width: 60ch; }

/* Cartões "para os pais": faixa colorida, título e uma frase */
.pgrid { display: grid; gap: 14px; margin: 14px 0; padding: 0; list-style: none; }
.pcard {
  position: relative; display: grid; gap: 4px; padding: 14px 14px 14px 22px;
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--c) 45%, var(--line));
  border-radius: 22px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 35%, var(--shadow));
  overflow: hidden;
}
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c); }
.pcard b { font-size: 1.08rem; font-weight: 900; }
.pcard span { color: var(--ink-soft); font-size: .95rem; line-height: 1.4; }
@media (min-width: 640px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }

/* História da Capi: selfie e constelação lado a lado */
.story { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.story figure { margin: 0; }
.story img { display: block; width: 100%; height: auto; border-radius: 18px; border: 4px solid var(--sc); background: #1e1b3a; }
.story figcaption { margin-top: 8px; text-align: center; font-weight: 800; }

/* Céu animado do topo (HomeSky do app): gradiente pela hora do dia, Sol ou Lua, estrelas, nuvens de blocos, colinas e passarinho */
.sky-top {
  position: relative; width: calc(100% - 32px); max-width: 1008px; margin: calc(14px + env(safe-area-inset-top)) auto 0;
  padding: 0; min-height: clamp(124px, 24vw, 164px); align-items: flex-end; justify-content: space-between;
}
.sky-wrap {
  position: absolute; inset: 0; overflow: hidden; border-radius: 28px;
  background: linear-gradient(#7fb6f2, #cfe8ff); box-shadow: 0 4px 0 var(--shadow);
}
.sky { display: block; width: 100%; height: 100%; }
.sky-top .logo {
  position: relative; z-index: 1; margin: 0 0 8px 12px; padding: 8px 14px 2px; border-radius: 24px;
  background: rgba(252, 242, 219, .5);
}
.sky-top .lang { position: relative; z-index: 2; align-self: flex-start; margin: 12px 12px 0 0; }
.sky-top .lang summary { background: rgba(255, 253, 245, .94); border-radius: 999px; box-shadow: 0 2px 0 var(--shadow); }

/* Botões das lojas com o símbolo de cada uma */
.soon.store { display: inline-flex; align-items: center; gap: 8px; }
.store-ico { width: 24px; height: 24px; flex: none; }
.soon.off.store .store-ico { opacity: .85; }
