/* ══════════════════════════════════════════════════════════
   NEXO Labs — Versión fusionada 2026
   Diseño original (hero, números, servicios, proceso, porqué,
   CTA) + paleta, preloader, nav, marquee, ticker y footer de
   la versión recreada.
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:  #1B4F8A;
  --blue-mid:   #2A7FC1;
  --teal:       #1A9E8F;
  --white:      #F2F5FA;
  --ink:        #060A14;
  --bg:         #0A0F1E;
  --bg-raise:   #0E1526;
  --line:       rgba(148, 178, 216, 0.13);
  --gray:       #8B96AB;
  --gray-soft:  #A9B4C8;
  --grad:       linear-gradient(135deg, #2A7FC1, #1A9E8F);
  --grad-text:  linear-gradient(92deg, #4FA3E3 0%, #2A7FC1 40%, #23C4B0 100%);
  --font-d:     'Syne', sans-serif;
  --font-b:     'DM Sans', sans-serif;
  --pad-x:      clamp(24px, 6vw, 88px);
  --ease-out:   cubic-bezier(.22, 1, .36, 1);
  /* Alineación logo hero ↔ wordmark del nav (original) */
  --nav-pad-y:  22px;
  --nav-wordmark-w: 168px;
  /* Duración base del ciclo del logo del hero (original) */
  --nexo-hero-logo-dur: calc(8s * 2 / 3);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(42, 127, 193, 0.55); color: #fff; }

img { max-width: 100%; height: auto; display: block; }

/* ── Grano fino global ── */
#grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 9s steps(8) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
}

/* ── Barra de progreso de scroll ── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1600;
}

/* ── Cursor custom (solo puntero fino) ── */
#cursor, #cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
  #cursor {
    display: block;
    width: 8px; height: 8px;
    background: var(--teal);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 2100;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s, background .25s;
    mix-blend-mode: screen;
  }
  #cursor-ring {
    display: block;
    width: 34px; height: 34px;
    border: 1.5px solid rgba(26, 158, 143, 0.5);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 2090;
    transform: translate(-50%, -50%);
    transition: width .3s, height .3s, border-color .3s, opacity .3s;
  }
  body.cursor-hover #cursor { width: 42px; height: 42px; background: rgba(42,127,193,.28); }
  body.cursor-hover #cursor-ring { opacity: 0; }
}

/* ══ PRELOADER (recreada) ══ */
#preloader {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.preloader-logo { width: clamp(90px, 14vw, 150px); }
.pre-diamond, .pre-spoke {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: preDraw 1.1s var(--ease-out) forwards;
}
.pre-spoke { animation-delay: .35s; }
.pre-node, .pre-center {
  opacity: 0; transform-origin: center;
  scale: .4;
  animation: preNode .5s var(--ease-out) forwards;
}
.pre-node:nth-of-type(1) { animation-delay: .75s; }
.pre-node:nth-of-type(2) { animation-delay: .85s; }
.pre-node:nth-of-type(3) { animation-delay: .95s; }
.pre-node:nth-of-type(4) { animation-delay: 1.05s; }
.pre-center { animation-delay: 1.15s; }
@keyframes preDraw { to { stroke-dashoffset: 0; } }
@keyframes preNode { to { opacity: 1; scale: 1; } }
.preloader-word {
  font-family: var(--font-d);
  font-weight: 800; font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .16em; display: flex;
}
.preloader-word span {
  opacity: 0; transform: translateY(14px);
  animation: preWord .45s var(--ease-out) forwards;
}
.preloader-word span:nth-child(1) { animation-delay: 1.2s; }
.preloader-word span:nth-child(2) { animation-delay: 1.28s; }
.preloader-word span:nth-child(3) { animation-delay: 1.36s; }
.preloader-word span:nth-child(4) { animation-delay: 1.44s; }
.preloader-word .pre-labs { animation-delay: 1.55s; color: var(--teal); font-weight: 500; }
@keyframes preWord { to { opacity: 1; transform: translateY(0); } }
#preloader.done { pointer-events: none; }

