/* Poké Idle — páginas estáticas do site (como-jogar, regiões, novidades, sobre, privacidade, termos, 404).
   Geradas por tools/build-pages.mjs; mesmas cores do jogo e as mesmas fontes: Nunito no texto, Dela Gothic One
   nos títulos (a voz do logo). Botão de ação = pílula vermelha sólida (--red-cta, AA com texto branco). */
:root {
  --bg: #0F1620;
  --panel: #1A2330;
  --panel-2: #212D3E;
  --line: #2C3A4E;
  --text: #F2F5F9;
  --muted: #9FB0C4;
  --red: #E3350D;
  --red-cta: #C92E0B;       /* texto branco em cima: 5,4:1 (o --red puro dá 4,4:1 e reprova no AA) */
  --red-cta-hover: #A82508;
  --gold: #FFCB05;
  --font-display: "Dela Gothic One", "Nunito", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-color: #3a4a62 var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 203, 5, 0.35); color: #fff; }
img { max-width: 100%; height: auto; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- topo ---------- */
.pg-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding: 10px max(16px, env(safe-area-inset-left, 0px));
  background: var(--panel); border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 10; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.pg-logo { display: inline-flex; align-items: center; text-decoration: none; }
.pg-logo-img { height: 46px; width: auto; display: block; }
.pg-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.pg-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 800;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.pg-nav a:hover, .pg-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.pg-lang { display: flex; gap: 2px; margin-left: auto; font-size: 13px; font-weight: 900; }
.pg-lang a, .pg-lang span {
  display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: 0 8px;
  border-radius: 8px; color: var(--muted); text-decoration: none;
}
.pg-lang span { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.pg-lang a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.pg-note { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- texto ---------- */
.pg { max-width: 760px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-left, 0px)) 48px; }
.pg h1 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em;
  font-size: clamp(28px, 5vw, 38px); line-height: 1.15; margin: 0 0 14px; text-wrap: balance;
}
.pg h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; line-height: 1.25; margin: 40px 0 10px; text-wrap: balance;
}
.pg h3 { font-weight: 900; }
.pg p, .pg li { color: #D9E1EA; }
.pg-lead { font-size: 18px; color: var(--text) !important; }
.pg figure { margin: 20px 0; }
.pg figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.pg figure img { border-radius: 12px; border: 1px solid var(--line); }

.pg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 6px; margin: 12px 0; }
.pg-card h2 { margin-top: 14px; }
.pg-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red-cta); color: #fff; font-size: 15px; margin-right: 4px; vertical-align: 2px; }

.pg-news { border-top: 1px solid var(--line); padding-top: 4px; }
.pg-news h2 { font-size: 19px; margin-bottom: 0; }
.pg-date { font-size: 14px; color: var(--muted) !important; margin: 2px 0 6px; }

/* perguntas: cada uma num bloco, separadas por linha (antes era um paredão de negrito + texto) */
.pg-faq { margin: 8px 0 0; border-top: 1px solid var(--line); }
.pg-faq dt { font-weight: 900; font-size: 17px; margin: 0; padding: 16px 0 2px; }
.pg-faq dd { margin: 0; padding: 0 0 16px; color: #D9E1EA; border-bottom: 1px solid var(--line); }

/* ---------- botões ---------- */
.pg-btn, .pg-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red-cta); color: #fff; font-weight: 900; text-decoration: none; white-space: nowrap;
  border-radius: 999px;
  transition: background-color .15s var(--ease-out), transform .08s, box-shadow .08s;
}
.pg-btn:hover, .pg-play:hover { background: var(--red-cta-hover); }
.pg-btn { min-height: 48px; padding: 0 28px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.pg-btn:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); }
.pg-play { min-height: 40px; padding: 0 18px; font-size: 15px; }
.pg-play:active { transform: translateY(1px); }
.pg-top .pg-lang + .pg-play { margin-left: 4px; }
.pg-top .pg-nav + .pg-play { margin-left: auto; }

