/*
 * Hero em duas colunas + as três variações em avaliação.
 *
 * A base resolve o problema medido no hero antigo: 731px de altura para 404px de
 * conteúdo, com metade da largura vazia. Aqui a altura é proporcional à tela
 * (mesma lógica do hero da NexTool) e a coluna visual ocupa o espaço que sobrava.
 */
.hero-v {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--on-dark-muted);
  min-height: 58vh;
  max-height: 680px;
  display: flex;
  align-items: center;
  padding: clamp(2.75rem, 2rem + 3vw, 4rem) 0;
}

/* Blobs de luz, no padrão da NexTool: dão profundidade sem pesar o HTML */
.hero-v__blob {
  position: absolute; z-index: 0; border-radius: 50%;
  filter: blur(52px); pointer-events: none;
}
.hero-v__blob--a {
  width: 300px; height: 300px; top: -110px; right: -110px;
  background: var(--hero-blob-a);
  animation: hero-flutua-a 9s ease-in-out infinite alternate;
}
.hero-v__blob--b {
  width: 280px; height: 280px; bottom: -120px; left: -110px;
  background: var(--hero-blob-b);
  animation: hero-flutua-b 11s ease-in-out infinite alternate;
}
@keyframes hero-flutua-a { to { transform: translate(-22px, 20px) scale(1.12); } }
@keyframes hero-flutua-b { to { transform: translate(20px, -16px) scale(1.1); } }

.hero-v .container { position: relative; z-index: 2; }

.hero-v__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
@media (min-width: 992px) {
  /* 36% e não 40%: a 992px a coluna do texto ficava estreita demais e o título
     estourava para três linhas com a maior palavra do carrossel. */
  .hero-v__grid { grid-template-columns: minmax(0, 1fr) 36%; }
}

/*
 * O título tem uma quebra fixa depois de "tecnologia,", então a segunda linha
 * precisa caber a MAIOR palavra do carrossel. Medido a 1440px: a coluna do
 * texto oferece 640px e "entregamos continuidade" pedia 701px na escala
 * global do h1 — por isso "continuidade" caía sozinha numa terceira linha.
 *
 * O tamanho aqui é um pouco menor que o h1 global (3.25rem) só para isso.
 * Ao trocar as palavras de `data-palavras`, confira se a mais longa ainda
 * cabe em duas linhas.
 */
.hero-v h1 {
  color: var(--on-dark);
  /* Curva medida no browser: a partir de ~41px a 1024 o título estoura para 3
     linhas com "continuidade". Esta reta passa por 40px @1024 e 46,4px @1440. */
  font-size: clamp(1.9rem, 1.52rem + 1.54vw, 2.9rem);
  max-width: 22ch;
  margin-bottom: .75rem;
  /* distribui as linhas sozinho, sem deixar palavra órfã na última */
  text-wrap: balance;
}
.hero-v__accent { color: var(--highlight-color); }
.hero-v p { color: var(--on-dark-muted); max-width: 52ch; }
.hero-v .btn-group { margin-top: 1.75rem; }

.hero-v__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.15rem; }
.hero-v__chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .8rem;
  font-size: .78rem; font-weight: 600;
  color: var(--on-dark-muted);
  background: var(--on-dark-surface);
  border: 1px solid var(--on-dark-border);
  border-radius: var(--radius-pill);
}
.hero-v__chip svg { width: .9rem; height: .9rem; color: var(--brand-cyan); }

/* ---------- Variação 1: painel de provas ---------- */
.hero-painel {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  background: var(--on-dark-surface);
  border: 1px solid var(--on-dark-border);
  backdrop-filter: blur(3px);
  text-align: center;
}
.hero-painel img { width: 7.5rem; margin: 0 auto .9rem; }
.hero-painel__titulo {
  font-family: var(--heading-font); font-weight: 700;
  color: var(--on-dark); font-size: 1rem; margin-bottom: 1.25rem;
}
.hero-painel__provas { list-style: none; display: grid; gap: .7rem; text-align: left; }
.hero-painel__provas li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.hero-painel__provas svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: .12rem; color: var(--brand-cyan); }

/* ---------- Variação 2: ilustração de nuvem e rede ---------- */
.hero-arte { display: grid; place-items: center; }
.hero-arte svg { width: min(100%, 24rem); height: auto; animation: hero-sobe-desce 3s ease-in-out infinite alternate; }
@keyframes hero-sobe-desce { from { transform: translateY(8px); } to { transform: translateY(-8px); } }

