/* Mavare Legal · v10
   Regla de forma: superficies de esquina recta; solo el botón flotante
   de WhatsApp y las etiquetas pequeñas son redondas.
   Regla de movimiento: un solo momento protagonista (la portada) y, en el
   resto, movimiento que explica dónde estás o responde a lo que tocas. */

:root {
  color-scheme: dark;
  --bg: #071010;
  --bg-2: #0b1a19;
  --bg-3: #0f2321;
  --ink: #eff7f5;
  --texto: #c4d6d2;
  --muted: #9db4b0;
  --line: #2a4744;
  --teal: #2ce0cf;
  --teal-soft: #a8f5e9;
  --font: 'DM Sans', Arial, sans-serif;
  --display: 'Manrope', Arial, sans-serif;
  --salida: cubic-bezier(0.16, 1, 0.3, 1);
  --alto-header: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--alto-header);
  scrollbar-color: #2f5551 var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font);
  caret-color: var(--teal);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--teal); color: var(--bg); }

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

p { text-wrap: pretty; }

.acento { color: var(--teal); }

.container {
  width: min(100% - 3rem, 1240px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 40;
  top: -5rem;
  left: 1rem;
  padding: 0.6rem 1rem;
  background: var(--teal);
  color: var(--bg);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Marca invisible al inicio de la página: cuando sale de la pantalla,
   el encabezado toma su fondo. */
.tope { position: absolute; top: 0; height: 24px; width: 1px; }

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--salida), border-color 0.3s var(--salida);
}

.site-header.con-fondo {
  background: rgba(7, 16, 16, 0.82);
  border-bottom-color: rgba(168, 245, 233, 0.14);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.header-inner {
  min-height: var(--alto-header);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: auto;
  font-family: var(--display);
  white-space: nowrap;
}

.brand-image {
  width: auto;
  height: 40px;
}

.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em; }
.brand-legal { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.25em; }

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  padding: 0.5rem 0;
  color: var(--texto);
  transition: color 0.2s var(--salida);
}

.site-nav a:hover,
.site-nav a[aria-current='true'] { color: var(--ink); }

/* Línea que se desliza a la sección en la que estás. */
.nav-linea {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 2px;
  background: var(--teal);
  transform-origin: left;
  transform: translateX(var(--x, 0px)) scaleX(var(--ancho, 0));
  opacity: var(--visible, 0);
  transition: transform 0.45s var(--salida), opacity 0.25s var(--salida);
}

.executive-access {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--teal);
  color: #061412;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s var(--salida), transform 0.15s var(--salida);
}

.executive-access:hover { background: var(--teal-soft); }
.executive-access:active { transform: scale(0.97); }

.menu-toggle { display: none; }

/* ---------- Botones ---------- */

.button {
  min-height: 52px;
  padding: 0 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s var(--salida), transform 0.15s var(--salida);
}

.button:active { transform: scale(0.97); }
.button-primary { background: var(--teal); color: #061412; }
.button-primary:hover { background: var(--teal-soft); }

.flecha { transition: transform 0.3s var(--salida); }
.button:hover .flecha { transform: translate(3px, -3px); }

.text-link {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(44, 224, 207, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.2s var(--salida), color 0.2s var(--salida);
}

.text-link:hover { color: var(--teal); text-decoration-color: var(--teal); }

/* ---------- Portada ---------- */

.hero {
  margin-top: calc(var(--alto-header) * -1);
  padding-top: var(--alto-header);
  overflow: hidden;
}

.hero-grid {
  min-height: min(calc(100svh - var(--alto-header)), 760px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: 3.5rem 4.5rem;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

/* Cada renglón del título sube desde detrás de una máscara. */
h1 .linea { display: block; overflow: hidden; padding-bottom: 0.08em; }
h1 .linea > span { display: block; }
@media (min-width: 861px) { h1 .linea { white-space: nowrap; } }

.hero-lead {
  max-width: 34rem;
  margin-top: 1.6rem;
  color: var(--texto);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.4rem;
}

/* La marca flota sobre la página, sin recuadro. */
.hero-marca img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 460px;
  margin-inline: auto;
}

/* Velo en movimiento detrás de la portada, tomado de la llama del logotipo. */
.hero { position: relative; isolation: isolate; }
.hero-velo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  filter: blur(26px);
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 20%, transparent 78%);
}
.hero-marca { will-change: transform; }
.hero-marca img { will-change: transform; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55)); }

