/* ==========================================================================
   Vease · Base compartilhada — www + /juridico/
   Fonte única de: fontes, tokens, base tipográfica, botões, nav e footer.
   Cada site linka este arquivo ANTES do seu styles.css próprio.
   Tokens: paper #F5F4F1 · ink #0A1114 · accent #FF3C00 · Satoshi + Inter
   ========================================================================== */

/* Fontes self-hosted (../assets/fonts resolve para /assets/fonts a partir de /css/) */
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/satoshi-700.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 900; font-display: swap; src: url('../assets/fonts/satoshi-900.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-var.woff2') format('woff2'); }

:root {
  --paper: #F5F4F1;
  --paper-tint: #EDEBE6;
  --ink: #0A1114;
  --ink-soft: #22313A;
  --ink-2: #0C1B21;         /* dark sections, teal undertone */
  --accent: #FF3C00;
  --accent-soft: #FF6B3D;
  --accent-strong: #C22E00;  /* texto accent sobre fundos claros: ≥4.5:1 (AA) */
  --line: rgba(10, 17, 20, .14);
  --line-light: rgba(245, 244, 241, .16);
  --muted: rgba(10, 17, 20, .64);
  --muted-light: rgba(245, 244, 241, .68);
  --f-display: 'Satoshi', 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; letter-spacing: -0.015em; }

p { margin: 0; }

a { color: inherit; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.vprogress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* tinta sobre laranja (5.4:1, AA) — mesmo padrão dos chips ativos do Jurídico */
.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid:hover { background: var(--accent-soft); }

/* background explícito: em <button> o padrão do navegador é opaco */
.btn-ghost { background: transparent; border-color: var(--line-light); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 244, 241, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo img { width: 104px; height: auto; }

.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu > a {
  text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink);
  opacity: .82; transition: opacity .15s ease;
  border-bottom: 2px solid transparent;
}
.nav-menu > a:hover { opacity: 1; }
.nav-menu > a.active { opacity: 1; border-bottom-color: var(--accent); }
.nav-cta { opacity: 1 !important; padding: 10px 20px; font-size: 15px; }
.nav-menu > a.nav-cta { font-weight: 700; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Nav sobre hero escuro (.nav-overhero): transparente flutuando sobre o hero,
   fundindo para papel ao longo de 200px de scroll, com véu de tinta garantindo
   legibilidade no topo. Precisa ser fixed para sobrepor o hero; cada site
   compensa o padding do próprio hero no seu styles.css. Sem suporte a
   scroll-timeline, mantém a barra sólida sticky. Páginas sem hero escuro usam
   .nav pura e não são afetadas. */
@keyframes navFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes navFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes navInkIn { from { color: var(--paper); } to { color: var(--ink); } }

.nav-overhero .logo-light { display: none; }

@supports (animation-timeline: scroll()) {
  .nav-overhero {
    position: fixed; top: 0; left: 0; right: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 0;
    animation: navInkIn linear both;
    animation-timeline: scroll();
    animation-range: 0px 200px;
  }
  .nav-overhero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(245, 244, 241, .88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    animation: navFadeIn linear both;
    animation-timeline: scroll();
    animation-range: 0px 200px;
  }
  .nav-overhero::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -28px;
    z-index: -2; pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 17, 20, .5), rgba(10, 17, 20, 0));
    animation: navFadeOut linear both;
    animation-timeline: scroll();
    animation-range: 0px 200px;
  }
  .nav-overhero .nav-logo { position: relative; display: inline-block; }
  .nav-overhero .logo-light {
    display: block; position: absolute; left: 0; top: 0;
    animation: navFadeOut linear both;
    animation-timeline: scroll();
    animation-range: 0px 200px;
  }
  .nav-overhero .logo-dark {
    animation: navFadeIn linear both;
    animation-timeline: scroll();
    animation-range: 0px 200px;
  }
  .nav-overhero .nav-toggle { color: inherit; }
  .nav-overhero .nav-toggle span { background: currentColor; }
  @media (min-width: 901px) {
    /* O CTA fica de fora da herança: pílula accent exige texto tinta (AA) em
       qualquer progresso do scroll — só os links de texto acompanham a nav. */
    .nav-overhero .nav-menu > a:not(.nav-cta) { color: inherit; }
  }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 72px 0 36px; }
/* Blurb à esquerda, colunas como bloco à direita */
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: start; }
.footer-brand img { width: 104px; margin-bottom: 20px; }
.footer-brand p { font-size: 14px; color: var(--muted-light); max-width: 380px; }

.footer-cols { display: grid; grid-template-columns: auto auto; gap: 72px; justify-content: end; }
.footer-heading { font-family: var(--f-display); font-weight: 700; font-size: 15px; margin: 0 0 16px; letter-spacing: normal; }
.footer-cols a { display: block; text-decoration: none; font-size: 14px; color: var(--muted-light); padding: 5px 0; }
.footer-cols a:hover { color: var(--paper); }

.footer-bottom {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line-light);
  display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between;
  font-size: 13px; color: var(--muted-light);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a { color: var(--muted-light); text-decoration: none; }
.footer-legal a:hover { color: var(--paper); }

/* ---------- Responsivo (chrome compartilhado) ---------- */
@media (max-width: 1024px) {
  .nav-logo { flex: none; }
  .nav-cta { white-space: nowrap; }
  .footer-top { grid-template-columns: 1fr; gap: 48px; }
}

/* Menu mobile ativa em 900px: entre 721 e ~935px o menu desktop não cabe */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu > a { padding: 12px 0; font-size: 17px; border-bottom: 0; }
  .nav-cta { margin-top: 12px; justify-content: center; }
}

@media (max-width: 720px) {
  .footer-cols { grid-template-columns: auto auto; justify-content: start; gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- Aviso de cookies (Consent Mode v2 · LGPD) ----------
   Artefato flutuante sobre qualquer página: superfície de tinta, sombra com
   offset real (sem halo), botões do sistema. Injetado por /js/consent.js. */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
  display: flex; justify-content: center; pointer-events: none;
}
/* o display:flex autoral venceria o [hidden] do user-agent (mesmo caso do .mobile-cta) */
.cookie-bar[hidden] { display: none !important; }
.cookie-box {
  pointer-events: auto;
  max-width: 680px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-light); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  padding: 20px 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
}
.cookie-text { flex: 1 1 300px; margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted-light); }
.cookie-text a { color: var(--paper); }
.cookie-actions { display: flex; gap: 10px; margin-left: auto; }
.cookie-actions .btn { font-size: 14px; padding: 10px 20px; }

/* "Preferências de cookies" no rodapé: botão com cara de link */
.footer-legal button {
  font: inherit; color: var(--muted-light);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.footer-legal button:hover { color: var(--paper); }