/* ---------- Variação 3: foto com sobreposição ---------- */
.hero-foto {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--on-dark-border);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.hero-foto img { width: 100%; height: 100%; object-fit: cover; }
.hero-foto::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--hero-foto-veu);
}

@media (max-width: 991.98px) {
  .hero-v { min-height: auto; max-height: none; }
  /* A coluna visual desce para depois do texto; a foto some para não pesar */
  .hero-v__grid { grid-template-columns: 1fr; }
  .hero-foto { display: none; }
  .hero-arte svg { width: min(100%, 17rem); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v__blob, .hero-arte svg { animation: none; }
}

/* Rótulos da página de prévia (não vão para o site final) */
.previa-rotulo {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}
.previa-rotulo h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.previa-rotulo p { margin: 0; color: var(--muted-color); font-size: .92rem; }

/* =====================================================================
 * Segunda rodada: heroes com movimento
 * ===================================================================== */

/* Palavra que se alterna no título */
.palavra-troca {
  display: inline-block;
  color: var(--highlight-color);
  /* a palavra nunca se parte no meio ao trocar */
  white-space: nowrap;
  transition: opacity .25s ease, transform .25s ease;
}
.palavra-troca.trocando { opacity: 0; transform: translateY(-.35em); }

/* Entrada escalonada dos elementos do hero */
.entra { opacity: 0; transform: translateY(14px); animation: entra-suave .55s ease forwards; }
.entra--1 { animation-delay: .05s; }
.entra--2 { animation-delay: .16s; }
.entra--3 { animation-delay: .27s; }
.entra--4 { animation-delay: .38s; }
@keyframes entra-suave { to { opacity: 1; transform: none; } }

/* --- Rede de nós no fundo --- */
.hero-rede {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* --- Painel de soluções que troca sozinho --- */
.hero-slides {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--on-dark-border);
  background: var(--on-dark-surface);
  backdrop-filter: blur(3px);
  padding: 1.6rem 1.6rem 1.2rem;
  min-height: 20rem;
  display: flex;
  flex-direction: column;
}

.hero-slides__palco { position: relative; flex: 1; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.hero-slide.ativo { opacity: 1; transform: none; pointer-events: auto; }

.hero-slide__icone {
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--on-dark-surface);
  border: 1px solid var(--on-dark-border);
  color: var(--brand-cyan);
  margin-bottom: 1rem;
}
.hero-slide__icone svg { width: 1.6rem; height: 1.6rem; }
.hero-slide h3 { color: var(--on-dark); font-size: 1.15rem; margin-bottom: .4rem; }
.hero-slide p { color: var(--on-dark-muted); font-size: .92rem; margin-bottom: .9rem; }
.hero-slide ul { list-style: none; display: grid; gap: .45rem; }
.hero-slide li { display: flex; gap: .5rem; align-items: flex-start; font-size: .87rem; color: var(--on-dark-muted); }
.hero-slide li svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: .15rem; color: var(--brand-cyan); }

.hero-slides__rodape { display: flex; align-items: center; gap: .75rem; margin-top: 1.1rem; }
.hero-slides__pontos { display: flex; gap: .4rem; }
.hero-slides__ponto {
  width: .5rem; height: .5rem; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--on-dark-border);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.hero-slides__ponto[aria-selected="true"] { background: var(--brand-cyan); transform: scale(1.35); }

.hero-slides__progresso {
  flex: 1; height: 2px;
  background: var(--on-dark-border);
  border-radius: 2px; overflow: hidden;
}
.hero-slides__progresso i {
  display: block; height: 100%; width: 100%;
  background: var(--brand-cyan);
  transform-origin: left;
  animation: hero-progresso 5s linear infinite;
}
.hero-slides.pausado .hero-slides__progresso i { animation-play-state: paused; }
@keyframes hero-progresso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Foto com movimento lento --- */
.hero-foto--viva img { animation: hero-zoom 18s ease-in-out infinite alternate; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.09); } }

@media (prefers-reduced-motion: reduce) {
  .entra { opacity: 1; transform: none; animation: none; }
  .hero-slides__progresso i,
  .hero-foto--viva img { animation: none; }
  .palavra-troca { transition: none; }
}

@media (max-width: 991.98px) {
  .hero-slides { min-height: 18rem; }
}

/* =====================================================================
 * Propostas de card lateral
 * ===================================================================== */

