/* =========================================================
   HL Engenharia Elétrica — site estático
   Réplica do layout Jupiter/WPBakery original, em HTML/CSS/JS puro
   ========================================================= */

:root {
  --azul: #005ad7;
  --azul-escuro: #0049b0;
  --verde: #39c839;
  --verde-escuro: #2eaa2e;
  --texto: #282828;
  --titulo: #515151;
  --subtitulo: #727272;
  --menu: #a5a5a5;
  --cinza-claro: #f7f7f7;
  --cinza-secao: #fcfcfc;
  --borda: #eeeeee;
  --rodape: #231f20;
  --rodape-texto: #8e8e8e;
  --subrodape: #43474d;

  --f-titulo: "Titillium Web", "Segoe UI", Arial, sans-serif;
  --f-texto: "Open Sans", "Segoe UI", Arial, sans-serif;
  --f-slider: "Roboto", "Segoe UI", Arial, sans-serif;

  --container: 1140px;
  --header-h: 120px;
  --header-h-min: 70px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.66;
  color: var(--texto);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-decoration: none; transition: color .2s; }
a:hover { color: var(--azul-escuro); }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }

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

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--azul); color: #fff; padding: 10px 16px;
}
.skip-link:focus { top: 10px; color: #fff; }

/* ---------- Cabeçalho ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--borda);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .04);
}

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

.logo img {
  width: 350px;
  transition: width .3s;
}
.is-scrolled .logo img { width: 175px; }

.main-nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0 -20px 0 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--f-titulo);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--menu);
  line-height: 55px;
  display: block;
  padding: 0 20px;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--azul); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--titulo);
  border-radius: 2px;
  position: relative;
  transition: transform .3s, background .3s;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

.header-spacer { height: var(--header-h); background: var(--cinza-claro); }

/* ---------- Títulos de seção ---------- */

.section-title {
  font-family: var(--f-titulo);
  font-size: 40px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--titulo);
  text-align: center;
  letter-spacing: 1px;
}
.divider {
  width: 70px;
  height: 4px;
  background: var(--verde);
  margin: 22px auto 34px;
  border: 0;
}
.section { padding: 70px 0; }

/* ---------- Slider (página inicial) ---------- */

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #1d2a33;
  color: #fff;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.hero-slide.is-active img { transform: scale(1); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .12);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 70px;
}
.hero-content > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.is-active .hero-content > * { opacity: 1; transform: none; }
.is-active .hero-content > :nth-child(2) { transition-delay: .25s; }
.is-active .hero-content > :nth-child(3) { transition-delay: .45s; }
.is-active .hero-content > :nth-child(4) { transition-delay: .65s; }

