/* ===== Variáveis ===== */
:root {
  --color-black: #000;
  --color-white: #fff;
  --color-cta: #1976d2;
  --color-cta-hover: #1565c0;
  --color-text-dark: #1a1a1a;
  --color-border: #e3e8ef;
  --color-hero-bg: #0a1628;
  --color-accent: #42a5f5;
  --color-tech-glow: rgba(66, 165, 245, 0.12);
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --header-height: 52px;
  --nav-height: 88px;
  --container-max: 1400px;
  --space-sm: 0.75rem;
  --space-md: 1.35rem;
  --space-lg: 2rem;
}

/* ===== Reset básico ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--color-text-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Fundo tecnológico compartilhado ===== */
.top-header,
.hero,
.servicos-sep {
  position: relative;
  background-color: var(--color-hero-bg);
  overflow: hidden;
  isolation: isolate;
}

.top-header::before,
.hero::before,
.servicos-sep::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 700' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23276fbd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.34'%3E%3Cpath d='M0 130h160l28 28v74h170'/%3E%3Cpath d='M0 530h220l42-42h188l28-28V340h118'/%3E%3Cpath d='M112 0v82l36 36h172'/%3E%3Cpath d='M252 700v-96l34-34h182'/%3E%3Cpath d='M334 108h170l34 34v118l34 34h152'/%3E%3Cpath d='M412 592h188l32-32V408l30-30h200'/%3E%3Cpath d='M624 0v116l42 42h202l34 34v80'/%3E%3Cpath d='M760 700v-112l38-38h146l32-32V360'/%3E%3Cpath d='M910 122h154l38 38v96l34 34h152'/%3E%3Cpath d='M1028 470h168l30-30V286l32-32h146'/%3E%3Cpath d='M1326 0v92l-28 28v110l-30 30v120'/%3E%3Cpath d='M1600 172h-176l-34 34v116l-34 34h-138'/%3E%3Cpath d='M1600 566h-206l-32-32V418l-30-30h-118'/%3E%3Cpath d='M1268 700v-84l-28-28v-82l-30-30h-126'/%3E%3Cpath d='M486 304h84'/%3E%3Cpath d='M976 360h94'/%3E%3Cpath d='M1140 240h68'/%3E%3Cpath d='M218 232h72'/%3E%3C/g%3E%3Cg fill='%23348be0' opacity='.32'%3E%3Ccircle cx='226' cy='232' r='6'/%3E%3Ccircle cx='282' cy='232' r='6'/%3E%3Ccircle cx='334' cy='108' r='6'/%3E%3Ccircle cx='412' cy='592' r='6'/%3E%3Ccircle cx='570' cy='304' r='6'/%3E%3Ccircle cx='724' cy='274' r='6'/%3E%3Ccircle cx='902' cy='272' r='6'/%3E%3Ccircle cx='976' cy='360' r='6'/%3E%3Ccircle cx='1070' cy='360' r='6'/%3E%3Ccircle cx='1140' cy='240' r='6'/%3E%3Ccircle cx='1208' cy='240' r='6'/%3E%3Ccircle cx='1288' cy='356' r='6'/%3E%3Ccircle cx='1084' cy='558' r='6'/%3E%3Ccircle cx='146' cy='118' r='6'/%3E%3C/g%3E%3Cg fill='%23215ca1' opacity='.18'%3E%3Crect x='106' y='192' width='66' height='66' rx='6'/%3E%3Crect x='676' y='88' width='96' height='96' rx='8'/%3E%3Crect x='1182' y='498' width='88' height='88' rx='8'/%3E%3Crect x='1368' y='100' width='126' height='34' rx='6'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(4, 15, 35, 0.1), rgba(4, 15, 35, 0.22));
  background-size: cover;
  background-position: center;
  opacity: 0.62;
  pointer-events: none;
  z-index: -2;
}

