/* ═══════════════════════════════════════════════════════════════════
   FlashArena — folha de estilo do site
   Segue docs/BRANDING.md: Sora nos títulos, Inter no corpo, azul
   elétrico para estrutura e ouro só para recompensa.

   As fontes são servidas daqui, e não de uma CDN, de propósito: uma
   página de política de privacidade que entrega o IP do visitante a
   um terceiro para buscar fonte contradiz o que ela própria promete.
   ═══════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Sora'; src: url('fontes/Sora-SemiBold.woff2') format('woff2');
             font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('fontes/Sora-ExtraBold.woff2') format('woff2');
             font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fontes/Inter-Regular.woff2') format('woff2');
             font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fontes/Inter-Medium.woff2') format('woff2');
             font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fontes/Inter-SemiBold.woff2') format('woff2');
             font-weight: 600; font-display: swap; }

/* ── Tokens: o tema claro é a definição base ─────────────────────── */

:root {
  --marca:        #4A5EF5;
  --marca-forte:  #2E3AAD;
  --marca-fraca:  #EDEFFE;
  --sobre-marca:  #FFFFFF;
  --ouro:         #D98A0F;

  --fundo:        #FBFBFD;
  --superficie:   #FFFFFF;
  --borda:        #E2E4EF;
  --borda-forte:  #C9CCDE;

  --texto:        #14161F;
  --texto-suave:  #545A6E;

  --sombra: 0 1px 2px rgb(20 22 31 / .05), 0 8px 24px -12px rgb(20 22 31 / .12);

  --medida: 34rem;
  --largura: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --marca:        #7385FF;
    --marca-forte:  #A3B0FF;
    --marca-fraca:  #1C2140;
    --sobre-marca:  #10131C;
    --ouro:         #FFC233;

    --fundo:        #12141A;
    --superficie:   #181B23;
    --borda:        #282C38;
    --borda-forte:  #3A3F4F;

    --texto:        #EDEEF3;
    --texto-suave:  #A0A6BA;

    --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  }
}

:root[data-theme="dark"] {
  --marca:        #7385FF;
  --marca-forte:  #A3B0FF;
  --marca-fraca:  #1C2140;
  --sobre-marca:  #10131C;
  --ouro:         #FFC233;

  --fundo:        #12141A;
  --superficie:   #181B23;
  --borda:        #282C38;
  --borda-forte:  #3A3F4F;

  --texto:        #EDEEF3;
  --texto-suave:  #A0A6BA;

  --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
}

/* ── Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -.022em; }
h2 { font-size: clamp(1.35rem, 1.15rem + .85vw, 1.75rem); font-weight: 700; letter-spacing: -.014em; }
h3 { font-size: 1.075rem; font-weight: 600; letter-spacing: -.006em; }

p, ul, ol, table, blockquote { margin: 0; }

a { color: var(--marca); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--marca-forte); }

:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { font-weight: 600; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .92em; }

/* ── Estrutura ────────────────────────────────────────────────────── */

.envelope {
  width: min(100% - 2.5rem, var(--largura));
  margin-inline: auto;
}

/* O espaçamento entre irmãos vem do layout, nunca de margens soltas. */
.pilha       { display: flex; flex-direction: column; gap: 1rem; }
.pilha-larga { display: flex; flex-direction: column; gap: 2rem; }
.pilha-secao { display: flex; flex-direction: column; gap: 3.5rem; }

/* ── Cabeçalho ────────────────────────────────────────────────────── */

.topo {
  border-bottom: 1px solid var(--borda);
  background: var(--fundo);
  position: sticky; top: 0; z-index: 10;
}

.topo > .envelope {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.marca-link {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.075rem;
  letter-spacing: -.02em;
  color: var(--texto); text-decoration: none;
}
.marca-link img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.marca-link em { font-style: normal; color: var(--marca); }

.navegacao { display: flex; gap: 1.35rem; margin-left: auto; flex-wrap: wrap; }
.navegacao a {
  color: var(--texto-suave); text-decoration: none;
  font-size: .9375rem; font-weight: 500;
}
.navegacao a:hover, .navegacao a[aria-current="page"] { color: var(--texto); }
.navegacao a[aria-current="page"] { font-weight: 600; }

/* ── Capa ─────────────────────────────────────────────────────────── */

.capa { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem); }

.selo {
  display: inline-flex; align-items: center; gap: .5rem;
  align-self: flex-start;
  padding: .3rem .75rem .3rem .6rem;
  border: 1px solid var(--borda-forte); border-radius: 999px;
  background: var(--superficie);
  font-size: .8125rem; font-weight: 500; color: var(--texto-suave);
}
.selo::before {
  content: ''; width: .45rem; height: .45rem; border-radius: 50%;
  background: var(--ouro); flex: none;
}

