/* Patroci · conta.patroci.org. Mobile first. Cores por tokens: escuro por padrao,
   claro pelo sistema (sem escolha salva) ou pelo botao (data-theme). */

@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/Cinzel-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-2: #121a30;
  --card: #141d36;
  --navy: #1b2740;
  --gold: #d8b46a;
  --gold-2: #f0cf84;
  --titulo: #f0cf84;
  --ink: #f3ead6;
  --muted: #aab4c8;
  --ok: #2fbf71;
  --danger: #ff6b6b;
  --on-gold: #1a1408;
  --line: rgba(216, 180, 106, 0.28);
  --foco: #f0cf84;
  --cabecalho: rgba(11, 16, 32, 0.92);
  --sombra: 0 12px 32px rgba(0, 0, 0, 0.35);
  --heroi-topo: rgba(216, 180, 106, 0.22);
  --heroi-canto: rgba(27, 39, 64, 0.9);
  --heroi-base: #17234a;
  --raio: 16px;
  --fonte-titulo: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --fonte-texto: "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fonte-codigo: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f1e4;
    --bg-2: #efe6cf;
    --card: #fffdf7;
    --navy: #1b2740;
    --gold: #7a5518;
    --gold-2: #5c3f10;
    --titulo: #5c3f10;
    --ink: #1d2233;
    --muted: #4f5870;
    --ok: #1b6b40;
    --danger: #a51d1d;
    --on-gold: #fffdf7;
    --line: rgba(122, 85, 24, 0.35);
    --foco: #1b2740;
    --cabecalho: rgba(246, 241, 228, 0.94);
    --sombra: 0 10px 26px rgba(60, 45, 15, 0.12);
    --heroi-topo: rgba(122, 85, 24, 0.18);
    --heroi-canto: rgba(255, 253, 247, 0.7);
    --heroi-base: #efe6cf;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e4;
  --bg-2: #efe6cf;
  --card: #fffdf7;
  --navy: #1b2740;
  --gold: #7a5518;
  --gold-2: #5c3f10;
  --titulo: #5c3f10;
  --ink: #1d2233;
  --muted: #4f5870;
  --ok: #1b6b40;
  --danger: #a51d1d;
  --on-gold: #fffdf7;
  --line: rgba(122, 85, 24, 0.35);
  --foco: #1b2740;
  --cabecalho: rgba(246, 241, 228, 0.94);
  --sombra: 0 10px 26px rgba(60, 45, 15, 0.12);
  --heroi-topo: rgba(122, 85, 24, 0.18);
  --heroi-canto: rgba(255, 253, 247, 0.7);
  --heroi-base: #efe6cf;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-2: #121a30;
  --card: #141d36;
  --navy: #1b2740;
  --gold: #d8b46a;
  --gold-2: #f0cf84;
  --titulo: #f0cf84;
  --ink: #f3ead6;
  --muted: #aab4c8;
  --ok: #2fbf71;
  --danger: #ff6b6b;
  --on-gold: #1a1408;
  --line: rgba(216, 180, 106, 0.28);
  --foco: #f0cf84;
  --cabecalho: rgba(11, 16, 32, 0.92);
  --sombra: 0 12px 32px rgba(0, 0, 0, 0.35);
  --heroi-topo: rgba(216, 180, 106, 0.22);
  --heroi-canto: rgba(27, 39, 64, 0.9);
  --heroi-base: #17234a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--fonte-texto);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--gold);
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pular {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  text-decoration: none;
}

.pular:focus {
  top: 12px;
}

/* Cabecalho */

.cabecalho {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cabecalho);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-block: 8px;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.marca-icone {
  width: 36px;
  height: 36px;
  flex: none;
}

.marca-fundo {
  fill: var(--navy);
}

.marca-anel {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
}

.marca-estrela {
  fill: var(--gold);
}

.marca-nome {
  font-family: var(--fonte-titulo);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  width: 100%;
  order: 3;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.menu a:hover {
  color: var(--gold);
}

.status-wrap {
  margin-left: auto;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.95rem;
  color: var(--ink);
}

.ponto {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.status[data-estado="online"] .ponto {
  background: var(--ok);
  animation: pulso 2.4s ease-out infinite;
}

.status[data-estado="offline"] .ponto {
  background: var(--danger);
}

@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(47, 191, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); }
}

/* Botoes */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primario {
  background: var(--gold);
  color: var(--on-gold);
}

.btn-primario:hover {
  background: var(--gold-2);
  color: var(--on-gold);
}

