/* ═══════════════════════════════════════════════════
   FÓRMULA PRECISA — páginas internas
   Usado por /privacidade/, /termos/ e 404.html.
   A home (index.html) tem o CSS dela inline.
   ATENÇÃO: os tokens abaixo são os mesmos do :root de
   index.html — ao mudar a paleta, mudar nos dois.
   ═══════════════════════════════════════════════════ */

:root {
  --green-dark: #004042;
  --green-mid: #12665A;
  --green-light: #E8F5E9;
  /* Paleta extraída do logo oficial: #004042 (verde-petróleo), #3FA504 (verde-folha)
     e branco. --green-cta é fundo de botão com texto branco: 5.02:1, passa WCAG AA.
     O verde da marca é --green-accent e só aparece em foco, brilho e sombra, onde não
     precisa carregar texto (sobre branco ele dá 3.18:1 — reprova em AA para texto,
     mas passa o 3:1 do critério 1.4.11 de indicador de foco). */
  --green-cta: #15803D;
  --green-cta-hover: #116B33;
  --green-accent: #3FA504;
  --off-white: #FAFAF7;
  --text: #1C1C1C;
  --text-soft: #4A5568;
  --gold: #D4A948;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 16px;
  --lh-body: 1.65;
  --lh-tight: 1.5;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
/* 100% e não 16px: px trava o ajuste de tamanho de fonte do navegador (WCAG 1.4.4) */
html { scroll-behavior: smooth; font-size: 100% }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

/* Skip link — o header é sticky e vem antes do conteúdo em toda página */
.fp-skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--green-cta); color: #fff;
  padding: 12px 20px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.fp-skip:focus { top: 8px }

/* ── Header ───────────────────────────────────── */
.fp-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,64,66,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.fp-header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px;
}
.fp-header-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
}
.fp-header-back {
  color: rgba(255,255,255,.85); text-decoration: none;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 4px; /* alvo de toque de 44px */
  transition: color .2s;
}
.fp-header-back:hover { color: #fff }

/* ── Documento ────────────────────────────────── */
.fp-doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 72px }
@media (min-width: 768px) { .fp-doc { padding: 72px 20px 96px } }

.fp-doc-label {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--green-mid); margin-bottom: 12px;
}
.fp-doc h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700; line-height: 1.2; margin-bottom: 12px;
}
.fp-doc-meta {
  color: var(--text-soft); font-size: 14px;
  padding-bottom: 28px; margin-bottom: 32px;
  border-bottom: 1px solid #e2e8e2;
}

.fp-doc h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 700; line-height: 1.3;
  margin: 44px 0 14px; color: var(--green-dark);
  scroll-margin-top: 80px;
}
.fp-doc h3 {
  font-family: var(--font-body);
  font-size: 17px; font-weight: 700;
  margin: 28px 0 10px;
}
.fp-doc p { color: var(--text-soft); font-size: 16px; line-height: 1.75; margin-bottom: 16px }
.fp-doc strong { color: var(--text) }
.fp-doc ul, .fp-doc ol { color: var(--text-soft); font-size: 16px; line-height: 1.75; margin: 0 0 18px 22px }
/* Links dentro de lista/parágrafo mantêm o fluxo do texto; os de navegação
   (rodapé, 404) recebem alvo de 44px logo abaixo. */
.fp-doc li { margin-bottom: 9px }
.fp-doc li > strong { color: var(--text) }
.fp-doc a { color: var(--green-mid); font-weight: 500; text-decoration: underline; text-underline-offset: 2px }
.fp-doc a:hover { color: var(--green-dark) }
.fp-doc hr { border: none; border-top: 1px solid #e2e8e2; margin: 40px 0 }

/* Índice no topo do documento */
.fp-toc {
  background: #fff; border: 1px solid #e2e8e2; border-radius: var(--r-md);
  padding: 22px 24px; margin-bottom: 40px;
}
.fp-toc h2 { font-family: var(--font-body); font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--text) }
.fp-toc ol { margin: 0 0 0 20px; font-size: 15px; line-height: 1.6 }
.fp-toc li { margin-bottom: 5px }