/* ══ UTILIDADES ══ */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-overline {
  font-size: 12px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.02em; line-height: 1.1;
  color: var(--white);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 17px; line-height: 1.6;
  color: var(--gray-soft);
  margin-bottom: 56px;
  max-width: 600px;
}
.reveal, .reveal-stagger { opacity: 0; transform: translateY(38px); }
html.no-motion .reveal, html.no-motion .reveal-stagger { opacity: 1; transform: none; }

/* ══ NAV (recreada) ══ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--nav-pad-y) var(--pad-x);
  transition: background .45s, padding .45s, box-shadow .45s, backdrop-filter .45s;
}
#nav.scrolled {
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  padding: 13px var(--pad-x);
  box-shadow: 0 1px 0 var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 0; text-decoration: none; transition: gap .4s var(--ease-out); }
#nav.nav-show-logo .nav-logo { gap: 11px; }
.nav-logo-mark {
  width: 34px; height: 34px;
  filter: drop-shadow(0 4px 14px rgba(26,158,143,.35));
  opacity: 0; transform: scale(.8);
  max-width: 0; overflow: hidden; pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), max-width .4s var(--ease-out);
}
#nav.nav-show-logo .nav-logo-mark {
  opacity: 1; transform: scale(1);
  max-width: 34px; pointer-events: auto;
}
.nav-logo-text {
  font-family: var(--font-d); font-weight: 800; font-size: 19px;
  color: var(--white); letter-spacing: -0.01em;
}
.nav-logo-text span { color: var(--teal); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav-links a {
  color: var(--gray-soft); text-decoration: none;
  font-size: 15px; font-weight: 500;
  position: relative; padding: 4px 0;
  transition: color .3s;
}
.nav-links a:not(.btn-nav)::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .45s var(--ease-out);
}
.nav-links a:not(.btn-nav):hover { color: var(--white); }
.nav-links a:not(.btn-nav):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.btn-nav {
  border: 1px solid rgba(42,127,193,.5);
  border-radius: 100px;
  padding: 9px 22px !important;
  color: var(--white) !important;
  overflow: hidden; position: relative;
  transition: border-color .3s, box-shadow .3s;
}
.btn-nav::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad);
  opacity: 0; transition: opacity .35s;
}
.btn-nav span { position: relative; z-index: 1; }
.btn-nav:hover { border-color: transparent; box-shadow: 0 8px 30px rgba(26,158,143,.35); }
.btn-nav:hover::before { opacity: 1; }

.nav-hamburger {
  display: none;
  background: none; border: 0;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  z-index: 1600;
}
.ham-bar {
  width: 26px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform .4s var(--ease-out), opacity .3s;
}

/* ══ HERO (diseño original) ══ */
#hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: var(--bg);
  padding: 120px 24px 80px;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.5;
}

/* Logo animado del hero: bajo el wordmark del nav (original).
   opacity:0 por defecto — se revela por JS recién el preloader se va,
   para que el barrido de salida del preloader nunca lo deje "a la vista"
   (se confundía con una repetición de esa misma intro). No se toca
   `transform` aquí (solo opacity) para no pisar el translateX(-50%). */
