/* ══════════════════════════════════════════════
   Deltha Contabilidade — styles.css
   Ordem: Reset → Tokens → Base → Layout →
          Componentes → Seções → Responsivo
   ══════════════════════════════════════════════ */

/* ── 1. RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── 2. TOKENS ── */
:root {
  /* Tinta — rampa única, todos os azuis escuros derivam daqui */
  --ink-900: #060f33;
  --ink-800: #0a1745;
  --ink-700: #12225e;

  /* Marca */
  --brand-600: #1a3fd4;
  --brand-500: #2250fc;
  --brand-300: #7b9dff;
  --brand-100: #e8edff;
  --brand-050: #f4f7ff;

  /* Marcas de terceiros — só o hover dos ícones sociais usa */
  --instagram: #d62976;
  --facebook: #1877f2;

  /* Superfícies */
  --surface-0: #ffffff;
  --surface-1: #f6f7fb;
  --surface-2: #eef1f8;

  /* Linhas */
  --line: #e3e8f4;
  --line-strong: #cfd6e8;

  /* Controle em repouso — precisa de 3:1 sobre --surface-1 (WCAG 1.4.11) */
  --control-muted: #7d879f;

  /* Texto */
  --text-strong: #0d1633;
  --text: #414b66;
  --text-muted: #5f6a85;

  /* Texto sobre fundo escuro */
  --on-dark: rgba(255, 255, 255, 0.92);
  --on-dark-mid: rgba(255, 255, 255, 0.68);
  --on-dark-soft: rgba(255, 255, 255, 0.55);
  --on-dark-line: rgba(255, 255, 255, 0.12);

  /* Espaço — base 4px */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-14: 3.5rem;
  --s-16: 4rem;

  /* Ritmo vertical — um token para todas as seções */
  --section-y: clamp(4.5rem, 8vw, 7rem);

  /* Folga da navbar fixa: um pouco mais que a barra em repouso (~5.5rem).
     Usado pelo scroll-margin-top das âncoras, pelo .page-hero e pelo sumário. */
  --nav-clear: 6rem;

  /* Raio */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-full: 999px;

  /* Sombra — três degraus, todos da mesma base de tinta */
  --shadow-1: 0 1px 2px rgba(10, 23, 69, 0.04), 0 2px 8px rgba(10, 23, 69, 0.04);
  --shadow-2: 0 2px 4px rgba(10, 23, 69, 0.04), 0 12px 28px rgba(10, 23, 69, 0.08);
  --shadow-3: 0 4px 8px rgba(10, 23, 69, 0.06), 0 24px 48px rgba(10, 23, 69, 0.12);

  /* Movimento */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 0.18s;
  --dur-2: 0.3s;
  --dur-3: 0.55s;

  /* Tipografia */
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Só a política de privacidade usa — nomes de cookie precisam ser literais */
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --lh-display: 1.1;
  --lh-ui: 1.5;
  --lh-body: 1.7;
}

/* ── 3. BASE ── */
body {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--surface-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

address {
  font-style: normal;
}

img {
  max-width: 100%;
}

/* Números alinham — é um site de contabilidade */
address,
.tabular,
.contact-text span,
.footer-cnpj,
.map-address address,
.hero-proof {
  font-variant-numeric: tabular-nums;
}

/* Anel de foco global — não havia nenhum */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Variante clara para fundos escuros */
#hero :where(a, button):focus-visible,
#diferenciais :where(a, button):focus-visible,
#footer :where(a, button):focus-visible,
.page-hero :where(a, button):focus-visible,
.nav-mobile :where(a, button):focus-visible,
.map-address:focus-visible,
.nav-hamburger:focus-visible {
  outline-color: #ffffff;
}

#navbar.scrolled .nav-links a:focus-visible,
#navbar.scrolled .nav-hamburger:focus-visible {
  outline-color: var(--brand-500);
}

/* ── 4. LAYOUT ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.section {
  padding: var(--section-y) 0;
}

/* Chegar numa âncora vindo de outra página (/#sobre) é um salto nativo, sem o
   JS — sem esta folga a navbar fixa cobriria o título da seção. */
section[id] {
  scroll-margin-top: var(--nav-clear);
}

.section-light {
  background: var(--surface-0);
}

.section-tinted {
  background: var(--surface-1);
}