/* Barra de avance de lectura. */
.progreso { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progreso {
      display: block;
      position: fixed;
      inset: 0 0 auto 0;
      z-index: 35;
      height: 3px;
      background: var(--teal);
      transform-origin: left;
      animation: avance linear both;
      animation-timeline: scroll(root);
    }
    @keyframes avance { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* Cinta en movimiento con el lema de la marca. */
.cinta {
  overflow: hidden;
  padding-block: 1.6rem;
  border-block: 1px solid var(--line);
  background: var(--bg);
}
.cinta-pista { display: flex; width: max-content; }
.cinta-pista > div { display: flex; flex: none; }
.cinta span {
  padding-inline: clamp(1.2rem, 3vw, 2.6rem);
  font: 800 clamp(2.6rem, 7vw, 6rem)/1 var(--display);
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.cinta .hueca { color: var(--teal); }

/* Cifras */
.cifras {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}
.cifras strong {
  display: block;
  color: var(--teal);
  font: 800 clamp(4rem, 11vw, 6rem)/0.95 var(--display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.cifras p { max-width: 17rem; margin-top: 0.9rem; color: var(--texto); }

/* ---------- Cada cuenta se trabaja ---------- */

.proof {
  padding-block: 6rem;
  background: var(--bg-2);
}

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.hechos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem clamp(1.5rem, 4vw, 3.5rem);
}

.hechos dt {
  margin-bottom: 0.45rem;
  font: 700 1.2rem/1.3 var(--display);
  letter-spacing: -0.02em;
}

.hechos dd { color: var(--texto); line-height: 1.6; }

/* ---------- Secciones ---------- */

.section { padding-block: 7.5rem; }

.section-head { max-width: 46rem; margin-bottom: 3.5rem; }

.section-head p,
.section-intro,
.contact-grid > div:not(.contact-card) > p {
  max-width: 34rem;
  margin-top: 1.4rem;
  color: var(--texto);
  font-size: 1.08rem;
}

/* Servicios: tres renglones de tipografía grande en lugar de tarjetas. */
.servicios { border-top: 1px solid var(--line); }

.servicios li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 2rem;
  padding-block: 2.2rem;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.3s var(--salida);
}

.servicios h3 {
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  transition: color 0.3s var(--salida), transform 0.45s var(--salida);
}

.servicios p { max-width: 30rem; color: var(--texto); }

/* El renglón activo se llena de color de izquierda a derecha:
   con el cursor en computadora, al pasar por el centro en celular. */
.servicios li { position: relative; isolation: isolate; padding-inline: 0; transition: padding 0.5s var(--salida); }
.servicios li::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--teal);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s var(--salida);
}
.servicios h3, .servicios p { transition: color 0.3s var(--salida); }
.servicios li.activo::before { clip-path: inset(0 0 0 0); }
.servicios li.activo { padding-inline: clamp(1rem, 2.5vw, 2rem); }
.servicios li.activo h3 { color: #052622; }
.servicios li.activo p { color: #0b3b35; font-weight: 500; }
@media (hover: hover) {
  .servicios li:hover::before { clip-path: inset(0 0 0 0); }
  .servicios li:hover { padding-inline: clamp(1rem, 2.5vw, 2rem); }
  .servicios li:hover h3 { color: #052622; }
  .servicios li:hover p { color: #0b3b35; font-weight: 500; }
}

/* Cómo trabajamos: el título se queda fijo mientras pasan los pasos,
   y la línea se llena conforme avanzas. */
.method { background: var(--bg-3); }

.method-grid,
.technology-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 7rem);
}

.method h2 {
  position: sticky;
  top: calc(var(--alto-header) + 3rem);
  align-self: start;
}

.pasos {
  position: relative;
  padding-left: 2.2rem;
  display: grid;
  gap: 4.5rem;
  padding-block: 0.4rem;
}

.pasos::before,
.pasos::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(168, 245, 233, 0.16);
}

.pasos::after {
  background: var(--teal);
  transform-origin: top;
}

.pasos h3 { margin-bottom: 0.5rem; font-size: 1.6rem; letter-spacing: -0.03em; }
.pasos p { max-width: 28rem; color: var(--texto); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes llenar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    .pasos { view-timeline-name: --pasos; }
    .pasos::after {
      animation: llenar linear both;
      animation-timeline: --pasos;
      animation-range: entry 40% cover 62%;
    }
  }
}

/* Capacidades */
.technology .section-intro { margin-bottom: 2.2rem; }

.capability-list { border-top: 1px solid var(--line); }

.capability-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.nexum-escena { align-self: center; perspective: 1400px; }

.nexum-panel {
  padding: 1.4rem 1.5rem;
  border: 1px solid #35605a;
  background: #0c1c1a;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  font-variant-numeric: tabular-nums;
}

.nexum-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.nexum-marca { font: 800 1.2rem var(--display); letter-spacing: 0.08em; }
.nexum-marca small { margin-left: 0.3rem; font: 500 0.72rem var(--font); letter-spacing: 0.02em; color: var(--muted); }

.nexum-muestra {
  padding: 0.25rem 0.65rem;
  border: 1px solid #35605a;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.nexum-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 1.3rem 0 0.4rem;
}

.nexum-kpis small { display: block; color: var(--muted); font-size: 0.74rem; }
.nexum-kpis strong { display: block; margin-top: 0.2rem; font: 700 1.3rem var(--display); letter-spacing: -0.03em; }

.nexum-titulo { margin: 1.4rem 0 0.5rem; color: var(--muted); font-size: 0.78rem; font-weight: 600; }

.nexum-barra {
  display: grid;
  grid-template-columns: 76px 1fr 40px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.3rem 0;
  font-size: 0.84rem;
  color: var(--texto);
}

.nexum-barra i { display: block; height: 6px; background: rgba(255, 255, 255, 0.07); }
.nexum-barra b { display: block; height: 100%; background: var(--teal); transform-origin: left; transform: scaleX(var(--avance)); }
.nexum-barra em { font-style: normal; text-align: right; color: var(--muted); }

.nexum-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--texto);
}

