/* =========================================================
   WHATSAPP E IA: cena única (frente P2, revisão 3, 04/11/2026)
   Painel do sistema (print 06) ao fundo, celular da conversa à frente, fios de luz
   (SVG desenhado por js/zap.js) que levam cada resposta da IA até o ponto do painel que ela
   acende, e um "registro da IA" que marca o que foi feito. Sem JS ou com movimento reduzido:
   tudo aparece aceso e parado.
   ========================================================= */
@media (min-width: 1024px) {
  .zap__grade { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
  .zap__texto { align-self: center; }
}

.zap__palco {
  --cel-w: clamp(220px, 40%, 300px);
  --cel-h: 540px;
  --cel-topo: 44px;
  position: relative;
  min-height: calc(var(--cel-topo) + var(--cel-h) + 40px);
  padding-left: calc(var(--cel-w) * .45);
}
.zap__palco::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 62% 40%, rgba(240, 184, 72, .16), transparent 70%), radial-gradient(40% 45% at 18% 70%, rgba(79, 163, 247, .12), transparent 70%);
}

/* quando o texto é mais alto que a cena (1024 a 1200 px), a cena acompanha a leitura em vez de deixar vazio */
@media (min-width: 1024px) { .zap__palco { position: sticky; top: calc(var(--topo-h) + 48px); } }

/* painel do sistema, ao fundo, levemente deitado */
.zap__painel { position: relative; z-index: 1; transform: perspective(1800px) rotateY(-7deg) rotateX(3deg); transform-origin: 30% 50%; }
.zap__painel > figcaption { display: flex; justify-content: flex-end; }
.zap__painel .tela__moldura { box-shadow: 0 50px 100px -50px rgba(0, 0, 0, .95), 0 0 80px -30px rgba(240, 184, 72, .4), inset 0 1px 0 rgba(255, 255, 255, .08); }

/* pontos do painel que acendem (posições em % do print 06-whatsapp, 2160x1350) */
.zap__pontos { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.zap__ponto {
  position: absolute; border-radius: 5px; background: rgba(240, 184, 72, .14);
  box-shadow: 0 0 0 2px var(--ouro), 0 0 22px 3px rgba(240, 184, 72, .6);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.zap__ponto--hist { left: 55.6%; top: 19.4%; width: 27%; height: 5.6%; }
.zap__ponto--encarte { left: 70.8%; top: 56.8%; width: 8%; height: 4.8%; }
.zap__ponto--carnes { left: 79.3%; top: 56.8%; width: 8%; height: 4.8%; }
.zap__ponto b {
  position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%);
  padding: .3em .75em; border-radius: 99px; background: var(--ouro); color: #0A1625;
  font-family: var(--f-mono); font-size: 11px; font-size: clamp(8px, 1.9cqw, 12px); font-weight: 600; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .7);
}
/* o fio entra pela esquerda (histórico, lista) ou por cima (carnes): o rótulo fica do lado livre */
.zap__ponto--hist b, .zap__ponto--encarte b { top: auto; bottom: calc(100% + 7px); }
.zap__ponto--carnes b { left: auto; right: -2px; transform: none; }
.js .zap__ponto:not(.is-on) { opacity: 0; transform: scale(.92); }
.zap__ponto.is-on { animation: zapAcende .9s var(--ease); }
@keyframes zapAcende { 0% { box-shadow: 0 0 0 2px var(--ouro), 0 0 0 0 rgba(240, 184, 72, .9); } 40% { box-shadow: 0 0 0 2px #FFE3A0, 0 0 40px 10px rgba(240, 184, 72, .8); } 100% { box-shadow: 0 0 0 2px var(--ouro), 0 0 22px 3px rgba(240, 184, 72, .6); } }

/* celular da conversa, à frente */
.zap__cel { position: absolute; z-index: 3; left: 0; top: var(--cel-topo); width: var(--cel-w); transform: rotate(-2.5deg); transform-origin: 50% 100%; }
.zap__cel .chat {
  width: 100%; height: var(--cel-h);
  box-shadow: 0 60px 110px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(240, 184, 72, .22), 0 0 70px -20px rgba(240, 184, 72, .35), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.zap__cel .msg { font-size: .875rem; }
@media (max-width: 1199px) { .zap__palco { --cel-h: 500px; } .zap__cel .msg { font-size: .82rem; padding: 8px 11px; } }
.zap__cel > .demo { display: flex; justify-content: center; margin-top: 14px; }

/* fios de luz entre o celular e o painel */
.zap__fios { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; pointer-events: none; }
.zap__fio { fill: none; stroke: rgba(240, 184, 72, .3); stroke-width: 1.4; stroke-dasharray: 3 6; transition: stroke .5s var(--ease); }
.zap__fio.is-on { stroke: rgba(240, 184, 72, .8); stroke-dasharray: none; filter: drop-shadow(0 0 4px rgba(240, 184, 72, .8)); }
.zap__no { fill: #0A1625; stroke: var(--ouro); stroke-width: 1.5; }
.zap__pulso { fill: none; stroke: #FFE7AE; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 34 var(--len, 2000); stroke-dashoffset: 34; opacity: 0; filter: drop-shadow(0 0 6px rgba(255, 220, 140, .95)); }
.zap__pulso.is-vai { animation: zapPulso .8s cubic-bezier(.45, 0, .25, 1) forwards; }
@keyframes zapPulso { 0% { opacity: 1; stroke-dashoffset: 34; } 88% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: calc(var(--len, 2000) * -1px); } }

/* registro do que a IA fez */
.zap__registro {
  position: relative; z-index: 2;
  margin: 18px 0 0 calc(var(--cel-w) * .55 + 26px);
  padding: 16px 18px 14px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(19, 40, 74, .72), rgba(10, 22, 37, .86));
  border: 1px solid var(--linha); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.zap__registro-tit { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: .66rem; font-weight: 600; letter-spacing: .18em; color: var(--apagado); margin-bottom: 10px; }
.zap__led { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 8px var(--verde); animation: pisca 1.6s steps(1) infinite; }
.zap__registro ul { list-style: none; display: grid; gap: 8px; }
.zap__registro li { display: flex; align-items: center; gap: 10px; font-size: .9rem; line-height: 1.35; color: var(--texto); transition: opacity .4s var(--ease), color .4s; }
.zap__reg-ico { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ouro); box-shadow: 0 0 10px rgba(240, 184, 72, .6); }
.zap__reg-ico::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #0A1625; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.js .zap__registro li:not(.is-on) { opacity: .55; color: var(--apoio); }
.js .zap__registro li:not(.is-on) .zap__reg-ico { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(169, 184, 204, .5); }
.js .zap__registro li:not(.is-on) .zap__reg-ico::after { opacity: 0; }

/* celular e tablet estreito: painel em cima, celular sobreposto embaixo, registro no fim */
@media (max-width: 699px) {
  .zap__palco { padding-left: 0; min-height: 0; --cel-w: min(280px, 80%); --cel-h: 500px; }
  .zap__painel { transform: none; }
  .zap__cel { position: relative; top: auto; margin: 14px auto 0; transform: rotate(-1.5deg); }
  .zap__registro { margin: 26px 0 0; }
  .zap__ponto b { display: none; } /* pequeno demais para ler; o registro abaixo diz o mesmo */
}

@media (prefers-reduced-motion: reduce) {
  .zap__ponto, .zap__registro li, .zap__fio { transition: none; }
  .zap__ponto.is-on, .zap__led { animation: none; }
  .zap__pulso { display: none; }
}