.hero-logo-wrap {
  position: absolute; z-index: 3;
  left: calc(var(--pad-x) + var(--nav-wordmark-w) / 2);
  top: calc(2 * var(--nav-pad-y) + 22px + 12px);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  opacity: 0;
}
.hero-logo-wrap svg.nexo-logo-anim { width: 110px; height: 113px; display: block; }
#hero .hero-logo-wrap .nexo-hero-node-hole-fill { fill: var(--bg); }
#hero .hero-logo-wrap .nexo-hero-rotates {
  transform-box: view-box;
  transform-origin: 50% 50%;
}
#hero .hero-logo-wrap.nexo-first-run .nexo-hero-rotates {
  animation: nexoHeroRotateLogo var(--nexo-hero-logo-dur) 1 linear forwards;
}
#hero .hero-logo-wrap.nexo-first-run .nexo-hero-node-1 {
  animation: nexoHeroMoveCircle1 var(--nexo-hero-logo-dur) 1 cubic-bezier(0.45, 0.02, 0.55, 0.98) forwards;
}
#hero .hero-logo-wrap.nexo-first-run .nexo-hero-node-2 {
  animation: nexoHeroMoveCircle2 var(--nexo-hero-logo-dur) 1 cubic-bezier(0.45, 0.02, 0.55, 0.98) forwards;
}
#hero .hero-logo-wrap.nexo-first-run .nexo-hero-node-3 {
  animation: nexoHeroMoveCircle3 var(--nexo-hero-logo-dur) 1 cubic-bezier(0.45, 0.02, 0.55, 0.98) forwards;
}
#hero .hero-logo-wrap.nexo-first-run .nexo-hero-node-4 {
  animation: nexoHeroMoveCircle4 var(--nexo-hero-logo-dur) 1 cubic-bezier(0.45, 0.02, 0.55, 0.98) forwards;
}
#hero .hero-logo-wrap.nexo-first-done:not(:hover) .nexo-hero-rotates {
  animation: none;
  transform: rotate(180deg);
}
#hero .hero-logo-wrap.nexo-first-done:not(:hover) .nexo-hero-node-1 { animation: none; transform: translate(250px, 425px); }
#hero .hero-logo-wrap.nexo-first-done:not(:hover) .nexo-hero-node-2 { animation: none; transform: translate(75px, 250px); }
#hero .hero-logo-wrap.nexo-first-done:not(:hover) .nexo-hero-node-3 { animation: none; transform: translate(250px, 75px); }
#hero .hero-logo-wrap.nexo-first-done:not(:hover) .nexo-hero-node-4 { animation: none; transform: translate(425px, 250px); }
#hero .hero-logo-wrap.nexo-first-done:hover .nexo-hero-rotates {
  animation: nexoHeroRotateLogo var(--nexo-hero-logo-dur) infinite linear;
}
#hero .hero-logo-wrap.nexo-first-done:hover .nexo-hero-node-1 {
  animation: nexoHeroMoveCircle1 var(--nexo-hero-logo-dur) infinite cubic-bezier(0.45, 0.02, 0.55, 0.98);
}
#hero .hero-logo-wrap.nexo-first-done:hover .nexo-hero-node-2 {
  animation: nexoHeroMoveCircle2 var(--nexo-hero-logo-dur) infinite cubic-bezier(0.45, 0.02, 0.55, 0.98);
}
#hero .hero-logo-wrap.nexo-first-done:hover .nexo-hero-node-3 {
  animation: nexoHeroMoveCircle3 var(--nexo-hero-logo-dur) infinite cubic-bezier(0.45, 0.02, 0.55, 0.98);
}
#hero .hero-logo-wrap.nexo-first-done:hover .nexo-hero-node-4 {
  animation: nexoHeroMoveCircle4 var(--nexo-hero-logo-dur) infinite cubic-bezier(0.45, 0.02, 0.55, 0.98);
}
@keyframes nexoHeroMoveCircle1 {
  0%  { transform: translate(250px, 75px); }
  11% { transform: translate(425px, 250px); }
  22%, 100% { transform: translate(250px, 425px); }
}
@keyframes nexoHeroMoveCircle2 {
  0%  { transform: translate(425px, 250px); }
  11% { transform: translate(250px, 425px); }
  22%, 100% { transform: translate(75px, 250px); }
}
@keyframes nexoHeroMoveCircle3 {
  0%  { transform: translate(250px, 425px); }
  11% { transform: translate(75px, 250px); }
  22%, 100% { transform: translate(250px, 75px); }
}
@keyframes nexoHeroMoveCircle4 {
  0%  { transform: translate(75px, 250px); }
  11% { transform: translate(250px, 75px); }
  22%, 100% { transform: translate(425px, 250px); }
}
@keyframes nexoHeroRotateLogo {
  0%, 14% { transform: rotate(0deg); }
  34.85% { transform: rotate(480deg); }
  38.375% { transform: rotate(540deg); }
  100% { transform: rotate(540deg); }
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 900px;
  width: 100%;
}
.hero-pill {
  display: inline-block;
  border: 1px solid var(--teal); color: var(--teal);
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; padding: 8px 20px;
  border-radius: 50px; margin-bottom: 32px;
}
.hero-h1 {
  font-family: var(--font-b); font-weight: 700;
  font-size: 38px;
  line-height: 1.2; letter-spacing: normal;
  color: var(--white); margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--gray-soft); line-height: 1.65;
  max-width: 580px; margin: 0 auto 26px;
}
.hero-sub em { color: var(--white); font-style: normal; border-bottom: 1px solid rgba(26,158,143,.55); }

