:root {
  --red: #e1251b;
  --red-dark: #b81a12;
  --black: #0b0b0c;
  --ink: #141416;
  --ink-2: #1d1d21;
  --gray: #6b6b74;
  --gray-light: #f4f4f6;
  --white: #ffffff;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c4b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --header-h: 124px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); }
.btn--sm { padding: 10px 20px; font-size: .88rem; }

/* ---------- Cabeçalho ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 11, 12, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .3s, height .3s;
}
.header.is-scrolled { background: rgba(11, 11, 12, .94); --header-h: 84px; height: 84px; }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__logo img { height: 100px; width: auto; transition: height .3s; }
.header.is-scrolled .header__logo img { height: 62px; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) {
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s;
}
.nav a:not(.btn):hover { color: var(--white); }
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 26px; height: 2px; margin: 6px 0; background: var(--white); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  background: var(--black);
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 60px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 85% 20%, rgba(225, 37, 27, .35), transparent 55%),
    linear-gradient(100deg, rgba(11, 11, 12, .97) 30%, rgba(11, 11, 12, .65) 100%),
    url("assets/img/servico-eletrica.webp") center / cover no-repeat;
}
.hero__content { position: relative; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  max-width: 20ch;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(255, 255, 255, .78); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.stats {
  list-style: none;
  padding: 0;
  margin: 64px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 56px;
}
.stats li { display: flex; flex-direction: column; border-left: 3px solid var(--red); padding-left: 16px; }
.stats strong { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stats span { font-size: .88rem; color: rgba(255, 255, 255, .65); }

/* ---------- Seções ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark p { color: rgba(255, 255, 255, .75); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; text-wrap: balance; }
.section__head p { color: var(--gray); }

/* ---------- Serviços ---------- */
.service-index {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: clamp(56px, 8vw, 96px);
}
.service-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--gray-light);
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.3;
  transition: background .2s, color .2s;
}
.service-index a::before { content: ""; flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--red); }
.service-index a:hover { background: var(--ink); color: var(--white); }

.services { display: grid; gap: clamp(72px, 10vw, 128px); }
.service {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.service:nth-child(even) .service__media { order: 2; justify-self: end; }

.service__media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: min(100%, 496px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .14);
}
.service__media::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 72px; height: 5px;
  background: var(--red);
  z-index: 2;
}
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.service:hover .service__media img { transform: scale(1.04); }

/* Foto muito vertical (painel): mostra inteira sobre um fundo desfocado da própria foto */
.service__media--contain::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: var(--photo) center / cover;
  filter: blur(28px) brightness(.55);
}
.service__media--contain img { position: relative; object-fit: contain; padding: 20px 0; }
.service:hover .service__media--contain img { transform: none; }

.service h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
.service__lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding-left: 14px;
}
.service__text p:not(.service__lead) { color: var(--gray); }

.tags { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gray-light);
  color: var(--ink);
}

.service__cta { font-weight: 600; color: var(--red); display: inline-flex; align-items: center; gap: 8px; }
.service__cta::after { content: "→"; transition: transform .2s; }
.service__cta:hover::after { transform: translateX(4px); }

/* ---------- Quem somos ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split__text .btn { margin-top: 12px; }

/* Duas fotos sobrepostas: a segunda avança sobre o canto inferior esquerdo da primeira */
.about-photos { display: grid; }
.about-photos img { border-radius: var(--radius); object-fit: cover; height: auto; align-self: start; }
.about-photos img:first-child { width: 84%; justify-self: end; aspect-ratio: 853 / 751; }
.about-photos img:last-child {
  width: 54%;
  aspect-ratio: 853 / 762;
  object-position: left top;
  margin-top: -26%;
  position: relative;
  border: 6px solid var(--ink);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.purpose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(56px, 8vw, 96px);
}
.purpose__card {
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--ink-2);
  border-top: 4px solid var(--red);
}
.purpose__card h3 { font-size: 1.3rem; font-weight: 700; }
.section--dark .purpose__card p { margin: 0; color: rgba(255, 255, 255, .75); }

