/* ============================================================
   NEXLABS — Propuesta C (ajustes sobre la propuesta B)
   Sección "Lo que construimos": fondo animado sutil + nuevo bento
   ============================================================ */

/* ---------- Fondo animado de la sección ---------- */
.serv-c { position: relative; overflow: hidden; }
#servCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}
.serv-c > .wrap { position: relative; z-index: 1; }
/* Constelación de Virgo: sobre las tarjetas pero en modo "screen" y semitransparente,
   así se percibe como si brillara detrás de un vidrio */
.virgo-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
  mix-blend-mode: screen; opacity: 0.38;
}
/* Cada tarjeta lleva un degradado con los colores de los círculos del cerebro.
   Opacidad total ~85% (color sutil al 20% sobre base oscura al 80%): deja ver la constelación detrás. */
.bento-c .tile {
  --a: 0.2;
  background:
    linear-gradient(135deg, rgba(var(--t1), var(--a)), rgba(var(--t2), calc(var(--a) * 0.7))),
    rgba(15,17,32,0.8);
  border-color: rgba(var(--t2), 0.32);
}
.bento-c .tile::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--t2), 0.22), transparent 60%); }
.bento-c .tile:hover { border-color: rgba(var(--t2), 0.6); }
.bento-c .tile .tile-num { color: rgba(var(--t2), 0.95); }
.bento-c .c-ai    { --t1: 91,33,182;  --t2: 168,85,247; }   /* violeta (Industria) */
.bento-c .c-local { --t1: 3,105,161;  --t2: 45,212,191; }   /* azul → turquesa (Oceanografía) */
.bento-c .c-web   { --t1: 55,48,163;  --t2: 129,140,248; }  /* índigo (Seguridad) */
.bento-c .c-soft  { --t1: 194,65,12;  --t2: 250,204,21; }   /* naranjo → amarillo (Energía solar) */
.bento-c .c-data  { --t1: 6,95,70;    --t2: 52,211,153; }   /* esmeralda (Contabilidad) */
.bento-c .t-full  { --t1: 162,28,175; --t2: 240,171,252; }  /* magenta (Educación) */

/* ---------- Bento en 12 columnas ---------- */
.bento-c { grid-template-columns: repeat(12, 1fr); grid-auto-rows: auto; }
.bento-c .c-ai    { grid-column: span 7; }
.bento-c .c-local { grid-column: span 5; }
.bento-c .c-web   { grid-column: span 3; }
.bento-c .c-soft  { grid-column: span 4; }
.bento-c .c-data  { grid-column: span 5; }
.bento-c .t-full  { grid-column: 1 / -1; }

/* Aplicaciones con IA: más compacta, sin espacio vacío entre el terminal y las etiquetas */
.bento-c .c-ai h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.bento-c .c-ai .agent { min-height: 0; margin: 18px 0 0; }
.bento-c .c-ai .chips { margin-top: 0; padding-top: 16px; }
.bento-c .c-local h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

/* Diseño web (pequeña) */
.bento-c .c-web .browser { margin-top: 14px; }
.bento-c .c-web .score { flex-wrap: wrap; gap: 4px 12px; }

/* Flujo IA local → automatización (horizontal) */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 4px; position: relative; }
.pipe::before {
  content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 21px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(45,212,191,0.6), rgba(139,92,246,0.6));
}
.pipe::after {
  content: ''; position: absolute; top: 18px; left: 12.5%; width: 8px; height: 8px; border-radius: 50%;
  background: #2DD4BF; box-shadow: 0 0 10px #2DD4BF; animation: pipe-run 3.2s var(--ease) infinite;
}
@keyframes pipe-run { 0% { left: 12.5%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(87.5% - 8px); opacity: 0; } }
.pipe li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 0.78rem; color: var(--text-2); line-height: 1.25; }
.pipe-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(5,6,12,0.9); border: 1px solid rgba(45,212,191,0.3); color: var(--teal); position: relative; z-index: 1;
}
.pipe-ic svg { width: 18px; height: 18px; }
.pipe li:nth-child(3) .pipe-ic, .pipe li:nth-child(4) .pipe-ic { border-color: rgba(139,92,246,0.35); color: var(--violet-2); }
.bento-c .c-local .chips { margin-top: auto; }

/* Mini gráfico de dashboards (histórico + pronóstico) */
.mini-chart { width: 100%; height: 70px; margin-top: 16px; display: block; }
.mc-bars rect { fill: rgba(79,142,247,0.35); }
.mc-bars rect.fc { fill: rgba(45,212,191,0.35); }
.mc-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: mc-draw 2.4s var(--ease) forwards; animation-play-state: paused; }
.tile.in .mc-line { animation-play-state: running; }

@keyframes mc-draw { to { stroke-dashoffset: 0; } }

/* ---------- Malla de ola en "Cómo trabajamos" (derecha) y "Proyectos 2026" (izquierda) ---------- */
.sect-wave { position: relative; overflow: hidden; }
.sect-wave > .wrap { position: relative; z-index: 1; }
.mini-wave {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.9;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
}

/* Tarjetas de proyectos levemente translúcidas para que la malla se intuya detrás */
#proyectos .pcard { background: rgba(15,17,32,0.85); }

/* ---------- "Comienza hoy": todo centrado ---------- */
.cta { text-align: center; }
.cta h2, .cta p { margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bento-c { grid-template-columns: repeat(2, 1fr); }
  .bento-c .c-ai, .bento-c .c-local, .bento-c .c-data { grid-column: span 2; }
  .bento-c .c-web, .bento-c .c-soft { grid-column: span 1; }
}
@media (max-width: 600px) {
  .bento-c { grid-template-columns: 1fr; }
  .bento-c .tile { grid-column: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .pipe::after { animation: none; display: none; }
}