/* Ticker "HACEMOS" (recreada, con alturas fijas para que nunca se corte) */
.hero-ticker {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-b);
  color: var(--gray);
  margin-bottom: 40px;
}
.ticker-static { letter-spacing: .12em; text-transform: uppercase; font-size: 12px; line-height: 26px; }
.ticker-mask {
  display: inline-block; overflow: hidden;
  height: 26px;
}
.ticker-words {
  display: flex; flex-direction: column;
  animation: tickerRoll 10s var(--ease-out) infinite;
}
.ticker-words span {
  display: block;
  height: 26px; line-height: 26px;
  color: var(--white); font-weight: 500; font-size: 15px;
  white-space: nowrap;
  text-align: left;
}
@keyframes tickerRoll {
  0%, 20%   { transform: translateY(0); }
  25%, 45%  { transform: translateY(-26px); }
  50%, 70%  { transform: translateY(-52px); }
  75%, 95%  { transform: translateY(-78px); }
  100%      { transform: translateY(-104px); }
}

/* Botones (recreada) */
.hero-ctas, .cta-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.btn-primary-lg, .btn-ghost-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-b); font-weight: 600; font-size: 15.5px;
  padding: 16px 32px; border-radius: 100px;
  text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s, border-color .3s;
  will-change: transform;
}
.btn-primary-lg {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 34px rgba(26,158,143,.3);
}
.btn-primary-lg::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #3B93D8, #22BBA8);
  opacity: 0; transition: opacity .35s;
}
.btn-primary-lg > * { position: relative; z-index: 1; }
.btn-primary-lg svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.btn-primary-lg:hover { box-shadow: 0 16px 44px rgba(26,158,143,.45); }
.btn-primary-lg:hover::before { opacity: 1; }
.btn-primary-lg:hover svg { transform: translateX(5px); }
.btn-ghost-lg {
  color: var(--white);
  border: 1px solid rgba(148,178,216,.3);
  background: rgba(14,21,38,.4);
  backdrop-filter: blur(6px);
}
.btn-ghost-lg:hover { border-color: rgba(42,127,193,.7); background: rgba(42,127,193,.1); }

/* Scroll indicator (original) */
.scroll-indicator {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2;
}
.scroll-line {
  width: 1px; height: 52px;
  background: linear-gradient(to bottom, rgba(26,158,143,0.8), transparent);
  animation: scrollLineAnim 2s ease-in-out infinite;
}
.scroll-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,0.3); }
@keyframes scrollLineAnim {
  0%,100% { transform: scaleY(0.7); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ══ MARQUEE (recreada) ══ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(6,10,20,.5);
  overflow: hidden;
  padding: 18px 0;
  position: relative; z-index: 2;
}
.marquee-track {
  display: flex; align-items: center; gap: 42px;
  width: max-content;
  animation: marqueeMove 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-d); font-weight: 700;
  font-size: 17px; letter-spacing: .04em;
  color: rgba(169,180,200,.75);
  white-space: nowrap;
  transition: color .3s;
}
.marquee-track span:hover { color: var(--white); }
.marquee-track i { color: var(--teal); font-style: normal; font-size: 11px; opacity: .8; }
@keyframes marqueeMove { to { transform: translateX(-50%); } }