/* Caixa de destaque — avisos que o leitor não pode perder */
.fp-callout {
  background: var(--green-light);
  border-left: 4px solid var(--green-mid);
  border-radius: var(--r-sm);
  padding: 18px 20px; margin: 24px 0;
}
.fp-callout p { margin-bottom: 0 }
.fp-callout p + p { margin-top: 12px }
.fp-callout.alerta { background: #FEF7E6; border-left-color: var(--gold) }

/* Tabelas (bases legais, retenção, histórico de versões) */
.fp-table-wrap { overflow-x: auto; margin: 20px 0 24px; -webkit-overflow-scrolling: touch }
.fp-doc table {
  width: 100%; min-width: 520px;
  border-collapse: collapse; font-size: 14.5px;
  background: #fff; border: 1px solid #e2e8e2; border-radius: 12px;
}
.fp-doc th, .fp-doc td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid #e8ebe8; vertical-align: top;
  line-height: 1.55;
}
.fp-doc th { background: var(--green-light); color: var(--green-dark); font-weight: 700; font-size: 13px }
.fp-doc tbody tr:last-child td { border-bottom: none }
.fp-doc td { color: var(--text-soft) }

/* Navegação entre os documentos legais */
.fp-doc-nav {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid #e2e8e2;
}
.fp-doc-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e2e8e2; border-radius: var(--r-sm);
  min-height: 44px; padding: 12px 18px; font-size: 14px; font-weight: 600;
  color: var(--green-dark); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.fp-doc-nav a:hover { border-color: var(--green-mid); transform: translateY(-2px); color: var(--green-dark) }

/* ── Página 404 ───────────────────────────────── */
.fp-404 { max-width: 620px; margin: 0 auto; padding: 96px 20px; text-align: center }
.fp-404-code {
  font-family: var(--font-display); font-size: clamp(64px, 14vw, 104px);
  font-weight: 700; line-height: 1; color: var(--green-dark); opacity: .18;
}
.fp-404 h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 700; margin: 8px 0 14px;
}
.fp-404 p { color: var(--text-soft); font-size: 17px; line-height: 1.65; margin-bottom: 28px }
.fp-404-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center }
/* Primário = WhatsApp (preenchido); secundário = voltar ao início (contornado).
   Antes era o contrário: o "secundário" verde vivo puxava mais olhar que o primário. */
.fp-404-actions a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  min-height: 44px; padding: 14px 26px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
/* translateY em vez de scale: escalar desloca o vizinho e borra o texto no meio da transição */
.fp-404-actions a:hover { transform: translateY(-2px) }
.fp-404-primary { background: var(--green-cta); color: #fff }
.fp-404-primary:hover { background: var(--green-cta-hover); box-shadow: 0 6px 20px rgba(63,165,4,.3) }
.fp-404-secondary { background: #fff; color: var(--green-dark); border-color: #cbd8cb }
.fp-404-secondary:hover { border-color: var(--green-mid) }
.fp-404-links { margin-top: 32px; font-size: 14px; color: var(--text-soft) }
.fp-404-links a {
  color: var(--green-mid); font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
}

/* ── Footer ───────────────────────────────────── */
/* Todos os tons do rodapé a partir de .82 de branco sobre #004042 (≈8,3:1).
   Antes, opacity empilhada sobre rgba derrubava o texto legal para ~3,6:1. */
.fp-footer { background: var(--green-dark); color: rgba(255,255,255,.82); padding: 48px 20px 24px }
.fp-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; text-align: center;
}
.fp-footer-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; color: #fff; font-weight: 600;
}
.fp-footer-logo svg { width: 24px; height: 24px; flex-shrink: 0 }
.fp-footer p { font-size: 13px; line-height: 1.6 }
.fp-footer a { color: rgba(255,255,255,.82) }
.fp-footer-legal {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0 12px; font-size: 13px; font-weight: 500;
}
.fp-footer-legal a {
  color: rgba(255,255,255,.82); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
}
.fp-footer-legal a:hover { color: #fff; text-decoration: underline }
.fp-footer-legal a[aria-current="page"] { color: #fff; text-decoration: underline }
/* p.fp-footer-rt para vencer a especificidade de `.fp-footer p` */
.fp-footer p.fp-footer-rt {
  font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.78);
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px; width: 100%; max-width: 620px;
}
.fp-footer p.fp-footer-copy { font-size: 12px; color: rgba(255,255,255,.78) }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important }
  /* o scroll suave é justamente o que causa enjoo — o bloco acima não o alcança */
  html { scroll-behavior: auto }
}