/* fecho de toda página: uma faixa com o botão de jogar, não um botão solto depois do texto */
.pg-cta {
  margin: 48px 0 0; padding: 32px 24px; border-radius: 18px; text-align: center;
  background: radial-gradient(120% 160% at 50% 130%, rgba(201, 46, 11, 0.35), transparent 62%), var(--panel);
  border: 1px solid var(--line);
}
.pg-cta .pg-note { margin-top: 14px; }
.pg-cta-h { display: block; margin: 0 0 18px; font-family: 'Dela Gothic One', sans-serif; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.2; color: var(--text); }

/* aviso de cookies (js/consent.js), o mesmo do jogo */
.cookiebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; width: min(560px, calc(100% - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: #161b26; color: #f3f4f6; border: 1px solid #2a3140; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); font-size: 14px; }
.cookiebar[hidden] { display: none; }
.cookiebar p { margin: 0; flex: 1 1 260px; }
.cookiebar-acts { display: flex; gap: 8px; margin-left: auto; }
.cookiebar .soc-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid #2a3140; background: #202634; color: #f3f4f6; font: inherit; font-weight: 800; cursor: pointer; }
.cookiebar .soc-btn.ok { border-color: #4ade80; color: #4ade80; }
@media (max-width: 640px) { .cookiebar { bottom: 8px; padding: 9px 11px; gap: 8px; font-size: 13px; } }

.pg-foot {
  border-top: 1px solid var(--line); padding: 22px max(16px, env(safe-area-inset-left, 0px)) 32px;
  color: var(--muted); font-size: 13px; text-align: center;
}
.pg-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-bottom: 8px; }
.pg-foot nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 8px; }
.pg-foot a { color: var(--muted); }
.pg-foot a:hover { color: var(--text); }

/* ---------- Pokédex (tools/pages-pokedex.mjs) ---------- */
.dx-regions { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.dx-regions a, .dx-regions span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 800; font-size: 14px; text-decoration: none; }
.dx-regions a { color: var(--muted); }
.dx-regions a:hover { color: var(--text); border-color: var(--muted); }
.dx-regions span { color: #fff; background: var(--red-cta); border-color: var(--red-cta); }
.dx-wrap { margin: 16px 0; }
.dx { width: 100%; border-collapse: collapse; font-size: 15px; }
.dx th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--line); }
.dx td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; color: #D9E1EA; }
.dx tr:target td { background: rgba(255, 203, 5, 0.08); }
.dx-n { color: var(--muted) !important; font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.dx-mon { white-space: nowrap; }
.dx-mon img { width: 48px; height: 48px; image-rendering: pixelated; vertical-align: middle; margin: -6px 4px -6px -6px; }
.dx-mon span { font-weight: 700; color: var(--text); }
.dx-ty { white-space: nowrap; }
.dx-t { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin: 1px 3px 1px 0; color: #fff; background: #68707A; }
.t-fire { background: #E2552B; } .t-water { background: #3B8BE0; } .t-grass { background: #3E9C3A; } .t-electric { background: #C9A400; color: #111; }
.t-ice { background: #3FB7C9; color: #111; } .t-fighting { background: #C2412F; } .t-poison { background: #8E44AD; } .t-ground { background: #A9793A; }
.t-flying { background: #6F86D6; } .t-psychic { background: #E0457B; } .t-bug { background: #7F9A1C; } .t-rock { background: #9C8A4E; }
.t-ghost { background: #5C4E8C; } .t-dragon { background: #5A3FD0; } .t-dark { background: #4B3F3A; } .t-steel { background: #6E8496; } .t-fairy { background: #D46FC0; }
.dx-where { list-style: none; margin: 0; padding: 0; }
.dx-where li { margin: 0; line-height: 1.35; }
.dx-where small, .dx-more { color: var(--muted); font-size: 13px; }
.dx-note { font-size: 14px; color: var(--muted); }
.dx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 18px 0; }
.dx-card { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; text-decoration: none; color: var(--text); transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out); }
.dx-card:hover { border-color: var(--gold); background: var(--panel-2); }
.dx-pics img { width: 56px; height: 56px; image-rendering: pixelated; }
.dx-cn b { font-size: 18px; }
.dx-cn small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .dx thead { display: none; }
  .dx, .dx tbody, .dx tr, .dx td { display: block; width: 100%; }
  .dx tr { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .dx td { border: 0; padding: 2px 0; }
  .dx-n { grid-column: 1; grid-row: 1; padding-top: 14px !important; }
  .dx-mon { grid-column: 2; }
  .dx-ty, .dx tr td:last-child { grid-column: 2; }
}

/* ---------- página de entrada (tools/pages-home.mjs) ---------- */
.pg.pg-wide { max-width: 1120px; }
.pg-wide .home-text { max-width: none; }
.pg-wide .home-text .pg-faq { max-width: 760px; }
@media (min-width: 1000px) { .pg-wide .home-grid { grid-template-columns: repeat(4, 1fr); } }
.pg-wide .home-text p { max-width: 68ch; }

.home-hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: 40px; align-items: center; margin: 4px 0 8px; }
.home-launch { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 800;
  color: var(--gold); background: rgba(255, 203, 5, 0.1); border: 1px solid rgba(255, 203, 5, 0.35); }
.home-logo { display: block; width: min(230px, 60%); height: auto; margin: 0 0 14px -6px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }
.home-hero h1 { font-size: clamp(30px, 3.3vw, 42px); line-height: 1.08; margin-bottom: 16px; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 22px 0 14px; }
.home-play { font-size: 18px; min-height: 56px; padding: 0 30px; }
.home-sec {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px;
  color: var(--text); font-weight: 900; text-decoration: none; background: var(--panel-2);
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.home-sec:hover { background: #2A3850; color: var(--gold); }
.home-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted) !important; margin: 0; }
.home-meta span::before { content: "✓ "; color: var(--gold); font-weight: 900; }
.home-shot { margin: 0 !important; position: relative; }
.home-shot img {
  display: block; width: 100%; border-radius: 18px !important; border: 3px solid #2a3a52 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-h2 { margin-top: 56px !important; }
.home-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0 8px; }
.home-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 18px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: border-color .18s var(--ease-out), background-color .18s var(--ease-out), transform .18s var(--ease-out);
}
.home-card:hover { border-color: var(--gold); background: var(--panel-2); transform: translateY(-3px); }
.home-card b { font-size: 18px; font-weight: 900; }
.home-card > span:last-child { font-size: 14px; color: var(--muted); line-height: 1.45; }
/* sprites de 96px com sobra transparente: mostrados a 72px com margem negativa para o bicho em si ficar grande */
.home-ic { display: flex; gap: 0; height: 60px; margin: -4px 0 4px -8px; } /* os lendários das Regiões enchem o quadro: 72px saía do cartão */
.home-ic img { width: 60px; height: 60px; margin-right: -10px; image-rendering: pixelated; }
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; }
.home-grid h3 { margin: 18px 0 4px; font-size: 17px; }
.home-grid p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .home-card, .home-card:hover { transition: none; transform: none; }
}
@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; gap: 22px; }
  .home-logo { display: none; }   /* o topo já mostra o logo */
  .home-shot { order: -1; }       /* celular: o jogo é a primeira coisa que aparece */
  .home-cards { grid-template-columns: repeat(2, 1fr); }
}
/* celular: topo em duas linhas (logo + idioma + Jogar; abas rolando de lado) em vez de três */
@media (max-width: 720px) {
  .pg-top { gap: 4px 10px; padding-top: 8px; padding-bottom: 6px; }
  .pg-logo-img { height: 40px; }
  .pg-nav {
    order: 5; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 0 max(10px, env(safe-area-inset-left, 0px));
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .pg-nav::-webkit-scrollbar { display: none; }
  .pg-nav a { flex: none; min-height: 44px; }
  .pg-lang a, .pg-lang span { min-height: 44px; min-width: 40px; }
  .pg-play { min-height: 44px; }
  .pg { padding-top: 20px; }
}
@media (max-width: 520px) {
  .home-cards, .home-grid { grid-template-columns: 1fr; }
  .home-play { width: 100%; }
  .home-sec { width: 100%; justify-content: center; }
  .pg-top .pg-play { padding: 0 14px; }
  .pg-cta { padding: 24px 16px; }
  .pg-cta .pg-btn { width: 100%; }
}