/* ══ NUMBERS (diseño original) ══ */
#numeros {
  background: var(--bg);
  padding: 72px 64px;
  text-align: center;
  border-top: 1px solid var(--line);
}
#numeros .section-overline { margin-bottom: 56px; font-family: sans-serif; font-size: 13px; }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 960px;
  margin: 0 auto 64px;
  align-items: stretch;
}
.number-item {
  padding: 0 48px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.number-item:last-child { border-right: none; }
.number-value {
  font-family: sans-serif; font-weight: 800;
  font-size: clamp(48px, 5vw, 64px); line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: 16px;
  display: block;
  font-variant-numeric: tabular-nums;
}
.number-label {
  font-size: 15.5px; color: var(--gray-soft); line-height: 1.55;
  max-width: 260px; margin: 0 auto;
}
.numbers-close {
  font-style: italic; color: var(--teal); font-size: 17px;
  max-width: 600px; margin: 0 auto; line-height: 1.65;
}

/* ══ SERVICIOS (diseño original) ══ */
#servicios {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--bg) 100%);
  padding: 72px 64px;
  position: relative;
  overflow: hidden;
  font-family: sans-serif;
}
#servicios::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(26,158,143,0.15) 0%, transparent 70%);
  pointer-events: none;
}
#servicios .section-inner { position: relative; z-index: 1; }
#servicios .section-overline { font-family: sans-serif; font-size: 12px; }
#servicios .section-title { font-family: "DM Sans", sans-serif; font-size: 40px; }
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; max-width: 1100px; margin: 0 auto;
}
.service-card {
  background: #FFFFFF; border-radius: 14px;
  padding: 28px 22px;
  box-shadow: 0 2px 20px rgba(6,10,20,0.15);
  position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.4s ease, background 0.4s ease;
  display: flex; flex-direction: column;
}
/* Halo de color detrás de la tarjeta: se dibuja fuera de su caja (box-shadow
   difuso, no un relleno), así nunca puede tapar el texto de adentro. */
.service-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
  z-index: 1;
}
.service-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(155deg, #ffffff 0%, #f4faff 55%, #f1faf8 100%);
  box-shadow:
    0 16px 48px rgba(6,10,20,0.32),
    0 0 46px 2px rgba(42,127,193,.45),
    0 0 84px 14px rgba(26,158,143,.3),
    0 0 120px 26px rgba(27,79,138,.18);
}
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, rgba(42,127,193,0.1), rgba(26,158,143,0.1));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-name {
  font-family: var(--font-d); font-weight: 700;
  font-size: 16px; color: var(--blue-dark); margin-bottom: 8px;
}
.service-tagline {
  font-size: 13px; color: rgba(27,79,138,0.65);
  line-height: 1.55; margin-bottom: 16px;
}
.service-card-link { text-decoration: none; color: inherit; }
.service-card-link .service-tagline { margin-bottom: 12px; }
.service-cta {
  margin-top: auto;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--teal);
  transition: color 0.2s;
}
.service-card-link:hover .service-cta { color: var(--blue-mid); }

/* ══ PROCESO (diseño original) ══ */
#proceso {
  background: var(--bg);
  padding: 72px 64px;
  font-family: sans-serif;
}
#proceso .section-overline { padding-top: 0; font-size: 12px; font-family: 'DM Sans', sans-serif; }
#proceso .section-title { font-family: "DM Sans", sans-serif; font-size: 40px; }
.process-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  --process-gap: 12px;
  --col-w: calc((100% - 3 * var(--process-gap)) / 4);
  --process-img-inner-w: min(280px, calc(var(--col-w) - 16px));
  --process-img-h: calc(var(--process-img-inner-w) * 365 / 512);
  --process-card-pad-top: 12px;
  --process-line-offset: 50px;
}
.process-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--process-gap);
  align-items: stretch;
  width: 100%;
}
.process-connector {
  position: absolute; z-index: 1;
  left: calc(var(--col-w) / 2);
  width: calc(3 * var(--col-w) + 3 * var(--process-gap));
  top: calc(var(--process-card-pad-top) + var(--process-img-h) / 2 + var(--process-line-offset));
  transform: translateY(-50%);
  height: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  pointer-events: none;
}
.process-connector-fill {
  height: 100%; width: 0%;
  background: var(--grad);
  transform-origin: left center;
}
.process-connector-fill.animated {
  animation: processLineSequential 4.2s cubic-bezier(0.33, 1, 0.65, 1) infinite;
}
@keyframes processLineSequential {
  0% { width: 0%; }
  5% { width: 0%; }
  18% { width: 25%; }
  23% { width: 25%; }
  36% { width: 50%; }
  41% { width: 50%; }
  54% { width: 75%; }
  59% { width: 75%; }
  74% { width: 100%; }
  88% { width: 100%; }
  100% { width: 100%; }
}
.process-step-wrap {
  position: relative; z-index: 2;
  min-width: 0;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 24px;
  padding: 12px 8px 16px;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  transition: transform 0.42s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.38s ease;
}
.process-step-wrap .step-diorama,
.process-step-wrap .proceso-desc {
  transition: transform 0.42s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.process-wrapper:has(.process-step-wrap:hover) .process-step-wrap:not(:hover) {
  filter: brightness(0.68);
}
.process-step-wrap:hover { z-index: 6; filter: brightness(1); }
.process-step-wrap:hover .step-diorama { transform: scale(1.2) translateY(-8px); }
.process-step-wrap:hover .proceso-desc { transform: scale(1.16); }
#proceso .proceso-desc { max-width: 200px; margin: 0; width: 100%; }
.step-desc { font-size: 14px; color: var(--gray-soft); line-height: 1.6; }
.step-diorama {
  display: flex; justify-content: center;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.45))
          drop-shadow(0 6px 16px rgba(26, 158, 143, 0.22));
}
.step-diorama img { max-width: 280px; width: 100%; height: auto; display: block; }