/* ── 5. TIPOGRAFIA COMPARTILHADA ── */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: var(--s-3);
}

.section-title {
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  letter-spacing: -0.03em;
  color: var(--ink-800);
  margin-bottom: var(--s-4);
}

.section-title span {
  color: var(--brand-500);
}

.section-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: var(--lh-body);
  max-width: 58ch;
}

.section-header {
  margin-bottom: var(--s-14);
}

/* Centralizado apenas nas duas seções de prova social */
.section-header--center {
  text-align: center;
}

.section-header--center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ── 6. BOTÕES ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0.75rem 1.625rem;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.btn-primary {
  background: var(--brand-500);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 80, 252, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
  background: var(--brand-600);
}

/* Secundário — para fundo claro, evita duas CTAs azuis competindo */
.btn-secondary {
  background: var(--surface-0);
  color: var(--ink-800);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--brand-500);
  color: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Fantasma — para fundo escuro */
.btn-ghost-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.btn-ghost-light:active {
  background: rgba(255, 255, 255, 0.06);
}

/* Ícones sociais — mesmo botão redondo no #contato, no painel do menu e no rodapé.
   A variante clara vive na seção 17; a escura é .social-links-dark, logo abaixo. */
.social-links {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  list-style: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link:active {
  transform: translateY(0);
}

/* Fundo escuro — rodapé e painel do menu mobile. A cor da rede preenche no hover. */
.social-links-dark .social-link {
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-dark);
}

.social-links-dark .social-link:hover {
  color: #ffffff;
}

.social-links-dark .social-link-instagram:hover {
  background: var(--instagram);
}

.social-links-dark .social-link-facebook:hover {
  background: var(--facebook);
}

/* ── 7. REVEAL ──
   O estado oculto é escopado em .js: sem JavaScript nada é escondido. */
.js .reveal,
.js .reveal-left,
.js .reveal-right {
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .reveal {
  transform: translateY(24px);
}

.js .reveal-left {
  transform: translateX(-24px);
}

.js .reveal-right {
  transform: translateX(24px);
}

.js .reveal.visible,
.js .reveal-left.visible,
.js .reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* ── 8. NAVBAR ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--s-5) 0;
  transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
    padding var(--dur-2) var(--ease);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-2);
  padding: var(--s-3) 0;
}

#navbar.scrolled .nav-links a {
  color: var(--text);
}

#navbar.scrolled .nav-links a:hover {
  color: var(--brand-500);
}

#navbar.scrolled .nav-hamburger span {
  background: var(--ink-800);
}

/* Posicionado para pintar acima do .nav-scrim, que vem antes no DOM */
#navbar .container {
  position: relative;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.nav-logo {
  display: block;
  flex-shrink: 0;
  position: relative;
  line-height: 0;
}

.nav-logo img {
  height: 48px;
  width: auto;
  display: block;
  transition: height var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}

/* A versão azul fica sobreposta e só entra quando a navbar vira branca */
.nav-logo-on-light {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

#navbar.scrolled .nav-logo-on-dark {
  opacity: 0;
}

#navbar.scrolled .nav-logo-on-light {
  opacity: 1;
}

#navbar.scrolled .nav-logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-cta .btn {
  min-height: 40px;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: #ffffff;
  display: block;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease),
    background var(--dur-2) var(--ease);
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MENU MOBILE ──
   Painel e scrim saem do fluxo: a navbar não muda de altura ao abrir, então o
   deslocamento do scroll suave (navbar.offsetHeight) continua valendo. */
.nav-scrim,
.nav-mobile {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  visibility: hidden;
  opacity: 0;
  /* visibility é discreta, mas fica "visible" durante toda a transição se uma
     das pontas for visible — é o que dá o fade-out sem allow-discrete. */
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease),
    visibility var(--dur-2);
}

/* --nav-h é gravado pelo JS na abertura; 5rem é só o piso de segurança */
.nav-scrim {
  height: calc(100dvh - var(--nav-h, 5rem));
  background: rgba(6, 15, 51, 0.55);
}

