:root {
  --azul: #042e94;
  --azul-claro: #0c4bd6;
  --azul-escuro: #02184f;
  --laranja: #ff4700;
  --branco: #fff;
  --fundo: #f3f6fc;
  --cartao: rgb(255 255 255 / 96%);
  --texto: #1c2434;
  --texto-suave: #667085;
  --borda: rgb(4 46 148 / 12%);
  --sombra: 0 18px 45px rgb(4 46 148 / 14%);
  --raio: 24px;
}

body.dark {
  --fundo: #08101f;
  --cartao: rgb(13 24 45 / 95%);
  --texto: #f8fafc;
  --texto-suave: #b6c2d4;
  --borda: rgb(255 255 255 / 9%);
  --sombra: 0 18px 45px rgb(0 0 0 / 35%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at 10% 10%, rgb(255 71 0 / 13%), transparent 22%), radial-gradient(circle at 90% 20%, rgb(12 75 214 / 16%), transparent 28%), var(--fundo);
  transition: background 0.3s ease, color 0.3s ease;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.bg-grid {
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgb(4 46 148 / 8%) 1px, transparent 1px), linear-gradient(90deg, rgb(4 46 148 / 8%) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
  pointer-events: none;
  animation: flutuar 9s ease-in-out infinite alternate;
}

.orb-1 {
  top: 18%;
  left: -90px;
  width: 260px;
  height: 260px;
  background: var(--laranja);
}

.orb-2 {
  right: -120px;
  bottom: 8%;
  width: 330px;
  height: 330px;
  background: var(--azul-claro);
  animation-delay: 1.5s;
}

@keyframes flutuar {
  from {
    transform: translateY(-10px) scale(1);
  }

  to {
    transform: translateY(30px) scale(1.08);
  }
}

.pagina {
  width: min(100% - 28px, 1120px);
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.tema {
  width: 46px;
  height: 46px;
  border: 1px solid var(--borda);
  border-radius: 50%;
  color: var(--azul);
  background: var(--cartao);
  box-shadow: var(--sombra);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tema:hover {
  transform: translateY(-2px) rotate(8deg);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 28px 34px;
  border: 1px solid var(--borda);
  border-radius: 32px;
  color: var(--branco);
  text-align: center;
  background: linear-gradient(145deg, rgb(4 46 148 / 98%), rgb(2 24 79 / 98%));
  box-shadow: var(--sombra);
}

.hero::after {
  position: absolute;
  top: -240px;
  right: -220px;
  width: 460px;
  height: 460px;
  border: 80px solid rgb(255 255 255 / 5%);
  border-radius: 50%;
  content: "";
}

.logo-imagem {
  width: 126px;
      height: 126px;
      margin: 0 auto 18px;
      border-radius: 50%;
      object-fit: contain;
      background: var(--branco);
      border: 6px solid rgba(255, 255, 255, 0.42);
      box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
      position: relative;
      z-index: 1;
}

.selo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 13px;
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 1;
}

.hero h1 span {
  color: var(--laranja);
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  color: rgb(255 255 255 / 84%);
  font-size: 17px;
  line-height: 1.65;
}

.acoes {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 19px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-principal {
  color: var(--branco);
  background: var(--laranja);
  box-shadow: 0 10px 28px rgb(255 71 0 / 32%);
}

.btn-secundario {
  border: 1px solid rgb(255 255 255 / 18%);
  color: var(--branco);
  background: rgb(255 255 255 / 12%);
}

.secao {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--cartao);
  box-shadow: var(--sombra);
  transition: background 0.3s ease;
}

.secao-cabecalho {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.secao-cabecalho h2 {
  margin-bottom: 5px;
  color: var(--azul);
  font-size: 25px;
}

body.dark .secao-cabecalho h2,
body.dark .card h3,
body.dark .rede span,
body.dark .rodape strong {
  color: #8fb3ff;
}

.secao-cabecalho p {
  color: var(--texto-suave);
  line-height: 1.5;
}

.grade-servicos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.card {
  min-height: 170px;
  padding: 20px 16px;
  border: 1px solid var(--borda);
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(160deg, rgb(4 46 148 / 6%), transparent 70%);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgb(255 71 0 / 45%);
  box-shadow: 0 14px 28px rgb(4 46 148 / 12%);
}

.icone {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  color: var(--branco);
  background: var(--azul);
  box-shadow: 0 8px 20px rgb(4 46 148 / 24%);
  font-size: 24px;
}

.card:nth-child(even) .icone {
  background: var(--laranja);
  box-shadow: 0 8px 20px rgb(255 71 0 / 24%);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--azul);
  font-size: 17px;
}

.card p {
  color: var(--texto-suave);
  font-size: 14px;
  line-height: 1.45;
}

.grade-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}

.rede {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--borda);
  border-radius: 16px;
  color: var(--texto);
  text-align: left;
  text-decoration: none;
  background: rgb(4 46 148 / 3.5%);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rede-botao {
  width: 100%;
  cursor: pointer;
}

.rede:hover {
  transform: translateX(4px);
  border-color: rgb(255 71 0 / 45%);
  background: rgb(255 71 0 / 6%);
}

.rede-icone {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--branco);
  background: var(--azul);
  font-size: 21px;
}

.rede:nth-child(3n) .rede-icone,
.rede:nth-child(4n) .rede-icone {
  background: var(--laranja);
}

.rede span {
  color: var(--azul);
  font-weight: 800;
}

.rede small {
  display: block;
  margin-top: 3px;
  color: var(--texto-suave);
  font-weight: 400;
}

.cta {
  margin-top: 24px;
  padding: 30px;
  border-radius: var(--raio);
  color: var(--branco);
  text-align: center;
  background: linear-gradient(135deg, var(--laranja), #d93900);
  box-shadow: 0 18px 38px rgb(255 71 0 / 22%);
}

.cta h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
}

.cta p {
  max-width: 630px;
  margin: 0 auto 20px;
  color: rgb(255 255 255 / 87%);
  line-height: 1.55;
}

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

.rodape {
  padding: 28px 12px 0;
  color: var(--texto-suave);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.rodape a {
  color: var(--azul);
  font-weight: 800;
  text-decoration: none;
}

.aviso {
  position: fixed;
  z-index: 99;
  bottom: 24px;
  left: 50%;
  padding: 12px 18px;
  border-radius: 12px;
  visibility: hidden;
  color: white;
  background: #111827;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: 0.25s ease;
}

.aviso.ativo {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visivel {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .grade-servicos {
    grid-template-columns: repeat(2, 1fr);
  }

  .grade-servicos .card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .pagina {
    width: min(100% - 18px, 1120px);
    padding-top: 16px;
  }

  .hero,
  .secao,
  .cta {
    border-radius: 22px;
  }

  .hero {
    padding: 38px 18px 26px;
  }

  .logo-imagem {
    width: 106px;
    height: 106px;
  }

  .secao {
    padding: 22px 16px;
  }

  .secao-cabecalho {
    display: block;
  }

  .grade-links,
  .grade-servicos {
    grid-template-columns: 1fr;
  }

  .grade-servicos .card:last-child {
    grid-column: auto;
  }

  .acoes {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}