.top-header::after,
.hero::after,
.servicos-sep::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, var(--color-tech-glow), transparent 18%),
    radial-gradient(circle at 78% 24%, var(--color-tech-glow), transparent 20%),
    radial-gradient(circle at 68% 76%, rgba(66, 165, 245, 0.08), transparent 22%);
  pointer-events: none;
  z-index: -1;
}

/* ===== Top Header (barra preta) ===== */
.top-header {
  color: var(--color-white);
  padding: var(--space-md) var(--space-lg);
}

.top-header::before {
  inset: -180px 0;
  background-position: center;
  background-size: cover;
  opacity: 0.48;
  transform: scale(1.02);
}

.top-header::after {
  inset: -120px 0;
}

.servicos-sep::before {
  inset: -180px 0;
  background-position: center;
  background-size: cover;
  opacity: 0.48;
  transform: scale(1.02);
}

.servicos-sep::after {
  inset: -120px 0;
}

.top-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.top-header__contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
}

.top-header__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-white);
  font-size: 1rem;
}

.top-header__link:hover {
  opacity: 0.9;
}

.top-header__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.top-header__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.top-header__email {
  flex-shrink: 0;
}

.top-header__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.top-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(144, 202, 249, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--color-white);
  transition: background 0.2s;
}

.top-header__social-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.top-header__social-link svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* ===== Nav Bar ===== */
.nav-bar {
  background: var(--color-white);
  border-bottom: 2px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav-bar__collapse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: var(--space-lg);
}

.nav-bar__logo {
  flex-shrink: 0;
  display: block;
}

.nav-bar__logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-bar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 52px;
  height: 52px;
  padding: 12px;
  background: none;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-dark);
}

.nav-bar__toggle-line {
  display: block;
  width: 100%;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.nav-bar__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.nav-bar__menu > li {
  position: relative;
}

.nav-bar__menu > li > a {
  display: block;
  padding: var(--space-md) var(--space-sm);
  color: var(--color-text-dark);
  font-size: 1.05rem;
  font-weight: 500;
}

.nav-bar__menu > li > a:hover {
  color: var(--color-cta);
}

.nav-bar__arrow {
  font-size: 0.65rem;
  margin-left: 4px;
  vertical-align: middle;
}

/* Dropdown Serviços */
.nav-bar__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.nav-bar__item--dropdown:hover .nav-bar__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-bar__submenu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-dark);
  font-size: 1rem;
  border-radius: 6px;
}

.nav-bar__submenu a:hover {
  background: var(--color-border);
  color: var(--color-cta);
}

.nav-bar__cta {
  flex-shrink: 0;
  display: inline-block;
  padding: 14px 28px;
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.nav-bar__cta:hover {
  background: var(--color-cta-hover);
}

/* ===== Hero ===== */
.hero {
  padding: var(--space-lg) var(--space-lg);
}

.hero__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.hero__text {
  border: 8px solid var(--color-white);
  border-right: none;
  padding: var(--space-lg);
  color: var(--color-white);
  align-self: center;
  max-width: 100%;
}

.hero__title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero__slogan {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
  opacity: 0.95;
}

.hero__image-wrap {
  position: relative;
}

.hero__image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  display: block;
}

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .hero__text {
    order: 1;
    border-right: 8px solid var(--color-white);
  }

  .hero__image-wrap {
    order: 2;
  }
}

/* ===== Porque somos a melhor escolha ===== */
.why {
  background: var(--color-white);
  padding: var(--space-lg) var(--space-md);
}

.why__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.why__cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.why__cta:hover {
  background: var(--color-cta-hover);
}

.why__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.3;
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  width: 100%;
}

.why__card {
  background: var(--color-white);
  border: 3px solid var(--color-accent);
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.why__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.why__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.why__card-title {
  margin: 0 0 var(--space-md);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.3;
}

.why__card-text {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-dark);
  text-align: left;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .why__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Como Funciona Nosso Atendimento ===== */
.atendimento {
  background: var(--color-white);
  padding: var(--space-lg) var(--space-md);
}

.atendimento__inner {
  max-width: 1000px;
  margin: 0 auto;
}

.atendimento__title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.3;
}

