/* ==========================================================================
   ESCALIER ENGENHARIA — style.css (base compartilhada)
   --------------------------------------------------------------------------
   Aplicada em todas as páginas: Index, Projetos, Contato.
   Cobre: variáveis, reset, tipografia, container, botões, header, drawer,
   footer, WhatsApp flutuante, utilitários e responsivo.
   NÃO contém CSS específico de seções de página (hero, empresa, atuação,
   método, lista de projetos, formulário) — esses ficam dentro de cada
   página, em <style> próprio.
   ========================================================================== */


/* ==========================================================================
   1. RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { background: var(--branco); color: var(--azul); font-family: var(--fonte-texto); font-size: 16px; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }


/* ==========================================================================
   2. VARIÁVEIS DE DESIGN
   --------------------------------------------------------------------------
   Sistema único de cores, tipografia, espaçamento e raios.
   Qualquer ajuste de identidade visual é feito aqui — uma vez.
   ========================================================================== */

:root {
  /* Paleta base */
  --azul:           #1E293B;   /* azul-marinho — fundo escuro / texto principal */
  --azul-escuro:    #0F172A;   /* variação para CTAs, números/clientes, rodapé */
  --azul-deep:      #0F172A;   /* alias mantido por compatibilidade — mesmo tom que --azul-escuro */
  --laranja:        #D9480F;   /* laranja óxido — destaque oficial */
  --laranja-hover:  #B83C0C;   /* hover do laranja */
  --branco:         #FFFFFF;
  --cinza-claro:    #F8F9FA;   /* fundo de seções alternadas */
  --cinza-borda:    #E2E8F0;   /* bordas e divisores */
  --cinza-texto:    #6B7C85;   /* texto corrido em fundo claro */
  --cinza-mute:     #94A3B8;   /* texto secundário, captions */

  /* Tipografia */
  --fonte-titulo:   'Poppins', sans-serif;
  --fonte-texto:    'Kanit', sans-serif;

  /* Espaçamento de página (padding lateral do container) */
  --pad-desktop:    80px;
  --pad-tablet:     60px;
  --pad-mobile:     20px;

  /* Estrutura */
  --header-altura:  78px;
  --max-width:      1600px;
  --raio:           6px;
  --transicao:      0.3s ease;
}


/* ==========================================================================
   3. TIPOGRAFIA BASE
   --------------------------------------------------------------------------
   Tamanhos default. Páginas/seções podem sobrescrever quando precisarem,
   mas a base aqui já dá um piso consistente.
   ========================================================================== */

h1, h2, h3, h4, h5, h6 { font-family: var(--fonte-titulo); color: var(--azul); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 48px; font-weight: 600; }
h2 { font-size: 36px; font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

p  { font-family: var(--fonte-texto); font-size: 16px; font-weight: 300; line-height: 1.75; color: var(--cinza-texto); }


/* Label/eyebrow padrão — usada acima de títulos de seção */
.label-secao {
  display: inline-block;
  font-family: var(--fonte-titulo);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--laranja);
  margin-bottom: 14px;
}
.label-secao.clara { color: rgba(255,255,255,0.5); }


/* ==========================================================================
   4. CONTAINER / GRID DE PÁGINA
   --------------------------------------------------------------------------
   .container = limite horizontal + padding lateral responsivo.
   Use sempre que precisar de uma faixa de conteúdo dentro de uma seção.
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-desktop);
}


/* ==========================================================================
   5. BOTÕES
   --------------------------------------------------------------------------
   Sistema de botões enxuto: três variantes que cobrem todos os usos.
   .btn (base) + modificador (.btn-primary | .btn-ghost) + .btn-link (nav).
   Padronização: caixa normal, peso 500, sem letter-spacing largo.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  font-family: var(--fonte-titulo);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--raio);
  white-space: nowrap;
  transition: var(--transicao);
  cursor: pointer;
  border: 1px solid transparent;
}

/* Primário — laranja sólido. CTA principal. */
.btn-primary { background: var(--laranja); color: var(--branco); border-color: var(--laranja); }
.btn-primary:hover { background: var(--laranja-hover); border-color: var(--laranja-hover); }
.btn:disabled,
.btn-primary:disabled {
  background: #94A3B8;
  border-color: #94A3B8;
  color: var(--branco);
  cursor: not-allowed;
  opacity: 0.65;
}
.btn-primary:disabled:hover {
  background: #94A3B8;
  border-color: #94A3B8;
}

/* Ghost — borda translúcida sobre fundo escuro. CTA secundária. */
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { color: var(--branco); border-color: rgba(255,255,255,0.6); }

/* Link — texto puro com seta. Para "Ver projetos →" e similares. */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fonte-titulo);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--cinza-mute);
  transition: color var(--transicao), gap var(--transicao);
}
.btn-link:hover { color: var(--azul); gap: 10px; }
.btn-link.clara { color: rgba(255,255,255,0.55); }
.btn-link.clara:hover { color: var(--branco); }


