/* ═══════════ PERFORMANCE OPTIMIZATIONS ═══════════ */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, video, svg, iframe { max-width: 100%; height: auto; }
@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;
  }
}
/* ═══════════════════════════════════════════════════════════ */

/* ===================================================================
   AMSI Montagens Industrial
   Folha de estilo principal
   =================================================================== */

/* === VARIÁVEIS === */
:root {
  --fundo:         #F8F7F4;
  --aco:           #0F1923;
  --aco-fundo:     #0A1118;
  --azul:          #1A3A5C;
  --laranja:       #E87722;
  --laranja-hover: #cf6717;
  --laranja-claro: #F4A05A;
  --branco:        #FFFFFF;
  --texto:         #1A1A1A;
  --texto-medio:   #5A5A5A;
  --linha:         #E0DDD8;
  --whatsapp:      #25D366;

  --sans:  "Inter", "Segoe UI", system-ui, sans-serif;
  --mono:  "Space Grotesk", "Inter", sans-serif;

  --container: 1220px;
  --header-h: 84px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--texto);
  background-color: var(--fundo);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* === ELEMENTOS COMPARTILHADOS === */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.label-laranja {
  color: var(--laranja);
}

.label-laranja-claro {
  color: var(--laranja-claro);
}

.section-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--texto);
  margin-top: 14px;
}

.section-title-light {
  color: var(--branco);
}

.section-intro {
  max-width: 580px;
  margin-top: 18px;
}

.body-text {
  font-size: 17px;
  font-weight: 400;
  color: var(--texto-medio);
}

.body-text-light {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
}

.body-text + .body-text {
  margin-top: 18px;
}

/* Botões — sólidos, radius pequeno, sem gradiente */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--laranja);
  color: var(--branco);
}

.btn-primary:hover {
  background-color: var(--laranja-hover);
}

.btn-ghost {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--branco);
}

.btn-ghost:hover {
  background-color: var(--branco);
  border-color: var(--branco);
  color: var(--aco);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--branco);
}

.btn-whatsapp:hover {
  background-color: #1eb858;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background-color: var(--branco);
  border-bottom-color: var(--linha);
  box-shadow: 0 4px 20px rgba(15, 25, 35, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 52px;
  width: auto;
}

.main-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled .nav-link {
  color: var(--texto);
}

.nav-link:hover {
  color: var(--laranja);
}

.nav-link.active {
  color: var(--laranja);
  border-bottom-color: var(--laranja);
}

.nav-cta .btn {
  padding: 10px 20px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 80;
  color: var(--branco);
  padding: 8px 6px;
}

.site-header.scrolled .menu-toggle {
  color: var(--texto);
}

.menu-bar {
  display: block;
  width: 26px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.menu-bar + .menu-bar {
  margin-top: 6px;
}

.menu-toggle.open {
  color: var(--texto);
}

.menu-toggle.open .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .menu-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === BACKDROP DO MENU MOBILE === */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background-color: rgba(10, 17, 24, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* === HERO === */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-h) + 24px) 0 60px;
  background-color: var(--aco);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(10, 17, 24, 0.94) 0%,
    rgba(10, 17, 24, 0.86) 32%,
    rgba(10, 17, 24, 0.55) 62%,
    rgba(10, 17, 24, 0.15) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-text {
  max-width: 660px;
}

.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--branco);
  margin-top: 18px;
}

.hero-accent {
  display: block;
  color: var(--laranja);
}

.hero-lead {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  margin-top: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* === FAIXA DE STATS === */
.stats {
  position: relative;
  background-color: var(--aco);
  color: var(--branco);
  padding: 70px 0;
  border-top: 4px solid var(--laranja);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 24px;
}

.stats-item + .stats-item {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-number {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  color: var(--branco);
}

.stats-label {
  font-weight: 400;
  font-size: 15px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.62);
}

/* === SOBRE === */
.about {
  background-color: var(--fundo);
  padding: clamp(64px, 9vw, 120px) 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text .body-text {
  margin-top: 22px;
}

.pillars {
  margin-top: 38px;
  display: grid;
  gap: 24px;
}

.pillar {
  border-left: 3px solid var(--laranja);
  padding-left: 22px;
}

.pillar-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--aco);
}

.pillar-text {
  font-size: 15.5px;
  color: var(--texto-medio);
  margin-top: 4px;
}

.about-frame {
  border: 1px solid var(--linha);
  padding: 12px;
  background-color: var(--branco);
}