.nav-mobile {
  transform: translateY(-6px);
  max-height: calc(100dvh - var(--nav-h, 5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink-800);
  border-top: 1px solid var(--on-dark-line);
  box-shadow: var(--shadow-3);
}

html.menu-open .nav-scrim,
html.menu-open .nav-mobile {
  visibility: visible;
  opacity: 1;
}

html.menu-open .nav-mobile {
  transform: none;
}

/* Trava a rolagem da página enquanto o menu está aberto */
html.menu-open {
  overflow: hidden;
}

/* A barra e o painel viram uma superfície escura só, mesmo com .scrolled ativo */
html.menu-open #navbar,
html.menu-open #navbar.scrolled {
  background: var(--ink-800);
  box-shadow: none;
  backdrop-filter: none;
}

html.menu-open #navbar.scrolled .nav-hamburger span {
  background: #ffffff;
}

html.menu-open #navbar.scrolled .nav-logo-on-dark {
  opacity: 1;
}

html.menu-open #navbar.scrolled .nav-logo-on-light {
  opacity: 0;
}

html.menu-open #navbar.scrolled .nav-hamburger:focus-visible {
  outline-color: #ffffff;
}

/* Acima de 768px o menu não existe — nem o estado aberto o traz de volta */
@media (min-width: 769px) {

  .nav-scrim,
  .nav-mobile {
    display: none;
  }
}

.nav-mobile ul {
  list-style: none;
}

.nav-mobile ul li a {
  display: block;
  padding: var(--s-3) var(--s-6);
  color: var(--on-dark-mid);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.nav-mobile ul li a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* Os itens entram escalonados: --i vem do .stagger, o mesmo utilitário do reveal */
html.menu-open .nav-mobile li {
  animation: navItemIn var(--dur-2) var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes navItemIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.nav-mobile .mobile-cta {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-6) var(--s-5);
}

.nav-mobile .mobile-cta .btn {
  width: 100%;
}

/* Redes sociais no fim do painel — as cores vêm de .social-links-dark (seção 6).
   Só o formato precisa ser retomado aqui: `.nav-mobile ul li a` acima é mais
   específico que `.social-link` e transformaria o botão redondo em item de lista. */
.nav-mobile .mobile-social {
  justify-content: center;
  padding: 0 var(--s-6) var(--s-6);
}

.nav-mobile .mobile-social li a {
  display: inline-flex;
  padding: 0;
}

.nav-mobile .mobile-social li a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-mobile .mobile-social li .social-link-instagram:hover {
  background: var(--instagram);
}

.nav-mobile .mobile-social li .social-link-facebook:hover {
  background: var(--facebook);
}

/* ── 9. HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--ink-900);
}

.hero-video,
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
  z-index: 1;
}

.hero-bg {
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Overlay derivado da rampa de tinta — conecta o hero ao navy do resto do site */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top, var(--ink-900) 0%, rgba(6, 15, 51, 0) 42%),
    linear-gradient(105deg,
      rgba(6, 15, 51, 0.94) 0%,
      rgba(10, 23, 69, 0.86) 45%,
      rgba(18, 34, 94, 0.72) 100%);
}

/* Grão — tira o aspecto de lavado chapado sobre o vídeo */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  padding: calc(var(--s-16) * 2) 0 var(--s-12);
}

.hero-content {
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: rgba(34, 80, 252, 0.2);
  border: 1px solid rgba(34, 80, 252, 0.45);
  border-radius: var(--r-full);
  padding: 0.375rem 0.9375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: var(--s-6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-300);
  flex-shrink: 0;
  animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.hero-title {
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  letter-spacing: -0.035em;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: var(--s-6);
  text-wrap: balance;
}

.hero-title em {
  font-style: normal;
  color: var(--brand-300);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--on-dark-mid);
  line-height: var(--lh-body);
  margin-bottom: var(--s-10);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* Barra de prova — ancora o hero e dá uma segunda camada de leitura */
.hero-proof {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--on-dark-line);
  padding: var(--s-5) 0;
}

.hero-proof ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-8);
}

.hero-proof li {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-size: 0.875rem;
  color: var(--on-dark-soft);
  line-height: var(--lh-ui);
  /* Evita a última linha órfã quando a frase quebra no mobile */
  text-wrap: pretty;
}

.hero-proof strong {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* ── 10. SOBRE ── */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.sobre-text .section-desc {
  margin-bottom: var(--s-8);
}

.sobre-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
}

/* ── 11. CARDS — vocabulário único ── */
.card {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-500);
  box-shadow: var(--shadow-2);
}

