/* ============================================================
   Santos & Bochnia Advogados — Design System
   base.css — tokens, reset, tipografia, componentes compartilhados
   Paleta extraída do logotipo oficial (PDF vetorial):
   navy #0D3557 · degradê monograma #519EAD → #77B9C9 → #9AD7E9
   ============================================================ */

:root {
  /* Cor */
  --navy: #0D3557;
  --navy-deep: #092A46;
  --ink: #16222F;
  --ink-soft: #45566A;
  --petrol: #2E7590;
  --teal: #77B9C9;
  --teal-light: #9AD7E9;
  --ice: #F5F8FA;
  --paper: #FDFEFE;
  --hairline: #DCE6EC;
  --wa: #25D366;
  --wa-ink: #06281A;

  /* Tipografia */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Segoe UI", Arial, sans-serif;

  /* Escala fluida */
  --fs-hero: clamp(2.6rem, 6.4vw, 4.6rem);
  --fs-h2: clamp(2rem, 4.2vw, 3.1rem);
  --fs-h3: clamp(1.35rem, 2.2vw, 1.7rem);
  --fs-body: clamp(1rem, 0.4vw + 0.95rem, 1.125rem);
  --fs-small: 0.875rem;

  /* Ritmo */
  --sect: clamp(4.5rem, 9vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 1200px;

  /* Sombra / raio */
  --r-card: 14px;
  --shadow-1: 0 1px 2px rgba(13, 53, 87, .06), 0 8px 24px rgba(13, 53, 87, .07);
  --shadow-2: 0 2px 6px rgba(13, 53, 87, .10), 0 18px 48px rgba(13, 53, 87, .14);

  --ease-out: cubic-bezier(.22, .8, .32, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--ice);
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--navy); text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--teal); color: var(--navy); }

:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 3px; }

/* ---------- Utilitários ---------- */
.container { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: var(--sect); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Eyebrow — rótulo de seção, tracking largo */
.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--petrol); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: var(--teal); flex: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.9rem; border-radius: 999px;
  font-weight: 600; font-size: 1.02rem; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-wa {
  background: var(--wa); color: var(--wa-ink);
  box-shadow: 0 2px 8px rgba(18, 140, 78, .28), 0 10px 28px rgba(18, 140, 78, .22);
}
.btn-wa:hover { background: #2BE374; color: var(--wa-ink); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(18,140,78,.32), 0 16px 40px rgba(18,140,78,.28); }
.btn-wa svg { width: 22px; height: 22px; flex: none; }

.btn-ghost {
  background: transparent; color: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

.btn-ghost--light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75); }
.btn-ghost--light:hover { background: #fff; color: var(--navy); }

.btn--lg { min-height: 60px; padding: 1.05rem 2.4rem; font-size: 1.12rem; }

/* ---------- Header compartilhado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: color-mix(in srgb, var(--ice) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); background: color-mix(in srgb, var(--ice) 94%, transparent); }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 92px; transition: min-height .3s var(--ease-out);
}
.site-header.is-scrolled .bar { min-height: 74px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 68px; width: auto; transition: height .3s var(--ease-out); }
.site-header.is-scrolled .brand img { height: 54px; }

/* ---------- Footer compartilhado ---------- */
.site-footer { background: var(--navy); color: #C9DBE6; font-size: var(--fs-small); }
.site-footer a { color: var(--teal-light); }
.site-footer a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 1.4rem; text-align: center; line-height: 1.7;
  color: #9DB6C6;
}

/* ---------- WhatsApp flutuante (desktop + mobile institucional) ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--wa); color: var(--wa-ink);
  box-shadow: 0 4px 14px rgba(18, 140, 78, .35);
  transition: transform .25s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08); color: var(--wa-ink); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float .pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); opacity: 0;
  animation: wa-pulse 3.5s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ---------- Barra sticky mobile (LPs) ---------- */
.wa-bar {
  position: fixed; inset: auto 0 0 0; z-index: 95;
  display: none; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--hairline);
}
.wa-bar .btn { width: 100%; }

/* ---------- Reveal (ativado por main.js) ---------- */
.rv { opacity: 0; transform: translateY(26px); }
.rv.is-in, .no-motion .rv { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.no-js .rv { opacity: 1; transform: none; }

/* ---------- FAQ (details nativo) ---------- */
.faq details {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-card);
  padding: 0; margin-bottom: .8rem; overflow: hidden;
  transition: box-shadow .25s;
}
.faq details[open] { box-shadow: var(--shadow-1); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--navy); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--serif); font-size: 1.6rem; line-height: 1;
  color: var(--petrol); transition: transform .3s var(--ease-out); flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.4rem 1.25rem; color: var(--ink-soft); }

/* ---------- Contadores ---------- */
.stat { text-align: left; }
.stat .num {
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1;
  font-variant-numeric: lining-nums;
}
.stat .num .sign { color: var(--petrol); }
.stat .label { margin-top: .45rem; font-size: var(--fs-small); letter-spacing: .04em; color: var(--ink-soft); }

/* ---------- Acessibilidade / preferências ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .rv { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .wa-bar.on-mobile { display: block; }
  .wa-bar.on-mobile ~ .site-footer, body.has-wa-bar .site-footer { padding-bottom: 92px; }
}