.linha-fina { color: var(--texto-suave); font-size: 1.1875rem; max-width: 33rem; }

/* ── Cartões ──────────────────────────────────────────────────────── */

.grade {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.cartao {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 1.35rem;
  display: flex; flex-direction: column; gap: .55rem;
  box-shadow: var(--sombra);
}
.cartao p { color: var(--texto-suave); font-size: .9375rem; }

.rotulo {
  font-size: .75rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--marca);
}

/* ── Botões ───────────────────────────────────────────────────────── */

.botoes { display: flex; flex-wrap: wrap; gap: .75rem; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: 0 1.35rem;
  border-radius: 10px; border: 1px solid transparent;
  font-family: 'Inter', sans-serif; font-size: .9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.botao-cheio { background: var(--marca); color: var(--sobre-marca); }
.botao-cheio:hover {
  background: var(--marca-forte); color: var(--sobre-marca);
  transform: translateY(-1px);
}
.botao-vazio { border-color: var(--borda-forte); color: var(--texto); background: var(--superficie); }
.botao-vazio:hover { border-color: var(--marca); color: var(--marca); }
.botao[aria-disabled="true"] {
  background: var(--superficie); color: var(--texto-suave);
  border-color: var(--borda); cursor: default; pointer-events: none;
}

/* ── Documento legal ──────────────────────────────────────────────── */

.documento { padding: clamp(2.5rem, 6vw, 4rem) 0 5rem; }
.documento .corpo { max-width: 42rem; }

.documento h2 {
  margin-top: 2.75rem; padding-top: 1.5rem;
  border-top: 1px solid var(--borda);
}
.documento h2:first-of-type { margin-top: 1.5rem; }
.documento h3 { margin-top: 1.75rem; }
.documento p, .documento ul, .documento ol { margin-top: .9rem; }
.documento li { margin-top: .35rem; }
.documento ul, .documento ol { padding-left: 1.35rem; }

.meta { color: var(--texto-suave); font-size: .875rem; }

.indice {
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: 14px; padding: 1.25rem 1.5rem;
}
.indice h2 {
  margin: 0; padding: 0; border: 0;
  font-size: .75rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--texto-suave); font-family: 'Inter', sans-serif; font-weight: 600;
}
.indice ol {
  margin-top: .8rem; padding-left: 1.15rem;
  columns: 2; column-gap: 2rem;
  font-size: .9375rem;
}
@media (max-width: 34rem) { .indice ol { columns: 1; } }
.indice a { color: var(--texto-suave); text-decoration: none; }
.indice a:hover { color: var(--marca); text-decoration: underline; }

/* Aviso: o que o leitor precisa ver antes de continuar. */
.aviso {
  border: 1px solid var(--borda-forte);
  border-left: 3px solid var(--ouro);
  border-radius: 0 12px 12px 0;
  background: var(--superficie);
  padding: 1.1rem 1.35rem;
  font-size: .9375rem;
}
.aviso strong { color: var(--texto); }

.pendente {
  background: var(--marca-fraca);
  border-radius: 5px; padding: 0 .3em;
  font-weight: 600; color: var(--marca-forte);
}

/* ── Tabelas ──────────────────────────────────────────────────────── */

.rolagem { overflow-x: auto; margin-top: 1.1rem; }

table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td {
  text-align: left; padding: .65rem .85rem;
  border-bottom: 1px solid var(--borda);
  vertical-align: top;
}
th {
  font-weight: 600; font-size: .8125rem; color: var(--texto-suave);
  letter-spacing: .02em; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; }

/* ── Rodapé ───────────────────────────────────────────────────────── */

.rodape {
  border-top: 1px solid var(--borda);
  padding: 2.5rem 0 3.5rem;
  color: var(--texto-suave); font-size: .9375rem;
}
.rodape .envelope { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }
.rodape nav { display: flex; flex-direction: column; gap: .45rem; }
.rodape nav strong {
  font-size: .75rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--texto); margin-bottom: .1rem;
}
.rodape a { color: var(--texto-suave); text-decoration: none; }
.rodape a:hover { color: var(--marca); }
.assinatura { margin-left: auto; max-width: 20rem; font-size: .875rem; }

.pular {
  position: absolute; left: -9999px;
  background: var(--marca); color: var(--sobre-marca);
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.pular:focus { left: 0; top: 0; }