.hero-icon { width: 34px; height: 58px; margin: 0 auto 26px; fill: #fff; }
.hero-kicker {
  font-family: var(--f-slider);
  font-weight: 300;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 5px;
  margin-bottom: 4px;
}
.hero-title {
  font-family: var(--f-slider);
  font-weight: 900;
  font-size: 80px;
  line-height: 1.1;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-text {
  font-family: var(--f-texto);
  font-size: 20px;
  line-height: 1.4;
  margin: 0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 60px;
  height: 80px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hero-arrow svg { width: 24px; height: 40px; stroke: #fff; stroke-width: 2.5; fill: none; transition: transform .2s; }
.hero-arrow:hover svg { transform: scale(1.15); }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.hero-dots button[aria-current="true"] { background: #fff; }

/* ---------- Sobre (página inicial) ---------- */

.intro { background: var(--cinza-secao); padding: 80px 0 60px; }
.intro p {
  max-width: 730px;
  margin: 0 auto;
  text-align: center;
}

/* ---------- Galeria ---------- */

.gallery {
  border-top: 1px solid var(--borda);
  border-bottom: 1px solid var(--borda);
  padding: 15px 0 30px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eee;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s, opacity .4s;
}
.gallery-grid a:hover img { transform: scale(1.06); opacity: .9; }

/* ---------- Cards de serviço ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1041px;
  margin: 0 0 0 15px;
}
.cards--wide { max-width: 1110px; margin-left: -4px; }
.card { text-align: center; }
.card-img { overflow: hidden; aspect-ratio: 1 / 1; margin-bottom: 26px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card h2,
.card h3 {
  font-family: var(--f-titulo);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--subtitulo);
  margin-bottom: 12px;
}
.card p { margin: 0 auto; }

/* ---------- Especificações (fundo escuro) ---------- */

.specs {
  position: relative;
  padding: 80px 0 100px;
  color: #fff;
  text-align: center;
  background: #303030 url("../img/fundo-especificacoes.webp") center / cover no-repeat;
}
.specs::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(48, 48, 48, .78);
}
.specs .container { position: relative; }
.specs .section-title { color: #fff; }
.specs p {
  font-family: var(--f-titulo);
  font-size: 20px;
  line-height: 1.3;
  max-width: 984px;
  margin: 0 auto;
}

/* ---------- Faixa de chamada (CTA) ---------- */

.cta { background: var(--azul); color: #fff; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px 30px;
  min-height: 113px;
  padding: 22px 35px;
  flex-wrap: wrap;
  text-align: center;
}
.cta-inner p { flex: 0 1 730px; }
.cta p {
  font-family: var(--f-texto);
  font-size: 26px;
  line-height: 1.3;
  margin: 0;
}
.cta--box { max-width: 1070px; margin: 0; }
.cta--box .cta-inner { justify-content: space-between; min-height: 83px; padding: 14px 29px 14px 15px; }
.cta--box p { flex: 0 1 683px; }

.btn {
  display: inline-block;
  font-family: var(--f-texto);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: var(--verde);
  line-height: 14px;
  padding: 20px 28px;
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--verde-escuro); color: #fff; transform: translateY(-1px); }

/* ---------- Clientes ---------- */

.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: center;
}
.clients-grid img {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  transition: transform .3s;
}
.clients-grid img:hover { transform: scale(1.06); }
.clients { padding: 70px 0 40px; }
.clients--page { padding: 40px 0; }

/* ---------- Banner das páginas internas ---------- */

.page-banner {
  position: relative;
  height: 206px;
  display: grid;
  place-items: center;
  background: var(--azul) center / cover no-repeat;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 90, 215, .88) 0%, rgba(13, 120, 160, .82) 50%, rgba(46, 185, 45, .88) 100%);
}
.page-banner h1 {
  position: relative;
  font-family: var(--f-titulo);
  font-weight: 200;
  font-size: 60px;
  line-height: 1.3;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.page-banner--sobre { background-image: url("../img/banner-sobre.webp"); }
.page-banner--servicos { background-image: url("../img/banner-servicos.webp"); }
.page-banner--contato { background-image: url("../img/banner-contato.webp"); }

/* ---------- Sobre nós ---------- */

.about {
  display: grid;
  grid-template-columns: 245px minmax(0, 795px);
  gap: 30px;
  max-width: 1070px;
  margin: 0 0 40px;
  align-items: start;
}
.about h2,
.contact-info h2,
.contact-form h2 {
  font-family: var(--f-titulo);
  font-size: 25px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--azul);
  margin-bottom: 18px;
  line-height: 1.3;
}
.about p,
.contact-info p {
  font-family: var(--f-titulo);
  font-size: 18px;
  line-height: 1.3;
  color: #424242;
}
.about p { margin-bottom: 1.2em; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1041px;
  margin: 0 0 0 15px;
  text-align: center;
}
.feature-icon {
  width: 200px;
  height: 200px;
  margin: 0 auto 34px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color .3s, background .3s;
}
.feature:hover .feature-icon { border-color: var(--verde); background: #f6fcf6; }
.feature-icon svg { width: 52px; height: 52px; stroke: var(--verde); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 {
  font-family: var(--f-titulo);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--subtitulo);
  margin-bottom: 12px;
}
.feature p { margin: 0 auto; }
.section-title--light { font-weight: 200; }

/* ---------- Contato ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1070px;
  margin: 0;
}
.contact-info h2 { margin-top: 30px; }
.contact-info h2:first-child { margin-top: 0; }
.contact-info p { margin: 0 0 10px; }
.contact-info .label {
  display: block;
  font-family: var(--f-titulo);
  color: #2f7fd8;
  font-size: 18px;
  text-transform: uppercase;
}
.contact-info a { color: var(--texto); }
.contact-info a:hover { color: var(--azul); }
.contact-info .email a { color: #2f7fd8; }

.contact-form h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--verde);
  margin-top: 8px;
}
.form-note { font-size: 12px; color: #666; margin-bottom: 10px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.req { color: #c00; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--texto);
  background: var(--cinza-claro);
  border: 1px solid #e6e6e6;
  padding: 8px 14px;
  min-height: 39px;
  border-radius: 0;
  transition: border-color .2s, background .2s;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--azul); background: #fff; }
.field textarea { min-height: 200px; resize: vertical; }
.field .error { display: none; color: #c00; font-size: 12px; margin-top: 4px; }
.field.has-error input,
.field.has-error textarea { border-color: #c00; }
.field.has-error .error { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 14px; padding: 12px 14px; display: none; font-size: 14px; }
.form-status.is-ok { display: block; background: #eaf8ea; color: #1d6b1d; border-left: 4px solid var(--verde); }
.form-status.is-error { display: block; background: #fdeeee; color: #8a1c1c; border-left: 4px solid #c00; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

.map {
  max-width: 1100px;
  margin: 50px auto 0;
  border: 1px solid var(--borda);
  padding: 2px;
  background: #fafafa;
}
.map iframe { display: block; width: 100%; height: 300px; border: 0; }

/* ---------- Rodapé ---------- */

.site-footer {
  background: var(--rodape);
  color: var(--rodape-texto);
  font-size: 14px;
  line-height: 1.55;
  padding: 50px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.footer-grid > div { padding: 0 22px; }
.site-footer h2 {
  font-family: var(--f-texto);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 22px;
}
.site-footer p { margin: 0 0 16px; }
.site-footer a { color: var(--rodape-texto); }
.site-footer a:hover { color: #fff; }
.footer-logo { width: 310px; margin-bottom: 26px; }
.footer-item { display: block; margin-bottom: 16px; }
.footer-item strong { display: block; font-weight: 400; text-transform: uppercase; }

.sub-footer {
  background: var(--subrodape);
  color: #b9bcc0;
  font-size: 12px;
  text-align: center;
  padding: 18px 20px;
}
.sub-footer p { margin: 0; }

/* ---------- Voltar ao topo ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(64, 64, 64, .8);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--azul); }
.to-top svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.5; fill: none; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 70px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 85vh; width: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
  padding: 10px 16px;
  opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- Animação de entrada ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-content > * { opacity: 1; transform: none; }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1024px) {
  .hero { height: 520px; }
  .hero-title { font-size: 60px; }
  .hero-kicker { font-size: 24px; }
}

@media (max-width: 900px) {
  :root { --header-h: 80px; --header-h-min: 64px; }
  .logo img { width: 210px; }
  .is-scrolled .logo img { width: 160px; }

  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--borda);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-open .main-nav { max-height: 400px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 6px 0; margin: 0; }
  .main-nav a { padding: 0 20px; line-height: 50px; border-bottom: 1px solid #f3f3f3; }
  .main-nav li:last-child a { border-bottom: 0; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid a:nth-child(n+4) { grid-column: span 1; }
  .clients-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .cards, .features, .cards--wide { margin-left: auto; margin-right: auto; }
  .about { grid-template-columns: 200px 1fr; }
  .cta--box { margin: 0 auto; }
  .cta--box .cta-inner,
  .cta-inner { justify-content: center; padding: 26px 20px; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 30px; }
  .divider { margin: 16px auto 26px; }

  .hero { height: 460px; }
  .hero-content { padding: 0 44px; }
  .hero-icon { width: 24px; height: 40px; margin-bottom: 16px; }
  .hero-kicker { font-size: 16px; letter-spacing: 3px; }
  .hero-title { font-size: 34px; letter-spacing: 2px; }
  .hero-text { font-size: 15px; }
  .hero-arrow { width: 40px; }
  .hero-arrow.prev { left: 2px; }
  .hero-arrow.next { right: 2px; }

  .intro { padding: 50px 0 40px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid a:last-child { grid-column: span 2; aspect-ratio: 8 / 3; }

  .cards,
  .features { grid-template-columns: 1fr; gap: 40px; max-width: 380px; }

  .specs { padding: 60px 0 70px; }
  .specs p { font-size: 17px; }

  .cta p { font-size: 21px; }
  .cta-inner { gap: 18px; padding: 30px 20px; }

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

  .page-banner { height: 150px; }
  .page-banner h1 { font-size: 38px; }
  .about p, .contact-info p { font-size: 16px; }
  .about h2, .contact-info h2, .contact-form h2 { font-size: 21px; }
  .feature-icon { width: 170px; height: 170px; }
  .footer-grid > div { padding: 0; }
  .footer-logo { width: 260px; }

  .about { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .about img { max-width: 200px; }

  .footer-grid { grid-template-columns: 1fr; gap: 10px; }
  .map iframe { height: 260px; }

  .lightbox { padding: 20px 10px; }
}
