/* Base, botões e cabeçalho */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--action); }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.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; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--action); font-weight: 700; box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-small); font-weight: 700; letter-spacing: .02em;
  color: var(--action);
}
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn .btn__arrow { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--action); color: #fff; box-shadow: 0 1px 2px rgba(13, 116, 180, .25), 0 6px 16px -6px rgba(13, 116, 180, .45); }
.btn--primary:hover { background: var(--action-hover); }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--action); color: var(--action-hover); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .9375rem; border-radius: 10px; }
.btn--lg { min-height: 54px; padding: 0 26px; }
.btn--block { width: 100%; }

.link-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; text-decoration: none; color: var(--action);
  padding-block: 6px;
}
.link-cta .icon { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.link-cta:hover { color: var(--action-hover); text-decoration: underline; text-underline-offset: 4px; }
.link-cta:hover .icon { transform: translateX(3px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); }
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 20px -14px rgba(19, 43, 58, .35); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; flex: none; border-radius: 6px; }
.brand__logo { height: 33px; width: auto; }

/* Logo com animação no hover (cabeçalho e rodapé). O PNG original não é alterado:
   o brilho é um pseudo-elemento recortado pelo próprio formato da logo (mask). */
.logo-fx { position: relative; display: inline-flex; flex: none; border-radius: 6px; --shine: rgba(255, 255, 255, .95); --glow: rgba(13, 116, 180, .28); }
.logo-fx img { transition: transform 450ms var(--ease), filter 450ms var(--ease); }
.logo-fx::before, .logo-fx::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, var(--shine) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  -webkit-mask: var(--logo-mask) center / contain no-repeat; mask: var(--logo-mask) center / contain no-repeat;
}
.logo-fx--cor { --logo-mask: url(../img/logo-cor-300.webp?v=2); }
.logo-fx--bco { --logo-mask: url(../img/logo-bco-300.webp?v=2); --shine: rgba(26, 159, 235, 1); --glow: rgba(26, 159, 235, .55); }
@media (prefers-reduced-motion: no-preference) {
  .logo-fx:hover img, .logo-fx:focus-visible img { transform: translateY(-2px) scale(1.035); filter: drop-shadow(0 6px 14px var(--glow)); }
  .logo-fx:hover::after, .logo-fx:focus-visible::after { animation: logo-shine 950ms var(--ease); }
}
@keyframes logo-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: 4px; }
.site-nav__list a {
  display: block; padding: 10px 14px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: .9688rem; text-decoration: none;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.site-nav__list a:hover { color: var(--ink); background: var(--bg-alt); }

.site-header__actions { display: flex; align-items: center; gap: 8px; }

.menu-toggle {
  display: none; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
  cursor: pointer; color: var(--ink);
}
.menu-toggle .icon { width: 22px; height: 22px; grid-area: 1 / 1; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.mobile-menu { border-top: 1px solid var(--border); background: var(--bg); box-shadow: 0 18px 30px -18px rgba(19, 43, 58, .35); }
.mobile-menu nav { padding-block: 12px 20px; }
.mobile-menu__list a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--border);
  color: var(--ink); font-weight: 600; font-size: 1.0625rem; text-decoration: none;
}
.mobile-menu__cta { width: 100%; margin-top: 16px; }
.mobile-menu__wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; margin-top: 6px; font-weight: 700; color: #157A3B; text-decoration: none;
}
.mobile-menu__wa .icon { color: #1EA952; }

@media (max-width: 959px) {
  .site-nav { display: none; }
  .site-header__actions { margin-left: auto; }
  .js .menu-toggle { display: grid; }
}
@media (max-width: 959px) {
  /* celular/tablet (página inicial, que tem o menu): logo no centro, menu à direita.
     Nas páginas legais o botão "Voltar ao site" ocupa a direita, então a logo continua à esquerda. */
  .site-header:not(.legal-header) .site-header__inner { position: relative; }
  .site-header:not(.legal-header) .brand { position: absolute; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 767px) {
  .brand__logo { height: 27px; }
}
@media (max-width: 599px) {
  .eyebrow::before { display: none; }
}
@media (min-width: 960px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Revelação de seção ----------
   O conteúdo nunca fica escondido por padrão: a entrada é uma animação disparada
   quando o elemento se aproxima da viewport. Se o observer não disparar
   (aba em segundo plano, impressão, navegador sem suporte), o conteúdo simplesmente aparece. */
[data-reveal].is-revealing { animation: reveal var(--t-reveal) var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }
