/* ============================================================
   oandrereis.com.br — visual
   Paleta e fontes num lugar só: mexa aqui e o site inteiro muda.
   ============================================================ */

:root {
  --fundo: #080b12;
  --superficie: #0e1420;
  --superficie-2: #141b2c;
  --linha: #1c2740;
  --linha-forte: #263452;
  --acento: #6ea8ff;
  --acento-suave: #31417a;
  --texto: #f2f4f8;
  --texto-2: #8b93a7;
  --texto-3: #5c6579;
  --verde: #5dcaa5;

  --fonte-titulo: "Bricolage Grotesque", "Arial Black", sans-serif;
  --fonte-texto: "Instrument Sans", system-ui, sans-serif;
  --fonte-mono: "JetBrains Mono", ui-monospace, monospace;

  --largura: 1120px;
  --raio: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--acento); color: var(--fundo); }

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ================= FUNDO ================= */

.bg-fallback {
  position: fixed; inset: 0; z-index: -2;
  background: var(--fundo);
}

#rede-canvas {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
}

/* ================= TIPOS DE TEXTO ================= */

.etiqueta {
  font-family: var(--fonte-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acento);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.etiqueta::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acento);
  flex: none;
}

/* linha técnica que "termina" a etiqueta — tira o ar de template */
.etiqueta::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--linha-forte);
}

.prova .etiqueta::after { display: none; }

.titulo-secao {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  text-wrap: balance;
}

/* ================= BOTÕES ================= */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--fonte-texto);
  font-weight: 600;
  font-size: 15px;
  color: var(--fundo);
  background: var(--acento);
  border: 1px solid var(--acento);
  border-radius: 12px;
  padding: 14px 26px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(0); }

.botao--fantasma {
  background: transparent;
  color: var(--texto);
  border-color: var(--linha-forte);
}
.botao--fantasma:hover { border-color: var(--acento); color: var(--acento); }

.botao--mini { padding: 9px 16px; font-size: 13.5px; border-radius: 10px; }
.botao--grande { padding: 18px 38px; font-size: 17px; border-radius: 14px; }

/* o verde fica reservado para "sinal de vida" (status); botões seguem o acento */
.botao--whats { background: var(--acento); border-color: var(--acento); }

/* ================= CABEÇALHO ================= */

.topo {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--fundo) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--linha) 60%, transparent);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 19px;
  color: var(--texto);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.marca em { font-style: normal; color: var(--acento); }

.marca__no {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--acento);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 18%, transparent);
}

.menu { display: flex; gap: 28px; }

.menu a {
  font-size: 14px;
  color: var(--texto-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.menu a:hover { color: var(--texto); }

/* ================= SEÇÕES (base) ================= */

section {
  max-width: var(--largura);
  margin: 0 auto;
  padding: clamp(90px, 13vh, 150px) 24px;
}

/* ================= HERO ================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: 120px;
}

.hero__titulo {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 26px;
}

.linha { display: block; overflow: hidden; }
.linha__texto { display: block; }
.linha__texto--acento { color: var(--acento); }

/* sublinhado "à mão" desenhado pelo GSAP na entrada */
.sublinha {
  display: block;
  width: 100%;
  height: 0.13em;
  overflow: visible;
}

.sublinha path {
  fill: none;
  stroke: var(--acento);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.9;
}

.hero__sub {
  color: var(--texto-2);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero__acoes { display: flex; flex-wrap: wrap; gap: 14px; }

/* ================= CHAT ================= */

.chat {
  position: relative;
  background: var(--superficie);
  border: 1px solid var(--linha-forte);
  border-radius: var(--raio);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
}

/* um nó de luz percorre a borda do chat: "isto está vivo" */
@supports (offset-path: rect(0 0 0 0)) {
  .chat::after {
    content: "";
    position: absolute;
    z-index: 3;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--acento);
    opacity: 0.9;
    offset-path: rect(2px calc(100% - 2px) calc(100% - 2px) 2px round 14px);
    animation: orbita 16s linear infinite;
    pointer-events: none;
  }
}

@keyframes orbita {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}

.chat__cabecalho {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--linha);
}

.chat__status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--verde);
  flex: none;
}

.chat__nome { font-size: 13.5px; font-weight: 600; }

.chat__contador {
  margin-left: auto;
  font-family: var(--fonte-mono);
  font-size: 11px;
  color: var(--texto-3);
}

.chat__mensagens {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-height: 240px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--linha-forte) transparent;
}

