/* ==========================================================================
   SITE — Folhinha Forense para as páginas geradas pelo servidor
   (seoEngine.renderPage: funcionalidades, institucionais, blog, SEO).
   Mesma identidade do app e da landing (DESIGN.md).
   ========================================================================== */

:root {
  --rp-ink: #13233f;
  --rp-primary: #1e3a6b;
  --rp-primary-hover: #16305a;
  --rp-blue: #2a62c9;
  --rp-ground: #f6f7f9;
  --rp-surface: #ffffff;
  --rp-line: #e2e5ea;
  --rp-line-strong: #c9d0da;
  --rp-text: #14171c;
  --rp-muted: #4f5866;
  --rp-on-ink-muted: #c9d3e6;
  --rp-tint: #e6ecf6;
  --rp-red: #c8261f;
  --rp-amber: #9a6212;
  --rp-green: #1f7a4d;
  --rp-green-tint: #e6f3ec;
  --rp-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* variáveis antigas usadas nos estilos inline das páginas */
  --bg-dark: var(--rp-ground);
  --bg-card: var(--rp-surface);
  --bg-card-hover: var(--rp-surface);
  --primary: var(--rp-primary);
  --primary-hover: var(--rp-primary-hover);
  --accent: var(--rp-blue);
  --text-main: var(--rp-text);
  --text-muted: var(--rp-muted);
  --border-color: var(--rp-line);
  --gradient-brand: var(--rp-primary);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--rp-font);
  background: var(--rp-ground);
  color: var(--rp-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--rp-font); letter-spacing: -0.015em; color: var(--rp-text); }
