/* ============================================================
   Portal RI — tokens e componentes compartilhados
   (nav, botões, rodapé, aviso de cookies, tipografia base)
   Usado por index.html, termos-de-uso.html e politica-de-privacidade.html
   ============================================================ */

:root {
  --bg: #F2F4F5;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --text: #111827;
  --text-muted: #5B6472;
  --border: #D1D5DB;
  --accent: #00AEAA;
  --accent-strong: #00908C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(0,174,170,0.10);
  --accent-2: #10B981;
  --accent-2-dim: rgba(16,185,129,0.16);
  --shadow: 0 1px 2px rgba(17,24,39,0.04), 0 12px 32px -16px rgba(17,24,39,0.16);
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220;
    --surface: #111827;
    --surface-2: #0E1626;
    --text: #E5E7EB;
    --text-muted: #97A1B0;
    --border: #2B3444;
    --accent: #1DC9C4;
    --accent-strong: #3EDAD5;
    --accent-ink: #06201F;
    --accent-soft: rgba(29,201,196,0.14);
    --accent-2: #34D399;
    --accent-2-dim: rgba(52,211,153,0.18);
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 20px 48px -20px rgba(0,0,0,0.55);
  }
}
:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111827;
  --surface-2: #0E1626;
  --text: #E5E7EB;
  --text-muted: #97A1B0;
  --border: #2B3444;
  --accent: #1DC9C4;
  --accent-strong: #3EDAD5;
  --accent-ink: #06201F;
  --accent-soft: rgba(29,201,196,0.14);
  --accent-2: #34D399;
  --accent-2-dim: rgba(52,211,153,0.18);
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 20px 48px -20px rgba(0,0,0,0.55);
}
:root[data-theme="light"] {
  --bg: #F2F4F5;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --text: #111827;
  --text-muted: #5B6472;
  --border: #D1D5DB;
  --accent: #00AEAA;
  --accent-strong: #00908C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(0,174,170,0.10);
  --accent-2: #10B981;
  --accent-2-dim: rgba(16,185,129,0.16);
  --shadow: 0 1px 2px rgba(17,24,39,0.04), 0 12px 32px -16px rgba(17,24,39,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 {
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-mark {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.brand-mark.sm { height: 26px; max-width: 170px; }
.brand-mark.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .brand-mark.logo-light { display: none; }
  .brand-mark.logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-mark.logo-light { display: none; }
:root[data-theme="dark"] .brand-mark.logo-dark { display: block; }
:root[data-theme="light"] .brand-mark.logo-light { display: block; }
:root[data-theme="light"] .brand-mark.logo-dark { display: none; }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-signin {
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  padding: 9px 4px;
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-signin { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-s);
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Section heads (also used on legal pages) ---------- */
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-top: 14px; }
.section-head p { color: var(--text-muted); font-size: 16.5px; margin-top: 14px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
}
.foot-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--text-muted); background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.foot-links a:hover, .foot-links button:hover { color: var(--text); }
.foot-links button { text-decoration: none; color: var(--text-muted); background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.foot-links button:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Aviso de cookies (LGPD) ---------- */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 16px;
  transform: translateY(130%);
  transition: transform 0.4s ease;
}
.cookie-consent.in { transform: translateY(0); }
.cookie-consent-inner {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-consent-inner p {
  flex: 1 1 380px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.cookie-consent-inner p a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.cookie-consent-inner p a:hover { text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Legal pages (Termos / Privacidade) ---------- */
.legal-hero { padding: 56px 0 8px; }
.legal-hero .eyebrow { display: block; margin-bottom: 14px; }
.legal-hero h1 { font-size: clamp(28px, 4vw, 42px); }
.legal-hero .updated { color: var(--text-muted); font-size: 14px; margin-top: 14px; }
.legal-notice {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-m);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text);
  margin: 28px 0 8px;
}
.legal-notice strong { color: var(--accent-strong); }
.legal-body { padding: 32px 0 96px; max-width: 760px; }
.legal-body section { padding: 0; margin-bottom: 36px; }
.legal-body h2 {
  font-size: 20px;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.legal-body section:first-of-type h2 { border-top: none; padding-top: 0; }
.legal-body h3 { font-size: 15.5px; font-weight: 700; margin: 18px 0 8px; }
.legal-body p { color: var(--text-muted); font-size: 15px; margin-bottom: 12px; }
.legal-body ul, .legal-body ol { color: var(--text-muted); font-size: 15px; padding-left: 22px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.legal-body a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--text); }
.legal-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  padding: 20px 22px;
  margin-bottom: 40px;
}
.legal-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 12px; border: none; padding: 0; }
.legal-toc ol { column-count: 2; column-gap: 24px; padding-left: 18px; font-size: 14px; }
@media (max-width: 640px) { .legal-toc ol { column-count: 1; } }
.legal-toc a { color: var(--text); font-weight: 500; }
.legal-toc a:hover { color: var(--accent-strong); }