.btn-secundario {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-secundario:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-bloco {
  width: 100%;
}

/* Heroi */

.heroi {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 56px 0 52px;
  background:
    radial-gradient(60% 55% at 50% 0%, var(--heroi-topo), transparent 70%),
    radial-gradient(45% 45% at 0% 100%, var(--heroi-canto), transparent 70%),
    linear-gradient(180deg, var(--heroi-base) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.heroi-arte {
  position: absolute;
  z-index: -1;
  top: -30px;
  left: 50%;
  width: min(360px, 80vw);
  transform: translateX(-50%);
  opacity: 0.16;
  pointer-events: none;
}

.heroi-sigilo {
  display: block;
  width: 100%;
  height: auto;
}

.heroi-texto {
  text-align: center;
}

.selo {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-family: var(--fonte-titulo);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--titulo);
}

.subtitulo {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.heroi-jogadores {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

/* Secoes e titulos */

.secao {
  padding: 56px 0;
}

.secao-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

h2 {
  margin: 0 0 12px;
  font-family: var(--fonte-titulo);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--titulo);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--ink);
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
}

.cartao {
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
}

.duas-colunas {
  display: grid;
  gap: 20px;
}

.cartao-lateral {
  align-self: start;
}

.lista-simples {
  margin: 0;
  padding-left: 1.2em;
}

.lista-simples li + li {
  margin-top: 10px;
}

/* Formulario de cadastro */

.form {
  display: block;
}

.campo {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.campo > label {
  font-weight: 600;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

input[type="text"]:focus-visible,
input[type="password"]:focus-visible {
  border-color: var(--gold);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.entrada-com-botao {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entrada-com-botao input {
  min-width: 0;
}

.btn-mostrar {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.95rem;
}

.campo-mel {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ajuda {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.erro {
  margin: 0;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 600;
}

.captcha {
  margin: 4px 0 18px;
}

.captcha .ajuda {
  margin-bottom: 8px;
}

.turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 66px;
}

.aviso-form {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-weight: 600;
}

.sucesso {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ok);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ok);
  font-weight: 600;
}

/* Como jogar */

.passos {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.passo {
  position: relative;
  counter-increment: passo;
  padding: 20px 18px 18px 66px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--raio);
}

.passo::before {
  content: counter(passo);
  position: absolute;
  left: 16px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--fonte-titulo);
  font-weight: 700;
}

.passo p {
  margin: 0;
  color: var(--muted);
}

/* Download */

.cartao-download .carregando {
  margin: 0;
  color: var(--muted);
}

.arquivo-nome {
  margin: 0 0 14px;
  font-family: var(--fonte-titulo);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--titulo);
  overflow-wrap: anywhere;
}

.fatos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.fatos > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
}

.fatos dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fatos dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rotulo {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hash-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 8px;
}

.hash {
  flex: 1 1 260px;
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fonte-codigo);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.comando {
  font-family: var(--fonte-codigo);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.requisitos {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* FAQ */

.faq {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 0;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 16px;
  color: var(--muted);
}

.faq code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fonte-codigo);
  overflow-wrap: anywhere;
}

/* Regras */

.regras {
  margin: 16px 0 0;
  padding-left: 1.2em;
}

.regras li + li {
  margin-top: 10px;
}

/* Rodape */

.rodape {
  padding: 36px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.rodape-grade {
  display: grid;
  gap: 20px;
}

.marca-rodape {
  margin: 0 0 8px;
  font-family: var(--fonte-titulo);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--titulo);
}

.rodape .ajuda {
  margin-bottom: 4px;
}

.rodape-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.rodape-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.rodape-tema .btn {
  width: 100%;
}

/* Pagina de erro */

.pagina-erro {
  display: grid;
  place-items: center;
  min-height: 80vh;
  padding: 48px 0;
  text-align: center;
}

.pagina-erro h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.pagina-erro .subtitulo {
  margin-bottom: 24px;
}

/* Telas maiores */

@media (min-width: 480px) {
  .entrada-com-botao {
    flex-direction: row;
  }

  .btn-mostrar {
    width: auto;
    min-width: 150px;
  }

  .fatos {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 720px) {
  .heroi {
    padding: 80px 0 72px;
  }

  .cartao {
    padding: 28px;
  }

  .passos {
    grid-template-columns: repeat(2, 1fr);
  }

  .heroi-arte {
    top: -60px;
    left: auto;
    right: -80px;
    transform: none;
    width: min(440px, 60vw);
    opacity: 0.14;
  }
}

@media (min-width: 880px) {
  .menu {
    order: 0;
    width: auto;
    margin-left: 8px;
  }
}

@media (min-width: 900px) {
  .duas-colunas {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: start;
  }
}

@media (min-width: 1000px) {
  .passos {
    grid-template-columns: repeat(4, 1fr);
  }

  .passo {
    padding-top: 22px;
  }
}

@media (min-width: 800px) {
  .rodape-grade {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    align-items: start;
  }
}

/* Movimento reduzido: sem animacoes nem rolagem suave */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover {
    transform: none;
  }
}
