/* Páginas públicas (server/routes/publico.js): a vitrine e o Bingo Book, com as peças do jogo (style.css: .fbox, .btn,
   .bar, as fontes) sobre o fundo pintado do menu. O jogo trava a rolagem da página; aqui ela volta. */
html:has(body.pub), body.pub { height: auto; min-height: 100%; overflow: auto; }
body.pub {
  background: linear-gradient(180deg, #050814d0, #050814f0 60%), url("assets/ui/bg/menu_bg.webp") center top / cover fixed no-repeat, #070a14;
  image-rendering: pixelated; font-size: 20px; -webkit-font-smoothing: none;
}
.pub a { color: var(--gold); }
.pub a.btn { color: var(--bink); }
.pub main { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px 40px; }

/* topo */
.pub-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; background: #070a15ee; box-shadow: 0 2px 0 #000, 0 4px 0 #ffffff10;
}
.pub-brand img { display: block; image-rendering: auto; height: 28px; width: auto; }
.pub-top nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.pub-top nav a:not(.btn) { color: var(--text); text-decoration: none; text-transform: uppercase; font-size: 17px; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; }
.pub-top nav a:not(.btn):hover { color: var(--gold); }
.pub .btn { text-decoration: none; }
.pub .btn.small { padding: 5px 10px 6px; font-size: 15px; }

