/* Cores espelham apps/mobile/lib/core/theme/brand_tokens.dart */
:root {
  --bg: #0b1118;
  --surface: #111a24;
  --card: #182331;
  --divider: #263445;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --action: #2563eb;
  --route: #38bdf8;
  --warning: #fbbf24;
  --radius: 14px;
  --max: 1080px;
  --read: 720px;
  color-scheme: dark;
}

/* Tema claro: BrandTokensClaro do app. Escolhido no botão do cabeçalho (assets/tema.js). */
:root[data-theme="light"] {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --card: #ffffff;
  --divider: #e2e8f0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --action: #2563eb;
  --route: #0284c7;
  --warning: #b45309;
  color-scheme: light;
}

/* A escrita do logo muda com o fundo, como no app. */
.brand .logo { display: block; height: 18px; width: auto; }
:root[data-theme="light"] .logo--escuro,
:root:not([data-theme="light"]) .logo--claro { display: none; }

/* Botão de tema: sol no escuro, lua no claro. */
.tema-botao {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--divider); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.tema-botao:hover { background: var(--surface); }
.tema-botao:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
.tema-botao svg { width: 18px; height: 18px; }
:root[data-theme="light"] .tema-botao .ic-sol,
:root:not([data-theme="light"]) .tema-botao .ic-lua { display: none; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--route); }
a:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--text); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin-top: 2.2em; }
h3 { font-size: 1.05rem; margin-top: 1.6em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { color: var(--text); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.read { max-width: var(--read); }

/* Cabeçalho */
.site-header {
  border-bottom: 1px solid var(--divider);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav a { color: var(--text-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Início */
.hero { padding: 96px 0 72px; text-align: center; }
.hero .logo { width: min(520px, 86%); height: auto; margin: 0 auto 32px; display: block; }
.hero p.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-2); max-width: 620px; margin: 0 auto 28px; }
.badge {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--divider); background: var(--surface);
  color: var(--text-2); font-size: .9rem;
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 88px; }
.feature { background: var(--card); border: 1px solid var(--divider); border-radius: var(--radius); padding: 24px; }
.feature h3 { margin-top: 0; }
.feature p { margin: 0; color: var(--muted); }
.feature .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--route); margin-bottom: 14px; }
.feature:nth-child(2) .dot { background: var(--warning); }
.feature:nth-child(3) .dot { background: var(--primary); }

/* Páginas de texto */
.page { padding: 56px 0 88px; }
.page .updated { color: var(--muted); font-size: .92rem; margin-bottom: 2em; }
.page table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
.page th, .page td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--divider); }
.page th { color: var(--text); font-weight: 600; background: var(--surface); }
.table-scroll { overflow-x: auto; }

.card { background: var(--card); border: 1px solid var(--divider); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 1.2em; }
.card p:last-child { margin-bottom: 0; }

details { background: var(--card); border: 1px solid var(--divider); border-radius: var(--radius); margin: 0 0 12px; }
summary { cursor: pointer; padding: 16px 20px; color: var(--text); font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 20px 16px; }
details > div p:last-child { margin-bottom: 0; }

/* Dados da empresa que ainda precisam ser preenchidos antes de publicar */
.fill { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning); padding: 0 4px; border-radius: 4px; white-space: nowrap; }

/* Rodapé */
.site-footer { border-top: 1px solid var(--divider); padding: 28px 0 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

@media (max-width: 560px) {
  .nav { gap: 12px; font-size: 12px; }
  .brand .logo { height: 16px; }
  .hero { padding: 64px 0 48px; }
}