.about-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* === SERVIÇOS === */
.services {
  background-color: var(--branco);
  padding: clamp(64px, 9vw, 120px) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.service-card {
  background-color: var(--fundo);
  border: 1px solid var(--linha);
  border-top: 3px solid var(--laranja);
  padding: 36px 32px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  background-color: rgba(232, 119, 34, 0.1);
  color: var(--laranja);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.service-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 21px;
  color: var(--aco);
  margin: 22px 0 10px;
  transition: color 0.25s ease;
}

.service-text {
  font-size: 16px;
  color: var(--texto-medio);
  transition: color 0.25s ease;
}

.service-card:hover {
  background-color: var(--aco);
  transform: translateY(-4px);
}

.service-card:hover .service-icon {
  background-color: var(--laranja);
  color: var(--branco);
}

.service-card:hover .service-title {
  color: var(--branco);
}

.service-card:hover .service-text {
  color: rgba(255, 255, 255, 0.66);
}

/* === SEGURANÇA === */
.safety {
  background-color: var(--fundo);
  padding: clamp(64px, 9vw, 120px) 0;
}

.safety-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.safety-frame {
  border: 1px solid var(--linha);
  padding: 12px;
  background-color: var(--branco);
}

.safety-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.diff-list {
  margin-top: 30px;
  display: grid;
  gap: 14px;
}

.diff-item {
  position: relative;
  padding-left: 34px;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--texto);
}

.diff-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  background-color: var(--laranja);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* === PORTFÓLIO === */
.portfolio {
  background-color: var(--aco);
  padding: clamp(64px, 9vw, 120px) 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
}

.portfolio-figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--aco-fundo);
}

.portfolio-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(232, 119, 34, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-figure:hover img {
  transform: scale(1.05);
}

.portfolio-figure:hover::after {
  opacity: 1;
}

/* === CLIENTES === */
.clients {
  background-color: var(--branco);
  padding: clamp(64px, 9vw, 120px) 0;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  border: 1px solid var(--linha);
  border-radius: 4px;
  background-color: var(--fundo);
  min-height: 110px;
}

.client-logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

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

/* === CTA DE CONTATO === */
.cta {
  background-color: var(--aco);
  padding: clamp(70px, 10vw, 130px) 0;
  border-top: 4px solid var(--laranja);
}

.cta-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--branco);
  margin-top: 16px;
}

.cta-lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 18px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.cta-phones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 20px;
  color: var(--branco);
}

.cta-phone {
  transition: color 0.2s ease;
}

.cta-phone:hover {
  color: var(--laranja-claro);
}

.cta-phone-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* === FOOTER === */
.site-footer {
  background-color: var(--aco-fundo);
  color: var(--branco);
  padding-top: 64px;
  border-top: 2px solid var(--laranja);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo {
  display: inline-block;
  line-height: 0;
}

.footer-logo img {
  width: 170px;
  height: auto;
}

.footer-about {
  font-weight: 400;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 320px;
  margin-top: 18px;
}

.footer-heading {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--laranja-claro);
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 9px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--branco);
}

.footer-info {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.footer-info a {
  transition: color 0.2s ease;
}

.footer-info a:hover {
  color: var(--branco);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 24px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-credit {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-credit a {
  color: var(--laranja-claro);
  transition: color 0.2s ease;
}

.footer-credit a:hover {
  color: var(--branco);
}

/* === WHATSAPP FLUTUANTE === */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--whatsapp);
  color: var(--branco);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--whatsapp);
  z-index: -1;
  animation: wa-pulse 2.2s ease-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* === ANIMAÇÕES === */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
}

.reveal.is-visible {
  animation: fade-up 0.7s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    animation: none;
  }
  .portfolio-figure img {
    transition: none;
  }
  .whatsapp-float::before {
    animation: none;
  }
}

/* === RESPONSIVO — TABLET (até 1024px) === */
@media (max-width: 1024px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .about-visual {
    max-width: 460px;
  }

  .safety-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .safety-visual {
    max-width: 460px;
    order: 2;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

/* === RESPONSIVO — MOBILE (até 768px) === */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    /* Altura ancorada na viewport (vh/dvh), não em top+bottom — garante
       que o drawer ocupe a tela inteira mesmo se um ancestral do header
       criar um containing-block ao rolar. */
    height: 100vh;
    height: 100dvh;
    z-index: 70;
    width: min(80vw, 320px);
    background-color: var(--branco);
    box-shadow: -14px 0 44px rgba(10, 17, 24, 0.22);
    padding: 100px 0 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 28px;
  }

  .nav-link {
    display: block;
    padding: 16px 0;
    color: var(--texto);
    border-bottom: 1px solid var(--linha);
  }

  .nav-link.active {
    border-bottom-color: var(--laranja);
  }

  .nav-cta {
    margin-top: 20px;
  }

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

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 60px) 0 80px;
  }

  .hero::after {
    background: linear-gradient(
      170deg,
      rgba(10, 17, 24, 0.92) 0%,
      rgba(10, 17, 24, 0.78) 60%,
      rgba(10, 17, 24, 0.55) 100%
    );
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .stats-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 0;
  }

  .stats-item:nth-child(odd) {
    border-left: none;
  }

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

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

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

  .cta-actions .btn {
    flex: 1 1 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* === RESPONSIVO — MOBILE PEQUENO (até 420px) === */
@media (max-width: 420px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-phones {
    font-size: 17px;
  }
}