/* vitrine */
.pub-hero { padding: 48px 0 20px; display: grid; place-items: center; }
.pub-hero-in { --px: 3px; --face: #0c1124e8; max-width: 780px; width: 100%; padding: 28px 26px 22px; text-align: center; }
.pub-hero h1 { margin: 0; }
.pub-logo { display: block; width: min(560px, 100%); height: auto; margin: 0 auto 6px; image-rendering: auto; }
.pub-kicker { font-family: var(--font-px); font-size: 11px; color: var(--accent); letter-spacing: 1px; text-shadow: 1px 1px 0 #000; margin: 6px 0 14px; }
.pub-lead { color: var(--text); font-size: 21px; line-height: 1.25; text-shadow: 1px 1px 0 #000; margin: 8px 0; }
.pub-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0 4px; }
.pub-cta .btn { font-size: 20px; padding: 12px 22px 13px; }
.pub-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 18px 0 8px; }
.pub-nums .fbox { padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.pub-nums b { font-family: var(--font-px); font-size: 22px; color: var(--gold); text-shadow: 2px 2px 0 #000; font-weight: 400; }
.pub-nums small { color: var(--muted); font-size: 17px; text-transform: uppercase; }
.pub-sec { margin-top: 34px; }
.pub-sec h2, .pub-h1 {
  font-family: var(--font-px); font-weight: 400; color: var(--gold); letter-spacing: 1px; text-shadow: 3px 3px 0 #000, -1px 0 0 #ff3d6e88, 1px 0 0 #3dd6ff88;
}
.pub-sec h2 { font-size: 16px; margin: 0 0 16px; }
.pub-h1 { font-size: 22px; margin: 8px 0 10px; }
.pub-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pub-feat { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.pub-feat b { font-size: 22px; color: var(--gold); text-transform: uppercase; text-shadow: 1px 1px 0 #000; }
.pub-feat p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.2; }
.pub-ico { image-rendering: pixelated; }
.pub-center { text-align: center; margin-top: 18px; }
.pub-final { --face: #0c1124e8; padding: 18px; text-align: center; margin-top: 34px; }
.pub-final p { margin: 6px 0; font-size: 21px; }

/* cards de personagem: o boneco andando (folha 144×192: 3 quadros de 48 px por linha, a de baixo é a primeira) */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.pub-card {
  --face: var(--navy-1); --edge: color-mix(in srgb, var(--c) 70%, #000); padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; text-decoration: none; color: var(--text); transition: transform .14s var(--ease);
}
.pub-card:hover { transform: translateY(-3px); --edge: var(--gold); }
.pub-card b { font-size: 19px; line-height: 1.05; text-shadow: 1px 1px 0 #000; }
.pub-card > span { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pub-sprite {
  --s: 96px; display: block; width: var(--s); height: var(--s); background: var(--sheet) 0 0 / calc(var(--s) * 3) calc(var(--s) * 4) no-repeat;
  image-rendering: pixelated; animation: pubWalk .64s steps(3) infinite;
  background-color: transparent;
}
.pub-card:not(:hover) .pub-sprite { animation-play-state: paused; background-position: calc(var(--s) * -1) 0; }
@keyframes pubWalk { from { background-position: 0 0; } to { background-position: calc(var(--s) * -3) 0; } }
@media (prefers-reduced-motion: reduce) { .pub-sprite { animation: none; background-position: calc(var(--s) * -1) 0; } }
.pub-tag {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 1px 6px; text-transform: uppercase; letter-spacing: .4px; line-height: 1.35;
  color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), 0 0 0 1px #000;
}

/* Bingo Book */
.pub-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 24px; }
.pub-jump a { color: var(--c); text-decoration: none; text-transform: uppercase; font-size: 17px; padding: 3px 8px; background: #070a15; box-shadow: 0 0 0 2px #000, inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); }
.pub-sec h2[id] { margin-top: 28px; text-shadow: 2px 2px 0 #000; }
.pub-crumb { color: var(--muted); font-size: 18px; margin: 20px 0 6px; }
.pub-ficha-top { --face: #0c1124e8; --edge: color-mix(in srgb, var(--c) 70%, #000); display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 18px; }
.pub-ficha-art { display: grid; place-items: center; background: radial-gradient(40% 10% at 50% 82%, #5fb4ff55, transparent), linear-gradient(180deg, #172452, #0c1430); box-shadow: 0 0 0 2px #000; min-height: 220px; }
.pub-ficha-info p { margin: 6px 0; }
.pub-stats { display: grid; gap: 6px; margin: 10px 0; max-width: 460px; }
.pub-stats > div { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; }
.pub-stats small { color: var(--muted); text-transform: uppercase; font-size: 16px; }
.pub-stats b { text-align: right; }
.pub-where small { color: var(--muted); }
.pub-forms .pub-card { max-width: 190px; }
.pub-ficha > h2 { margin-top: 30px; }
.pub-golpes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.pub-golpe { padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.pub-golpe b { font-size: 21px; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.pub-golpe-cv {
  width: 240px; height: 126px; image-rendering: pixelated; border: 2px solid var(--blue);
  background: radial-gradient(34% 8% at 50% 80%, #5fb4ff66, #5fb4ff00 100%), linear-gradient(180deg, #172452, #0c1430 78%, #0a1028);
}

.pub-foot { text-align: center; color: var(--dim); font-size: 16px; padding: 22px 16px 30px; }
.pub-foot a { color: var(--muted); }

@media (max-width: 760px) {
  .pub-nums { grid-template-columns: repeat(2, 1fr); }
  .pub-feats { grid-template-columns: 1fr; }
  .pub-ficha-top { grid-template-columns: 1fr; }
  .pub-top nav a:not(.btn) { font-size: 15px; }
  .pub-hero { padding-top: 24px; }
}

/* ===== Vitrine (body.lp): trailer, pétalas, desfile, galeria e palco dos golpes ===== */
.lp main { width: 100%; padding: 0 0 40px; }
.lp main > .pub-sec, .lp main > .lp-nums { width: min(1120px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.lp-hero {
  position: relative; overflow: hidden; min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 36px 16px 140px;
  background: radial-gradient(70% 55% at 50% 38%, #3a2a7a66, transparent 70%), linear-gradient(180deg, #05081400, #050814 96%), url("assets/ui/bg/menu_bg.webp") center / cover no-repeat;
}
.lp-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, #00000000 0 2px, #0000002a 2px 3px); }
.lp-hero-in { position: relative; z-index: 2; width: min(920px, 100%); text-align: center; }
.lp-tv {
  position: relative; margin: 0 auto 18px; width: min(860px, 100%); aspect-ratio: 860 / 340; background: #000;
  box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--gold), 0 0 0 9px #000, 0 0 40px 8px #ffb02e55, 0 24px 60px #000c;
  animation: lpGlow 3.2s ease-in-out infinite;
}
.lp-tv video { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.lp-tv::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 2px, #00000022 2px 3px), radial-gradient(120% 90% at 50% 50%, transparent 60%, #0008); }
@keyframes lpGlow { 50% { box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--gold-hi), 0 0 0 9px #000, 0 0 64px 14px #ffb02e77, 0 24px 60px #000c; } }
.lp-tag { font-family: var(--font-px); font-size: 11px; letter-spacing: 1px; color: var(--accent); text-shadow: 2px 2px 0 #000; margin: 6px 0 10px; text-transform: uppercase; }
.lp-title {
  font-family: var(--font-px); font-weight: 400; font-size: clamp(16px, 2.6vw, 26px); line-height: 1.45; color: var(--gold); margin: 0 auto 6px; max-width: 820px;
  text-shadow: 3px 3px 0 #000, -1px 0 0 #ff3d6e99, 1px 0 0 #3dd6ff99, 0 0 18px #ffb02e66;
}
.lp-big { font-size: 26px !important; padding: 16px 38px 17px !important; letter-spacing: 1.5px; animation: lpPulse 1.8s ease-in-out infinite; }
@keyframes lpPulse { 50% { transform: scale(1.06); filter: brightness(1.12); } }
.lp-sub { color: var(--muted); font-size: 19px; text-shadow: 1px 1px 0 #000; margin: 10px 0 0; }
.lp-sub a { color: var(--gold); }

/* pétalas de cerejeira caindo (como no banner) */
.lp-petals { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.lp-petals i {
  position: absolute; top: -20px; left: var(--x); width: 10px; height: 7px; background: #ff9ec4; border-radius: 70% 0 70% 0; opacity: .85;
  transform: scale(var(--s)); animation: lpFall var(--t) linear var(--w) infinite; box-shadow: 1px 1px 0 #c2507f;
}
@keyframes lpFall { to { transform: translate(-140px, 105vh) rotate(540deg) scale(var(--s)); } }

/* desfile: os personagens andando no chão do topo (linha da direita da folha: 3ª de 4) */
.lp-parade { position: absolute; left: 0; right: 0; bottom: 18px; height: 110px; z-index: 2; pointer-events: none; }
.lp-parade::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 26px; background: radial-gradient(60% 100% at 50% 100%, #5fb4ff33, transparent 70%); }
.lp-walker {
  --s: 96px; position: absolute; bottom: var(--y); left: -110px; width: var(--s); height: var(--s);
  background: var(--sheet) 0 calc(var(--s) * -2) / calc(var(--s) * 3) calc(var(--s) * 4) no-repeat; image-rendering: pixelated;
  animation: lpWalkX var(--d) linear var(--delay) infinite, lpWalkF .5s steps(3) infinite;
  filter: drop-shadow(0 4px 0 #0007);
}
@keyframes lpWalkX { to { left: calc(100% + 110px); } }
@keyframes lpWalkF { from { background-position-x: 0; } to { background-position-x: calc(var(--s) * -3); } }

/* números */
.lp-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; position: relative; z-index: 3; }
.lp-nums .fbox { --face: #0c1124f2; padding: 16px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.lp-nums b { font-family: var(--font-px); font-size: 28px; color: var(--gold); text-shadow: 3px 3px 0 #000, 0 0 14px #ffb02e66; font-weight: 400; }
.lp-nums small { color: var(--muted); font-size: 17px; text-transform: uppercase; }

/* galeria */
.lp .pub-sec h2 { font-size: 18px; text-align: center; margin-bottom: 20px; }
.lp-gallery { --face: #0c1124f2; padding: 12px; }
.lp-gal-main { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #000; }
.lp-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s; }
.lp-slide.on { opacity: 1; }
.lp-slide img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: auto; animation: lpKen 9s ease-in-out infinite alternate; }
@keyframes lpKen { to { transform: scale(1.06); } }
.lp-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 14px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, transparent, #000000d8);
}
.lp-slide figcaption b { font-size: 26px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.lp-slide figcaption span { font-size: 19px; color: var(--text); text-shadow: 1px 1px 0 #000; }
.lp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.lp-thumb { padding: 0; border: 0; background: #000; cursor: pointer; opacity: .55; box-shadow: 0 0 0 2px #000; transition: opacity .2s, transform .15s; }
.lp-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lp-thumb.on { opacity: 1; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold); }
.lp-thumb:hover { opacity: 1; transform: translateY(-2px); }

/* palco dos golpes */
.lp-palco { --face: #0c1124f2; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-stage { width: min(640px, 100%); height: auto; aspect-ratio: 160 / 84; }
.lp-palco-info { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; }
.lp-golpe-name { font-family: var(--font-px); font-size: 20px; font-weight: 400; color: var(--gold); text-shadow: 3px 3px 0 #000, 0 0 14px #ffb02e66; }
.lp-golpe-who { color: var(--muted); font-size: 19px; text-transform: uppercase; }
.lp-dots { display: flex; gap: 8px; }
.lp-dot { width: 14px; height: 14px; padding: 0; border: 0; background: #2a3560; box-shadow: 0 0 0 2px #000; cursor: pointer; }
.lp-dot.on { background: var(--gold); }

.lp-feat { transition: transform .15s var(--ease); }
.lp-feat:hover { transform: translateY(-4px); --edge: var(--gold); }

/* convite final sobre o Vale do Fim */
.lp-final {
  margin-top: 46px; padding: 90px 16px; display: grid; place-items: center;
  background: linear-gradient(180deg, #050814, #05081488 30%, #05081488 70%, #050814), url("assets/landing/vale.webp") center / cover no-repeat;
}
.lp-final-in { --face: #0c1124e8; padding: 24px 22px; max-width: 760px; text-align: center; }
.lp-final h2 { font-family: var(--font-px); font-weight: 400; font-size: 20px; color: var(--gold); text-shadow: 3px 3px 0 #000; margin: 0 0 10px; }
.lp-final p { font-size: 21px; margin: 8px 0; }

@media (max-width: 760px) {
  .lp-hero { padding-bottom: 120px; min-height: auto; }
  .lp-walker { --s: 72px; }
  .lp-parade { height: 84px; }
  .lp-nums { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .lp-big { font-size: 22px !important; padding: 14px 26px 15px !important; }
  .lp-thumbs { gap: 6px; }
  .lp-slide figcaption b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-petals, .lp-parade { display: none; }
  .lp-big, .lp-tv, .lp-slide img { animation: none; }
}

/* ===== Logo animado do topo (assets/landing/logo_titulo.png, logo_idle.png e logo_emblema.png: as três peças do logo) =====
   Entrada: o título vem da esquerda, IDLE da direita e o emblema cai girando; depois flutua, com um brilho que passa por
   cima das letras (máscara do próprio logo) e o emblema dando um giro de tempos em tempos. Atrás: uma aura, o emblema
   gigante girando devagar e faíscas subindo. */
.lp-logo { position: relative; width: min(900px, 94vw); aspect-ratio: 1178 / 117; margin: 40px auto 44px; font-size: 0; }
.lp-logo-art { position: absolute; inset: 0; animation: lpFloat 3.6s ease-in-out 1.4s infinite; filter: drop-shadow(0 6px 0 #000a) drop-shadow(0 0 18px #ff8a1f66); }
.lp-logo-art img { position: absolute; top: 0; height: 100%; image-rendering: pixelated; }
.lp-l1 { left: 0; width: 66.214%; animation: lpInL .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.lp-l2 { left: 67.063%; width: 22.156%; animation: lpInR .7s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
.lp-l3 { left: 90.068%; width: 9.932%; transform-origin: 52% 52%; animation: lpInSpin .9s cubic-bezier(.3, 1.4, .5, 1) .35s both, lpSpin 6s ease-in-out 2.4s infinite; }
@keyframes lpInL { from { transform: translateX(-60vw); opacity: 0; } }
@keyframes lpInR { from { transform: translateX(60vw); opacity: 0; } }
@keyframes lpInSpin { from { transform: translateY(-160%) rotate(-540deg) scale(.4); opacity: 0; } }
@keyframes lpSpin { 0%, 78% { transform: rotate(0); } 92% { transform: rotate(380deg) scale(1.12); } 100% { transform: rotate(360deg); } }
@keyframes lpFloat { 50% { transform: translateY(-8px); } }
/* brilho: uma faixa branca correndo, recortada no formato do logo */
.lp-shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: url("assets/ui/bg/logo.png") 0 0 / 100% 100% no-repeat; mask: url("assets/ui/bg/logo.png") 0 0 / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 0 40%, #ffffffd0 46%, #fff6c0 50%, transparent 56% 100%) -150% 0 / 60% 100% no-repeat;
  animation: lpShine 4s ease-in-out 1.6s infinite;
}
@keyframes lpShine { 0% { background-position: -150% 0; } 55%, 100% { background-position: 260% 0; } }
/* aura de chakra e espiral gigante atrás */
.lp-aura {
  position: absolute; left: 50%; top: 50%; width: 120%; height: 360%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, #ff8a1f55, #ff5a1f22 55%, transparent 75%); animation: lpAura 2.4s ease-in-out infinite;
}
@keyframes lpAura { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.08); } }
.lp-bigspiral {
  position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); opacity: .09; image-rendering: pixelated;
  filter: blur(1px) saturate(.6); animation: lpBig 40s linear infinite;
}
@keyframes lpBig { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* faíscas subindo */
.lp-embers { position: absolute; inset: -40% 0 -10%; pointer-events: none; }
.lp-embers i {
  position: absolute; bottom: 0; left: var(--x); width: 4px; height: 4px; background: #ffd040; box-shadow: 0 0 6px #ff8a1f, 0 0 0 1px #9a3a08;
  animation: lpEmber var(--t) ease-in var(--w) infinite; opacity: 0;
}
@keyframes lpEmber { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -170%) scale(.4); } }
.lp-logo + .lp-tag { margin-top: 0; }
@media (max-width: 760px) { .lp-logo { margin: 26px auto 30px; } }
@media (prefers-reduced-motion: reduce) {
  .lp-logo-art, .lp-l1, .lp-l2, .lp-l3, .lp-shine, .lp-aura, .lp-bigspiral, .lp-embers i { animation: none; }
  .lp-embers { display: none; }
}
