/* A landing page do beta (docs/BETA.md). A tela-título é a mesma de site/; as imagens saem de `cargo extrair site-beta`. */
:root {
  --deep: #050b24; --navy: #0b1a4a; --navy2: #14296f; --rim: #2a4bb8;
  --gold: #ffcc00; --ink: #e8edff; --mute: #9fb0e0;
  --k: 2;                       /* a escala da tela-título (pixels inteiros) */
  color-scheme: dark;
}
@media (min-width: 1100px) { :root { --k: 3; } }
@media (min-width: 1500px) { :root { --k: 4; } }
@media (max-width: 680px) { :root { --k: 1; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
img, video { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }

/* ---- barra do topo ---- */
nav.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 20px;
  background: rgba(5, 11, 36, .88); backdrop-filter: blur(6px); border-bottom: 2px solid #000; box-shadow: 0 2px 0 var(--rim); }
.brand img { height: 34px; display: block; }

/* ---- botões ---- */
.btn { display: inline-block; font: inherit; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: #2a1400; cursor: pointer; white-space: nowrap;
  background: linear-gradient(#fff36b, #ffcc00 45%, #ff9a00); border: 3px solid #000; border-radius: 10px; padding: 12px 22px;
  box-shadow: 0 5px 0 #7a3c00, 0 8px 18px rgba(0, 0, 0, .45); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #7a3c00, 0 10px 22px rgba(0, 0, 0, .5); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7a3c00; }
.btn:disabled { filter: grayscale(.6); cursor: wait; transform: none; }
.btn.small { padding: 6px 14px; font-size: 13px; box-shadow: 0 3px 0 #7a3c00; }

/* ---- a tela-título (320 × 224 do original, em pixels inteiros; o fundo cobre a largura toda) ---- */
.hero { background: #000; }
.titulo { position: relative; display: block; height: calc(224px * var(--k)); overflow: hidden; background: rgb(0, 144, 255);
  animation: acende .37s linear both; }
@keyframes acende { from { filter: brightness(0); } }
.faixa { position: absolute; left: 0; right: 0; top: calc(var(--y) * 1px * var(--k)); height: calc(var(--h) * 1px * var(--k));
  background: url(img/ghz_bg.png) repeat-x; background-size: calc(8192px * var(--k)) calc(224px * var(--k));
  background-position: 0 calc(var(--y) * -1px * var(--k)); image-rendering: pixelated;
  animation: rola var(--d) linear infinite; }
@keyframes rola { to { background-position-x: calc(-8192px * var(--k)); } }
.palco { position: absolute; top: 0; left: calc(50% - 160px * var(--k)); width: calc(320px * var(--k)); height: 100%; }
.palco > * { position: absolute; }
.brasao { left: calc(32px * var(--k)); top: calc(32px * var(--k)); width: calc(272px * var(--k)); }
.sonic-clip { left: 0; top: 0; width: 100%; height: calc(104px * var(--k)); overflow: hidden; }
.sonic { position: absolute; left: calc(120px * var(--k)); top: calc(22px * var(--k)); width: calc(88px * var(--k)); height: calc(104px * var(--k));
  background: url(img/titulo_sonic.png) no-repeat 0 0; background-size: calc(704px * var(--k)) calc(104px * var(--k)); image-rendering: pixelated;
  animation: sobe .15s linear .5s both, quadros .8s steps(6) .65s both, dedo .267s steps(2) 1.45s infinite; }
@keyframes sobe { from { translate: 0 calc(72px * var(--k)); } }
@keyframes quadros { to { background-position-x: calc(-528px * var(--k)); } }
@keyframes dedo { from { background-position-x: calc(-528px * var(--k)); } to { background-position-x: calc(-704px * var(--k)); } }
.idle { left: 0; right: 0; top: calc(136px * var(--k)); display: flex; justify-content: center; }
.idle img { height: calc(39px * var(--k)); margin-left: calc(-3px * var(--k));
  animation: cai .4s cubic-bezier(.3, 1.6, .6, 1) calc(1.17s + var(--i) * .133s) both, respira 2.1s ease-in-out calc(1.6s + var(--i) * .3s) infinite; }
.idle img:first-child { margin-left: 0; }
.idle img:nth-child(3) { margin-left: calc(-5px * var(--k)); }
@keyframes cai { from { translate: 0 calc(-46px * var(--k)); opacity: 0; } 30% { opacity: 1; } }
@keyframes respira { 50% { transform: translateY(calc(-1.5px * var(--k))); } }
.psb { left: calc(88px * var(--k)); top: calc(180px * var(--k)); width: calc(144px * var(--k)); animation: pisca 1.067s steps(1) 2s infinite both; }
@keyframes pisca { 0% { opacity: 0; } 50% { opacity: 1; } }

/* a faixa de chão da Green Hill entre as seções (tiles da ROM) */
.chao { height: 64px; background: #5a3a10 url(img/chao.png) repeat-x; background-size: auto 64px; image-rendering: pixelated; }

/* ---- o convite ---- */
.wrap { max-width: 1120px; margin: 0 auto; }
.wrap.estreito { max-width: 680px; text-align: center; }
.convite { padding: 56px 20px 64px; background: linear-gradient(var(--navy), var(--deep)); scroll-margin-top: 52px; }
.selo { display: inline-block; margin: 0 0 18px; padding: 5px 14px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); border: 2px solid var(--gold); border-radius: 999px; }
h1 { margin: 0 0 14px; font-size: clamp(30px, 5vw, 46px); line-height: 1.15; font-weight: 900; letter-spacing: -.01em; }
h1 b { color: var(--gold); }
.lead { margin: 0 auto 26px; font-size: 18px; color: #d7def8; }
.campos { display: flex; gap: 12px; align-items: stretch; }
.campos input[type=email] { flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--ink); padding: 12px 16px; background: #071036;
  border: 3px solid var(--rim); border-radius: 10px; outline: none; }
.campos input[type=email]::placeholder { color: #7486bd; }
.campos input[type=email]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 0, .25); }
/* o campo que só robôs preenchem */
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { min-height: 26px; margin: 14px 0 0; font-weight: 600; color: var(--mute); }
.msg:empty { min-height: 0; margin: 0; }
.msg.certo { color: #7dff9a; font-size: 18px; }
.msg.erro { color: #ff9d9d; }
.nota { margin: 16px 0 0; font-size: 14px; color: var(--mute); }

/* ---- seções ---- */
.sec { padding: 72px 20px; }
.sec.ceu { background: linear-gradient(#0a3aa8, var(--navy) 70%); }
h2 { margin: 0 0 36px; display: flex; justify-content: center; }
h2 .ct { height: 51px; max-width: 100%; object-fit: contain; }

/* os clipes, como televisores */
.tv { display: block; width: 100%; height: auto; aspect-ratio: 320 / 224; background: #000; border: 4px solid #000; border-radius: 14px;
  box-shadow: 0 0 0 4px var(--rim), 0 14px 34px rgba(0, 0, 0, .55); }

.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.feats b { color: var(--gold); font-size: 20px; }
.feats p { margin: 2px 0 0; color: #d7def8; font-size: 17px; }

/* personagens: só a imagem e o nome */
.chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.char { margin: 0; padding: 8px 8px 10px; border-radius: 14px; background: linear-gradient(var(--navy2), #0d1c52); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--rim); }
.char video { display: block; width: 100%; height: auto; aspect-ratio: 320 / 224; border-radius: 8px; background: #000; }
.char figcaption { margin-top: 8px; text-align: center; font-weight: 800; font-size: 18px; }
.mais { margin: 26px 0 0; text-align: center; font-size: 17px; color: var(--mute); }

/* zonas, vila, arena e special stage */
.mundo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 40px; }
.mundo article { min-width: 0; text-align: center; }
.mundo h3 { margin: 22px 0 8px; display: flex; justify-content: center; }
.mundo h3 .ct { height: 34px; max-width: 100%; object-fit: contain; }
.mundo p { margin: 0; color: #d7def8; font-size: 17px; }

/* fim */
.final { background: radial-gradient(ellipse at 50% 120%, #1d3fb0, var(--deep) 70%); }
.final h2 { margin-bottom: 16px; }
footer { padding: 26px 20px 34px; text-align: center; font-size: 14px; color: var(--mute); border-top: 2px solid #000; box-shadow: inset 0 2px 0 var(--rim); }
footer p { margin: 2px 0; }

/* o pop-up do convite */
dialog { width: min(540px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; color: var(--ink); background: linear-gradient(var(--navy2), var(--navy));
  border: 4px solid #000; border-radius: 16px; box-shadow: 0 0 0 4px var(--rim), 0 24px 70px rgba(0, 0, 0, .7); }
dialog[open] { animation: entra .16s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } }
dialog::backdrop { background: rgba(2, 5, 20, .8); }
html:has(dialog[open]) { overflow: hidden; }
.caixa { position: relative; padding: 38px 26px 26px; text-align: center; }
dialog h2 { margin: 0 34px 14px; }
dialog h2 .ct { height: 34px; }
dialog .lead { margin-bottom: 20px; font-size: 17px; }
.fechar { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; padding: 0; font: 700 28px/1 system-ui, sans-serif; color: var(--ink); cursor: pointer;
  background: transparent; border: 0; border-radius: 8px; }
.fechar:hover, .fechar:focus-visible { color: var(--gold); background: rgba(255, 255, 255, .08); outline: none; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .chars { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mundo { grid-template-columns: 1fr; }
  .sec { padding: 56px 16px; }
  .convite { padding: 44px 16px 52px; }
}
@media (max-width: 520px) {
  .campos { flex-direction: column; }
  /* o logo e o botão não cabem juntos; o formulário está logo abaixo da tela-título */
  nav.top { justify-content: center; }
  nav.top .btn { display: none; }
  .brand img { height: 24px; }
  h2 .ct { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faixa, .idle img, .psb, dialog[open] { animation: none; }
  .sonic { animation: none; background-position-x: calc(-528px * var(--k)); }
}
