/* =========================================================
   Hackathon · lista de espera
   Visual: "blocos" + retrô Windows 95 (parente do devcelio.page).
   Mobile first. Cores e fontes nas variáveis abaixo.
   Sem imagens externas, sem CDN: fonte Silkscreen self-hosted (OFL).
   ========================================================= */

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #111111;
  --papel: #ffffff;
  --face: #c9c9c9;        /* cinza das janelas */
  --ceu: #9ad6ff;
  --ceu-2: #bfe6ff;
  --azul: #1a3fc8;
  --verde: #0b7a35;
  --vermelho: #c8102e;
  --roxo: #6a1fb5;
  --laranja: #b84500;
  --amarelo: #ffc933;
  --grama: #35a853;
  --muted: #333333;

  --pixel: "Silkscreen", "Courier New", monospace;
  --ui: Tahoma, "MS Sans Serif", Verdana, "Segoe UI", Geneva, sans-serif;

  --raised: inset -2px -2px #6f6f6f, inset 2px 2px #fff;
  --bloco: 4px 4px 0 var(--ink);
  --max: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 var(--ui);
  /* céu em faixas (degradê "pixelado") */
  background-color: var(--ceu-2);
  background-image: linear-gradient(to bottom,
    var(--ceu) 0 160px, #aadcff 160px 320px, #b4e0ff 320px 480px, var(--ceu-2) 480px 100%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: #0f2796; }
svg { display: block; max-width: 100%; }
.oculto { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--papel); }
input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--amarelo); }

