:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --accent: #1e40af;
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-soft: #fff7ed;
  --border: #e2e8f0;
  --card: #f8fafc;
  --max: 760px;
  --max-wide: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 96px;
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

header.site .brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}

header.site nav a {
  margin-left: 16px;
  color: var(--muted);
  text-decoration: none;
}

header.site nav a:hover { color: var(--accent); }

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}

h3 {
  font-size: 18px;
  margin: 24px 0 8px;
}

p { margin: 0 0 16px; }

a { color: var(--accent); }

ul, ol { padding-left: 24px; margin: 0 0 16px; }
li { margin: 4px 0; }

code, kbd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 16px 16px 36px;
  margin-bottom: 32px;
  font-size: 14px;
}

.toc strong { display: block; margin-left: -20px; margin-bottom: 8px; }

.callout {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

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

th {
  background: var(--card);
  font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

footer.site a { color: var(--muted); margin: 0 8px; }

@media (max-width: 600px) {
  .wrap { padding: 32px 18px 64px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  header.site nav a { margin-left: 10px; }
}

/* ============================================================
   HOMEPAGE — vigi.live (institucional)
   ============================================================ */

body.home { background: var(--bg); }

header.site .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}

header.site .brand-logo img {
  height: 32px;
  width: auto;
  display: block;
}

header.site .brand-logo span {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background-color .15s ease, transform .05s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--card); }

/* Hero */
.hero {
  padding: 72px 24px 56px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  text-align: center;
}
.hero img.hero-logo {
  height: 84px;
  width: auto;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 48px;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--fg);
}
.hero .tagline {
  font-size: 20px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }
.section-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}
.section h2 {
  font-size: 28px;
  margin: 0 0 16px;
  text-align: center;
  letter-spacing: -0.015em;
}
.section .lede {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.55;
}

/* Card grid */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1000px;
  margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--fg);
}
.card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}
.card .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 15px;
}

/* Integrations strip */
.integrations {
  background: var(--card);
  text-align: center;
  padding: 48px 24px;
  border-bottom: 1px solid var(--border);
}
.integrations p { color: var(--muted); margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.integrations .plats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
}

/* Empresa box */
.empresa-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.empresa-box dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 20px;
  margin: 0;
  font-size: 15px;
}
.empresa-box dt {
  color: var(--muted);
  font-weight: 500;
}
.empresa-box dd { margin: 0; color: var(--fg); }

@media (max-width: 600px) {
  .empresa-box dl { grid-template-columns: 1fr; gap: 4px; }
  .empresa-box dt { margin-top: 8px; font-size: 13px; }
  .hero { padding: 48px 18px 40px; }
  .hero h1 { font-size: 34px; }
  .hero .tagline { font-size: 17px; }
  .hero img.hero-logo { height: 64px; }
  .section { padding: 48px 18px; }
  .section h2 { font-size: 23px; }
}

/* Footer institucional (mais rico que o das páginas legais) */
footer.site-foot {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 24px 32px;
}
footer.site-foot .foot-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}
footer.site-foot h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
footer.site-foot a { color: #cbd5e1; text-decoration: none; display: block; padding: 4px 0; font-size: 14px; }
footer.site-foot a:hover { color: #fff; }
footer.site-foot .foot-brand img { height: 36px; margin-bottom: 12px; }
footer.site-foot .foot-brand p { font-size: 13px; color: #94a3b8; line-height: 1.55; }
footer.site-foot .foot-bottom {
  max-width: var(--max-wide);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 720px) {
  footer.site-foot .foot-inner { grid-template-columns: 1fr; gap: 28px; }
}