.msg {
  max-width: 88%;
  font-size: 14px;
  line-height: 1.55;
  padding: 9px 14px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.msg--agente {
  align-self: flex-start;
  background: var(--superficie-2);
  color: #cdd5e4;
  border-radius: 14px 14px 14px 4px;
}

.msg--voce {
  align-self: flex-end;
  background: var(--acento);
  color: var(--fundo);
  border-radius: 14px 14px 4px 14px;
}

.msg--digitando { color: var(--texto-3); font-family: var(--fonte-mono); font-size: 12px; }

.chat__form {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--linha);
}

.chat__form input {
  flex: 1;
  min-width: 0;
  font-family: var(--fonte-texto);
  font-size: 14px;
  color: var(--texto);
  background: var(--superficie-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  transition: border-color 0.2s ease;
}

.chat__form input::placeholder { color: var(--texto-3); }
.chat__form input:focus { outline: none; border-color: var(--acento-suave); }

.chat__form button {
  width: 40px; height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--fundo);
  background: var(--acento);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.chat__form button:hover { transform: scale(1.06); }

/* atalho permanente para o WhatsApp dentro do chat: a promessa do
   agente ("é só tocar aqui embaixo") precisa ser sempre verdadeira */
.chat__whats {
  display: block;
  text-align: center;
  font-family: var(--fonte-mono);
  font-size: 11.5px;
  color: var(--texto-3);
  text-decoration: none;
  padding: 10px 14px;
  border-top: 1px solid var(--linha);
  transition: color 0.2s ease;
}

.chat__whats:hover,
.chat__whats:focus-visible { color: var(--verde); }

.chat__cta {
  padding: 14px 16px;
  border-top: 1px solid var(--linha);
  text-align: center;
}
.chat__cta p { font-size: 13.5px; color: var(--texto-2); margin-bottom: 10px; }
.chat__cta .botao { color: var(--fundo); }

/* --- chat flutuante (pill + dock) --- */

.chat-pill {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--fonte-texto);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--texto);
  background: var(--superficie);
  border: 1px solid var(--acento-suave);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.chat-pill:hover { transform: translateY(-2px); border-color: var(--acento); }

/* o ponto do pill é azul (a cor do agente), não verde: verde gritaria "WhatsApp" */
.chat-pill__ponto {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--acento);
  flex: none;
}

.chat-dock {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
}

.chat-dock .chat__mensagens { max-height: min(46vh, 380px); }

.chat-dock .chat__cabecalho { padding-right: 44px; }

.chat-dock__fechar {
  position: absolute;
  top: 8px; right: 10px;
  z-index: 2;
  width: 30px; height: 30px;
  font-size: 18px;
  line-height: 1;
  color: var(--texto-3);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.chat-dock__fechar:hover { color: var(--texto); }

/* ================= O QUE EU CONSTRUO =================
   Folha de especificação: linhas de engenharia, não cards de vitrine. */

.frentes {
  margin-top: 42px;
  border-top: 1px solid var(--linha-forte);
}

.frente {
  display: grid;
  grid-template-columns: 96px 300px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 30px 12px;
  border-bottom: 1px solid var(--linha);
  position: relative;
  transition: background 0.3s ease;
}

.frente::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scale(0);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acento);
  transition: transform 0.3s ease;
}

.frente:hover { background: color-mix(in srgb, var(--superficie) 65%, transparent); }
.frente:hover::before { transform: translateY(-50%) scale(1); }

.frente__indice {
  font-family: var(--fonte-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--acento);
  padding-left: 20px;
}

.frente h3 {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.01em;
}

.frente p:last-child { font-size: 15px; color: var(--texto-2); max-width: 52ch; }

/* ================= PROCESSO (seção pinada) =================
   No desktop, um trilho vertical de laudo técnico marca as 4 etapas
   enquanto o scroll troca o conteúdo. No celular, lista simples. */

.processo__conteudo { max-width: 820px; }

.trilho { display: none; }

.etapas {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.etapa {
  background: color-mix(in srgb, var(--superficie) 82%, transparent);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  padding: 26px;
}

.etapa__numero {
  font-family: var(--fonte-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--acento);
  margin-bottom: 14px;
}

.etapa h3 {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}

.etapa p:last-child { font-size: 15.5px; color: var(--texto-2); max-width: 54ch; }

/* --- modo pinado (ativado pelo JS em telas largas) --- */

.processo.is-pinada .processo__palco {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 40px;
  margin-top: 42px;
  min-height: 300px;
}

.processo.is-pinada .trilho {
  display: block;
  position: relative;
}

.processo.is-pinada .trilho::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--linha);
}

.processo.is-pinada #processo-progresso {
  position: absolute;
  left: 50%; top: 0;
  width: 2px; height: 0;
  transform: translateX(-50%);
  background: var(--acento);
}

.processo.is-pinada .trilho__ponto {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--superficie-2);
  border: 2px solid var(--linha-forte);
  opacity: 0.45;
}