/* --- Painel de operação (estilo NOC) --- */
.hero-noc {
  border-radius: var(--radius-lg);
  border: 1px solid var(--on-dark-border);
  background: var(--on-dark-surface);
  backdrop-filter: blur(3px);
  overflow: hidden;
}
.hero-noc__topo {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1.15rem;
  border-bottom: 1px solid var(--on-dark-border);
  font-size: .8rem; color: var(--on-dark-muted);
}
.hero-noc__pulso {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--status-ok);
  box-shadow: 0 0 0 0 var(--status-ok-halo);
  animation: hero-pulso 2.2s ease-out infinite;
}
@keyframes hero-pulso {
  70% { box-shadow: 0 0 0 .55rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero-noc__lista { list-style: none; }
.hero-noc__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .5rem 1rem;
  padding: .78rem 1.15rem;
  border-bottom: 1px solid var(--on-dark-border);
}
.hero-noc__item:last-child { border-bottom: 0; }
.hero-noc__nome { color: var(--on-dark); font-size: .92rem; font-weight: 600; }
.hero-noc__meta { color: var(--on-dark-muted); font-size: .78rem; }
.hero-noc__selo {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 700;
  color: var(--status-ok);
}
.hero-noc__selo::before {
  content: ""; width: .4rem; height: .4rem; border-radius: 50%;
  background: currentColor;
}
/* barrinha de atividade que preenche em ritmos diferentes por linha */
.hero-noc__barra { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--on-dark-border); overflow: hidden; }
.hero-noc__barra i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--brand-cyan), var(--accent-color));
  transform-origin: left;
  animation: hero-atividade 3.4s ease-in-out infinite;
}
.hero-noc__item:nth-child(2) .hero-noc__barra i { animation-duration: 4.6s; }
.hero-noc__item:nth-child(3) .hero-noc__barra i { animation-duration: 5.4s; }
.hero-noc__item:nth-child(4) .hero-noc__barra i { animation-duration: 4s; }
@keyframes hero-atividade {
  0%, 100% { transform: scaleX(.25); opacity: .6; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* --- Mini-dashboard --- */
.hero-painel-dados {
  border-radius: var(--radius-lg);
  border: 1px solid var(--on-dark-border);
  background: var(--on-dark-surface);
  backdrop-filter: blur(3px);
  overflow: hidden;
}
.hero-painel-dados__topo {
  display: flex; align-items: center; gap: .4rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--on-dark-border);
}
.hero-painel-dados__topo span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--on-dark-border); }
.hero-painel-dados__titulo { margin-left: .5rem; font-size: .78rem; color: var(--on-dark-muted); }
.hero-painel-dados__grade { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--on-dark-border); }
.hero-metrica { background: var(--navy-800); padding: 1.05rem 1.15rem; }
.hero-metrica strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 1.5rem; line-height: 1.1;
  color: var(--on-dark);
}
.hero-metrica span { font-size: .74rem; color: var(--on-dark-muted); }
.hero-metrica--destaque strong { color: var(--brand-cyan); }
.hero-grafico { background: var(--navy-800); padding: 1rem 1.15rem 1.15rem; grid-column: 1 / -1; }
.hero-grafico svg { width: 100%; height: 3.5rem; }
.hero-grafico polyline { stroke: var(--brand-cyan); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 400; stroke-dashoffset: 400; animation: hero-traco 2.4s ease-out forwards; }
@keyframes hero-traco { to { stroke-dashoffset: 0; } }

/* --- Cartas empilhadas --- */
.hero-cartas { position: relative; height: 20rem; }
.hero-carta {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--on-dark-border);
  background: var(--on-dark-surface);
  backdrop-filter: blur(3px);
  padding: 1.75rem;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s ease;
}
.hero-carta:nth-child(1) { transform: translate(0, 0) rotate(0deg); z-index: 3; }
.hero-carta:nth-child(2) { transform: translate(1.1rem, .9rem) rotate(1.6deg); z-index: 2; opacity: .65; }
.hero-carta:nth-child(3) { transform: translate(2.2rem, 1.8rem) rotate(3.2deg); z-index: 1; opacity: .35; }
.hero-carta__icone {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--on-dark-surface); border: 1px solid var(--on-dark-border);
  color: var(--brand-cyan); margin-bottom: 1rem;
}
.hero-carta__icone svg { width: 1.5rem; height: 1.5rem; }
.hero-carta h3 { color: var(--on-dark); font-size: 1.1rem; margin-bottom: .4rem; }
.hero-carta p { color: var(--on-dark-muted); font-size: .9rem; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-noc__pulso, .hero-noc__barra i, .hero-grafico polyline { animation: none; }
  .hero-grafico polyline { stroke-dashoffset: 0; }
}