.atendimento__content {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.atendimento__text {
  min-width: 0;
}

.atendimento__text p {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  color: var(--color-text-dark);
  line-height: 1.6;
  text-align: left;
}

.atendimento__text p:last-child {
  margin-bottom: 0;
}

.atendimento__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-md);
  align-content: start;
  max-width: 420px;
  justify-self: end;
}

.atendimento__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.atendimento__img--1 {
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 4/3;
}

.atendimento__img--2 {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 4/3;
}

.atendimento__img--3 {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  aspect-ratio: 2/3;
}

@media (max-width: 960px) {
  .atendimento__content {
    grid-template-columns: 1fr;
  }

  .atendimento__images {
    order: -1;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    max-width: 400px;
    margin: 0 auto;
    justify-self: center;
  }

  .atendimento__img--3 {
    grid-row: 1 / 3;
  }
}

@media (max-width: 480px) {
  .atendimento__images {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .atendimento__img--3 {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 2/3;
    max-height: 360px;
    justify-self: center;
  }
}

/* ===== Separador da área de serviços ===== */
.servicos-sep {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.servicos-sep__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.servicos-sep__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}

.servicos-sep__subtitle {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* ===== Serviços (seções separadas) ===== */
.servico {
  background: var(--color-white);
  padding: var(--space-lg) var(--space-md);
}

.servico--alt {
  background: #f5f7fa;
}

.servico__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.servico__title {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.3;
}

.servico__content {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  width: 100%;
}

.servico__text {
  min-width: 0;
}

.servico__text p {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  color: var(--color-text-dark);
  line-height: 1.6;
  text-align: left;
}

.servico__text p:last-child {
  margin-bottom: 0;
}

.servico__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-md);
  align-content: start;
  max-width: 420px;
  justify-self: end;
}

.servico__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.servico__img--1 {
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 4/3;
}

.servico__img--2 {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 4/3;
}

.servico__img--3 {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  aspect-ratio: 2/3;
}

.servico__cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.servico__cta:hover {
  background: var(--color-cta-hover);
}

@media (max-width: 960px) {
  .servico__content {
    grid-template-columns: 1fr;
  }

  .servico__images {
    order: -1;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    max-width: 400px;
    margin: 0 auto;
    justify-self: center;
  }

  .servico__img--3 {
    grid-row: 1 / 3;
  }
}

@media (max-width: 480px) {
  .servico__images {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .servico__img--3 {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 2/3;
    max-height: 360px;
    justify-self: center;
  }
}

/* ===== Responsividade ===== */

/* Header: empilhar em telas pequenas */
@media (max-width: 768px) {
  .top-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .top-header__email {
    order: 2;
  }

  .top-header__social {
    order: 3;
  }
}

@media (max-width: 480px) {
  .top-header__link {
    font-size: 0.95rem;
  }

  .top-header__social-link {
    width: 38px;
    height: 38px;
  }

  .top-header__social-link svg {
    width: 18px;
    height: 18px;
  }
}

/* Nav: hambúrguer a partir de 768px */
@media (max-width: 768px) {
  .nav-bar__inner {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-bar__toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-bar__collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    margin-top: var(--space-sm);
  }

  .nav-bar__collapse.is-open {
    display: flex;
  }

  .nav-bar__menu {
    flex-direction: column;
    order: 1;
  }

  .nav-bar__menu > li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-bar__menu > li:last-child {
    border-bottom: none;
  }

  .nav-bar__menu > li > a {
    padding: var(--space-md);
  }

  .nav-bar__item--dropdown .nav-bar__submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    display: none;
  }

  .nav-bar__item--dropdown.is-open .nav-bar__submenu {
    display: block;
  }

  .nav-bar__cta {
    order: 2;
    margin-top: var(--space-sm);
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-bar__logo img {
    width: 54px;
    height: 54px;
  }

  .nav-bar__menu > li > a {
    font-size: 1rem;
  }
}
