/* ============================================================
   IG TECH · Tech Vibe Layer
   Esencia: informática + IA + tecnología
   Partículas conectadas · live badges · terminal labels · system status
   ============================================================ */

/* ============================================================
   1. PARTICLES CANVAS · neural network detrás del hero
   ============================================================ */
.tv-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.hero { position: relative; }
.hero > .container,
.hero > .hero-bg,
.hero > .hero-grid-pattern {
  z-index: 2;
  position: relative;
}

/* ============================================================
   2. LIVE BADGE en el logo · pulsing green dot
   ============================================================ */
.logo {
  position: relative;
}
.logo::after {
  content: '';
  position: absolute;
  top: 8px;
  right: -6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: tv-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes tv-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================================
   3. TERMINAL LABELS · eyebrow con prefijo "> _"
   ============================================================ */
.eyebrow,
.hero-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before,
.hero-eyebrow::before {
  content: '>';
  color: #22C55E;
  font-weight: 700;
  opacity: 0.85;
  animation: tv-blink 1.6s steps(2) infinite;
}
@keyframes tv-blink {
  0%, 50% { opacity: 0.85; }
  51%, 100% { opacity: 0.15; }
}

/* ============================================================
   4. SCAN LINE · RETIRADA
   La línea cruzando el hero cada 9s era decoración pura y reforzaba
   el cliché "consultora IT = scan radar". Las partículas y el live badge
   ya cargan ese acento; añadir una tercera capa era ruido.
   ============================================================ */
.hero::before { display: none !important; }
@keyframes tv-scan {
  0%, 100% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  50% { transform: translateY(100vh); }
}

/* ============================================================
   5. CODE-STYLE BORDERS · pilar cards con esquinas técnicas
   ============================================================ */
.pillar-card {
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border-top: 1.5px solid #22C55E;
  border-left: 1.5px solid #22C55E;
  opacity: 0;
  transition: opacity 0.3s ease, top 0.3s ease, left 0.3s ease;
}
.pillar-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  border-bottom: 1.5px solid #22C55E;
  border-right: 1.5px solid #22C55E;
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease, right 0.3s ease;
}
.pillar-card:hover::before {
  opacity: 1;
  top: -2px; left: -2px;
}
.pillar-card:hover::after {
  opacity: 1;
  bottom: -2px; right: -2px;
}