/* Tile de ícone — um spec só */
.icon-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--brand-050);
  color: var(--brand-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

/* ── 12. SERVIÇOS ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.service-card {
  padding: var(--s-8);
}

.service-card:hover .icon-tile {
  background: var(--brand-100);
}

.service-card h3 {
  font-size: 1.125rem;
  color: var(--ink-800);
  margin: var(--s-5) 0 var(--s-2);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: var(--lh-body);
}

/* ── 13. DIFERENCIAIS ── */
#diferenciais {
  background: var(--ink-800);
  position: relative;
  overflow: hidden;
}

#diferenciais::before,
#diferenciais::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(123, 157, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

#diferenciais::before {
  top: -250px;
  right: -250px;
  width: 700px;
  height: 700px;
}

#diferenciais::after {
  bottom: -200px;
  left: -150px;
  width: 500px;
  height: 500px;
  border-color: rgba(123, 157, 255, 0.09);
}

#diferenciais .container {
  position: relative;
  z-index: 1;
}

#diferenciais .section-label {
  color: var(--brand-300);
}

#diferenciais .section-title {
  color: #ffffff;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}

.diff-item {
  text-align: center;
  padding: var(--s-8) var(--s-6);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-lg);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
    background var(--dur-2) var(--ease);
}

.diff-item:hover {
  transform: translateY(-4px);
  background: rgba(34, 80, 252, 0.14);
  border-color: rgba(123, 157, 255, 0.4);
}

/* Variante circular sobre fundo escuro — registro deliberadamente diferente */
.diff-item .icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 80, 252, 0.18);
  color: var(--brand-300);
  margin: 0 auto var(--s-5);
}

.diff-item h3 {
  font-size: 1.0625rem;
  color: #ffffff;
  margin-bottom: var(--s-2);
}

.diff-item p {
  font-size: 0.875rem;
  color: var(--on-dark-mid);
  line-height: var(--lh-body);
}

/* ── 14. CLIENTES ── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-4);
  list-style: none;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
  min-height: 88px;
}

.client-logo img {
  max-width: 110px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}

.client-logo:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ── 15. DEPOIMENTOS ── */
.testimonials-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto;
}

.testimonials-track {
  display: flex;
  transition: transform var(--dur-3) var(--ease);
}

.testimonial-slide {
  flex: 0 0 100%;
}

.testimonial-card {
  background: var(--surface-0);
  padding: var(--s-12) var(--s-12) var(--s-10);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  position: relative;
}

.testimonial-quote-mark {
  position: absolute;
  top: var(--s-4);
  right: var(--s-8);
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-050);
  user-select: none;
  pointer-events: none;
}

.testimonial-stars {
  color: #e08c00;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-5);
}

.testimonial-text {
  font-size: 1.0625rem;
  color: var(--text-strong);
  line-height: var(--lh-body);
  margin-bottom: var(--s-8);
  position: relative;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink-800);
  line-height: var(--lh-ui);
}

.author-company {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: var(--lh-ui);
}

.testimonials-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  margin-top: var(--s-10);
}

.t-dots {
  display: flex;
  gap: var(--s-1);
}

/* O botão inteiro é o alvo de toque; o ponto visual é desenhado no ::before.
   Alvos vizinhos se encostam mas nunca se sobrepõem — um ::after grande
   sobre um dot de 9px roubaria o clique do dot ao lado. */
.t-dot {
  width: 34px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.t-dot::before {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: var(--r-full);
  background: var(--control-muted);
  transition: background var(--dur-2) var(--ease), width var(--dur-2) var(--ease);
}

.t-dot:hover::before {
  background: var(--brand-300);
}

.t-dot.active::before {
  background: var(--brand-500);
  width: 28px;
}

.t-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-0);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-800);
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease);
}

.t-btn:hover {
  border-color: var(--brand-500);
  color: var(--brand-500);
  box-shadow: var(--shadow-1);
}

.t-btn svg {
  width: 16px;
  height: 16px;
}

/* ── 16. UTILITÁRIOS ── */
.utils-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

.util-card {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  text-decoration: none;
  color: inherit;
}

.util-card:hover .icon-tile {
  background: var(--brand-500);
  color: #ffffff;
}

.util-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-800);
  line-height: var(--lh-ui);
}

