/* =========================================================
   IPsim — nova proposta de site
   Ideia central: o símbolo de rede do logo vira o mapa dos serviços.
   ========================================================= */

:root {
  /* Cores */
  --papel: #F1F2EE;        /* fundo geral, cinza-claro frio */
  --superficie: #FFFFFF;   /* áreas que precisam de destaque sobre o papel */
  --tinta: #000000;        /* texto e o preto do logo */
  --grafite: #4A4F5A;      /* texto secundário */
  --indigo: #2A1B6E;       /* índigo do logo: botões, links, faixa de segurança */
  --amarelo: #F2B705;      /* amarelo de cabo de rede: só para o que está selecionado */
  --linha: #D3D6CF;        /* divisórias */

  /* Tipografia: uma família só, a largura muda o tom */
  --fonte: "Archivo", "Segoe UI", system-ui, sans-serif;

  --limite: 76rem;
  --respiro: clamp(4rem, 9vw, 7.5rem);   /* espaço vertical entre seções */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; }
p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }

.limite { max-width: var(--limite); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .limite { padding-inline: 2rem; } }

.pular {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--tinta); color: var(--papel); padding: .6rem 1rem; border-radius: 999px;
}
.pular:focus { top: 1rem; }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 650; font-size: 1rem; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.botao-cheio { background: var(--indigo); color: #fff; }
.botao-cheio:hover { background: var(--tinta); }
.botao-contorno { border-color: var(--tinta); color: var(--tinta); }
.botao-contorno:hover { background: var(--tinta); color: var(--papel); }
.botao-pequeno { min-height: 2.5rem; padding: .45rem 1.1rem; font-size: .9375rem; }

.link { color: var(--indigo); font-weight: 650; text-underline-offset: .2em; }
.link:hover { color: var(--tinta); }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: var(--superficie);   /* branco, para a placa branca do logo oficial não aparecer */
  border-bottom: 1px solid var(--linha);
}
.topo-interno { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.marca img { height: 2.25rem; width: auto; }
.menu { display: none; margin-left: auto; gap: 1.75rem; font-weight: 600; font-size: .9375rem; }
.menu a { text-decoration: none; }
.menu a:hover { text-decoration: underline; text-underline-offset: .3em; }
.topo .botao { margin-left: auto; }
@media (min-width: 48rem) {
  .menu { display: flex; }
  .topo .botao { margin-left: 0; }
}

/* ---------- Abertura ---------- */
.abertura { padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.abertura h1 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.6rem, 7.4vw, 6.75rem);
  line-height: .98;
  letter-spacing: -.025em;
}
/* Cada frase começa numa linha nova */
.abertura h1 span { display: block; text-wrap: balance; }
.abertura-rodape {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--tinta);
  display: grid; gap: 1.5rem;
}
.abertura-rodape p { font-size: 1.1875rem; max-width: 34rem; color: var(--grafite); }
.acoes { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 60rem) {
  .abertura-rodape { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- Serviços: o mapa de rede ---------- */
.servicos { padding-block: clamp(2rem, 5vw, 3.5rem) var(--respiro); }
.servicos-grade { display: grid; gap: 2rem; }
.servicos-intro h2,
.sobre h2, .seguranca h2, .consultoria h2, .contato h2 {
  font-stretch: 115%;
  font-weight: 750;
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.servicos-intro p { margin-top: .75rem; color: var(--grafite); }

.rede { position: relative; max-width: 30rem; margin-inline: auto; width: 100%; }
.rede-desenho { display: block; width: 100%; height: auto; overflow: visible; }

.ligacoes line { stroke-width: 2.5; transition: stroke .2s ease, stroke-width .2s ease; }
.ligacoes .indigo, .pontos .indigo { stroke: var(--indigo); fill: var(--indigo); }
.ligacoes .preto,  .pontos .preto  { stroke: var(--tinta);  fill: var(--tinta); }
.pontos circle { stroke-width: 0; cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform .2s ease, fill .2s ease; }

.centro { fill: var(--papel); stroke: var(--indigo); stroke-width: 13; }
.centro-texto { font-family: var(--fonte); font-weight: 700; font-size: 17px; fill: var(--tinta); }

/* Serviço selecionado: a ligação acende em amarelo */
.ligacoes line.ativo { stroke: var(--amarelo); stroke-width: 6; }
.pontos circle.ativo { fill: var(--amarelo); stroke: var(--tinta); stroke-width: 2.5; transform: scale(1.45); }

/* Botões: no celular, uma lista de etiquetas abaixo do desenho */
.rede-botoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.rede-botoes button {
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.25;
  color: var(--tinta); background: var(--superficie);
  border: 1.5px solid var(--linha); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.rede-botoes button:hover { border-color: var(--tinta); }
.rede-botoes button[aria-pressed="true"] { background: var(--amarelo); border-color: var(--tinta); }

/* No computador, cada etiqueta fica ao lado do seu ponto */
@media (min-width: 60rem) {
  .rede { max-width: none; padding-inline: 9.5rem; }
  .rede-botoes { display: block; margin: 0; position: absolute; inset: 0 9.5rem; }
  .rede-botoes li { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
  .rede-botoes button {
    position: absolute; width: max-content; max-width: 9rem; text-align: left;
    background: transparent; border-color: transparent; padding: .3rem .65rem;
  }
  .rede-botoes button:hover { border-color: var(--tinta); background: var(--superficie); }
  .lado-direita  button { left: 1.4rem;  top: 50%; transform: translateY(-50%); }
  .lado-esquerda button { right: 1.4rem; top: 50%; transform: translateY(-50%); text-align: right; }
  .lado-cima     button { bottom: 1.3rem; left: 50%; transform: translateX(-50%); max-width: none; }
  .lado-baixo    button { top: 1.3rem;    left: 50%; transform: translateX(-50%); max-width: none; }
}

.painel article { padding-top: 1.25rem; border-top: 2px solid var(--tinta); max-width: 36rem; }
.painel article + article { margin-top: 2rem; }          /* sem JavaScript, todos aparecem em sequência */
/* Com JavaScript, os textos ficam empilhados na mesma célula: o painel tem sempre
   a altura do texto mais longo e a página não sobe nem desce ao trocar de serviço. */
.js .painel { display: grid; }
.js .painel article { grid-area: 1 / 1; }
.js .painel article + article { margin-top: 0; }
.js .painel article[hidden] { display: block; visibility: hidden; }
.painel h3 { font-stretch: 110%; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.painel p { margin-top: .75rem; color: var(--grafite); }

@media (min-width: 60rem) {
  .servicos-grade {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
    grid-template-areas: "intro rede" "painel rede";
    grid-template-rows: auto 1fr;
    column-gap: 3rem;
    align-items: start;
  }
  .servicos-intro { grid-area: intro; }
  .rede { grid-area: rede; }
  .painel { grid-area: painel; align-self: end; padding-bottom: 2rem; }
  .painel article + article { margin-top: 0; }
}

/* Abertura do mapa: as ligações saem do centro uma única vez */
@media (prefers-reduced-motion: no-preference) {
  .ligacoes line { stroke-dasharray: 160; animation: ligar .7s cubic-bezier(.3,.7,.3,1) both; }
  .ligacoes line:nth-child(2) { animation-delay: .08s; }
  .ligacoes line:nth-child(3) { animation-delay: .16s; }
  .ligacoes line:nth-child(4) { animation-delay: .24s; }
  .ligacoes line:nth-child(5) { animation-delay: .32s; }
  .ligacoes line:nth-child(6) { animation-delay: .40s; }
  .ligacoes line:nth-child(7) { animation-delay: .48s; }
  .ligacoes line:nth-child(8) { animation-delay: .56s; }
  .pontos circle { animation: acender .35s ease-out both; animation-delay: calc(var(--d, 0s) + .45s); }
  .pontos circle:nth-child(1) { --d: 0s; }
  .pontos circle:nth-child(2) { --d: .08s; }
  .pontos circle:nth-child(3) { --d: .16s; }
  .pontos circle:nth-child(4) { --d: .24s; }
  .pontos circle:nth-child(5) { --d: .32s; }
  .pontos circle:nth-child(6) { --d: .40s; }
  .pontos circle:nth-child(7) { --d: .48s; }
  .pontos circle:nth-child(8) { --d: .56s; }
}
@keyframes ligar   { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
@keyframes acender { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Faixa de foto ---------- */
.faixa-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 48rem) { .faixa-foto img { aspect-ratio: 21 / 8; } }

/* ---------- Sobre ---------- */
.sobre { padding-block: var(--respiro); }
.sobre-grade { margin-top: 2.5rem; display: grid; gap: 3rem; }
.sobre-texto { display: grid; gap: 1.25rem; align-content: start; max-width: 40rem; color: var(--grafite); }
.sobre-texto .destaque {
  color: var(--tinta);
  font-stretch: 105%;
  font-size: clamp(1.3rem, 2.2vw, 1.625rem);
  line-height: 1.4;
  font-weight: 500;
}
.sobre-lado h3 { font-size: 1.125rem; font-weight: 700; }
.sobre-lado h3 + p { margin-top: .5rem; color: var(--grafite); }
.sobre-lado p + h3 { margin-top: 2.25rem; }
.valores { margin-top: .75rem; display: grid; gap: 0; }
.valores div { padding-block: .9rem; border-top: 1px solid var(--linha); }
.valores dt { font-weight: 650; }
.valores dd { color: var(--grafite); font-size: .9375rem; }
@media (min-width: 60rem) {
  .sobre-grade { grid-template-columns: 1.35fr 1fr; gap: 5rem; }
}

/* ---------- Segurança ---------- */
.seguranca { background: var(--indigo); color: #fff; padding-block: var(--respiro); }
.seguranca :focus-visible { outline-color: var(--amarelo); }
.seguranca-intro { margin-top: 1rem; max-width: 36rem; color: #D8D3EE; font-size: 1.125rem; }
.seguranca-lista { margin-top: 3rem; display: grid; gap: 2rem; }
.seguranca-lista li { padding-top: 1.25rem; border-top: 2px solid var(--amarelo); }
.seguranca-lista h3 { font-stretch: 110%; font-size: 1.25rem; font-weight: 700; }
.seguranca-lista p { margin-top: .5rem; color: #D8D3EE; }
@media (min-width: 48rem) {
  .seguranca-lista { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* ---------- Consultoria ---------- */
.consultoria { padding-block: var(--respiro); }
.consultoria-grade { display: grid; gap: 2.5rem; align-items: start; }
.consultoria-foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% center; }
.consultoria-grade > div > p { margin-top: 1rem; color: var(--grafite); max-width: 36rem; }
.consultoria-grade > div > .consultoria-lide { margin-top: 1.25rem; color: var(--tinta); font-size: 1.25rem; font-weight: 550; }
.consultoria h3 { margin-top: 2.5rem; font-size: 1.125rem; font-weight: 700; }
.frentes { margin-top: .75rem; }
.frentes li {
  display: flex; gap: .85rem; align-items: baseline;
  padding-block: .7rem; border-top: 1px solid var(--linha);
}
/* O marcador repete o ponto do símbolo de rede do logo */
.frentes li::before {
  content: ""; flex: 0 0 auto; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--indigo); transform: translateY(-.1rem);
}
.frentes li:nth-child(even)::before { background: var(--tinta); }
@media (min-width: 60rem) {
  .consultoria-grade { grid-template-columns: 1fr 1.15fr; gap: 5rem; }
}

/* ---------- Contato ---------- */
.contato { padding-block: var(--respiro); background: var(--superficie); border-top: 1px solid var(--linha); }
.contato h2 { max-width: 18ch; }
.contato h2 + p { margin-top: 1rem; color: var(--grafite); max-width: 34rem; }
.contato-canais { margin-top: 2.5rem; display: grid; gap: 1rem; }
.canal {
  display: grid; gap: .25rem;
  padding: 1.25rem 0; border-top: 2px solid var(--tinta);
  text-decoration: none;
  transition: background-color .15s ease, padding .15s ease;
}
.canal-nome { font-weight: 600; color: var(--grafite); }
.canal-dado {
  font-stretch: 112%; font-weight: 700; letter-spacing: -.015em;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem); line-height: 1.15;
  overflow-wrap: anywhere;
}
.canal:hover, .canal:focus-visible {
  background: var(--amarelo); padding-inline: 1rem;
  border-radius: 1rem; border-top-color: transparent;
}
@media (min-width: 60rem) {
  .contato-canais { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* ---------- Rodapé ---------- */
.rodape { padding-block: 3rem 2rem; background: var(--superficie); border-top: 1px solid var(--linha); font-size: .9375rem; color: var(--grafite); }
.rodape-grade { display: grid; gap: 2rem; }
.rodape-logo { height: 2rem; width: auto; margin-bottom: .75rem; }
.rodape-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 600; color: var(--tinta); }
.rodape-links a { text-decoration: none; }
.rodape-links a:hover { text-decoration: underline; }
.copyright { font-size: .875rem; }
@media (min-width: 48rem) {
  .rodape-grade { grid-template-columns: 1fr auto; align-items: start; }
  .copyright { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--linha); }
}

/* ---------- Botão flutuante do WhatsApp ---------- */
.whatsapp-flutuante {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: #fff;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background-color .15s ease;
}
.whatsapp-flutuante svg { width: 1.9rem; height: 1.9rem; }
.whatsapp-flutuante:hover { background: #1EBE5A; transform: scale(1.06); }
.whatsapp-flutuante:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
@media (min-width: 48rem) {
  .whatsapp-flutuante { right: 1.5rem; bottom: 1.5rem; width: 3.75rem; height: 3.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
