/* PEG-AI · PREDDITA — Landing institucional
   Apenas o que o Tailwind CDN não cobre nativamente.
*/

/* ── Tipografia ─────────────────────────────────────────────── */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ── Scroll suave ───────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Gradiente animado do hero ──────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
.hero-gradient {
  background: linear-gradient(120deg, #1e3a8a, #3730a3, #4338ca, #6d28d9, #7c3aed, #4338ca, #1e3a8a);
  background-size: 400% 400%;
  animation: gradient-shift 18s ease infinite;
}

/* ── Gradiente sutil para seções secundárias ────────────────── */
.section-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #4338ca 50%, #6d28d9 100%);
}

/* ── Card hover premium ─────────────────────────────────────── */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
}

/* ── Nav com scroll effect ──────────────────────────────────── */
.nav-scrolled {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* ── Scroll indicator ───────────────────────────────────────── */
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(8px); opacity: 1; }
}
.scroll-indicator { animation: bounce-soft 2.2s ease-in-out infinite; }

/* ── Texto gradiente ────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(90deg, #60a5fa, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.text-gradient-dark {
  background: linear-gradient(90deg, #2563eb, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Borda com gradiente ────────────────────────────────────── */
.border-gradient {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.border-gradient::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
  z-index: -1;
}

/* ── Linha divisória gradiente ──────────────────────────────── */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, #6366f1, transparent);
  opacity: 0.3;
}

/* ── Fundo de seção com ruído sutil ─────────────────────────── */
.bg-noise {
  position: relative;
}
.bg-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* ════════════════════ ORQUESTRAÇÃO RADIAL v2 ════════════════════ */

/* Container 3D sutil */
.orchestration-svg {
  transform: rotateX(8deg);
  transform-origin: center center;
  transition: transform 0.6s ease;
}
.orchestration-svg:hover { transform: rotateX(0deg); }

/* Brain pulsa + aura expande */
@keyframes brain-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.brain-node {
  transform-origin: 300px 300px;
  animation: brain-pulse 3s ease-in-out infinite;
}
@keyframes aura-expand {
  0%, 100% { opacity: 0.15; r: 80; }
  50%      { opacity: 0.35; r: 95; }
}
.brain-aura { animation: aura-expand 3s ease-in-out infinite; }

/* Sentinel — anéis em direções opostas */
@keyframes rotate-cw  { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes rotate-ccw { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
.sentinel-ring-outer { transform-origin: 300px 300px; animation: rotate-cw  50s linear infinite; }
.sentinel-ring-inner { transform-origin: 300px 300px; animation: rotate-ccw 70s linear infinite; }

/* Agentes — respiro suave de base */
@keyframes agent-breath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.92; }
}
.agent-node {
  transform-origin: center center;
  transition: filter 0.35s ease;
  animation: agent-breath 4s ease-in-out infinite;
  cursor: pointer;
  will-change: filter;
}
.agent-node:nth-of-type(1) { animation-delay: 0s; }
.agent-node:nth-of-type(2) { animation-delay: 0.7s; }
.agent-node:nth-of-type(3) { animation-delay: 1.4s; }
.agent-node:nth-of-type(4) { animation-delay: 2.1s; }
.agent-node:nth-of-type(5) { animation-delay: 2.8s; }
.agent-node:nth-of-type(6) { animation-delay: 3.5s; }

/* HOVER: sem scale (mantém hitbox estável).
   Ativado via .is-active controlado pelo Alpine. */
.agent-node.is-active {
  animation: none !important;
  filter: brightness(1.28)
          drop-shadow(0 0 14px rgba(255,255,255,0.65))
          drop-shadow(0 0 28px rgba(167,139,250,0.55));
}
.agent-node.is-active circle:first-child {
  stroke: rgba(255,255,255,0.85);
  stroke-width: 2.5;
}

/* Linhas — glow suave */
@keyframes line-glow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.7; }
}
.agent-lines line { animation: line-glow 3s ease-in-out infinite; }
.agent-lines line:nth-child(2) { animation-delay: 0.5s; }
.agent-lines line:nth-child(3) { animation-delay: 1s; }
.agent-lines line:nth-child(4) { animation-delay: 1.5s; }
.agent-lines line:nth-child(5) { animation-delay: 2s; }
.agent-lines line:nth-child(6) { animation-delay: 2.5s; }

/* Partículas com brilho */
.data-pulses circle {
  filter: drop-shadow(0 0 4px currentColor);
}

/* Respeitar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .brain-node, .brain-aura, .sentinel-ring-outer, .sentinel-ring-inner,
  .agent-node, .agent-lines line, .data-pulses circle, .orchestration-svg {
    animation: none !important;
    transition: none !important;
  }
}