/* Pillar A/B/C con prefijo de letra en código */
.pillar-card[data-pillar]::before {
  content: '';
}
.pillar-card[data-pillar="A"] .pillar-title::before {
  content: '[A] ';
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7em;
  color: #22C55E;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.pillar-card[data-pillar="B"] .pillar-title::before {
  content: '[B] ';
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7em;
  color: #22C55E;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.pillar-card[data-pillar="C"] .pillar-title::before {
  content: '[C] ';
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7em;
  color: #22C55E;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ============================================================
   6. STAT NUMBERS · efecto "data refresh" sutil
   ============================================================ */
.stat-num {
  position: relative;
  font-family: 'Inter Tight', system-ui, sans-serif;
}
.stats .reveal::before {
  content: '◉';
  display: inline-block;
  color: #22C55E;
  font-size: 8px;
  margin-bottom: 8px;
  animation: tv-data-blink 3s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}
@keyframes tv-data-blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================================
   7. SYSTEM STATUS · línea técnica encima del footer
   ============================================================ */
.tv-system-status {
  background: #02060F;
  color: rgba(255, 255, 255, 0.6);
  padding: 14px 0;
  border-top: 1px solid rgba(34, 197, 94, 0.15);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.tv-system-status-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.tv-status-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.tv-status-item .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: tv-data-blink 2.4s ease-in-out infinite;
}
.tv-status-item .label {
  color: rgba(255, 255, 255, 0.5);
}
.tv-status-item .value {
  color: #22C55E;
  font-weight: 600;
}

@media (max-width: 760px) {
  .tv-system-status-inner { font-size: 10.5px; gap: 12px; padding: 0 16px; }
  .tv-status-item:not(:first-child) { display: none; }
  .tv-status-item:nth-child(1),
  .tv-status-item:last-child { display: inline-flex; }
}
@media (max-width: 400px) {
  .tv-system-status { padding: 12px 0; }
  .tv-system-status-inner { font-size: 9.5px; gap: 8px; }
  .tv-status-item:last-child { display: none; }
}

/* ============================================================
   8. GLITCH HOVER · subtle text glitch en hero h1
   ============================================================ */
.hero-title .accent-line {
  position: relative;
  display: inline-block;
}
.hero-title .accent-line:hover {
  animation: tv-glitch 0.4s cubic-bezier(0.36, 0, 0.66, -0.56) 1;
}
@keyframes tv-glitch {
  0% { transform: translate(0); text-shadow: 0 0 0 transparent; }
  20% { transform: translate(-1px, 1px); text-shadow: 2px 0 #22C55E, -2px 0 #1E5FFF; }
  40% { transform: translate(1px, -1px); text-shadow: -2px 0 #22C55E, 2px 0 #1E5FFF; }
  60% { transform: translate(-1px, 0); text-shadow: 2px 0 #22C55E, -2px 0 #1E5FFF; }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); text-shadow: 0 0 0 transparent; }
}

/* ============================================================
   9. SECTION CONNECTOR · línea técnica entre secciones
   ============================================================ */
.section + .section::before,
.stats + .section::before {
  content: '';
  display: block;
  height: 40px;
  background:
    linear-gradient(180deg, transparent 0%, transparent 49%, rgba(34, 197, 94, 0.35) 50%, transparent 51%, transparent 100%);
  width: 1px;
  margin: -20px auto 0;
}

/* ============================================================
   10. CODE-COMMENT eyebrows · puede activarse con .tv-comment
   ============================================================ */
.tv-comment {
  font-family: 'JetBrains Mono', monospace !important;
  color: rgba(34, 197, 94, 0.7) !important;
  font-weight: 400;
}
.tv-comment::before {
  content: '// ';
  opacity: 0.7;
}

/* ============================================================
   11. TERMINAL · enhancement con typing cursor en última línea
   ============================================================ */
.terminal-line.tv-typing::after {
  content: '▊';
  display: inline-block;
  margin-left: 4px;
  color: #22C55E;
  animation: tv-cursor-blink 1s steps(2) infinite;
}
@keyframes tv-cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================================
   12. CIRCUIT GLOW · resplandor verde sutil en bordes del hero
   ============================================================ */
.hero {
  box-shadow: inset 0 -1px 0 rgba(34, 197, 94, 0.15);
}

/* ============================================================
   13. RESPONSIVE · particles más sutiles en móvil
   ============================================================ */
@media (max-width: 760px) {
  .tv-particles { opacity: 0.3; }
  .hero::before { display: none; }
  /* Sin esquinas técnicas en móvil · evita overflow */
  .pillar-card::before,
  .pillar-card::after { display: none; }
  /* Eyebrows más compactos en móvil */
  .eyebrow, .hero-eyebrow { font-size: 11px !important; gap: 6px; }
}
@media (max-width: 480px) {
  /* Desactivar particles en móviles pequeños (rendimiento) */
  .tv-particles { display: none; }
}

/* ============================================================
   15. HERO ORBIT · diagrama "web · sistemas · IA · soporte" orbitando
   un núcleo "One", visualiza el eslogan de hero-firma. Primera
   diapositiva del carrusel del hero (las otras 3 son los casos
   reales, que también viven íntegros en #casos más abajo).

   Núcleo en verde de acento (contraste fuerte contra el fondo casi
   negro del hero; navy-sobre-navy no se distinguía). Disposición
   asimétrica a propósito (ángulos/radios distintos por nodo, no
   una cruz perfecta a 90°). Un solo gesto de movimiento: las líneas
   se dibujan una vez al cargar y luego un pulso recorre cada una
   por turnos; el resto queda quieto.
   ============================================================ */
.hero-orbit-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orbit {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.hero-orbit-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  color: var(--color-neutral-0);
  overflow: visible;
}
.hero-orbit-ring {
  fill: none;
  stroke: rgba(34, 197, 94, 0.2);
  stroke-width: 1.3;
  stroke-dasharray: 2 8;
}
.hero-orbit-line {
  fill: none;
  stroke: rgba(34, 197, 94, 0.26);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: orbit-draw 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}
.hero-orbit-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-dasharray: 8 90;
  animation: orbit-flow 4.2s linear infinite;
}
.hero-orbit-node-halo {
  display: none;
}
.hero-orbit-node-ring {
  fill: rgba(253, 253, 254, 0.08);
  stroke: rgba(34, 197, 94, 0.55);
  stroke-width: 1.4;
}
.hero-orbit-node-icon {
  fill: none;
  stroke: currentColor;
  color: var(--color-neutral-0);
}
.hero-orbit-node-icon-fill {
  fill: currentColor;
  stroke: none;
  color: var(--color-neutral-0);
}
.hero-orbit-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-wide);
  fill: rgba(253, 253, 254, 0.65);
}
.hero-orbit-core {
  stroke: rgba(253, 253, 254, 0.2);
  stroke-width: 1.5;
  animation: orbit-core-glow 4s ease-in-out infinite;
}
.hero-orbit-core-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.01em;
  fill: var(--color-neutral-0);
}
@keyframes orbit-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes orbit-flow {
  to { stroke-dashoffset: -98; }
}
@keyframes orbit-core-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(34, 197, 94, 0.32)); }
  50%      { filter: drop-shadow(0 0 26px rgba(34, 197, 94, 0.52)); }
}
@media (max-width: 900px) {
  .hero-orbit-svg { max-width: 320px; }
}

/* ============================================================
   14. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .logo::after,
  .tv-status-item .dot,
  .stats .reveal::before,
  .eyebrow::before,
  .hero-eyebrow::before,
  .hero-orbit-line,
  .hero-orbit-pulse,
  .hero-orbit-core,
  .terminal-line.tv-typing::after {
    animation: none !important;
  }
  .hero-orbit-line { stroke-dashoffset: 0 !important; }
  .hero-orbit-pulse { opacity: 0; }
  .tv-particles { display: none !important; }
}
