/* Fruit Pop Blast · página de download. Cores tiradas da arte do jogo (céu, mar, madeira, folha). */
:root {
  --sky-1: #bfeafb;
  --sky-2: #7fd3f2;
  --sea-1: #1fb4d8;
  --sea-2: #0f86ad;
  --sea-3: #0a5f7e;
  --cream: #fff7e6;
  --cream-2: #ffeccb;
  --sand: #f9dfb0;
  --wood-1: #c47a36;
  --wood-2: #93501d;
  --wood-3: #5f300f;
  --ink: #4a230b;
  --ink-soft: #77401a;
  --leaf-1: #86e05a;
  --leaf-2: #45b52c;
  --leaf-3: #24801a;
  --leaf-4: #155211;
  --berry: #e3344a;
  --sun: #ffc93a;
  --on-sea: #f2fdff;
  --on-sea-soft: #cdf1fb;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 1.0625rem/1.6 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }

html { scrollbar-color: var(--wood-2) var(--cream-2); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb { background: var(--wood-2); border-radius: 8px; border: 3px solid var(--cream-2); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--cream); font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

h2 {
  font: 700 clamp(2rem, 1.3rem + 2.6vw, 3.25rem)/1.05 var(--display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: clamp(20px, 4vh, 48px) var(--gutter) clamp(72px, 10vh, 120px);
  display: grid;
  align-items: center;
  overflow: clip;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 55%, var(--sea-1));
}

.hero__scene {
  position: absolute; inset: 0; z-index: -2;
}
.hero__scene img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
}
/* Mobile: a cena nítida, com o creme subindo por baixo para o texto respirar. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(255 247 230 / 0) 30%, rgb(255 247 230 / 0.82) 58%, var(--cream) 86%);
}

.deco { position: absolute; pointer-events: none; z-index: 1; }
.deco--leaf-tl { width: clamp(110px, 16vw, 220px); left: -28px; top: -18px; transform: rotate(-8deg); transform-origin: 0 0; animation: sway 7s ease-in-out infinite alternate; }
.deco--hibiscus-tr { width: clamp(110px, 15vw, 230px); right: -34px; top: -26px; transform-origin: 100% 0; animation: sway 8s ease-in-out -2s infinite alternate-reverse; }
@keyframes sway { from { rotate: -3deg; } to { rotate: 4deg; } }

.hero__inner {
  position: relative; z-index: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(16px, 3vw, 48px);
  grid-template-columns: 1fr;
  align-items: center;
}

.hero__copy {
  display: grid; justify-items: center; text-align: center;
  gap: 18px;
  padding-top: 34svh;
}
.hero__logo { width: min(400px, 82vw); margin-bottom: -4px; }
.hero__logo img { width: 100%; filter: drop-shadow(0 10px 14px rgb(60 25 5 / 0.35)); }

.hero__lede {
  max-width: 34ch;
  font: 600 clamp(1.08rem, 1rem + 0.4vw, 1.3rem)/1.45 var(--body);
  color: var(--ink);
  text-wrap: pretty;
}

/* ---------- Botão de download (mesma linguagem do "Jogar" do jogo) ---------- */

.download { display: grid; justify-items: center; gap: 12px; width: 100%; }

.cta {
  --rim: var(--wood-2);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 72px;
  padding: 0.5em 1.4em 0.55em 1.15em;
  border: 4px solid var(--wood-3);
  border-radius: 999px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0) 55%),
    linear-gradient(180deg, var(--leaf-1), var(--leaf-2) 52%, var(--leaf-3));
  box-shadow:
    inset 0 -6px 0 rgb(14 70 10 / 0.35),
    inset 0 3px 0 rgb(255 255 255 / 0.45),
    0 0 0 4px var(--wood-1),
    0 0 0 7px var(--wood-3),
    0 14px 22px -8px rgb(70 30 5 / 0.6);
  color: #fffdf2;
  font: 700 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1 var(--display);
  letter-spacing: 0.005em;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--leaf-4);
  cursor: pointer;
  transition: transform 260ms var(--ease-out), filter 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.cta__icon { width: 1.25em; height: 1.25em; flex: none; filter: drop-shadow(0 2px 0 var(--leaf-4)); }
