/* =============================================================
   site.css — sistema visual compartilhado das páginas internas
   (serviços, legais, portfólio, cases, checklist, blog, obrigado, 404).
   Mesma identidade da home (index.css): tokens, fonte, cabeçalho,
   rodapé, botões e WhatsApp flutuante.

   As páginas antigas usam outros nomes de variável (--bg-primary,
   --muted, --grad...). Eles ficam mapeados aqui para a paleta nova,
   então os estilos próprios de cada página herdam as cores novas.
   ============================================================= */

/* ── FONTES ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/assets/fonts/plus-jakarta-sans-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'Jakarta Fallback';
  src: local('Arial');
  size-adjust: 106%;
  ascent-override: 98%;
  descent-override: 21%;
  line-gap-override: 0%;
}

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:            #0a0e15;
  --bg-alt:        #0e131c;
  --surface:       #121925;
  --surface-2:     #18202d;
  --border:        rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text:          #f1f5f9;
  --text-2:        #a7b4c6;
  --text-3:        #8b9ab0;
  --accent:        #3b82f6;
  --accent-text:   #7db2ff;
  --accent-soft:   rgba(59, 130, 246, 0.12);
  --btn:           #1d4ed8;
  --btn-hover:     #1e40af;
  --whatsapp:      #0f7a3d;
  --whatsapp-hover:#0b6532;
  --star:          #fbbf24;

  --font-display:  'Plus Jakarta Sans', 'Jakarta Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body:     system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm:     10px;
  --radius:        16px;
  --radius-lg:     20px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);

  /* Aliases dos nomes antigos (pages.css / estilos inline) */
  --bg-primary:      var(--bg);
  --bg-secondary:    var(--bg-alt);
  --bg2:             var(--bg-alt);
  --bg-card:         var(--surface);
  --bg-card-hover:   var(--surface-2);
  --surface2:        var(--surface-2);
  --accent-light:    var(--accent-text);
  --accent-2:        var(--accent-text);
  --accent2:         var(--accent-text);
  --accent-glow:     rgba(59, 130, 246, 0.25);
  --text-primary:    var(--text);
  --text-secondary:  var(--text-2);
  --text-muted:      var(--text-3);
  --muted:           var(--text-2);
  --dim:             var(--text-3);
  --border-hover:    var(--border-strong);
  --border-h:        var(--border-strong);
  --gradient-accent: linear-gradient(var(--btn), var(--btn));
  --gradient-card:   linear-gradient(var(--surface), var(--surface));
  --grad:            linear-gradient(var(--btn), var(--btn));
  --font-main:       var(--font-body);
}

/* ── BASE ───────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.012em;
  word-spacing: 0.08em;
  text-wrap: balance;
}

::selection { background: var(--btn); color: #fff; }

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

/* ── CABEÇALHO ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 14, 21, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo,
.site-footer .logo,
.logo--center {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--btn);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
  word-spacing: 0.08em;
  color: var(--text);
  white-space: nowrap;
}

.logo-sub { font-weight: 500; color: var(--text-2); }

.site-nav { display: flex; align-items: center; gap: 28px; }

.site-nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.site-header-actions { display: flex; align-items: center; gap: 12px; }

.site-header .lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-2);
  cursor: pointer;
}

.site-header .lang-toggle .lang-sep { color: var(--text-3); font-weight: 400; }
.site-header .lang-toggle.lang-en [data-lang-label-en],
.site-header .lang-toggle.lang-pt [data-lang-label-pt] { color: var(--accent-text); }
.site-header .lang-toggle:hover { border-color: var(--accent); }

/* ── BOTÕES ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover { text-decoration: none; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: 0.9rem; }
.btn-lg { padding: 15px 26px; min-height: 54px; font-size: 1rem; }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-hover); color: #fff; }

/* ── RODAPÉ ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 0;
  padding: 40px 0 32px;
  background: #070a10;
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.site-footer-copy {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-3);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.site-footer-links a {
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-links a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* ── WHATSAPP FLUTUANTE ─────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1ebe5d;
  color: #fff;
  font-size: 0;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  animation: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.whatsapp-float:hover { transform: scale(1.06); background: #18a851; animation: none; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5); }

.whatsapp-float .wa-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.whatsapp-float:hover .wa-tooltip { opacity: 1; }

/* ── COOKIE BANNER ──────────────────────────────────────────── */
/* o atributo hidden do HTML precisa vencer o display: flex abaixo (o JS mostra com style.display),
   senão o aviso reaparece a cada visita mesmo depois de respondido */
.cookie-banner[hidden] { display: none; }

.cookie-banner {
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
}

.cookie-text { color: var(--text-2); }
.cookie-text a { color: var(--accent-text); }
.cookie-btn-accept { background: var(--btn); color: #fff; border: 1px solid var(--btn); border-radius: var(--radius-sm); min-height: 40px; }
.cookie-btn-decline { color: var(--text-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); min-height: 40px; }

/* ── HARMONIZAÇÃO DOS ESTILOS ANTIGOS ───────────────────────── */
/* Etiquetas em pílula viram texto de apoio (eyebrow), como na home */
.section-tag,
.post-tag,
.page-tag,
.case-badge,
.checklist-badge {
  display: inline-block !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--accent-text) !important;
}

.section-tag::before,
.post-tag::before,
.page-tag::before,
.case-badge::before,
.checklist-badge::before { display: none !important; }

/* ── RESPONSIVO ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; }
}

@media (max-width: 480px) {
  .logo-sub { display: none; }
  .site-header-actions .btn-sm { padding: 8px 12px; font-size: 0.85rem; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float .wa-tooltip { display: none; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Links dentro de texto: sublinhados (não dependem só da cor) */
p a:not(.btn):not([class*="btn"]),
li a:not(.btn):not([class*="btn"]),
.faq-a a,
.cookie-text a { text-decoration: underline; text-underline-offset: 3px; }
