:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #566070;
  --border: #e1e5eb;
  --accent: #2748d8;
  --accent-contrast: #ffffff;
  --radius: 14px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1218;
    --surface: #161c25;
    --text: #e8ecf2;
    --muted: #9aa5b5;
    --border: #263040;
    --accent: #8aaaff;
    --accent-contrast: #0e1218;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1218;
  --surface: #161c25;
  --text: #e8ecf2;
  --muted: #9aa5b5;
  --border: #263040;
  --accent: #8aaaff;
  --accent-contrast: #0e1218;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: .5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; border-radius: 8px; }

/* Cabeçalho */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -.01em;
}
.brand svg { width: 2rem; height: 2rem; flex: none; }
.nav { display: flex; gap: 1.25rem; font-size: .975rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; }
.eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; margin: 0 0 2rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

/* Seções */
section { padding: 3rem 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: 1.65rem; letter-spacing: -.015em; margin: 0 0 1.5rem; }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

.facts { display: grid; gap: .5rem 2rem; grid-template-columns: max-content 1fr; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* Rodapé */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: .925rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 1.25rem; }

/* Páginas legais */
.doc { padding: 3rem 0 4rem; max-width: 46rem; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); max-width: none; }
.doc h2 { font-size: 1.3rem; margin: 2.25rem 0 .75rem; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: .4rem; }
.meta { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: .975rem; margin: 1rem 0; }
.doc th, .doc td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }

@media (max-width: 36rem) {
  .hero { padding: 3rem 0 2.5rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: .75rem; }
  .nav { gap: .9rem; }
  .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; }
  .doc thead { display: none; }
  .doc td { border-bottom: 0; padding: .15rem 0; }
  .doc tr { border-bottom: 1px solid var(--border); padding: .6rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