/* ══ POR QUÉ (diseño original) ══ */
#porque {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--bg) 100%);
  padding: 120px 64px;
  position: relative;
  overflow: hidden;
}
#porque::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(26,158,143,0.15) 0%, transparent 70%);
}
#porque .section-overline { font-size: 16px; font-family: sans-serif; }
.porque-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 1;
}
.porque-big {
  font-family: "DM Sans", sans-serif; font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--white);
  display: flex; flex-direction: column;
  gap: 0.28em;
}
.porque-big-line { display: block; }
.porque-reasons { display: flex; flex-direction: column; gap: 36px; }
.reason { display: flex; gap: 20px; align-items: flex-start; }
.reason-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(42,127,193,0.15), rgba(26,158,143,0.15));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.reason-icon svg { width: 22px; height: 22px; }
.reason-text h3 {
  font-family: var(--font-d); font-weight: 700;
  font-size: 16px; color: var(--white); margin-bottom: 6px;
}
.reason-text p { font-size: 14px; color: var(--gray-soft); line-height: 1.6; }

/* ══ CTA (diseño original · botones recreada) ══ */
#cta {
  background: var(--bg);
  padding: 144px 64px;
  text-align: center;
  position: relative;
}
.cta-title {
  font-family: sans-serif; font-weight: 800;
  font-size: clamp(34px, 4.6vw, 58px);
  letter-spacing: -0.02em; line-height: 1.08;
  color: var(--white);
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.cta-sub {
  font-size: 18px; color: var(--gray-soft);
  max-width: 560px; margin: 0 auto 48px;
  line-height: 1.6; position: relative; z-index: 1;
}
.cta-actions { position: relative; z-index: 1; }

/* ══ FOOTER (recreada) ══ */
footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  padding: clamp(56px, 7vw, 84px) var(--pad-x) 30px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  padding-bottom: 52px;
}
.footer-brand-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.footer-logo-mark { width: 36px; height: 36px; filter: drop-shadow(0 4px 12px rgba(26,158,143,0.25)); }
.footer-logo-text { font-family: var(--font-d); font-weight: 800; font-size: 21px; }
.footer-logo-text span { color: var(--teal); font-weight: 500; }
.footer-tagline { color: var(--gray); font-size: 14.5px; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--font-d); font-weight: 700;
  font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--gray-soft); text-decoration: none; font-size: 14.5px;
  transition: color .3s, padding-left .3s;
}
.footer-col a:hover { color: var(--white); padding-left: 5px; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-copy, .footer-made { color: var(--gray); font-size: 13px; }
.footer-made { font-family: var(--font-b); font-size: 11.5px; letter-spacing: .1em; }

/* ══ RESPONSIVE ══ */
@media (max-width: 980px) {
  #numeros, #servicios, #proceso { padding-left: 32px; padding-right: 32px; }
  #porque { padding: 80px 32px; }
  #cta { padding: 100px 32px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .process-connector { display: none; }
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }

  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    background: rgba(6,10,20,.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 34px;
    opacity: 0; pointer-events: none;
    transition: opacity .45s;
  }
  .nav-links a { font-size: 24px; font-family: var(--font-d); font-weight: 700; }
  #nav.nav-open .nav-links { opacity: 1; pointer-events: auto; }
  #nav.nav-open .ham-bar:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  #nav.nav-open .ham-bar:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
}