/* ==========================================================================
   6. HEADER
   --------------------------------------------------------------------------
   Comportamento:
   - .site-header.transparente = sem fundo (usado sobre o hero do index)
   - .site-header.solido       = fundo azul-marinho (default; ativado por
     scroll no index, fixo nas demais páginas)
   O JS alterna a classe conforme a posição do scroll.
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-altura);
  z-index: 1000;
  background: transparent;
  transition: background var(--transicao), border-color var(--transicao);
  border-bottom: 1px solid transparent;
}
.site-header.solido {
  background: var(--azul);
  border-bottom-color: rgba(255,255,255,0.06);
}

.header-inner {
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-desktop);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 32px; width: auto; }

/* Bloco direito do header */
.header-direita {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Redes sociais no header */
.header-social {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transicao);
}
.header-social a:hover { border-color: var(--laranja); color: var(--laranja); }
.header-social svg { width: 16px; height: 16px; }

/* Botão Contato no header — alterna entre ghost (transparente) e sólido laranja
   conforme a classe do header (.transparente vs .solido) */
.btn-contato-header {
  font-family: var(--fonte-titulo);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0 22px;
  height: 40px;
  border-radius: var(--raio);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background var(--transicao), border-color var(--transicao), color var(--transicao);
}

/* Sobre header transparente — borda branca translúcida, sem fundo */
.site-header:not(.solido) .btn-contato-header {
  background: transparent;
  color: var(--branco);
  border: 1px solid rgba(255,255,255,0.4);
}
.site-header:not(.solido) .btn-contato-header:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--branco);
}

/* Sobre header sólido — laranja preenchido, sem borda */
.site-header.solido .btn-contato-header {
  background: var(--laranja);
  color: var(--branco);
  border: 1px solid var(--laranja);
}
.site-header.solido .btn-contato-header:hover {
  background: var(--laranja-hover);
  border-color: var(--laranja-hover);
}

/* Sanduíche — abre o drawer */
.menu-sandwich {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-sandwich span {
  display: block;
  width: 24px; height: 2px;
  background: var(--branco);
  border-radius: 2px;
  transition: var(--transicao);
}
.menu-sandwich:hover span { background: var(--laranja); }


/* ==========================================================================
   7. DRAWER (menu lateral)
   ========================================================================== */

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transicao);
}
.drawer-overlay.aberto { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 320px; height: 100%;
  background: var(--azul);
  z-index: 1101;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}
.drawer.aberto { transform: translateX(0); }

.drawer-close {
  align-self: flex-end;
  color: rgba(255,255,255,0.5);
  font-size: 22px;
  margin-bottom: 24px;
  transition: color var(--transicao);
}
.drawer-close:hover { color: var(--laranja); }

.drawer a {
  font-family: var(--fonte-titulo);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--transicao);
}
.drawer a:hover { color: var(--laranja); }


/* ==========================================================================
   8. FOOTER
   --------------------------------------------------------------------------
   Layout único compartilhado por todas as páginas.
   Estrutura: [logo + nav] | divisor | [copyright + redes sociais]
   ========================================================================== */

.site-footer {
  background: var(--azul-deep);
  padding: 40px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-topo {
  display: flex;
  justify-content: center;
  padding-bottom: 28px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}
.footer-nav a {
  font-family: var(--fonte-titulo);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  transition: color var(--transicao);
}
.footer-nav a:hover { color: var(--branco); }


.footer-base {
  padding-top: 24px;
  text-align: center;
}
.footer-copy {
  font-family: var(--fonte-texto);
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.3);
}


/* ==========================================================================
   9. WHATSAPP FLUTUANTE
   --------------------------------------------------------------------------
   Canto inferior direito. Presente em todas as páginas.
   Discreto — laranja, mas pequeno (não é a CTA principal).
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 48px; height: 48px;
  background: var(--laranja);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(217,72,15,0.4);
  transition: transform var(--transicao), box-shadow var(--transicao);
}
.whatsapp-float svg { width: 22px; height: 22px; fill: var(--branco); }
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(217,72,15,0.5);
}


/* ==========================================================================
   10. ANIMAÇÕES UTILITÁRIAS
   --------------------------------------------------------------------------
   Fade in da página + reveal de elementos no scroll (data-animar).
   ========================================================================== */

body { animation: pageFadeIn 0.25s ease; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-fade-out { opacity: 0; transition: opacity 0.25s ease; }

[data-animar] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animar].visivel {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   11. RESPONSIVO
   ========================================================================== */

/* Tablet / desktop pequeno — reduz padding lateral */
@media (max-width: 1280px) {
  .container { padding: 0 var(--pad-tablet); }
  .header-inner { padding: 0 var(--pad-tablet); }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --header-altura: 64px; }

  .container { padding: 0 var(--pad-mobile); }
  .header-inner { padding: 0 var(--pad-mobile); gap: 12px; }

  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }

  /* Esconde redes sociais e botão Contato no header mobile — vai tudo pro drawer */
  .header-social { display: none; }
  .btn-contato-header { display: none; }

  /* Drawer ocupa quase a tela toda */
  .drawer { width: 85%; max-width: 320px; padding: 24px; }

  /* Footer empilhado */
  .footer-topo {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-nav { gap: 16px 20px; }

  /* WhatsApp menor */
  .whatsapp-float {
    width: 44px; height: 44px;
    bottom: 16px; right: 16px;
  }
  .whatsapp-float svg { width: 20px; height: 20px; }
}

/* Utilitário de acessibilidade: esconde visualmente mas mantém disponível
   para leitores de tela e SEO */
.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;
}