.nexum-chip {
  padding: 0.15rem 0.65rem;
  border: 1px solid rgba(44, 224, 207, 0.5);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
}

/* Lista de gestiones que se actualiza sola (datos de muestra). */
.nexum-vivo { height: calc(2.75rem * 3); overflow: hidden; }
.nexum-fila { height: 2.75rem; padding-block: 0; }
.nexum-lista.entra { transition: transform 0.7s var(--salida); }
.nexum-fila.nueva .nexum-chip { background: var(--teal); color: #052622; }
.nexum-chip { transition: background-color 1.2s var(--salida), color 1.2s var(--salida); }

/* Cobertura */
.coverage { background: var(--bg-2); }
.coverage h2 { max-width: 18ch; }

.canales {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 3.5rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.canales h3 { margin-bottom: 0.5rem; color: var(--teal); font-size: 1.25rem; letter-spacing: -0.02em; }
.canales p { color: var(--texto); }

/* Contacto: cierre oscuro con acento en la llamada a la acción. */
.contact { background: var(--bg); color: var(--ink); }
.contact h2 { font-size: clamp(2.6rem, 6.4vw, 6rem); line-height: 1; }
.contact .contact-grid > div:not(.contact-card) > p { color: var(--texto); font-weight: 500; }
.contact ::selection { background: #052622; color: var(--teal); }
.contact a:focus-visible { outline-color: var(--teal); }
.contact-card { color: var(--ink); }
.contact-grid { align-items: center; grid-template-columns: 1.15fr 0.85fr; }

.contact-card {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--bg-3);
  border: 1px solid var(--line);
}

.contact-card h3 { font-size: 1.9rem; letter-spacing: -0.04em; }
.contact-card > p { color: var(--texto); }

.contact-detail {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  margin: 1.8rem 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-detail a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.contact-card .contact-note { margin-top: 1.4rem; color: var(--muted); font-size: 0.88rem; }

/* Pie */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: #06100f;
}

.footer-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo { display: block; width: auto; height: 64px; margin-bottom: 0.8rem; }
.site-footer p, .site-footer small { margin-top: 0.4rem; color: var(--muted); font-size: 0.82rem; }
.site-footer a { font-size: 0.88rem; font-weight: 700; transition: color 0.2s var(--salida); }
.site-footer a:hover { color: var(--teal); }

/* Botón flotante de WhatsApp */
.wa-flotante {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0 1.15rem;
  border-radius: 999px;
  background: #25d366;
  color: #04210f;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s var(--salida), transform 0.15s var(--salida);
}

.wa-flotante:hover { background: #4be083; }
.wa-flotante:active { transform: scale(0.95); }

/* ---------- Movimiento ----------
   Solo corre si el navegador cargó el script (clase .anim) y la persona
   no pidió reducir animaciones. Sin eso, todo se ve completo y quieto. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes subir-renglon { from { transform: translateY(105%); } }
  @keyframes entrar { from { opacity: 0; transform: translateY(14px); } }
  @keyframes marca {
    from { opacity: 0; filter: blur(14px); clip-path: inset(100% 0 0 0); transform: translateY(24px) scale(0.97); }
    to { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); transform: none; }
  }
  @keyframes llegar { from { opacity: 0; transform: translateY(16px) scale(0.9); } }

  /* Momento protagonista: el título sube renglón por renglón y la marca
     se levanta desde abajo, como la llama del logotipo. */
  .anim h1 .linea > span { animation: subir-renglon 0.9s var(--salida) both; }
  .anim h1 .linea:nth-child(2) > span { animation-delay: 0.1s; }
  .anim .hero-lead { animation: entrar 0.7s 0.35s var(--salida) both; }
  .anim .hero-actions { animation: entrar 0.7s 0.45s var(--salida) both; }
  .anim .hero-marca img { animation: marca 1.3s 0.15s var(--salida) both; }
  .anim .wa-flotante { animation: llegar 0.5s 1.3s var(--salida) both; }

  /* El resto de la página: los títulos solo aclaran; las listas entran
     como listas, un elemento tras otro. */
  .anim .aparece {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(44px);
    transition: opacity 0.8s var(--salida), filter 0.9s var(--salida), transform 1.1s var(--salida);
  }
  .anim .aparece.is-visible { opacity: 1; filter: none; transform: none; }

  /* Los pasos se encienden al cruzar el centro de la pantalla. */
  .anim .pasos.is-visible > li { transition: opacity 0.4s var(--salida), transform 0.6s var(--salida); transition-delay: 0s; }
  .anim .pasos.is-visible > li:not(.activo) { opacity: 0.32; }
  .anim .pasos > li.activo h3 { color: var(--teal); }
  .pasos h3 { transition: color 0.4s var(--salida); }

  .cinta-pista { animation: correr 38s linear infinite; }
  .cinta.pausada .cinta-pista { animation-play-state: paused; }
  @keyframes correr { to { transform: translateX(-50%); } }

  @keyframes flotar { 50% { transform: translateY(-12px); } }
  .anim .hero-marca { animation: flotar 7s 1.6s ease-in-out infinite; }

  .anim .en-lista > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--salida), transform 0.7s var(--salida);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .anim .en-lista.is-visible > * { opacity: 1; transform: none; }
  /* Al pasar el cursor por Servicios no debe esperar el retraso de entrada. */
  .anim .servicios.is-visible.listo > * { transition: padding 0.5s var(--salida); }

  /* El panel de NEXUM llega inclinado y se asienta; las barras crecen. */
  .anim .nexum-panel {
    opacity: 0;
    transform: rotateX(10deg) rotateY(-10deg) translateY(30px);
    transition: opacity 0.7s var(--salida), transform 1.1s var(--salida);
  }
  .anim .nexum-escena.is-visible .nexum-panel { opacity: 1; transform: none; }
  .anim .nexum-barra b { transform: scaleX(0); transition: transform 1s var(--salida); }
  .anim .nexum-escena.is-visible .nexum-barra b { transform: scaleX(var(--avance)); transition-delay: 0.45s; }
  .anim .nexum-escena.is-visible .nexum-barra:nth-of-type(2n) b { transition-delay: 0.55s; }

  @view-transition { navigation: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Pantallas medianas y celular ---------- */

@media (max-width: 1020px) {
  .site-nav { gap: 1rem; font-size: 0.85rem; }
  .acceso-largo { display: none; }
}

@media (max-width: 860px) {
  :root { --alto-header: 64px; }
  .container { width: min(100% - 2.5rem, 1240px); }

  .header-inner { gap: 0.6rem; }
  .brand-image { height: 34px; }
  .brand-name { font-size: 1.15rem; }
  .brand-legal { font-size: 0.58rem; }

  .menu-toggle {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--salida);
  }
  .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: rgba(7, 16, 16, 0.97);
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--salida), transform 0.3s var(--salida), visibility 0s 0.3s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid rgba(168, 245, 233, 0.1); }
  .nav-linea { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 1rem;
    padding-block: 2.5rem 3.5rem;
  }
  .hero-marca { order: -1; width: min(52vw, 230px); margin: 0 auto 1.2rem 0; }
  h1 { font-size: clamp(2.5rem, 11vw, 4rem); }
  .hero-lead { font-size: 1.05rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 1.3rem; }

  .section { padding-block: 4.5rem; }
  .proof { padding-block: 4rem; }
  .section-head { margin-bottom: 2.2rem; }

  .proof-grid,
  .method-grid,
  .technology-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }

  .hechos { gap: 1.8rem 1.5rem; }
  .servicios li { grid-template-columns: 1fr; gap: 0.7rem; padding-block: 1.7rem; }
  .method h2 { position: static; }
  .pasos { gap: 2.6rem; padding-left: 1.5rem; }
  .canales { grid-template-columns: 1fr; gap: 1.8rem; margin-top: 2.2rem; }
  .cifras { grid-template-columns: 1fr; gap: 2.2rem; margin-bottom: 3.5rem; padding-bottom: 3rem; }
  .cifras strong { font-size: 4.6rem; }
  .cinta { padding-block: 1.1rem; }
  .hero-velo { -webkit-mask-image: radial-gradient(ellipse 110% 60% at 50% 25%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 110% 60% at 50% 25%, #000 20%, transparent 80%); }
  .nexum-panel { padding: 1.1rem; }
  .nexum-kpis { gap: 0.8rem; }
  .nexum-kpis strong { font-size: 1.05rem; }

  .footer-inner { align-items: start; flex-direction: column; gap: 1rem; }
  .site-footer { padding-bottom: 6rem; }

  .wa-flotante { right: 1rem; bottom: 1rem; width: 56px; height: 56px; min-height: 0; padding: 0; justify-content: center; }
  .wa-flotante span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (max-width: 480px) {
  .hechos { grid-template-columns: 1fr; }
}

/* ---------- Asistente guiado ---------- */

.oculto-visual {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Va encima del botón de WhatsApp, que se queda donde estaba. */
.asistente-lanzador {
  position: fixed;
  right: 1.4rem;
  bottom: calc(1.4rem + 54px + 0.75rem);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #04201c;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s var(--salida), transform 0.15s var(--salida);
}

.asistente-lanzador:hover { background: var(--teal-soft); }
.asistente-lanzador:active { transform: scale(0.95); }

.asistente {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 2rem));
  height: min(600px, calc(100svh - 2.8rem));
  background: #0c1c1a;
  border: 1px solid #35605a;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.75);
  transform-origin: bottom right;
  will-change: transform, opacity;
}

.asistente[hidden] { display: none; }

/* Con el asistente abierto, los dos botones flotantes se apartan. */
.asistente-abierto .asistente-lanzador,
.asistente-abierto .wa-flotante {
  visibility: hidden;
}

.asistente-cabeza {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 0.6rem 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.asistente-cabeza div { margin-right: auto; line-height: 1.2; }
.asistente-cabeza strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.asistente-cabeza span { color: var(--muted); font-size: 0.8rem; }

.asistente-cabeza button {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.6rem;
  border: 0;
  background: transparent;
  color: var(--texto);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s var(--salida);
}

.asistente-cabeza button:hover { color: var(--teal); }

.asistente-charla {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #2f5551 transparent;
}

.burbuja {
  max-width: 86%;
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.burbuja.bot { align-self: flex-start; background: var(--bg-3); color: var(--ink); }
.burbuja.yo { align-self: flex-end; background: var(--teal); color: #04201c; font-weight: 600; }

.burbuja.escribiendo { display: flex; gap: 5px; padding-block: 0.95rem; }
.burbuja.escribiendo i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

.asistente-pie {
  display: grid;
  gap: 0.5rem;
  padding: 0 1.1rem 0.9rem;
}

.asistente-opcion,
.asistente-enviar {
  min-height: 46px;
  padding: 0.6rem 1rem;
  border: 1px solid #35605a;
  background: transparent;
  color: var(--ink);
  font: 600 0.93rem/1.3 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s var(--salida), border-color 0.15s var(--salida), color 0.15s var(--salida), transform 0.12s var(--salida);
}

.asistente-opcion:hover,
.asistente-enviar:hover { border-color: var(--teal); color: var(--teal); }
.asistente-opcion:active,
.asistente-enviar:active { transform: scale(0.98); }

.asistente-enviar { display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; }
.asistente-wa { border-color: #25d366; background: #25d366; color: #04210f; }
.asistente-wa:hover { background: #4be083; border-color: #4be083; color: #04210f; }

.asistente-forma { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.asistente-error { flex: 1 1 100%; color: #ffb4a8; font-size: 0.85rem; }
.asistente-error[hidden] { display: none; }
.asistente-lanzador strong { font-weight: 800; }

.asistente-forma input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 0.9rem;
  border: 1px solid #35605a;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem var(--font);
}

.asistente-forma input::placeholder { color: var(--muted); }
.asistente-forma input:focus-visible { outline: 2px solid var(--teal); outline-offset: 0; }

.asistente-forma button {
  min-height: 46px;
  padding: 0 1.1rem;
  border: 0;
  background: var(--teal);
  color: #04201c;
  font-weight: 700;
  cursor: pointer;
}

.asistente-nota {
  padding: 0 1.1rem 0.9rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.asistente-nota a { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes burbuja-entra { from { opacity: 0; transform: translateY(8px); } }
  @keyframes punto { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
  .burbuja, .asistente-pie > * { animation: burbuja-entra 0.35s var(--salida) both; }
  .asistente-pie > *:nth-child(2) { animation-delay: 0.05s; }
  .asistente-pie > *:nth-child(3) { animation-delay: 0.1s; }
  .asistente-pie > *:nth-child(4) { animation-delay: 0.15s; }
  .burbuja.escribiendo i { animation: punto 1s infinite; }
  .burbuja.escribiendo i:nth-child(2) { animation-delay: 0.15s; }
  .burbuja.escribiendo i:nth-child(3) { animation-delay: 0.3s; }
  .anim .asistente-lanzador { animation: llegar 0.5s 1.45s var(--salida) both; }
}

@media (max-width: 860px) {
  .asistente-lanzador {
    right: 1rem;
    bottom: calc(1rem + 56px + 0.7rem);
    width: 56px;
    height: 56px;
    min-height: 0;
    padding: 0;
    justify-content: center;
  }
  .asistente-lanzador span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .asistente {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: min(86svh, 640px);
    border-width: 1px 0 0;
    transform-origin: bottom center;
  }
}

/* Retrato ilustrado de Mava. */
.mava-retrato { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(44, 224, 207, 0.35); }
.asistente-lanzador { padding-left: 0.45rem; }
@media (max-width: 860px) {
  .asistente-lanzador { padding-left: 0; }
  .asistente-lanzador .mava-retrato { width: 48px; height: 48px; }
}
.asistente-cabeza div, .asistente-cabeza button { white-space: nowrap; }
.asistente-enviar { width: 100%; font-family: var(--font); }

/* ---------- Intro de marca ----------
   La flama sube ondulando, la M aparece detrás y al final la cortina
   se levanta. Dura unos dos segundos y se puede saltar con un clic. */

.intro { display: none; }

.intro-activa .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: clip-path 0.75s var(--salida);
  clip-path: inset(0 0 0 0);
}

.intro-activa .intro.se-va { clip-path: inset(0 0 100% 0); }

/* Sin intro no hay nada que esperar; con intro, la portada espera. */
.intro-activa body { overflow: hidden; }

.intro-logo {
  position: relative;
  width: min(58vw, 330px);
  aspect-ratio: 744 / 900;
}

.intro-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes intro-flama {
  from { clip-path: inset(100% 0 0 0); transform: translateY(26px); opacity: 0.4; }
  to { clip-path: inset(-12% -12% 0 -12%); transform: none; opacity: 1; }
}
@keyframes intro-eme {
  from { opacity: 0; transform: translateY(12px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes intro-texto {
  from { opacity: 0; transform: scaleX(0.9); }
  to { opacity: 1; transform: none; }
}

.intro-activa .intro-flama {
  filter: url(#flama-viva);
  animation: intro-flama 1.15s 0.1s var(--salida) both;
}
.intro-activa .intro-eme { animation: intro-eme 0.9s 0.55s var(--salida) both; }
.intro-activa .intro-texto { animation: intro-texto 0.8s 1.05s var(--salida) both; }

/* Mientras dura la intro, la portada no gasta su propia entrada. */
.intro-activa.anim h1 .linea > span,
.intro-activa.anim .hero-lead,
.intro-activa.anim .hero-actions,
.intro-activa.anim .hero-marca img,
.intro-activa.anim .wa-flotante,
.intro-activa.anim .asistente-lanzador {
  animation-play-state: paused;
}

/* ---------- Logo del encabezado: la flama ondea siempre ----------
   Movimiento pequeño y lento; la M se queda quieta para que se lea. */

.filtros { position: absolute; }

.brand-image {
  position: relative;
  display: block;
  flex: none;
  width: auto;
  height: 40px;
  aspect-ratio: 139 / 160;
}

.brand-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes flama-mece {
    0%, 100% { transform: skewX(0deg) scaleY(1); }
    35% { transform: skewX(-2.2deg) scaleY(1.035); }
    70% { transform: skewX(1.6deg) scaleY(0.985); }
  }

  .brand-flama {
    filter: url(#flama-suave);
    transform-origin: 60% 100%;
    animation: flama-mece 4.6s ease-in-out infinite;
  }
}

@media (max-width: 860px) {
  .brand-image { height: 34px; }
}


/* ==========================================================
   v24 · Menos texto, más imagen
   - Hechos y alcance con icono.
   - "La ruta de cada cuenta": diagrama que se dibuja al llegar.
   - Cobertura: mapa de puntos que se enciende desde Monterrey.
   ========================================================== */

.icono { width: 1.5rem; height: 1.5rem; flex: none; }

.hechos .icono { display: block; margin-bottom: 0.9rem; color: var(--teal); width: 1.75rem; height: 1.75rem; }

.servicios p { font-size: 1.15rem; }

/* ---------- La ruta de cada cuenta ---------- */

.method h2 { position: static; max-width: 16ch; }

.ruta {
  --nodo: 4.5rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 4.5rem;
  padding: 0;
  list-style: none;
}

/* La línea que une los nodos: gris de base, turquesa que avanza. */
.ruta::before,
.ruta::after {
  content: '';
  position: absolute;
  top: calc(var(--nodo) / 2 - 1px);
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(168, 245, 233, 0.16);
}

.ruta::after { background: var(--teal); transform-origin: left; }

.ruta li { position: relative; z-index: 1; text-align: center; }

.ruta-nodo {
  display: grid;
  place-items: center;
  width: var(--nodo);
  height: var(--nodo);
  margin: 0 auto 1.4rem;
  border-radius: 1.5rem;
  corner-shape: squircle;
  background: var(--bg-3);
  box-shadow: inset 0 0 0 2px var(--teal);
  color: var(--teal);
}

.ruta-nodo .icono { width: 1.9rem; height: 1.9rem; }

.ruta h3 { font-size: 1.35rem; letter-spacing: -0.03em; }

.ruta p { max-width: 14rem; margin: 0.4rem auto 0; color: var(--texto); font-size: 0.98rem; line-height: 1.45; }

/* ---------- Cobertura con mapa ---------- */

.coverage-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.coverage h2 { max-width: 12ch; }

.alcance { display: grid; gap: 1.5rem; margin: 3rem 0 0; padding: 0; list-style: none; }

.alcance li { display: flex; align-items: center; gap: 1rem; }

.alcance .icono {
  box-sizing: content-box;
  padding: 0.8rem;
  border-radius: 1rem;
  corner-shape: squircle;
  background: rgba(44, 224, 207, 0.12);
  color: var(--teal);
}

.alcance strong { display: block; font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.02em; }

.alcance span { color: var(--texto); }

.mapa-mx { display: block; width: 100%; height: auto; overflow: visible; }

.mapa-puntos circle { fill: var(--teal); opacity: 0.85; }

.mapa-centro { fill: #fff; }

.mapa-onda { fill: none; stroke: #fff; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }

.mapa-base text { fill: #fff; font: 700 15px var(--display); letter-spacing: -0.01em; }

@media (prefers-reduced-motion: no-preference) {
  .anim .ruta::after { transform: scaleX(0); transition: transform 1.8s var(--salida); }
  .anim .ruta.is-visible::after { transform: scaleX(1); }

  .anim .ruta li {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s var(--salida), transform 0.8s var(--salida);
  }
  .anim .ruta li:nth-child(2) { transition-delay: 0.25s; }
  .anim .ruta li:nth-child(3) { transition-delay: 0.5s; }
  .anim .ruta li:nth-child(4) { transition-delay: 0.75s; }
  .anim .ruta li:nth-child(5) { transition-delay: 1s; }
  .anim .ruta.is-visible li { opacity: 1; transform: none; }

  /* Los puntos se encienden en onda: primero los cercanos a Monterrey. */
  .anim .mapa-puntos circle {
    opacity: 0.12;
    transition: opacity 0.5s ease-out;
    transition-delay: calc(var(--d) * 85ms);
  }
  .anim .mapa-escena.is-visible .mapa-puntos circle { opacity: 0.85; }

  .mapa-escena.is-visible .mapa-onda { animation: mapa-onda 2.6s ease-out infinite; }
  .mapa-escena.is-visible .mapa-onda-2 { animation-delay: 1.3s; }

  @keyframes mapa-onda {
    from { opacity: 0.9; transform: scale(1); }
    to { opacity: 0; transform: scale(5); }
  }
}

@media (max-width: 860px) {
  /* En celular la ruta baja en vertical, con la línea a la izquierda. */
  .ruta { --nodo: 3.5rem; grid-template-columns: 1fr; gap: 1.8rem; margin-top: 2.8rem; }

  .ruta::before,
  .ruta::after {
    top: 0;
    bottom: 0;
    left: calc(var(--nodo) / 2 - 1px);
    right: auto;
    width: 2px;
    height: auto;
  }

  .ruta::after { transform-origin: top; }
  .anim .ruta::after { transform: scaleY(0); }
  .anim .ruta.is-visible::after { transform: scaleY(1); }

  .ruta li {
    display: grid;
    grid-template-columns: var(--nodo) 1fr;
    column-gap: 1.1rem;
    align-items: center;
    text-align: left;
  }

  .ruta-nodo { grid-row: span 2; margin: 0; border-radius: 1.1rem; }
  .ruta-nodo .icono { width: 1.5rem; height: 1.5rem; }
  .ruta h3 { align-self: end; font-size: 1.2rem; }
  .ruta p { align-self: start; max-width: none; margin: 0; }

  .coverage-grid { grid-template-columns: 1fr; }
  .mapa-escena { order: -1; }
  .alcance { margin-top: 2rem; }
}

/* Enlaces legales del pie */
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.footer-cookies {
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 700;
  transition: color 0.2s var(--salida);
}
.footer-cookies:hover { color: var(--teal); }

/* Aviso de privacidad simplificado en Mava, antes de enviar */
.asistente-aviso { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.asistente-aviso a { color: var(--teal); }

/* Servicios: jerarquía y alineación para las descripciones ampliadas. */
.services .section-head h2 {
  max-width: 24ch;
  font-size: clamp(2rem, 3.3vw, 3.5rem);
  line-height: 1.12;
  text-wrap: balance;
}
.servicios li { align-items: center; }
.servicios h3 {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
.servicios p { margin-block: 0; min-width: 0; }
/* NEXUM: título de marca con escala adecuada a su columna. */
#tech-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* Alineación vertical explícita de cada fila de servicios. */
.services .servicios > li {
  align-items: center;
}
.services .servicios > li > h3 {
  align-self: center;
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.16;
}
.services .servicios > li > p {
  align-self: center;
  margin: 0;
}