.cta:hover { transform: translateY(-3px); filter: saturate(1.12) brightness(1.04); }
.cta:active { transform: translateY(2px) scale(0.985); transition-duration: 80ms; }
.cta:focus-visible { outline-offset: 10px; border-radius: 999px; }
.cta::after {
  /* brilho que atravessa o botão de tempos em tempos */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.55) 48%, transparent 60%) no-repeat;
  background-size: 250% 100%; background-position: 130% 0;
  animation: shine 5.5s var(--ease-out) 1.6s infinite;
  mix-blend-mode: soft-light;
}
@keyframes shine { 0%, 70% { background-position: 130% 0; } 100% { background-position: -40% 0; } }

.download[data-state='loading'] .cta { filter: saturate(0.55); pointer-events: none; }
.download[data-state='error'] .cta { filter: saturate(0.3) brightness(0.95); }

.cta--small { min-height: 60px; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); }

.release {
  display: grid; gap: 2px; justify-items: center;
  padding: 10px 20px 11px;
  border-radius: 16px;
  background: rgb(255 247 230 / 0.92);
  box-shadow: 0 6px 16px -8px rgb(70 30 5 / 0.4), inset 0 0 0 2px rgb(196 122 54 / 0.35);
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.release__line { font-size: 1rem; }
.release__date { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.release__date:empty { display: none; }
.download[data-state='loading'] .release__line { color: var(--ink-soft); }
.download[data-state='error'] .release { background: #fff0ec; box-shadow: inset 0 0 0 2px rgb(227 52 74 / 0.4); }

.release__all { font-size: 0.95rem; font-weight: 700; }
.release__all a { color: var(--ink-soft); }
.release__all a:hover { color: var(--ink); }

.qr {
  display: none;
  align-items: center; gap: 16px;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: rgb(255 247 230 / 0.92);
  box-shadow: 0 8px 20px -10px rgb(70 30 5 / 0.45), inset 0 0 0 2px rgb(196 122 54 / 0.3);
  text-align: left;
  font-size: 0.95rem; font-weight: 700; line-height: 1.4;
  max-width: 380px;
}
.qr__code { flex: none; width: 92px; height: 92px; padding: 6px; background: #fff; border-radius: 10px; }
.qr__code svg { width: 100%; height: 100%; display: block; }

/* Palco: a tela inicial do jogo num celular, com a turma em volta. */
.hero__stage { display: none; }

.mascot {
  --cell: 220px;
  position: absolute;
  width: var(--cell); height: var(--cell);
  background: url('assets/mascot-victory.webp') 0 calc(var(--cell) * -2) / calc(var(--cell) * 4) calc(var(--cell) * 3) no-repeat;
  filter: drop-shadow(0 14px 12px rgb(60 25 5 / 0.35));
  will-change: transform;
}

/* ---------- Como jogar ---------- */

.play {
  position: relative;
  padding: clamp(72px, 9vw, 120px) var(--gutter) clamp(84px, 10vw, 140px);
  background:
    radial-gradient(90% 60% at 80% 20%, rgb(255 255 255 / 0.16), transparent 60%),
    linear-gradient(180deg, var(--sea-1), var(--sea-2) 60%, var(--sea-3));
  color: var(--on-sea);
}
.wave { position: absolute; left: 0; width: 100%; height: clamp(36px, 5vw, 80px); display: block; }
.wave--top { top: -1px; fill: var(--cream); transform: scaleY(-1); }
.wave--bottom { bottom: -1px; fill: var(--cream); }

.play__inner {
  width: min(1180px, 100%); margin: 0 auto;
  display: grid; gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.play__copy { display: grid; gap: 22px; }
.play h2 { color: #fff; text-shadow: 0 3px 0 rgb(6 70 95 / 0.55); }
.play__intro { max-width: 52ch; color: var(--on-sea); font-size: 1.12rem; font-weight: 600; }

.rules { display: grid; gap: 14px; max-width: 54ch; }
.rules li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; color: var(--on-sea-soft); }
.rules img { width: 44px; height: 44px; filter: drop-shadow(0 4px 4px rgb(5 50 70 / 0.35)); }
.rules strong { color: #fff; font-weight: 800; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 34px; padding-top: 6px; }
.facts div { display: grid; }
.facts dt { font: 700 clamp(2.4rem, 2rem + 1.6vw, 3.4rem)/1 var(--display); color: var(--sun); text-shadow: 0 3px 0 rgb(120 70 0 / 0.45); font-variant-numeric: tabular-nums; }
.facts dd { color: var(--on-sea-soft); font-weight: 700; }

/* Tabuleiro de demonstração */
.demo {
  --cell: clamp(36px, 10.4vw, 58px);
  --gap: clamp(3px, 0.7vw, 5px);
  justify-self: center;
  display: grid; gap: 14px; justify-items: center;
  width: max-content;
}
.demo__hud {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%;
  font: 700 1.15rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.hud__goal, .hud__score {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wood-1), var(--wood-2));
  box-shadow: inset 0 2px 0 rgb(255 220 170 / 0.45), inset 0 -3px 0 rgb(60 25 5 / 0.35), 0 6px 12px -6px rgb(10 40 60 / 0.6);
  color: var(--cream);
  text-shadow: 0 2px 0 var(--wood-3);
}
.hud__score { padding-left: 14px; }
.hud__goal img { width: 28px; height: 28px; }
.hud__label { font-size: 0.85rem; opacity: 0.85; }
.hud__goal.is-done { background: linear-gradient(180deg, var(--leaf-2), var(--leaf-3)); }

.demo__board {
  position: relative;
  padding: clamp(8px, 1.6vw, 14px);
  border-radius: 22px;
  background: linear-gradient(160deg, #d58c47, var(--wood-2) 55%, #7c4116);
  box-shadow:
    inset 0 3px 0 rgb(255 215 160 / 0.5),
    inset 0 -4px 0 rgb(50 20 5 / 0.4),
    0 0 0 4px var(--wood-3),
    0 24px 40px -18px rgb(5 35 50 / 0.75);
}
.demo__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  padding: var(--gap);
  border-radius: 14px;
  background: #6b3712;
}
.cell {
  position: relative;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7dfb6, #efcf9b);
  box-shadow: inset 0 3px 4px rgb(120 60 20 / 0.28);
}
.cell.is-target { background: linear-gradient(180deg, #fff3c9, #ffe28a); box-shadow: inset 0 0 0 3px rgb(255 201 58 / 0.9); }
.tile {
  position: absolute; inset: -1px;
  width: calc(100% + 2px); height: calc(100% + 2px);
  max-width: none;
  filter: drop-shadow(0 2px 1px rgb(60 25 5 / 0.3));
}
.demo__fx { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, var(--sun) 31% 60%, rgb(255 201 58 / 0) 61%);
}
.demo__toast {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  padding: 10px 22px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sun), #f59e0b);
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.5), 0 0 0 4px var(--wood-3), 0 14px 22px -10px rgb(60 25 5 / 0.7);
  color: var(--ink);
  font: 700 clamp(1.3rem, 1rem + 1.4vw, 2rem)/1 var(--display);
  white-space: nowrap;
  opacity: 0; scale: 0.6;
  pointer-events: none;
}
.demo__tray {
  --mini: calc(var(--cell) * 0.5);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: rgb(4 60 82 / 0.38);
  box-shadow: inset 0 2px 8px rgb(0 30 45 / 0.35);
  min-height: calc(var(--mini) * 3 + 28px);
}
.slot { display: grid; place-items: center; }
.piece { display: grid; gap: 2px; grid-auto-rows: var(--mini); grid-auto-columns: var(--mini); transition: opacity 300ms var(--ease-out), translate 300ms var(--ease-out); }
.piece img { width: 100%; height: 100%; max-width: none; filter: drop-shadow(0 2px 1px rgb(0 30 45 / 0.35)); }
.piece.is-lifted { translate: 0 -6px; }
.piece.is-gone { opacity: 0; }

.flyer {
  position: absolute; left: 0; top: 0; z-index: 5;
  display: grid; gap: var(--gap);
  grid-auto-rows: var(--cell); grid-auto-columns: var(--cell);
  pointer-events: none;
  transform-origin: 0 0;
  filter: drop-shadow(0 18px 14px rgb(5 35 50 / 0.45));
}
.flyer img { width: calc(100% + 2px); height: calc(100% + 2px); margin: -1px; max-width: none; }

.fruits {
  width: min(1180px, 100%);
  margin: clamp(48px, 7vw, 88px) auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px clamp(14px, 3vw, 36px);
}
.fruits li { display: grid; justify-items: center; gap: 8px; font: 600 1rem/1 var(--display); color: var(--on-sea); }
.fruits img { width: clamp(52px, 7vw, 72px); height: auto; filter: drop-shadow(0 6px 6px rgb(5 40 60 / 0.4)); transition: transform 400ms var(--ease-out); }
.fruits li:hover img { transform: translateY(-6px) rotate(-6deg); }

/* ---------- Instalar ---------- */

.install { padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(64px, 8vw, 110px); }
.install__inner {
  width: min(980px, 100%); margin: 0 auto;
  display: grid; gap: 28px; align-items: center; justify-items: center;
}
.install__char { width: clamp(150px, 30vw, 300px); filter: drop-shadow(0 18px 14px rgb(70 30 5 / 0.25)); animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -10px; rotate: 2deg; } }
.install__copy { display: grid; gap: 26px; justify-items: start; }
.install h2 { color: var(--ink); }

.steps { display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; max-width: 60ch; }
.steps__n {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--wood-1), var(--wood-2));
  box-shadow: inset 0 2px 0 rgb(255 220 170 / 0.5), inset 0 -3px 0 rgb(60 25 5 / 0.35), 0 6px 10px -5px rgb(70 30 5 / 0.6);
  color: var(--cream);
  font: 700 1.5rem/1 var(--display);
  text-shadow: 0 2px 0 var(--wood-3);
}
.steps p { padding-top: 0.55em; color: var(--ink-soft); }
.steps strong { color: var(--ink); font-weight: 800; }

/* ---------- Rodapé ---------- */

.footer {
  display: grid; justify-items: center; gap: 10px;
  padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--wood-2), var(--wood-3));
  color: var(--cream-2);
  font-weight: 700;
  text-align: center;
}
.footer img { width: 150px; }