.skip {
  position: absolute; left: 8px; top: -80px; z-index: 50;
  background: var(--amarelo); color: var(--ink); padding: 10px 14px; font-weight: 700; border: 3px solid var(--ink);
}
.skip:focus { top: 8px; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--papel); border-bottom: 4px solid var(--ink);
}
.marca { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 14px/1.1 var(--pixel); text-transform: uppercase; min-width: 0; }
.marca span { line-height: 1.15; font-size: 12px; overflow-wrap: anywhere; }
@media (min-width: 560px) { .marca span { font-size: 14px; } }
.marca-cubo { width: 44px; height: 44px; flex: none; border: 3px solid var(--ink); box-sizing: border-box; image-rendering: auto; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block; cursor: pointer; text-align: center; text-decoration: none;
  font: 700 14px/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); background: var(--amarelo);
  border: 3px solid var(--ink); padding: 12px 18px; min-height: 44px;
  box-shadow: 0 5px 0 var(--ink);
  transition: none;
}
.btn:hover { background: #ffd75e; color: var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-claro { background: var(--papel); }
.btn-claro:hover { background: #eef4ff; }
.btn-pequeno { padding: 8px 12px; font-size: 12px; min-height: 40px; box-shadow: 0 4px 0 var(--ink); }
.btn-grande { font-size: 15px; padding: 14px 20px; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; background: #d6d6d6; color: #3a3a3a; transform: none; box-shadow: 0 5px 0 #555; border-color: #555; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 28px 16px 8px;
  display: grid; gap: 24px;
}
.hero-texto { background: var(--papel); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 20px 18px 18px; }
.selo {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 12px/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .04em;
  background: var(--vermelho); color: #fff; padding: 7px 10px; border: 3px solid var(--ink);
}
.selo-ponto { width: 10px; height: 10px; background: var(--amarelo); border: 2px solid var(--ink); flex: none; }
h1 {
  margin: 16px 0 12px; color: var(--azul);
  font: 700 clamp(30px, 10.5vw, 68px)/1.02 var(--pixel); text-transform: uppercase; letter-spacing: -.01em;
  text-shadow: 3px 3px 0 var(--amarelo);
  overflow-wrap: break-word;
}
.sub { font-size: 17px; max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chips li { font: 700 11px/1.3 var(--pixel); text-transform: uppercase; background: #eaf0ff; border: 2px solid var(--ink); padding: 6px 9px; }
.acoes { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 6px; }
.acoes .btn { flex: 1 1 100%; }
.aviso-mini { font-size: 13px; color: var(--muted); margin-top: 14px; }

.hero-arte { display: flex; justify-content: center; padding: 16px 0 0; }
.torre { width: min(100%, 300px); height: auto; overflow: visible; }
.azul { color: #2f5bff; } .verde { color: #2fbf5b; } .amarelo { color: var(--amarelo); }
.vermelho { color: #ff4d4d; } .roxo { color: #a35bff; } .laranja { color: #ff8a1f; }

/* ---------- Seções (janelas) ---------- */
.trilha { max-width: var(--max); margin: 0 auto; padding: 24px 16px 40px; display: grid; gap: 28px; }
.miolo { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.janela { background: var(--face); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0; padding: 10px 12px; color: #fff;
  font: 700 clamp(14px, 4.2vw, 19px)/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 4px solid var(--ink);
}
.barra-azul { background: var(--azul); }
.barra-verde { background: var(--verde); }
.barra-roxa { background: var(--roxo); }
.barra-laranja { background: var(--laranja); }
.barra-vermelha { background: var(--vermelho); }
.barra-amarela { background: var(--amarelo); color: var(--ink); }
.botoes { display: flex; gap: 4px; flex: none; }
.botoes i { width: 16px; height: 16px; background: var(--face); border: 2px solid var(--ink); box-shadow: var(--raised); }
.botoes .fechar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -6px -4px -6px 0; background: var(--face); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--raised); text-shadow: none; text-decoration: none; }
.botoes button.fechar { cursor: pointer; padding: 0; font: inherit; }
dialog.modal { padding: 0 10px 10px 0; border: 0; background: transparent; color: inherit; width: min(730px, calc(100vw - 16px)); max-width: none; max-height: calc(100dvh - 16px); overflow: auto; overscroll-behavior: contain; }
dialog.modal::backdrop { background: rgba(17, 17, 17, .65); }
body:has(dialog.modal[open]) { overflow: hidden; }
.botoes .fechar:hover { background: #ff6b6b; color: #fff; }
.botoes .fechar:active { box-shadow: none; transform: translate(1px, 1px); }
.botoes .fechar:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.corpo { background: var(--papel); margin: 4px; padding: 18px 16px 20px; border: 2px solid var(--ink); }
.corpo > * + * { margin-top: 14px; }
.lead { font-size: 18px; }
.nota { font-size: 14px; color: var(--muted); background: #fff8d6; border-left: 6px solid var(--amarelo); padding: 8px 12px; }
.destaque { font-size: 20px; background: #ffe9d6; border: 3px solid var(--ink); padding: 12px 14px; }
.assinatura { font-family: var(--pixel); font-size: 13px; text-transform: uppercase; }
.mini-titulo { font: 700 14px/1.3 var(--pixel); text-transform: uppercase; margin-top: 22px !important; color: var(--azul); }

.cartoes { display: grid; gap: 14px; }
.cartao { border: 3px solid var(--ink); background: #f6f8ff; padding: 14px; box-shadow: var(--bloco); }
.cartao h3 { font: 700 15px/1.25 var(--pixel); text-transform: uppercase; margin: 10px 0 6px; }
.cartao p { font-size: 15px; }
.cartao-icone {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 3px solid var(--ink);
  font: 700 15px/1 var(--pixel); color: var(--ink); box-shadow: inset 0 6px 0 rgba(255,255,255,.4), inset 0 -6px 0 rgba(0,0,0,.18);
}
.cartao-org h3 { margin-top: 0; }
.cartao-org a { font-weight: 700; }
.c-azul { background: #7f9bff; } .c-amarelo { background: var(--amarelo); } .c-verde { background: #5fe08a; } .c-vermelho { background: #ff7b7b; }
.roteiro { counter-reset: p; display: grid; gap: 10px; }
.roteiro li { counter-increment: p; position: relative; padding: 4px 0 4px 44px; }
.roteiro li::before {
  content: counter(p); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; display: grid; place-items: center;
  font: 700 14px/1 var(--pixel); background: var(--amarelo); border: 3px solid var(--ink);
}
.lista-blocos { display: grid; gap: 12px; }
.lista-blocos li { position: relative; padding-left: 30px; }
.lista-blocos li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 14px; background: var(--verde); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* ---------- FAQ ---------- */
details { border: 3px solid var(--ink); background: #f6f8ff; }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 12px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; font: 700 16px/1 var(--pixel); background: var(--amarelo); border: 2px solid var(--ink); }
details[open] summary::after { content: "–"; }
details[open] summary { border-bottom: 3px solid var(--ink); background: #e5ecff; }
details p { padding: 12px 14px; }

/* ---------- Formulário ---------- */
.campo { border: 0; padding: 0; margin-left: 0; margin-right: 0; min-width: 0; }
.campo + .campo, .campo + .hp + .campo { margin-top: 18px; }
label, legend { font-weight: 700; display: block; margin-bottom: 6px; padding: 0; }
input[type="text"], input[type="email"] {
  width: 100%; font: 16px/1.3 var(--ui); color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-radius: 0; padding: 12px; min-height: 48px;
  box-shadow: inset 3px 3px 0 #d4d4d4;
}
input[aria-invalid="true"] { border-color: var(--vermelho); background: #fff1f1; }
.opcao { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; padding: 12px; border: 3px solid var(--ink); background: #f6f8ff; margin-bottom: 8px; cursor: pointer; min-height: 48px; }
.opcao span { flex: 1; }
.opcao input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--azul); cursor: pointer; }
.opcao:has(input:checked) { background: #dfe8ff; box-shadow: inset 6px 0 0 var(--azul); }
.opcao-aceite { font-size: 14px; }
.erro { color: #a00a22; font-weight: 700; font-size: 14px; margin-top: 6px; }
.erro::before { content: "! "; font-family: var(--pixel); }
.turnstile { min-height: 65px; }
.btn-enviar { width: 100%; margin-top: 22px; }
.status { margin-top: 18px; }
.status:empty { display: none; }
.status:focus { outline: 3px solid var(--ink); outline-offset: 3px; }
.msg { border: 3px solid var(--ink); padding: 12px 14px; font-weight: 700; }
.msg-ok { background: #d8f7e1; }
.msg-erro { background: #ffe0e0; }
.msg-aviso { background: #fff3c4; }
.sucesso { text-align: left; }
.sucesso h3 { font: 700 18px/1.2 var(--pixel); text-transform: uppercase; color: var(--verde); margin-bottom: 8px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Páginas simples ---------- */
.texto-longo h2 { font: 700 15px/1.3 var(--pixel); text-transform: uppercase; color: var(--azul); margin-top: 22px; }
.texto-longo h2:first-child { margin-top: 0; }
.texto-longo ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; }
.contato-saida { font-weight: 700; word-break: break-all; }
.contato-saida:empty { display: none; }

/* ---------- Rodapé (baseplate) ---------- */
.rodape {
  margin-top: 8px; padding: 40px 16px 32px; border-top: 4px solid var(--ink);
  background-color: var(--grama);
  background-image: radial-gradient(circle at 50% 50%, #2e9448 0 7px, transparent 8px);
  background-size: 32px 32px;
}
.rodape-caixa { max-width: var(--max); margin: 0 auto; background: var(--papel); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 16px; font-size: 14px; }
.rodape-caixa > * + * { margin-top: 10px; }
.rodape-links a { font-weight: 700; }

/* ---------- Animações (só se o usuário permitir) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .torre use { animation: cai .55s steps(7, end) backwards; }
  .torre .c1 { animation-delay: .00s; } .torre .c2 { animation-delay: .06s; } .torre .c3 { animation-delay: .12s; }
  .torre .c4 { animation-delay: .18s; } .torre .c5 { animation-delay: .24s; } .torre .c6 { animation-delay: .30s; }
  .torre .c7 { animation-delay: .36s; } .torre .c8 { animation-delay: .42s; } .torre .c9 { animation-delay: .48s; }
  .torre .c10 { animation-delay: .54s; } .torre .c11 { animation-delay: .60s; } .torre .c12 { animation-delay: .66s; }
  .torre .c13 { animation-delay: .72s; } .torre .c14 { animation-delay: .78s; } .torre .c15 { animation-delay: .84s; }
  .selo-ponto { animation: pisca 1.2s steps(2, end) infinite; }
  @keyframes cai { from { translate: 0 -90px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
  @keyframes pisca { 50% { opacity: .15; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Telas maiores ---------- */
@media (min-width: 560px) {
  .acoes .btn { flex: 0 0 auto; }
  .cartoes { grid-template-columns: 1fr 1fr; }
  .corpo { padding: 24px 24px 26px; }
}
@media (min-width: 900px) {
  body { background-image: linear-gradient(to bottom, var(--ceu) 0 220px, #aadcff 220px 440px, #b4e0ff 440px 660px, var(--ceu-2) 660px 100%); }
  .topo { padding: 12px 32px; }
  .hero { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 40px; padding-top: 48px; }
  .hero-texto { padding: 32px 32px 28px; }
  .hero-arte { padding: 0; }
  .torre { width: 100%; max-width: 340px; }
  .cartoes-3 { grid-template-columns: repeat(3, 1fr); }
  .cartoes:not(.cartoes-3):not(.cartoes-org) { grid-template-columns: repeat(4, 1fr); }
  .trilha { gap: 40px; padding-top: 40px; }
  .janela-form .corpo { max-width: 640px; }
  .janela-form { max-width: 760px; width: 100%; margin: 0 auto; }
}