.processo.is-pinada .etapas {
  display: block;
  position: relative;
  margin-top: 0;
  min-height: 300px;
}

.processo.is-pinada .etapa {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.processo.is-pinada .etapa h3 {
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.02em;
  margin: 6px 0 14px;
}

.processo.is-pinada .etapa p:last-child { font-size: 17px; }

/* ================= PROVA ================= */

.prova { text-align: center; }

.prova .etiqueta { justify-content: center; }

.prova__texto {
  max-width: 56ch;
  margin: 0 auto 30px;
  color: var(--texto-2);
}

/* o CTA da prova ocupa a própria linha, isolado do chip abaixo */
.prova .botao {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* nota de roadmap como chip de status: metadado, não concorrente do CTA */
.prova__breve {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 48px auto 0;
  font-family: var(--fonte-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--texto-3);
  border: 1px solid var(--linha);
  border-radius: 999px;
  padding: 9px 18px;
}

.prova__breve::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acento-suave);
  flex: none;
}

/* ================= SOBRE ================= */

.sobre {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.sobre__moldura { position: relative; }

.sobre__foto {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  border: 1px solid var(--linha-forte);
  background: var(--superficie);
  overflow: hidden;
}

/* marcas de canto de prancheta de engenharia */
.sobre__moldura::before,
.sobre__moldura::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
}

.sobre__moldura::before {
  top: -7px; left: -7px;
  border-top: 2px solid var(--acento);
  border-left: 2px solid var(--acento);
}

.sobre__moldura::after {
  bottom: -7px; right: -7px;
  border-bottom: 2px solid var(--acento);
  border-right: 2px solid var(--acento);
}

.sobre__legenda {
  font-family: var(--fonte-mono);
  font-size: 12px;
  color: var(--texto-3);
  margin-top: 12px;
}

.sobre__iniciais {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 64px;
  color: var(--linha-forte);
}

.sobre__foto img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.sobre__texto p { color: var(--texto-2); margin-bottom: 18px; max-width: 54ch; }

.sobre__fatos {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.sobre__fatos li {
  font-family: var(--fonte-mono);
  font-size: 13px;
  color: var(--texto-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sobre__fatos li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acento);
  flex: none;
}

/* ================= CONTATO ================= */

.contato {
  text-align: center;
  padding-bottom: clamp(110px, 16vh, 180px);
}

.contato__titulo {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.contato__sub {
  max-width: 52ch;
  margin: 0 auto 38px;
  color: var(--texto-2);
}

/* ================= RODAPÉ ================= */

.rodape {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 26px 24px;
  border-top: 1px solid var(--linha);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--texto-3);
}

/* ================= RESPONSIVO ================= */

@media (max-width: 960px) {
  .menu { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 110px;
    min-height: auto;
  }

  .frente {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 12px 24px 22px;
  }

  /* holofote de scroll: no toque não há hover, então o destaque
     viaja com a rolagem (classe aplicada pelo animations.js) */
  .frente.is-viva { background: color-mix(in srgb, var(--superficie) 65%, transparent); }
  .frente.is-viva::before { transform: translateY(-50%) scale(1); }
  .frente.is-viva .frente__indice { color: var(--texto); }

  /* processo no mobile: trilho vivo no lugar de caixas */
  .etapas {
    display: block;
    position: relative;
    padding-left: 30px;
  }

  .etapas::before {
    content: "";
    position: absolute;
    left: 5px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--linha-forte);
  }

  .etapa {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0 0 44px;
    position: relative;
  }

  .etapa:last-child { padding-bottom: 0; }

  .etapa::before {
    content: "";
    position: absolute;
    left: -30px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--superficie-2);
    border: 2px solid var(--linha-forte);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  }

  .etapa.is-ativa::before {
    background: var(--acento);
    border-color: var(--acento);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--acento) 16%, transparent);
  }

  .etapa h3 { font-size: 26px; }

  .sobre { grid-template-columns: 1fr; }
  .sobre__figura { max-width: 340px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }

  section { padding-left: 18px; padding-right: 18px; }

  .chat__mensagens { min-height: 200px; max-height: 260px; }

  .chat-dock { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .chat-pill { right: 12px; bottom: 12px; }
}

/* ================= TOQUE E VIDA AMBIENTE ================= */

/* o "hover" do polegar: resposta física ao toque */
.botao:active,
.chat-pill:active,
.chat__form button:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.frente:active { background: color-mix(in srgb, var(--superficie) 80%, transparent); }

/* o ponto do pill e o status online respiram devagar */
@keyframes respira {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.82); }
}

.chat-pill__ponto,
.chat__status {
  animation: respira 2.6s ease-in-out infinite;
}

/* ================= MOVIMENTO REDUZIDO ================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