/* ---------- Telas largas ---------- */

@media (min-width: 900px) {
  .hero { padding-bottom: clamp(96px, 12vh, 140px); }
  .hero__scene img { filter: blur(14px) saturate(1.15); scale: 1.1; }
  .hero::after {
    background:
      radial-gradient(70% 90% at 22% 50%, rgb(255 247 230 / 0.86), rgb(255 247 230 / 0.25) 65%, transparent),
      linear-gradient(180deg, rgb(255 247 230 / 0) 75%, var(--cream));
  }
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
  .hero__copy { justify-items: start; text-align: left; padding-top: 0; gap: 22px; }
  .hero__logo { width: min(500px, 100%); margin-left: -10px; }
  .download { justify-items: start; }
  .release { justify-items: start; }
  .qr { display: flex; }
  .qr[hidden] { display: none; }

  .hero__stage { display: block; position: relative; height: min(680px, 78svh); }
  .phone {
    position: absolute; left: 50%; top: 50%;
    height: 100%; aspect-ratio: 640 / 1137;
    translate: -50% -50%; rotate: 3deg;
    padding: 12px;
    border-radius: 46px;
    background: linear-gradient(150deg, #3d2412, #1f1209);
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.12), 0 40px 60px -24px rgb(40 20 5 / 0.7), 0 0 0 6px rgb(255 247 230 / 0.6);
    animation: float 7s ease-in-out infinite;
  }
  .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
  @keyframes float { 50% { translate: -50% calc(-50% - 10px); } }

  .stage__char { position: absolute; filter: drop-shadow(0 16px 14px rgb(60 25 5 / 0.35)); }
  .stage__char--pineapple { width: 170px; right: -6%; top: 2%; rotate: 8deg; animation: bob 5s ease-in-out -1s infinite; }
  .stage__char--coconut { width: 150px; right: -2%; bottom: 4%; animation: bob 6s ease-in-out -3s infinite; }
  .mascot { --cell: 250px; left: 47%; bottom: -8%; }

  .play__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .install__inner { grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 80px); }
}

@media (max-width: 899px) {
  /* No celular a Moranguinho pula sobre o píer, acima do logo. */
  .mascot { --cell: clamp(150px, 42vw, 210px); left: 50%; top: calc(34svh - var(--cell) * 0.86); margin-left: calc(var(--cell) / -2); }
}

@media (max-width: 420px) {
  .cta { padding-inline: 1em; }
  .demo__hud { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