.util-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: var(--lh-ui);
  margin-top: 0.125rem;
}

/* ── 17. CONTATO ── */
.contato-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-4);
  padding: var(--s-8) var(--s-5);
  text-decoration: none;
  color: inherit;
}

/* Só os cards clicáveis reagem — o de horário é informativo */
.contact-card:not(a):hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.contact-card .icon-tile {
  background: var(--ink-800);
  color: #ffffff;
}

a.contact-card:hover .icon-tile {
  background: var(--brand-500);
}

.contact-text strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--s-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-text span {
  /* bloco porque o horário usa duas linhas (seg–qui e sexta) */
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-800);
  line-height: var(--lh-ui);
}

/* Redes sociais — fundo claro, ícone escuro que ganha a cor da rede no hover */
.contato-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-10);
}

.contato-social-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contato-social .social-link {
  background: var(--surface-0);
  border-color: var(--line);
  color: var(--ink-800);
  box-shadow: var(--shadow-1);
}

.contato-social .social-link:hover {
  box-shadow: var(--shadow-2);
}

.contato-social .social-link-instagram:hover {
  border-color: var(--instagram);
  color: var(--instagram);
}

.contato-social .social-link-facebook:hover {
  border-color: var(--facebook);
  color: var(--facebook);
}

.contato-map {
  margin-top: var(--s-12);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  line-height: 0;
}

.map-address {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-6);
  background: var(--ink-800);
  color: var(--on-dark);
  font-size: 0.9375rem;
  line-height: var(--lh-ui);
  text-decoration: none;
  transition: background var(--dur-2) var(--ease);
}

.map-address:hover {
  background: var(--ink-700);
}

.map-address svg {
  width: 20px;
  height: 20px;
  color: var(--brand-300);
  flex-shrink: 0;
}

.map-address address {
  flex: 1;
}

.map-address-cta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-300);
  white-space: nowrap;
}

.contato-map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 8;
  height: auto;
  border: 0;
}

/* ── 18. FOOTER ── */
#footer {
  background: var(--ink-900);
  color: var(--on-dark-mid);
  padding: var(--s-16) 0 var(--s-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--s-10);
  margin-bottom: var(--s-12);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid var(--on-dark-line);
}

.footer-brand img {
  height: 44px;
  width: auto;
  margin-bottom: var(--s-5);
  display: block;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: var(--lh-body);
  max-width: 34ch;
}

.footer-cnpj {
  margin-top: var(--s-3);
  font-size: 0.875rem;
  color: var(--on-dark-soft);
}

/* Redes sociais no rodapé — as cores vêm de .social-links-dark (seção 6) */
.footer-social {
  margin-top: var(--s-6);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-5);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.footer-col ul li a {
  font-size: 0.9375rem;
  color: var(--on-dark-mid);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-contact-entry {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: 0.9375rem;
  color: var(--on-dark-mid);
  margin-bottom: var(--s-3);
  line-height: var(--lh-ui);
}

.footer-contact-entry svg {
  width: 16px;
  height: 16px;
  color: var(--brand-300);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-entry a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}

.footer-contact-entry a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  font-size: 0.875rem;
  color: var(--on-dark-soft);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

.footer-bottom a {
  color: var(--on-dark-mid);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* ── 19. WHATSAPP FLUTUANTE ── */
.whatsapp-float {
  position: fixed;
  bottom: var(--s-8);
  right: var(--s-8);
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1da851;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(10, 23, 69, 0.28);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 32px rgba(10, 23, 69, 0.34);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  color: #ffffff;
}

/* ── 20. PÁGINA INTERNA ──
   Cabeçalho escuro e prosa jurídica, usados pela política de privacidade.
   A faixa escura não é decoração: a navbar em repouso é transparente com texto
   branco e só vira branca com .scrolled, então sem um fundo escuro no topo os
   links da barra sumiriam. Qualquer página interna nova precisa dela. */
.page-hero {
  background: var(--ink-900);
  padding: calc(var(--nav-clear) + var(--s-10)) 0 var(--s-12);
  color: var(--on-dark-mid);
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-dark-mid);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}

.page-back:hover {
  color: #ffffff;
}

.page-back svg {
  width: 16px;
  height: 16px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: var(--s-2) 0 var(--s-3);
}

.page-updated {
  font-size: 0.875rem;
  color: var(--on-dark-soft);
  font-variant-numeric: tabular-nums;
}

.legal-layout {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: var(--s-12);
  align-items: start;
}

/* Item de grid nasce com min-width:auto e se recusa a encolher abaixo do
   próprio conteúdo. Sem isto o min-width da tabela (34rem) estoura a coluna,
   o invólucro .legal-table nunca chega a rolar e é a página inteira que rola
   na horizontal em tela estreita. */
.legal-layout>* {
  min-width: 0;
}

/* Sumário — acompanha a rolagem no desktop, vira bloco normal em ≤1024px */
.legal-toc {
  position: sticky;
  top: var(--nav-clear);
  padding: var(--s-5) var(--s-6);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.legal-toc h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-800);
  margin-bottom: var(--s-2);
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: block;
  padding: var(--s-2) 0;
  font-size: 0.875rem;
  line-height: var(--lh-ui);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}

