/* ============================================================================
   codeWriter — wow.css
   Estilos para los elementos inyectados/mejorados por wow.js
   (se carga además de global.css; usa los tokens del design system)
   ========================================================================== */

/* --- EFFECT 2: barra de progreso + glow de los agentes C-Suite --- */
.term-line {
  position: relative;
  overflow: hidden;
}
.term-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent, #8bd3eb);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(139, 211, 235, 0.7);
}
.term-line.is-active {
  background: rgba(139, 211, 235, 0.08);
}
.term-line.is-active .term-role {
  box-shadow: 0 0 0 1px rgba(139, 211, 235, 0.5);
}
.term-line.is-done .term-progress {
  background: var(--ok, #4ade80);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

/* --- EFFECT 3: panel de código en streaming --- */
.term-code {
  margin-top: 14px;
  border-top: 1px solid #1c1c22;
  padding-top: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.term-code-head {
  font-size: 11px;
  color: #8bd3eb;
  background: rgba(139, 211, 235, 0.1);
  border: 1px solid rgba(139, 211, 235, 0.25);
  padding: 3px 9px;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 8px;
}
.term-code-body {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #c9c9d1;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 168px;
  overflow: hidden;
}
.term-code-body::after {
  content: '▍';
  color: #8bd3eb;
  animation: cwBlink 1s steps(2) infinite;
}
@keyframes cwBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- EFFECT 4: árbol de archivos del repo que aparece --- */
.repo-tree {
  margin-top: 40px;
  border: 1px solid var(--border-strong, #2e2e37);
  border-radius: 14px;
  background: var(--panel, #111114);
  padding: 22px 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.repo-tree-head {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--accent, #8bd3eb);
  margin-bottom: 12px;
}
.repo-list,
.repo-list ul {
  list-style: none;
  margin: 0;
  padding-left: 16px;
}
.repo-list {
  padding-left: 0;
}
.repo-dir {
  color: var(--text-2, #c9c9d1);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}
.repo-file {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: var(--text-3, #8a8a94);
  padding: 2px 0;
}
.repo-dir::before { content: '▸ '; color: var(--accent, #8bd3eb); }
.repo-file::before { content: '· '; color: var(--text-muted, #62626c); }
.repo-bar {
  margin-top: 14px;
  height: 4px;
  border-radius: 999px;
  background: var(--border, #232329);
  overflow: hidden;
}
.repo-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent, #8bd3eb);
  transform: scaleX(0);
  transform-origin: left center;
  box-shadow: 0 0 10px rgba(139, 211, 235, 0.6);
}
.repo-status {
  margin-top: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--text-muted, #62626c);
}
.repo-status.ok {
  color: var(--ok, #4ade80);
}

/* --- EFFECT 5: grafo de orquestación C-Suite --- */
.flow-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.hero-grid { position: relative; z-index: 1; }

.flow-edge {
  fill: none;
  stroke: rgba(139, 211, 235, 0.35);
  stroke-width: 1.5;
}
.flow-node circle {
  fill: #0d0d11;
  stroke: rgba(139, 211, 235, 0.4);
  stroke-width: 1.5;
  transition: fill 0.3s ease, stroke 0.3s ease;
}
.flow-node text {
  fill: #8a8a94;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  transition: fill 0.3s ease;
}
.flow-node.lit circle {
  fill: rgba(139, 211, 235, 0.15);
  stroke: #8bd3eb;
}
.flow-node.lit text {
  fill: #8bd3eb;
}
.flow-pulse {
  fill: #8bd3eb;
  filter: drop-shadow(0 0 6px rgba(139, 211, 235, 0.9));
}

/* Reduced motion: nada de lo inyectado debe quedar oculto */
@media (prefers-reduced-motion: reduce) {
  .term-progress,
  .flow-pulse { display: none; }
  .term-line { opacity: 1 !important; }
}