a { color: var(--rp-primary); }
::selection { background: var(--rp-tint); color: var(--rp-ink); }
:focus-visible { outline: 2px solid var(--rp-blue); outline-offset: 2px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--rp-surface);
  border-bottom: 1px solid var(--rp-line);
  padding: 14px 24px;
}
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--rp-text); font-weight: 700; font-size: 18px; }
.logo img { box-shadow: none !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; }
.logo-text { color: var(--rp-text); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-link { color: var(--rp-muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-link:hover { color: var(--rp-text); }
.btn-header {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--rp-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.btn-header:hover { background: var(--rp-primary); }
.hamburger { display: none; background: none; border: 0; color: var(--rp-text); font-size: 28px; padding: 8px; cursor: pointer; }
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 88px 24px 32px;
  background: var(--rp-surface);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--rp-text); font-size: 18px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.mobile-menu a:hover { color: var(--rp-primary); }
.mobile-menu .btn-header { color: #fff; font-size: 16px; padding: 12px 20px; }

/* ---------- Trilha e chamada rápida ---------- */
.breadcrumbs-container { background: var(--rp-surface); border-bottom: 1px solid var(--rp-line); padding: 10px 24px; }
.breadcrumbs-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.breadcrumb-item { color: var(--rp-muted); text-decoration: none; }
.breadcrumb-item:hover { color: var(--rp-text); text-decoration: underline; }
.breadcrumb-item.active { color: var(--rp-text); font-weight: 600; }
.breadcrumb-separator { color: var(--rp-muted); }
.hero-quick-cta { max-width: 1200px; margin: 20px auto 0; padding: 0 24px; }
.hero-quick-cta a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--rp-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}
.hero-quick-cta a:hover { background: var(--rp-primary-hover); }

/* ---------- Conteúdo ---------- */
.page-main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; }
.page-hero {
  margin: 0 -24px 40px;
  padding: 56px 40px 52px;
  background: var(--rp-ink);
  border-radius: 10px;
  text-align: left;
  max-width: none;
}
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: transparent;
  color: var(--rp-on-ink-muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: #fff;
  background: none;
  -webkit-text-fill-color: currentColor;
  margin-bottom: 16px;
  max-width: 900px;
}
.hero-subtitle { font-size: 18px; line-height: 1.6; color: var(--rp-on-ink-muted); max-width: 760px; margin: 0; }
.page-hero a:not([class]) { color: #fff; }

.content-body {
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  padding: 40px;
}
.content-body h2 { font-size: 24px; font-weight: 700; color: var(--rp-text); margin: 36px 0 12px; }
.content-body h2:first-child { margin-top: 0; }
.content-body h3 { color: var(--rp-text); }
.content-body p { font-size: 16px; color: var(--rp-text); margin-bottom: 16px; line-height: 1.7; max-width: 75ch; }
.content-body ul, .content-body ol { margin: 0 0 20px 24px; color: var(--rp-text); }
.content-body li { margin-bottom: 8px; font-size: 15px; }
.content-body strong { color: var(--rp-text); }
.content-body a { color: var(--rp-primary); text-underline-offset: 3px; }
.content-body table { border-color: var(--rp-line); font-variant-numeric: tabular-nums; }
.content-body th { background: var(--rp-ground); color: var(--rp-text); text-align: left; }
.content-body td, .content-body th { border-bottom: 1px solid var(--rp-line); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  margin: 40px 0;
  background: var(--rp-surface);
  border-top: 1px solid var(--rp-line);
  border-left: 1px solid var(--rp-line);
  border-radius: 10px;
  overflow: hidden;
}
.feature-card {
  background: var(--rp-surface);
  border: 0;
  border-right: 1px solid var(--rp-line);
  border-bottom: 1px solid var(--rp-line);
  border-radius: 0;
  padding: 28px;
  box-shadow: none;
  color: var(--rp-text);
}
.feature-card:hover { transform: none; box-shadow: none; background: var(--rp-surface); }
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rp-tint);
  color: var(--rp-primary);
  font-size: 20px;
  margin-bottom: 14px;
}
.feature-card h2, .feature-card h3 { font-size: 18px; font-weight: 650; color: var(--rp-text); margin-bottom: 8px; padding: 0; }
.feature-card p { font-size: 14px; color: var(--rp-muted); margin: 0; line-height: 1.6; }
.feature-card a { color: var(--rp-primary) !important; }

/* ---------- Dúvidas ---------- */
.faq-section { margin: 64px 0; }
.section-header { text-align: left; margin-bottom: 24px; }
.section-badge { display: none; }
.section-title { font-size: clamp(26px, 3vw, 32px); font-weight: 700; color: var(--rp-text); margin: 0 0 8px; }
.section-subtitle { color: var(--rp-muted); font-size: 16px; }
.faq-grid { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.faq-item { background: var(--rp-surface); border: 1px solid var(--rp-line); border-radius: 8px; }
.faq-item[open] { border-color: var(--rp-line-strong); }
.faq-question {
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--rp-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-icon { transition: transform .2s ease; color: var(--rp-muted); }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--rp-text); }
.faq-answer { padding: 0 22px 18px; color: var(--rp-muted); font-size: 15px; line-height: 1.7; }

/* ---------- Links relacionados ---------- */
.contextual-section {
  margin: 64px 0 40px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.contextual-heading { font-size: 22px; font-weight: 700; color: var(--rp-text); margin-bottom: 16px; }
.contextual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rp-line);
  border-left: 1px solid var(--rp-line);
  border-radius: 10px;
  overflow: hidden;
}
.contextual-card {
  background: var(--rp-surface);
  border: 0;
  border-right: 1px solid var(--rp-line);
  border-bottom: 1px solid var(--rp-line);
  border-radius: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--rp-text);
}
.contextual-card:hover { background: var(--rp-ground); transform: none; box-shadow: none; }
.card-tag { font-size: 12px; font-weight: 600; color: var(--rp-muted); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.card-title { font-size: 16px; font-weight: 650; color: var(--rp-text); margin-bottom: 6px; }
.card-desc { font-size: 14px; color: var(--rp-muted); flex: 1; margin-bottom: 12px; }
.card-link-text { font-size: 14px; font-weight: 600; color: var(--rp-primary); display: flex; align-items: center; gap: 6px; }

/* ---------- Blocos auxiliares ---------- */
.lgpd-badge-box {
  background: var(--rp-green-tint);
  border: 1px solid #c6e3d2;
  color: #14532d;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 32px 0;
  font-size: 14px;
}
.lgpd-note { background: var(--rp-green-tint) !important; border-color: #c6e3d2 !important; color: #14532d !important; }
.lgpd-note a { color: #14532d !important; }
.lgpd-note svg, .lgpd-badge-box svg { stroke: var(--rp-green); }
.editorial-author-box, .informative-disclaimer-box, .dev-support-banner {
  background: var(--rp-surface) !important;
  border: 1px solid var(--rp-line) !important;
  border-radius: 10px !important;
  color: var(--rp-muted) !important;
}
.editorial-author-box *, .dev-support-banner * { color: inherit; }
.editorial-author-box strong, .dev-support-banner strong, .editorial-author-box h3, .dev-support-banner h3 { color: var(--rp-text) !important; }

/* ---------- Chamada final ---------- */
.cta-banner {
  background: var(--rp-ink);
  border-radius: 10px;
  padding: 48px 40px;
  margin: 64px 0 20px;
  text-align: left;
  box-shadow: none;
  color: #fff;
}
.cta-banner h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: #fff; margin-bottom: 10px; }
.cta-banner p { font-size: 16px; color: var(--rp-on-ink-muted); opacity: 1; max-width: 640px; margin: 0 0 24px; }
.btn-cta-large {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 6px;
  background: #fff;
  color: var(--rp-ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}
.btn-cta-large:hover { background: var(--rp-tint); transform: none; box-shadow: none; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--rp-surface); border-top: 1px solid var(--rp-line); padding: 40px 24px; text-align: center; color: var(--rp-muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; max-width: 1000px; margin: 0 auto 18px; }
.footer-links a { color: var(--rp-muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--rp-text); text-decoration: underline; }

/* ---------- Tutoriais em vídeo (tutoriais.js) ---------- */
.tut-section { background: var(--rp-surface) !important; border: 1px solid var(--rp-line) !important; border-radius: 10px !important; }
.tut-kicker { display: none; }
.tut-preview { color: var(--rp-amber) !important; }
.tut-card { background: var(--rp-surface) !important; border-radius: 8px !important; }
.tut-card:hover { transform: none !important; border-color: var(--rp-line-strong) !important; }
.tut-body strong { font-family: var(--rp-font) !important; color: var(--rp-text); }
.tut-body em { color: var(--rp-primary) !important; }
.yt-learn { background: var(--rp-surface) !important; border-color: var(--rp-line) !important; color: var(--rp-text) !important; }
.yt-learn:hover { background: var(--rp-ground) !important; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}
@media (max-width: 768px) {
  .page-main { padding: 20px 16px 64px; }
  .page-hero { margin: 0 -16px 28px; padding: 36px 20px; border-radius: 0; }
  .content-body { padding: 24px 18px; }
  .cta-banner { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Ajustes da conferência no navegador */
.nav-link, .btn-header { white-space: nowrap; }
.logo { white-space: nowrap; }
.page-hero .btn-cta-large { margin-top: 24px; }
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}
