/* Site estático da Mesa Posta (início, privacidade, termos). Cores e medidas vêm de tema.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--color-bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: radial-gradient(140% 900px at 50% 0%, var(--color-felt-300) 0%, var(--color-surface-table) 45%, var(--color-bg) 100%) no-repeat;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-strong); }
:focus-visible { outline: 3px solid var(--color-accent-strong); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 7vw, 44px); }
h2 { font-size: var(--text-title-2); margin-top: 1.6em; }
h3 { font-size: var(--text-title-3); margin-top: 1.2em; }
p, li { color: var(--color-text); }
.muted { color: var(--color-text-muted); }

.wrap { width: min(100% - 40px, 720px); margin-inline: auto; }

/* Cabeçalho e rodapé */
.top { padding: 20px 0; }
.top a { display: inline-flex; }
.top img { height: 40px; width: auto; }
.foot { margin-top: 56px; padding: 24px 0 40px; border-top: 1px solid var(--color-border); font-size: var(--text-caption); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
.foot a { color: var(--color-text-muted); }
.foot a:hover { color: var(--color-text); }

/* Início */
.hero { text-align: center; padding: 40px 0 8px; }
.hero .sig { width: min(100%, 520px); height: auto; }
.hero .lead { font-size: 18px; color: var(--color-text); max-width: 34ch; margin: 24px auto 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch-min);
  padding: 0 18px; margin-top: 16px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--color-border);
  font-weight: 600; font-size: var(--text-label); color: var(--color-text);
}
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-warning); }
.games { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.games li {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-2);
}
.games strong { display: block; font-family: var(--font-display); font-size: var(--text-title-3); color: var(--color-accent); }
.games span { font-size: var(--text-caption); color: var(--color-text-muted); }
.how { margin-top: 40px; }
.how ol { padding-left: 1.2em; }
.how li { margin: 6px 0; }

/* Páginas de texto (privacidade, termos) */
.doc {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  padding: clamp(20px, 5vw, 40px); box-shadow: var(--shadow-3);
}
.doc h1 { margin-bottom: .2em; }
.doc .updated { margin-top: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.doc th { color: var(--color-accent); font-weight: 600; }
.doc .table { overflow-x: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero .sig { animation: chegar var(--duration-slow) var(--ease-out) both; }
  .games li { animation: chegar var(--duration-base) var(--ease-out) both; }
  .games li:nth-child(2) { animation-delay: 60ms; }
  .games li:nth-child(3) { animation-delay: 120ms; }
  .games li:nth-child(4) { animation-delay: 180ms; }
  .games li:nth-child(5) { animation-delay: 240ms; }
}
@keyframes chegar { from { opacity: 0; transform: translateY(12px); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Tabelas viram cartões em telas estreitas */
@media (max-width: 560px) {
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .doc tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .doc td { display: block; padding: 4px 0; border: 0; }
  .doc td::before { content: attr(data-label); display: block; font-size: var(--text-caption); font-weight: 600; color: var(--color-accent); }
}