/* A numeração é do CSS nos dois lados — sumário e títulos nunca desencontram */
.legal-toc a::before {
  content: counter(toc) ". ";
  color: var(--control-muted);
}

.legal-toc a:hover {
  color: var(--brand-500);
}

.legal {
  max-width: 72ch;
  counter-reset: legal;
}

.legal > section + section {
  margin-top: var(--s-12);
}

.legal h2 {
  font-size: 1.375rem;
  color: var(--ink-800);
  margin-bottom: var(--s-4);
}

/* Só as seções numeradas entram na contagem — o resumo fica de fora */
.legal > section > h2 {
  counter-increment: legal;
}

.legal > section > h2::before {
  content: counter(legal) ". ";
  color: var(--brand-500);
}

.legal h3 {
  font-size: 1.0625rem;
  color: var(--ink-800);
  margin: var(--s-8) 0 var(--s-3);
}

.legal p,
.legal ul,
.legal ol {
  margin-bottom: var(--s-4);
}

.legal ul,
.legal ol {
  padding-left: var(--s-5);
}

.legal li {
  margin-bottom: var(--s-2);
}

.legal li::marker {
  color: var(--brand-300);
}

.legal > section > :last-child {
  margin-bottom: 0;
}

.legal a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur-2) var(--ease);
}

.legal a:hover {
  color: var(--brand-500);
}

.legal strong {
  color: var(--text-strong);
  font-weight: 600;
}

.legal code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--brand-050);
  color: var(--brand-600);
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
}

/* Resumo em linguagem simples — a versão de trinta segundos do documento */
.legal-summary {
  padding: var(--s-6);
  margin-bottom: var(--s-12);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-lg);
}

.legal-summary h2 {
  font-size: 1rem;
  margin-bottom: var(--s-3);
}

.legal-summary ul,
.legal-summary li:last-child {
  margin-bottom: 0;
}

/* O invólucro rola sozinho em tela estreita: a tabela tem largura mínima */
.legal-table {
  overflow-x: auto;
  margin-bottom: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.legal table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: var(--lh-ui);
}

.legal th,
.legal td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal thead th {
  background: var(--surface-1);
  color: var(--ink-800);
  font-size: 0.8125rem;
  font-weight: 600;
}

.legal tbody tr:last-child td,
.legal tbody tr:last-child th {
  border-bottom: 0;
}

/* ── 21. BANNER DE COOKIES ──
   Mesmo mecanismo do menu mobile: o estado mora numa classe no <html> e o
   fechado é visibility:hidden, o que já tira o banner do Tab e do leitor de
   tela. Sem JavaScript o banner nunca aparece — e nem precisa: o gtag só é
   injetado depois do aceite, então sem JS não há coleta a consentir. */
.cookie-banner {
  display: none;
}

.js .cookie-banner {
  display: block;
  position: fixed;
  left: var(--s-6);
  bottom: var(--s-6);
  z-index: 998;
  width: min(26rem, calc(100vw - var(--s-6) * 2));
  padding: var(--s-6);
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  visibility: hidden;
  opacity: 0;
  transform: translateY(var(--s-4));
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease),
    visibility var(--dur-2);
}