@media (max-width: 767px) {
  /* Hero: logo centrado arriba, contenido debajo (original mobile) */
  .hero-logo-wrap {
    left: 50%;
    top: 104px;
    transform: translateX(-50%);
  }
  .hero-logo-wrap svg.nexo-logo-anim { width: 124px; height: 128px; }
  #hero {
    align-items: flex-start;
    padding-top: clamp(240px, 34vh, 300px);
    min-height: 100svh;
  }
  .hero-pill { font-size: 10.5px; padding: 7px 16px; margin-bottom: 24px; }
  .hero-sub { font-size: 15.5px; margin-bottom: 22px; }
  .hero-ctas { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }
  .btn-primary-lg, .btn-ghost-lg { justify-content: center; }
  .scroll-indicator { display: none; }

  /* Números */
  #numeros { padding: 52px 20px; }
  #numeros .section-overline { margin-bottom: 36px; }
  .numbers-grid { grid-template-columns: 1fr; margin-bottom: 44px; }
  .number-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0 0 32px;
  }
  .number-item:nth-child(n+2) { padding-top: 32px; }
  .number-item:last-child { border-bottom: none; padding-bottom: 0; }
  .numbers-close { font-size: 15px; }

  /* Servicios */
  #servicios { padding: 52px 20px; }
  #servicios .section-title { font-size: 28px; }
  #servicios .section-sub { font-size: 15px; margin-bottom: 32px; }
  .services-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Proceso: diorama izquierda + texto derecha (original mobile) */
  #proceso { padding: 52px 20px; }
  #proceso .section-title { font-size: 28px; }
  #proceso .section-sub { font-size: 15px; margin-bottom: 32px; }
  .process-connector { display: none !important; }
  .process-cards { grid-template-columns: 1fr; gap: 20px; }
  .process-step-wrap {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 16px;
  }
  .step-diorama { width: 165px; flex-shrink: 0; }
  .step-diorama img { max-width: 165px; width: 165px; }
  #proceso .proceso-desc { max-width: 100%; text-align: left; flex: 1; }
  .process-step-wrap:hover .step-diorama { transform: none; }
  .process-step-wrap:hover .proceso-desc { transform: none; }
  .process-wrapper:has(.process-step-wrap:hover) .process-step-wrap:not(:hover) { filter: none; }

  /* Por qué */
  #porque { padding: 52px 20px 60px; }
  .porque-inner { grid-template-columns: 1fr; gap: 40px; }
  .porque-big { font-size: clamp(32px, 10vw, 52px); }

  /* CTA */
  #cta { padding: 80px 20px; }
  #cta .cta-sub { font-size: 16px; margin-bottom: 32px; }
  .cta-actions { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; }

  /* Grano estático (rendimiento) */
  #grain { animation: none; inset: 0; width: 100%; height: 100%; }
}

@media (max-width: 480px) {
  .step-diorama { width: 140px; }
  .step-diorama img { max-width: 140px; width: 140px; }
}

/* ══ REDUCED MOTION ══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger, .anim-hero { opacity: 1 !important; transform: none !important; }
  .hero-logo-wrap { opacity: 1 !important; }
  #preloader { display: none; }
  .ticker-words { animation: none; }
  #grain { animation: none; }
  .process-connector-fill.animated { animation: none; width: 100%; }
  #hero .hero-logo-wrap .nexo-hero-rotates { animation: none !important; transform: rotate(0deg) !important; }
  #hero .hero-logo-wrap .nexo-hero-node-1 { animation: none !important; transform: translate(250px, 75px) !important; }
  #hero .hero-logo-wrap .nexo-hero-node-2 { animation: none !important; transform: translate(425px, 250px) !important; }
  #hero .hero-logo-wrap .nexo-hero-node-3 { animation: none !important; transform: translate(250px, 425px) !important; }
  #hero .hero-logo-wrap .nexo-hero-node-4 { animation: none !important; transform: translate(75px, 250px) !important; }
}
