/* =========================================================
   Estilo inspirado na ilustração "Vamos plantar e descobrir!"
   ========================================================= */
:root {
  --ink: #2b2420;
  --leaf: #4f9d2a;
  --leaf-dark: #2f5d12;
  --leaf-light: #a8d46f;
  --mint: #c9e8a8;
  --mint-soft: #e8f5d8;
  --sun: #f7d21a;
  --orange: #f28a1e;
  --red: #e5322d;
  --soil: #8b5a2b;
  --soil-light: #e9a25e;
  --sky: #4fb8e0;
  --pink: #ef6a8e;
  --cream: #fffdf6;
  --paper: #ffffff;
  --sketch-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --shadow: 6px 6px 0 rgba(43, 36, 32, .9);
  --font-title: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf-dark); }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.1; margin: 0 0 .4em; color: var(--leaf-dark); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.center { text-align: center; margin-top: 2rem; }
.section { padding: 4.5rem 0; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head p { margin: 0; color: #6b5a4c; }

/* Contorno "desenhado à mão" */
.sketch {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--sketch-radius);
  box-shadow: var(--shadow);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4em;
  font: 800 1rem var(--font-body);
  padding: .8em 1.4em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  background: #fff;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px dashed var(--sky); outline-offset: 3px; }
.btn-sun { background: var(--sun); }
.btn-leaf { background: var(--leaf); color: #fff; }
.btn-ghost { background: #fff; }
.btn[hidden] { display: none; }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 4vw;
  background: rgba(255, 253, 246, .92);
  backdrop-filter: blur(6px);
  border-bottom: 3px dashed var(--mint);
}
.logo { font: 800 1.6rem var(--font-title); color: var(--leaf-dark); text-decoration: none; }
.logo-leaf { display: inline-block; animation: sway 3s ease-in-out infinite; }
.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a { font-weight: 800; text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--leaf); }
.nav-cta { background: var(--sun); padding: .35em 1em; border: 3px solid var(--ink); border-radius: 999px; }
.menu-btn { display: none; font-size: 1.6rem; background: none; border: 0; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 3.5rem 0 2.5rem; overflow: hidden; }
.hero-inner { width: min(1120px, 92vw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.kicker { display: inline-block; margin: 0 0 1rem; font-weight: 800; color: var(--orange); background: #fff4e3; padding: .25em .9em; border-radius: 999px; border: 2px dashed var(--orange); }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h1 .hl { color: var(--leaf); display: inline-block; position: relative; }
h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .28em; background: var(--sun); z-index: -1; border-radius: 99px; transform: rotate(-1.5deg); }
.lead { font-size: 1.2rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }

.hero-art { margin: 0; text-align: center; }
.frame { position: relative; background: #fff; padding: 14px; border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); transform: rotate(2deg); transition: transform .4s; }
.frame:hover { transform: rotate(0) scale(1.02); }
.frame img { border-radius: 8px; }
.tape { position: absolute; width: 90px; height: 28px; background: rgba(247, 210, 26, .75); border: 2px solid rgba(43, 36, 32, .25); }
.t1 { top: -14px; left: 24px; transform: rotate(-8deg); }
.t2 { bottom: -14px; right: 24px; transform: rotate(-6deg); background: rgba(201, 232, 168, .85); }
.hero-art figcaption { font: 700 1.1rem var(--font-title); color: var(--leaf-dark); margin-top: 1.2rem; }

.sky-deco { position: absolute; inset: 0; pointer-events: none; }
.hero-sun { position: absolute; width: 110px; top: 8px; right: 3vw; animation: spin 30s linear infinite; }
.fly { position: absolute; width: 46px; animation: flutter 6s ease-in-out infinite; }
.fly.b1 { top: 14%; left: 44%; }
.fly.b2 { top: 70%; left: 4%; animation-delay: -2s; width: 38px; }
.fly.b3 { top: 82%; left: 52%; animation-delay: -4s; width: 34px; }

/* ---------- Cerca ---------- */
.fence {
  height: 84px;
  background: url("../assets/fence.svg") repeat-x left bottom;
  background-size: auto 84px;
  position: relative;
}
.fence::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 14px; background: var(--leaf-light); border-top: 3px solid var(--ink); }

/* ---------- Perfil ---------- */
.about { background: var(--mint-soft); padding-top: 5rem; }
.profile-card { display: grid; grid-template-columns: 170px 1fr 230px; gap: 2rem; align-items: center; padding: 2.4rem; }
.profile-pic { width: 170px; height: 170px; border-radius: 50%; border: 4px solid var(--ink); overflow: hidden; background: var(--sun); box-shadow: 0 0 0 8px var(--mint), 0 0 0 11px var(--ink); }
.profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.profile-pic svg { width: 100%; height: 100%; transform: translateY(10%); }
.profile-name { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.profile-handle { font-weight: 800; color: var(--pink); text-decoration: none; }
.profile-bio { white-space: pre-line; font-size: 1.1rem; margin: .8rem 0; }
.profile-stats { list-style: none; display: flex; gap: 1.2rem; padding: 0; margin: 0 0 1.2rem; flex-wrap: wrap; }
.profile-stats li { background: var(--mint); border: 2px dashed var(--leaf); border-radius: 14px; padding: .3em .9em; font-weight: 700; }
.profile-stats b { font: 800 1.3rem var(--font-title); color: var(--leaf-dark); margin-right: .2em; }
.profile-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.profile-kids { display: flex; align-items: flex-end; }
.profile-kids > * { width: 50%; }
.profile-kids > *:last-child { margin-left: -14%; }

/* ---------- Posts ---------- */
.demo-note { text-align: center; background: #fff4e3; border: 2px dashed var(--orange); border-radius: 14px; padding: .6em 1em; max-width: 640px; margin: 0 auto 1.6rem; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post {
  position: relative; aspect-ratio: 1; padding: 10px 10px 34px;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; transition: transform .25s; overflow: hidden;
  animation: pop .45s backwards;
}
.post:nth-child(3n+1) { transform: rotate(-1.5deg); }
.post:nth-child(3n+2) { transform: rotate(1deg); }
.post:nth-child(3n) { transform: rotate(-.5deg); }
.post:hover { transform: rotate(0) translateY(-6px); }
.post img, .post .post-demo { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.post .post-demo { display: grid; place-items: center; }
.post .post-demo svg { width: 55%; }
.post-label { position: absolute; left: 12px; right: 12px; bottom: 6px; font: 700 .85rem var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #6b5a4c; }
.post-video { position: absolute; top: 18px; right: 18px; background: var(--ink); color: #fff; border-radius: 99px; padding: .1em .6em; font-size: .8rem; }
.post-grid.embeds { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.post-grid.embeds .instagram-media { min-width: 0 !important; }

.lightbox { border: 3px solid var(--ink); border-radius: 18px; padding: 0; max-width: min(720px, 94vw); box-shadow: var(--shadow); }
.lightbox::backdrop { background: rgba(43, 36, 32, .6); }
.lightbox img { max-height: 70vh; width: 100%; object-fit: contain; background: #f3efe6; }
.lb-body { padding: 1rem 1.4rem 1.4rem; }
.lb-body p { white-space: pre-line; max-height: 22vh; overflow: auto; }
.lb-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: var(--sun); font-weight: 800; cursor: pointer; }

/* ---------- Área de jogos ---------- */
.play { background: linear-gradient(#fffdf6 0, #fffdf6 40%, #fdf0dc 100%); padding-top: 5rem; }
.play-head { display: grid; grid-template-columns: 170px 1fr 170px; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.play-title { text-align: center; }
.kid-wrap { position: relative; }
.kid-wrap svg, .kid-wrap img { width: 100%; animation: bob 3.2s ease-in-out infinite; }
#kidJelly svg, #kidJelly img { animation-delay: -1.6s; }
.kid-name { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 0 .7em; font: 800 .95rem var(--font-title); }
.bubble {
  position: relative; display: inline-block; max-width: 560px;
  background: #fff; border: 3px solid var(--ink); border-radius: 26px;
  padding: .8em 1.3em; font-weight: 700; font-size: 1.1rem; min-height: 3.2em;
  transition: transform .2s;
}
.bubble::after { content: ""; position: absolute; bottom: -16px; left: 18%; width: 24px; height: 24px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(30deg) rotate(45deg) scale(.8); }
.bubble.from-jelly::after { left: auto; right: 18%; transform: skewX(-30deg) rotate(45deg) scale(.8); }
.bubble.talk { animation: talk .35s; }

.activity-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: 2rem 0 1.6rem; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .9rem .6rem; background: #fff; border: 3px solid var(--ink); border-radius: 20px;
  font: 800 1rem var(--font-title); color: var(--ink); cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, background .15s;
}
.tab svg { width: 52px; height: 52px; }
.tab:hover { transform: translateY(-4px); }
.tab[aria-selected="true"] { background: var(--sun); transform: translateY(-4px) rotate(-1deg); }
.stage { padding: 1.6rem; min-height: 420px; position: relative; overflow: hidden; }
.stage h3 { font-size: 1.7rem; margin-bottom: .2em; }
.stage .hint { margin: 0 0 1rem; color: #6b5a4c; }
.game-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.pill { background: var(--mint); border-radius: 99px; padding: .2em .9em; font-weight: 800; border: 2px solid var(--ink); }

/* Procura e conta */
.scene { width: 100%; border: 3px solid var(--ink); border-radius: 16px; background: #fbfdf4; display: block; touch-action: manipulation; }
.scene .hit { cursor: pointer; }
.scene .hit .art { transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.scene .hit:hover .art { transform: scale(1.12); }
.scene .found .art { opacity: .35; }
.scene .tick { animation: popin .35s; }
.scene .wiggle .art { animation: wiggle .4s; }
.counter-band { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); background: var(--mint); border: 3px solid var(--ink); border-radius: 16px; margin-top: 1rem; overflow: hidden; }
.counter-band > div { padding: .6rem .8rem; display: flex; align-items: center; gap: .5rem; justify-content: center; text-align: center; font-weight: 700; line-height: 1.2; }
.counter-band > div + div { border-left: 3px dashed var(--ink); }
.counter-band svg { width: 34px; height: 34px; flex: none; }
.counter-band .num { font: 800 1.5rem var(--font-title); }
.counter-band .done { background: #fff7c2; }

/* Memória */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; max-width: 560px; margin: 0 auto; perspective: 900px; }
.card { aspect-ratio: 1; position: relative; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .45s; }
.card.flip, .card.ok { transform: rotateY(180deg); }
.card .face { position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: 16px; backface-visibility: hidden; display: grid; place-items: center; }
.card .back { background: var(--leaf) radial-gradient(circle at 30% 30%, var(--leaf-light) 0 12%, transparent 13%) 0 0/34px 34px; box-shadow: 3px 3px 0 var(--ink); }
.card .back::after { content: "🌱"; font-size: 1.8rem; background: #fff; border-radius: 50%; width: 52%; aspect-ratio: 1; display: grid; place-items: center; border: 3px solid var(--ink); }
.card .front { background: #fff; transform: rotateY(180deg); }
.card .front svg { width: 72%; }
.card.ok .front { background: #fff7c2; }

/* Onde cresce? */
.grow-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; align-items: stretch; }
.grow-current { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: #fff; border: 3px dashed var(--ink); border-radius: 20px; padding: 1rem; text-align: center; }
.grow-current svg { width: 120px; animation: bob 2.6s ease-in-out infinite; }
.grow-current .name { font: 800 1.6rem var(--font-title); }
.zones { display: grid; grid-template-rows: 1fr 1fr 1fr; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
.zone { position: relative; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; min-height: 110px; border: 0; text-align: left; font: 800 1.15rem var(--font-title); color: var(--ink); cursor: pointer; transition: filter .2s; flex-wrap: wrap; }
.zone:hover { filter: brightness(1.06); }
.zone .zlabel { background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: .1em .8em; margin-right: .4rem; }
.zone svg { width: 54px; animation: popin .4s; }
.zone.tree { background: #dff2c9; }
.zone.surface { background: var(--soil-light); border-top: 3px solid var(--ink); }
.zone.under { background: #7a4a23; border-top: 3px dashed var(--ink); color: #fff; }
.zone.under .zlabel { color: var(--ink); }
.zone.flash-ok { animation: flashok .5s; }
.zone.flash-no { animation: wiggle .4s; }

/* Colorir */
.paint-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; transition: transform .15s; }
.swatch[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 4px var(--sun); }
.color-svg { width: 100%; border: 3px solid var(--ink); border-radius: 16px; background: #fff; cursor: crosshair; }
.color-svg .p { cursor: pointer; transition: fill .2s; }

/* Faz crescer */
.plant-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: center; }
.plant-svg { width: 100%; max-width: 360px; margin: 0 auto; display: block; }
.plant-svg .stage-g { opacity: 0; transition: opacity .5s; }
.plant-svg .stage-g.on { opacity: 1; }
.plant-controls { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.needs { display: flex; gap: .8rem; }
.need { border: 3px solid var(--ink); border-radius: 14px; padding: .3em .8em; font-weight: 800; background: #fff; }
.need.ok { background: var(--mint); }
.progress { width: 100%; height: 22px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--leaf) 0 12px, var(--leaf-light) 12px 24px); transition: width .5s; }
/* ---------- Kelly & Jelly espalhados pelo site ---------- */
.btn-pin { background: #e60023; color: #fff; }
.mascot { position: absolute; width: 130px; cursor: pointer; user-select: none; }
.mascot .mfig svg, .mascot .mfig img { width: 100%; display: block; }
.mbubble {
  position: absolute; bottom: calc(100% - 14px); left: 62%; z-index: 2;
  white-space: nowrap; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: .3em .85em; font: 800 .95rem var(--font-title); box-shadow: 2px 2px 0 var(--ink);
}
.mbubble::after { content: ""; position: absolute; left: 14px; bottom: -9px; width: 14px; height: 14px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.mascot.right .mbubble { left: auto; right: 62%; }
.mascot.right .mbubble::after { left: auto; right: 14px; }
.mbubble.pop { animation: talk .35s; }
/* a espreitar por trás da cerca */
.fence .mascot.peek { bottom: 16px; left: 7%; z-index: -1; width: 150px; }
.fence .mascot.peek.right { left: auto; right: 34%; }
.fence .mascot.peek .mfig { animation: peek 4.5s ease-in-out infinite; }
.fence .mascot.peek.right .mfig { animation-delay: -2s; }
.hero { padding-bottom: 8.5rem; }
.insta { padding-bottom: 9rem; }
/* no cartão de perfil */
.profile-mascot { align-self: end; margin-bottom: -2.4rem; padding-top: 3rem; }
.mascot.static { position: relative; width: 100%; }
/* em medalhão */
.mascot.badge { width: 104px; }
.mascot.badge .mfig { width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--ink); overflow: hidden; background: var(--sun); box-shadow: 3px 3px 0 var(--ink); }
.mascot.badge .mfig svg, .mascot.badge .mfig img { transform: translateY(12%); }
.mascot.badge .mbubble { bottom: auto; top: -18px; left: 92%; }
.mascot.badge .mbubble::after { left: -9px; bottom: 12px; transform: rotate(135deg); }
.section-head { position: relative; }
.insta .mascot.badge { left: 4%; top: -8px; }
.mascot.foot { position: relative; display: inline-block; margin: 1.6rem 0 0; }
.mascot.foot .mfig { background: #fff; }
.social { display: flex; justify-content: center; gap: .8rem; margin-top: 1.4rem; }
@keyframes peek { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@media (max-width: 900px) {
  .profile-mascot { width: 200px; margin-bottom: -1.6rem; }
  .insta .mascot.badge { position: relative; left: auto; top: auto; margin: 0 auto 1rem; }
  .mascot.badge .mbubble { white-space: normal; width: 150px; }
  .mascot.static .mbubble { left: 50%; right: auto; transform: translateX(-50%); white-space: normal; width: 210px; text-align: center; }
  .mascot.static .mbubble::after { left: 50%; right: auto; margin-left: -7px; }
}
@media (max-width: 640px) {
  .fence .mascot.peek { width: 96px; }
}

/* ---------- Páginas separadas ---------- */
.nav a[aria-current="page"] { color: var(--leaf); text-decoration: underline wavy var(--sun) 3px; text-underline-offset: 6px; }
.nav a.nav-cta[aria-current="page"] { color: var(--ink); text-decoration: none; background: var(--leaf-light); }
.page-hero { position: relative; overflow: hidden; text-align: center; padding: 3.5rem 1rem 8.5rem; }
.page-hero > *:not(.sky-deco) { position: relative; z-index: 1; }
.page-hero .lead { margin: 0 auto; max-width: 44ch; }
.page-hero .fly.b1 { top: 22%; left: 12%; }
.page-hero .fly.b2 { top: 58%; left: 80%; }
.play-title h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.play { padding-top: 3rem; }
.explore-sec { background: var(--mint-soft); padding-top: 5rem; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.explore-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 1.4rem 1.6rem; text-decoration: none; color: var(--ink); transition: transform .2s; }
.explore-card:nth-child(1) { transform: rotate(-1deg); }
.explore-card:nth-child(3) { transform: rotate(1deg); }
.explore-card:hover { transform: translateY(-6px) rotate(0); }
.explore-card h3 { font-size: 1.6rem; margin: 1rem 0 .2rem; }
.explore-card p { margin: 0; color: #6b5a4c; }
.ec-art { width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--ink); overflow: hidden; background: var(--sun); box-shadow: 0 0 0 7px var(--mint), 0 0 0 10px var(--ink); }
.ec-art img { width: 100%; height: 100%; object-fit: cover; }
.ec-art svg { width: 100%; transform: translateY(14%); }
.ec-art[data-art="jelly"] { background: var(--leaf-light); }
.footer-band a { padding: 1rem; color: var(--ink); text-decoration: none; }
.footer-band a:hover { background: #b6dd8f; }
.footer-band a + a { border-left: 3px dashed var(--ink); }
@media (max-width: 900px) {
  .explore { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .footer-band a:nth-child(3) { border-left: 0; }
  .footer-band a:nth-child(n+3) { border-top: 3px dashed var(--ink); }
}

#pSun { transform-box: fill-box; transform-origin: center; }
.drop { animation: drop .9s ease-in forwards; }
.kid-wrap { cursor: pointer; }
.glow { animation: glow 1s; }

/* Confetis */
.confetti { position: fixed; top: -20px; width: 12px; height: 16px; z-index: 100; pointer-events: none; border: 2px solid var(--ink); border-radius: 3px; animation: fall linear forwards; }

/* ---------- Rodapé ---------- */
.footer { background: var(--mint); border-top: 3px solid var(--ink); text-align: center; padding: 0 0 1.4rem; }
.footer-band { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px dashed var(--ink); font: 800 1.1rem var(--font-title); }
.footer-band span { padding: 1rem; }
.footer-band span + span { border-left: 3px dashed var(--ink); }
.footer p { margin: 1.2rem 1rem 0; font-size: .95rem; }

/* ---------- Animações ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { 50% { transform: rotate(-12deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes flutter { 0%,100% { transform: translate(0,0) rotate(-8deg); } 25% { transform: translate(30px,-20px) rotate(8deg) scaleX(.85); } 50% { transform: translate(60px,0) rotate(-4deg); } 75% { transform: translate(25px,18px) rotate(6deg) scaleX(.85); } }
@keyframes pop { from { opacity: 0; transform: scale(.8); } }
@keyframes popin { from { transform: scale(0); } 70% { transform: scale(1.2); } }
@keyframes wiggle { 25% { transform: translateX(-6px) rotate(-4deg); } 75% { transform: translateX(6px) rotate(4deg); } }
@keyframes talk { 40% { transform: scale(1.04) rotate(-1deg); } }
@keyframes flashok { 40% { filter: brightness(1.3) saturate(1.4); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes drop { from { transform: translateY(0); opacity: 1; } to { transform: translateY(120px); opacity: 0; } }
@keyframes glow { 50% { filter: drop-shadow(0 0 18px #f7d21a); transform: scale(1.1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .profile-stats, .profile-actions { justify-content: center; }
  .profile-kids { width: 220px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .activity-tabs { grid-template-columns: repeat(3, 1fr); }
  .play-head { grid-template-columns: 100px 1fr 100px; }
  .grow-layout, .plant-layout { grid-template-columns: 1fr; }
  .counter-band { grid-template-columns: repeat(2, 1fr); }
  .counter-band > div:first-child { grid-column: 1 / -1; }
  .counter-band > div + div { border-left: 0; border-top: 3px dashed var(--ink); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--cream); padding: 1rem; border-bottom: 3px dashed var(--mint); }
  .nav.open { display: flex; }
  .post-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .activity-tabs { grid-template-columns: repeat(2, 1fr); }
  .play-head { grid-template-columns: 70px 1fr 70px; }
  .kid-name { display: none; }
  .memory { gap: .5rem; }
  .footer-band { grid-template-columns: repeat(2, 1fr); }
  .footer-band span:nth-child(3) { border-left: 0; }
  .footer-band span:nth-child(n+3) { border-top: 3px dashed var(--ink); }
  .stage { padding: 1rem; }
}

/* =========================================================
   v3 — logótipo, línguas, árabe (RTL), secções e jogos em janela
   ========================================================= */
html.i18n-pending body { visibility: hidden; }
html[lang="ar"] { --font-title: "Baloo Bhaijaan 2", "Tajawal", system-ui, sans-serif; --font-body: "Tajawal", system-ui, sans-serif; }
html[lang="ar"] body { line-height: 1.7; }

/* Topo */
.topbar { gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; order: 0; font-size: 1.45rem; white-space: nowrap; }
.logo-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--mint); }
.nav { order: 1; margin-inline-start: auto; }
.topbar-right { order: 2; display: flex; align-items: center; gap: .6rem; }
.lang-switch { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button { border: 0; background: none; padding: .3em .65em; font: 800 .85rem var(--font-body); color: var(--ink); cursor: pointer; min-width: 36px; }
.lang-switch button + button { border-inline-start: 2px solid var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--sun); }
.lang-switch button[lang="ar"] { font-family: "Tajawal", sans-serif; font-size: 1rem; line-height: 1; }

/* RTL: pequenos acertos */
[dir="rtl"] .zone { text-align: right; }
[dir="rtl"] .lb-close { right: auto; left: 10px; }
[dir="rtl"] .mascot.badge .mbubble { left: auto; right: 92%; }
[dir="rtl"] .mascot.badge .mbubble::after { left: auto; right: -9px; transform: rotate(-45deg); }
[dir="rtl"] .profile-handle, [dir="rtl"] .num { unicode-bidi: plaintext; }

/* Chamada para trabalho (início) */
.cta-band { background: var(--leaf); color: #fff; border-block: 3px solid var(--ink); padding: 2.4rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { margin: .2rem 0 0; font-weight: 700; }

/* Serviços (sobre mim) */
.work { background: #fdf0dc; border-top: 3px dashed var(--soil-light); scroll-margin-top: 80px; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-bottom: 1rem; }
.service { padding: 1.6rem 1.3rem; text-align: center; }
.service h3 { font-size: 1.45rem; margin: .8rem 0 .2rem; }
.service p { margin: 0; color: #6b5a4c; }
.svc-icon { font-size: 2.2rem; display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--mint); border: 3px solid var(--ink); }
.work-actions { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }

/* Lista de jogos */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.game-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
  padding: 1.3rem 1rem; background: var(--card-bg, #fff); border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s;
}
.game-card:hover { transform: translateY(-5px) rotate(-1deg); }
.game-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.gc-art { width: 88px; height: 88px; display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 50%; }
.gc-art svg { width: 62px; height: 62px; }
.gc-title { font: 800 1.3rem var(--font-title); line-height: 1.15; margin-top: .3rem; }
.gc-desc { font-size: .95rem; color: #6b5a4c; }
.gc-go { margin-top: auto; background: var(--sun); border: 2px solid var(--ink); border-radius: 99px; padding: .15em 1em; font-weight: 800; }

/* Janela do jogo */
body.modal-open { overflow: hidden; }
.game-modal {
  width: min(1000px, 94vw); max-width: none; height: min(860px, 94dvh); max-height: none;
  padding: 0; border: 3px solid var(--ink); border-radius: 22px; background: var(--cream); color: var(--ink);
  box-shadow: 8px 8px 0 rgba(43, 36, 32, .9); overflow: hidden; flex-direction: column;
}
.game-modal[open] { display: flex; }
.game-modal::backdrop { background: rgba(43, 36, 32, .55); }
.gm-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; background: var(--game-bg, #fff4c4); border-bottom: 3px solid var(--ink); }
.gm-icon { width: 42px; height: 42px; display: grid; place-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 50%; flex: none; }
.gm-icon svg { width: 30px; height: 30px; }
.gm-head h2 { margin: 0; font-size: 1.5rem; flex: 1; color: var(--leaf-dark); }
.gm-close { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-weight: 800; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.gm-close:hover { background: var(--sun); }
.gm-talk { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; background: #fff; border-bottom: 3px dashed var(--mint); }
.gm-kid { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 2px solid var(--ink); overflow: hidden; background: var(--sun); }
.gm-kid[data-who="jelly"] { background: var(--leaf-light); }
.gm-kid svg, .gm-kid img { width: 100%; transform: translateY(12%); }
.gm-bubble { margin: 0; font-weight: 700; min-height: 2.6em; display: flex; align-items: center; line-height: 1.3; }
.gm-bubble.talk { animation: talk .35s; }
.gm-body { flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 1rem 1.2rem 1.4rem; }
.gm-body .stage { padding: 0; min-height: 0; overflow: visible; }
.gm-body .hint { margin: 0 0 .8rem; }
.game-bar { flex-wrap: nowrap; }
.game-bar .hint { margin: 0; }
.counter-band { margin: 0 0 .8rem; }
.paint-bar { justify-content: center; }
.paint-actions { display: flex; justify-content: center; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }
.plant-btns { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-water { background: #bfe6f6; }
.grow-current small { display: block; color: #6b5a4c; }

.nav a { white-space: nowrap; }
/* Menu recolhido (☰) a partir de ecrãs médios, para o nome e as línguas caberem */
@media (max-width: 980px) {
  .topbar { position: sticky; }
  .topbar-right { margin-inline-start: auto; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--cream); padding: 1rem; border-bottom: 3px dashed var(--mint); margin: 0; }
  .nav.open { display: flex; }
}
@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}
@media (max-width: 700px) {
  .game-modal { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; inset: 0; border: 0; border-radius: 0; box-shadow: none; }
  .gm-head { padding-top: max(.55rem, env(safe-area-inset-top)); }
  .gm-head h2 { font-size: 1.2rem; }
  .gm-bubble { font-size: .95rem; }
  .gm-body { padding: .7rem .7rem calc(1rem + env(safe-area-inset-bottom)); }
  .game-bar { flex-wrap: wrap; }
  .memory { max-width: 420px; gap: .45rem; }
  .card .back::after { font-size: 1.3rem; }
  .grow-layout { gap: .8rem; }
  .grow-current { flex-direction: row; justify-content: flex-start; gap: 1rem; padding: .6rem 1rem; text-align: start; }
  .grow-current svg { width: 74px; }
  .grow-current .name { font-size: 1.4rem; }
  .zone { min-height: 92px; padding: .5rem .7rem; }
  .zone svg { width: 42px; }
  .swatch { width: 38px; height: 38px; }
  .plant-svg { max-width: 260px; }
  .plant-controls { align-items: stretch; }
  .plant-btns .btn { flex: 1; justify-content: center; }
  .counter-band > div { padding: .45rem .5rem; }
  .counter-band svg { width: 28px; height: 28px; }
}
@media (max-width: 640px) {
  .game-grid { grid-template-columns: 1fr; gap: .8rem; margin-top: 1.4rem; }
  .game-card { display: grid; grid-template-columns: 72px 1fr auto; grid-template-rows: auto auto; text-align: start; align-items: center; column-gap: .9rem; row-gap: .1rem; padding: .8rem 1rem; }
  .gc-art { width: 72px; height: 72px; grid-row: 1 / 3; }
  .gc-art svg { width: 50px; height: 50px; }
  .gc-title { font-size: 1.15rem; margin: 0; align-self: end; }
  .gc-desc { font-size: .88rem; grid-column: 2; align-self: start; }
  .gc-go { grid-column: 3; grid-row: 1 / 3; margin: 0; }
  .cta-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .topbar { padding: .55rem 3vw; gap: .4rem; }
  .logo { font-size: 1.15rem; gap: .4rem; }
  .logo-photo { width: 36px; height: 36px; }
  .lang-switch button { padding: .25em .45em; min-width: 30px; font-size: .78rem; }
  .gc-go { display: none; }
  .game-card { grid-template-columns: 72px 1fr; }
}

/* =========================================================
   v4 — tons mais infantis e conforto em qualquer ecrã
   ========================================================= */
:root {
  --cream: #fffaf0;
  --sky-1: #cdeeff;
  --sky-2: #eaf8ff;
  --sunny: #fff3c4;
  --peach: #ffe4d4;
  --lilac: #eee8ff;
  --mint-soft: #e6f6d6;
  --berry: #f2557d;
}
body { background: var(--cream); }

/* Céu com nuvens no topo das páginas */
.hero, .page-hero {
  background:
    radial-gradient(46px 26px at 12% 20%, #fff 96%, transparent 100%),
    radial-gradient(64px 32px at 17% 18%, #fff 96%, transparent 100%),
    radial-gradient(40px 22px at 21% 21%, #fff 96%, transparent 100%),
    radial-gradient(52px 26px at 62% 10%, #fff 96%, transparent 100%),
    radial-gradient(72px 32px at 67% 8%, #fff 96%, transparent 100%),
    linear-gradient(var(--sky-1) 0%, var(--sky-2) 60%, var(--cream) 100%);
}
.kicker { background: #fff; color: var(--berry); border: 2px dashed var(--berry); }

/* Secções com cores diferentes */
.explore-sec { background-color: var(--sunny); background-image: radial-gradient(#ffe28f 2.2px, transparent 2.8px); background-size: 28px 28px; }
.insta { background-color: #fff; }
.about { background-color: var(--mint-soft); background-image: radial-gradient(#cdeab0 2.2px, transparent 2.8px); background-size: 28px 28px; }
.work { background-color: var(--peach); border-top: 0; }
.play { background: var(--lilac); background-image: radial-gradient(#dcd2ff 2.2px, transparent 2.8px); background-size: 28px 28px; }
.cta-band { background: var(--sun); color: var(--ink); }
.cta-band h2 { color: var(--leaf-dark); }
.cta-band .btn-sun { background: var(--leaf); color: #fff; }

/* Títulos com um risco ondulado por baixo */
.section-head h2, .play-title h1 { position: relative; display: inline-block; padding-bottom: .25em; }
.section-head h2::after, .play-title h1::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 110px; height: 12px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 12'%3E%3Cpath d='M3 7 Q 16 1 29 7 T 55 7 T 81 7 T 107 7' fill='none' stroke='%23f28a1e' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Cartões com cores de lápis */
.explore-card:nth-child(1) { background: #fff; }
.explore-card:nth-child(1) .ec-art { background: var(--peach); }
.explore-card:nth-child(2) .ec-art { background: var(--sun); }
.explore-card:nth-child(3) .ec-art { background: var(--leaf-light); }
.post:nth-child(4n+1) { background: #fff3c4; }
.post:nth-child(4n+2) { background: #e3f4d2; }
.post:nth-child(4n+3) { background: #ffe1d3; }
.post:nth-child(4n+4) { background: #dcefff; }
.service:nth-child(1) .svc-icon { background: var(--sunny); }
.service:nth-child(2) .svc-icon { background: #ffd6e2; }
.service:nth-child(3) .svc-icon { background: #d8eeff; }

/* Botões maiores e fáceis de tocar */
.btn { min-height: 50px; padding: .7em 1.5em; font-size: 1.05rem; justify-content: center; }
.btn:hover { transform: translate(-2px, -3px) rotate(-1deg); }
.menu-btn { width: 46px; height: 46px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; font-size: 1.3rem; line-height: 1; }
.lang-switch button { min-height: 38px; }
.nav a { padding: .35em .2em; }
.mbubble { white-space: normal; width: max-content; max-width: min(240px, 62vw); line-height: 1.25; }

/* Menu aberto no telemóvel/tablet: links grandes */
@media (max-width: 980px) {
  .nav { gap: .4rem; box-shadow: 0 10px 0 rgba(43, 36, 32, .06); }
  .nav a { font-size: 1.15rem; padding: .7em 1em; border-radius: 16px; background: #fff; border: 2px solid var(--ink); text-align: center; }
  .nav a.nav-cta { background: var(--sun); }
  .nav a[aria-current="page"] { background: var(--leaf-light); text-decoration: none; color: var(--ink); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .section { padding: 3.2rem 0; }
  .hero { padding-top: 2rem; }
  .hero-actions .btn { width: 100%; }
  .page-hero { padding-top: 2.4rem; }
  .profile-card { padding: 1.6rem 1.2rem; }
  .post-grid { gap: .8rem; }
  .post { padding: 7px 7px 28px; }
}
@media (max-width: 360px) {
  .logo span { display: none; }
}

/* Balão do medalhão por cima da cabeça em ecrãs pequenos */
@media (max-width: 480px) {
  .mascot.badge .mbubble, [dir="rtl"] .mascot.badge .mbubble { top: auto; bottom: calc(100% + 8px); left: 50%; right: auto; transform: translateX(-50%); text-align: center; }
  .mascot.badge .mbubble::after, [dir="rtl"] .mascot.badge .mbubble::after { left: 50%; right: auto; bottom: -9px; margin-left: -7px; transform: rotate(45deg); }
  .mascot.foot { margin-top: 3.4rem; }
}
html, body { overflow-x: clip; }
/* Kelly/Jelly a espreitar: à frente do céu, atrás das tábuas da cerca */
.fence { background: none; position: relative; z-index: 2; }
.fence::before { content: ""; position: absolute; inset: 0; background: url("../assets/fence.svg") repeat-x left bottom / auto 84px; z-index: 2; pointer-events: none; }
.fence .mascot.peek { z-index: 1; }