.values { margin-top: clamp(48px, 7vw, 80px); }
.values__title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 28px; }
.values__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.values__list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.values__list strong { color: #ff6b62; font-weight: 600; }
.values__list span { font-size: .9rem; line-height: 1.5; color: rgba(255, 255, 255, .7); }

/* ---------- Diferenciais ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--gray-light);
  transition: background .3s, color .3s;
}
.feature:hover { background: var(--ink); color: var(--white); }
.feature:hover p { color: rgba(255, 255, 255, .7); }
.feature__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--red);
  margin-bottom: 20px;
}
.feature__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.1rem; font-weight: 600; }
.feature p { color: var(--gray); font-size: .95rem; margin: 0; transition: color .3s; }

/* ---------- Clientes ---------- */
.clients {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.client {
  flex: 0 1 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 30px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: border-color .25s;
}
.client:hover { border-color: rgba(225, 37, 27, .6); }
.client img {
  width: 140px; height: 140px;
  border-radius: 50%;
  margin-bottom: 22px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06);
}
.client h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .3em; }
.section--dark .client p { font-size: .9rem; color: rgba(255, 255, 255, .6); margin: 0; }

/* ---------- Contato ---------- */
.section--contact { background: var(--gray-light); }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 860px;
  margin-inline: auto;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: clamp(28px, 4vw, 40px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: translate .25s, border-color .25s, box-shadow .25s, opacity .7s ease, transform .7s ease;
}
.contact-card:hover { translate: 0 -4px; border-color: var(--red); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }
.contact-card--whatsapp:hover { border-color: var(--whatsapp); }
.contact-card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--red);
  color: var(--white);
  margin-bottom: 18px;
}
.contact-card--whatsapp .contact-card__icon { background: var(--whatsapp); }
.contact-card__icon svg { width: 28px; height: 28px; }
.contact-card__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gray); font-weight: 500; }
.contact-card strong { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 700; overflow-wrap: anywhere; }
.contact-card__action { margin-top: 14px; font-weight: 600; color: var(--red); display: inline-flex; gap: 8px; }
.contact-card--whatsapp .contact-card__action { color: var(--whatsapp-dark); }
.contact-card__action::after { content: "→"; transition: transform .2s; }
.contact-card:hover .contact-card__action::after { transform: translateX(4px); }

/* Botão flutuante do WhatsApp */
.whatsapp-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
  transition: transform .2s, background .2s;
}
.whatsapp-fab:hover { transform: scale(1.08); background: var(--whatsapp-dark); }
.whatsapp-fab svg { width: 32px; height: 32px; }

/* ---------- Rodapé ---------- */
.footer { background: var(--black); color: rgba(255, 255, 255, .6); padding: 40px 0; font-size: .88rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__logo { height: 56px; width: auto; }
.footer p { margin: 0; }
.footer__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.footer__contact a { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-weight: 500; }
.footer__contact a:hover { color: var(--white); }
.footer__contact svg { width: 18px; height: 18px; color: var(--red); }

/* ---------- 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; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  :root { --header-h: 84px; }
  .header__logo img { height: 60px; }
  .header.is-scrolled .header__logo img { height: 54px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 24px;
    background: rgba(11, 11, 12, .98);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s, opacity .3s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; }

  .service-index { grid-template-columns: 1fr 1fr; }
  .service { grid-template-columns: 1fr; }
  .service:nth-child(even) .service__media { order: 0; }
  .service__media { aspect-ratio: 4 / 4.4; width: 100%; }

  .split { grid-template-columns: 1fr; }
  .about-photos { order: -1; }
  .purpose { grid-template-columns: 1fr; }
  .values__list { grid-template-columns: 1fr 1fr; }
  .values__list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer { padding-bottom: 100px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .values__list { grid-template-columns: 1fr; }
}