.cookie-open .cookie-banner {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.cookie-banner h2 {
  font-size: 1rem;
  color: var(--ink-800);
  margin-bottom: var(--s-2);
}

.cookie-banner p {
  font-size: 0.875rem;
  line-height: var(--lh-ui);
  color: var(--text);
  margin-bottom: var(--s-5);
}

.cookie-actions {
  display: flex;
  gap: var(--s-3);
}

/* Aceitar e recusar têm o mesmo peso visual: a escolha precisa ser livre */
.cookie-actions .btn {
  flex: 1 1 0;
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ── 22. RESPONSIVO ──
   O ritmo vertical é resolvido pelo clamp() em --section-y; aqui só grids. */

/* Acima disso o container é estreito o bastante para o botão flutuante do
   WhatsApp cair fora dele; abaixo, a barra de prova precisa abrir espaço. */
@media (max-width: 1400px) {
  .hero-proof .container {
    padding-right: calc(var(--s-6) + 72px);
  }
}

@media (max-width: 1024px) {

  .services-grid,
  .contato-cards,
  .diff-grid,
  .utils-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);
  }

  .contato-map iframe {
    aspect-ratio: 16 / 9;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: var(--s-10);
  }

  .legal-toc {
    position: static;
  }
}

@media (max-width: 768px) {

  /* Em coluna única o deslize lateral não tem para onde ir: o estado inicial
     de .reveal-right fica 24px fora do container e a página rola 8px na
     horizontal enquanto o reveal não dispara. Na vertical o movimento é o
     mesmo de .reveal e não vaza. */
  .js .reveal-left,
  .js .reveal-right {
    transform: translateY(24px);
  }

  .js .nav-links,
  .js .nav-cta {
    display: none;
  }

  .js .nav-hamburger {
    display: flex;
  }

  /* Sem JavaScript o hambúrguer seria inerte e o topo ficaria sem navegação
     nenhuma — então a marca e a CTA dividem a primeira linha e os links
     quebram numa segunda. */
  html:not(.js) .nav-hamburger {
    display: none;
  }

  html:not(.js) .nav-inner {
    flex-wrap: wrap;
    row-gap: var(--s-3);
  }

  html:not(.js) .nav-links {
    order: 1;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-2) var(--s-4);
    font-size: 0.875rem;
  }

  .nav-logo img,
  #navbar.scrolled .nav-logo img {
    height: 38px;
  }

  .hero-inner {
    padding: calc(var(--s-16) * 1.75) 0 var(--s-8);
  }

  .sobre-grid {
    grid-template-columns: 1fr;
    gap: var(--s-10);
  }

  .sobre-media {
    order: -1;
    max-width: 440px;
    margin: 0 auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    flex-direction: column;
    gap: var(--s-2);
  }

  .testimonial-card {
    padding: var(--s-8) var(--s-6) var(--s-6);
  }

  .testimonial-quote-mark {
    font-size: 4.5rem;
    right: var(--s-5);
  }

  /* O banner ocupa a largura toda e tira o botão do WhatsApp de baixo dele.
     --cookie-h é gravado pelo JS na abertura, como --nav-h no menu mobile. */
  .js .cookie-banner {
    left: var(--s-4);
    right: var(--s-4);
    bottom: var(--s-4);
    width: auto;
    padding: var(--s-5);
  }

  .cookie-open .whatsapp-float {
    bottom: calc(var(--cookie-h, 12rem) + var(--s-4) + var(--s-4));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--s-4);
  }

  .diff-grid,
  .contato-cards,
  .utils-grid {
    grid-template-columns: 1fr;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Abre espaço à direita para o botão flutuante do WhatsApp não cobrir a prova */
  .hero-proof .container {
    padding-right: calc(var(--s-4) + 56px);
  }

  .hero-proof ul {
    gap: var(--s-2) var(--s-5);
  }

  .hero-proof li {
    font-size: 0.8125rem;
  }

  .hero-proof strong {
    font-size: 1rem;
  }

  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: var(--s-4);
    right: var(--s-4);
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .map-address {
    flex-wrap: wrap;
  }

  .map-address address {
    flex: 1 1 calc(100% - 2rem);
  }

  .map-address-cta {
    margin-left: calc(20px + var(--s-3));
  }
}

/* ── 23. MOVIMENTO REDUZIDO ── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .reveal-left,
  .js .reveal-right {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .btn:hover,
  .card:hover,
  .diff-item:hover,
  .whatsapp-float:hover {
    transform: none;
  }
}
