/* ==========================================================================
   GameAgro — design tokens & shared primitives
   Fonte única de verdade para cor, tipografia, espaçamento e componentes
   base (.btn, .card, .tag, .eyebrow, tabela) usados no site e em todos
   os jogos. Qualquer stylesheet específico deve consumir estas variáveis
   em vez de declarar as suas próprias.
   ========================================================================== */

:root {
  /* --- cor: texto e superfícies --- */
  --ink: #1c211d;
  --ink-soft: #5b655d;
  --ink-faint: #8b948c;
  --paper: #f5f3ec;
  --surface: #fffefb;
  --surface-sunken: #efece2;
  --line: rgba(28, 33, 29, 0.14);
  --line-strong: rgba(28, 33, 29, 0.28);

  /* --- cor: marca --- */
  --forest: #1f3d2e;
  --forest-strong: #142c21;
  --forest-soft: #46705a;
  --forest-tint: rgba(31, 61, 46, 0.08);
  --clay: #a8592f;
  --clay-strong: #8a4623;
  --clay-tint: rgba(168, 89, 47, 0.12);
  --ochre: #a97a2e;

  /* --- cor: estados semânticos (discretos, sem neon) --- */
  --good: #2c6a48;
  --good-tint: rgba(44, 106, 72, 0.12);
  --bad: #9c3b30;
  --bad-tint: rgba(156, 59, 48, 0.12);
  --warn: #a3781f;
  --warn-tint: rgba(163, 120, 31, 0.14);

  --focus: #a8592f;

  /* --- tipografia --- */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  /* --- espaçamento --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* --- forma --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1180px;

  /* --- sombra (sutil, sem cor) --- */
  --shadow-sm: 0 1px 2px rgba(20, 23, 20, 0.07);
  --shadow-md: 0 10px 28px rgba(20, 23, 20, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background: var(--paper);
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(90deg, rgba(31, 61, 46, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 61, 46, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  background: none;
}

h1, h2, h3, h4, p {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

p {
  font-family: var(--font-sans);
  font-weight: 400;
}

/* --- eyebrow: rótulo pequeno acima de títulos --- */
.eyebrow {
  margin: 0 0 10px;
  color: var(--clay-strong);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- botões --- */
.btn {
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
}

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

.btn-primary {
  color: var(--surface);
  background: var(--forest);
}

.btn-primary:hover {
  background: var(--forest-strong);
}

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

.btn-secondary:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.btn-ghost {
  color: var(--forest);
  padding-left: 4px;
  padding-right: 4px;
  min-height: auto;
}

.btn-ghost:hover {
  color: var(--forest-strong);
}

/* --- tag: rótulo retangular, sem pill --- */
.tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag-clay {
  color: var(--clay-strong);
  border-color: rgba(168, 89, 47, 0.4);
  background: var(--clay-tint);
}

.tag-forest {
  color: var(--forest);
  border-color: rgba(31, 61, 46, 0.32);
  background: var(--forest-tint);
}

/* --- cartão base --- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* --- ícone (sprite SVG via <use>) --- */
.icon {
  width: 1.4em;
  height: 1.4em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- tabela --- */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- scroll reveal (sutil) --- */
.reveal {
  opacity: 1;
  transform: none;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.js-enabled .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- foco acessível --- */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* --- estado vazio honesto (rankings sem dados) --- */
.empty-state {
  padding: var(--space-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}
