/* SPY4U · diseño 3D, cómo funciona, clientes, diagnóstico y pie */


/* ---------- DISEÑO 3D (pantalla y media, con movimiento constante) ---------- */
.lema-3d { position: relative; padding: 16px 22px; font-family: var(--f-display); font-size: 12px; letter-spacing: .26em; line-height: 1.9; color: var(--plata-2); text-transform: uppercase; max-width: 340px; }
.lema-3d i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--neon); }
.lema-3d i:nth-of-type(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.lema-3d i:nth-of-type(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.lema-3d i:nth-of-type(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.lema-3d i:nth-of-type(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
/* tarjetas alineadas y del mismo alto; entran como cortina desde abajo (clase .visible) */
.tres-d { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.tile3d {
  position: relative; height: clamp(420px, 62vh, 600px); overflow: hidden; background: var(--negro-2); border: 1px solid var(--linea-2); border-radius: var(--radio);
  clip-path: inset(100% 0 0 0 round var(--radio)); transition: clip-path 1.2s var(--curva), box-shadow .4s, border-color .4s;
}
.tile3d.visible { clip-path: inset(0 0 0 0 round var(--radio)); }
.tile3d:nth-child(2) { transition-delay: .12s, 0s, 0s; } .tile3d:nth-child(3) { transition-delay: .24s, 0s, 0s; } .tile3d:nth-child(4) { transition-delay: .36s, 0s, 0s; }
.tile3d__img { position: absolute; inset: 0; overflow: hidden; }
.tile3d__img img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transform-origin: 50% 60%; animation: acerca 14s ease-in-out infinite alternate; }
.tile3d:nth-child(2) .tile3d__img img { animation-delay: -4s; transform-origin: 30% 50%; }
.tile3d:nth-child(3) .tile3d__img img { animation-delay: -8s; transform-origin: 70% 40%; }
.tile3d:nth-child(4) .tile3d__img img { animation-delay: -11s; transform-origin: 50% 30%; }
@keyframes acerca { from { transform: scale(1.02); } to { transform: scale(1.16); } }
.tile3d__texto, .tile3d ul { opacity: 0; transform: translateY(12px); transition: opacity .7s .6s, transform .7s .6s var(--curva); }
.tile3d.visible .tile3d__texto, .tile3d.visible ul { opacity: 1; transform: none; }
.tile3d.visible ul { transition-delay: .9s; }
.tile3d::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(4,7,12,.92) 0%, rgba(4,7,12,.12) 45%, rgba(4,7,12,.9) 100%); pointer-events: none; }
.tile3d__malla {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: 1; opacity: .5; pointer-events: none; overflow: hidden;
  transform: perspective(380px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 90%); mask-image: linear-gradient(0deg, #000 10%, transparent 90%);
}
/* la rejilla avanza moviéndose (transform), no redibujando el fondo en cada cuadro */
.tile3d__malla::before {
  content: ""; position: absolute; left: 0; right: 0; top: -44px; bottom: 0;
  background-image: linear-gradient(rgba(var(--neon-rgb), .45) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--neon-rgb), .45) 1px, transparent 1px);
  background-size: 44px 44px; animation: malla 3.2s linear infinite;
}
.tile3d:nth-child(2n) .tile3d__malla::before { animation-duration: 2.4s; }
@keyframes malla { to { transform: translateY(44px); } }
.tile3d__barrido { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, transparent 78%, rgba(var(--neon-rgb), .1)); animation: barreTile 5.5s linear infinite; }
.tile3d__barrido::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--neon); box-shadow: 0 0 14px 2px rgba(var(--neon-rgb), .7); }
.tile3d:nth-child(2) .tile3d__barrido { animation-delay: -1.4s; }
.tile3d:nth-child(3) .tile3d__barrido { animation-delay: -2.8s; }
.tile3d:nth-child(4) .tile3d__barrido { animation-delay: -4.2s; }
@keyframes barreTile { 0% { transform: translateY(-100%); opacity: 0; } 8% { opacity: .9; } 92% { opacity: .9; } 100% { transform: translateY(0); opacity: 0; } }
.tile3d__texto { position: absolute; left: 22px; right: 22px; top: 22px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.tile3d h3 { font-family: var(--f-display); font-weight: 400; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; }
.tile3d__texto span { font-family: var(--f-display); font-size: 9px; letter-spacing: .2em; line-height: 1.8; color: var(--plata-2); text-transform: uppercase; }
.tile3d ul { position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2; display: flex; flex-direction: column; gap: 10px; font-family: var(--f-display); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.tile3d li { display: flex; align-items: center; gap: 12px; }
.tile3d li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--neon); box-shadow: 0 0 8px rgba(var(--neon-rgb), .55); flex: 0 0 auto; animation: punto 2.4s ease-in-out infinite; }
.tile3d li:nth-child(2)::before { animation-delay: .4s; } .tile3d li:nth-child(3)::before { animation-delay: .8s; }
@keyframes punto { 50% { background: rgba(var(--neon-rgb), .5); box-shadow: 0 0 14px rgba(var(--neon-rgb), .9); } }
.tile3d:hover { border-color: rgba(var(--neon-rgb), .6); box-shadow: 0 0 30px rgba(var(--neon-rgb), .18); }

/* iconos que se dibujan y se mueven sin parar, como GIF */
.pilares3d { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); margin-top: 32px; }
.pilares3d li { display: flex; gap: 14px; align-items: center; padding: 20px 16px 20px 0; }
.pilares3d svg { width: 42px; height: 42px; flex: 0 0 auto; fill: none; stroke: var(--plata-2); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; animation: flota 3.6s ease-in-out infinite; }
.pilares3d li:nth-child(2) svg { animation-delay: -.7s; } .pilares3d li:nth-child(3) svg { animation-delay: -1.4s; }
.pilares3d li:nth-child(4) svg { animation-delay: -2.1s; } .pilares3d li:nth-child(5) svg { animation-delay: -2.8s; }
@keyframes flota { 50% { transform: translateY(-4px); } }
.pilares3d svg .n { stroke: var(--neon); filter: drop-shadow(0 0 4px rgba(var(--neon-rgb), .8)); stroke-dasharray: 80; stroke-dashoffset: 80; animation: trazo 2.8s ease-in-out infinite; }
@keyframes trazo { 0% { stroke-dashoffset: 80; } 45%, 72% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -80; } }
.pilares3d svg .gira { transform-box: fill-box; transform-origin: center; animation: gira 6s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.pilares3d svg .parpadea { animation: parpadeaIcono 1.2s steps(2) infinite; }
@keyframes parpadeaIcono { 50% { opacity: .2; } }
.pilares3d svg .late { transform-box: fill-box; transform-origin: center; animation: lateIcono 1.8s ease-in-out infinite; }
@keyframes lateIcono { 50% { transform: scale(1.12); stroke: var(--neon); } }
.pilares3d b { display: block; margin-bottom: 4px; font-family: var(--f-display); font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.pilares3d span { font-size: 13px; color: var(--gris); }

/* ---------- CÓMO FUNCIONA: la línea corre por detrás y traza cada tarjeta ---------- */
.proceso { position: relative; }
.proceso__trazo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.proceso__trazo path { fill: none; stroke: var(--neon); stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(var(--neon-rgb), .9)); }
.proceso__trazo .guia { stroke: rgba(199, 210, 222, .14); stroke-width: 1; filter: none; }
.proceso__pasos { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.paso { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2.4vh, 22px); }
.paso__rombo { position: relative; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; background: var(--negro); border: 1px solid rgba(199, 210, 222, .45); transform: rotate(45deg); transition: border-color .5s, box-shadow .5s, background .5s; }
.paso__rombo span { transform: rotate(-45deg); font-family: var(--f-display); font-size: 12px; color: var(--gris-2); transition: color .5s; }
/* todas las tarjetas del mismo alto: la línea que las une queda recta */
.paso__card { position: relative; z-index: 1; width: 100%; flex: 1 1 auto; display: flex; flex-direction: column; background: var(--negro-2); border: 1px solid var(--linea-2); border-radius: var(--radio); transition: border-color .6s, box-shadow .6s; }
.paso__img { position: relative; height: clamp(130px, 22vh, 220px); overflow: hidden; }
.paso__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.4); transform: scale(1.06); transition: filter 1s var(--curva), transform 1.4s var(--curva); }
.paso__img .escaneo { opacity: 0; }
.paso h3 { padding: 18px 18px 0; font-family: var(--f-display); font-weight: 400; font-size: 12.5px; line-height: 1.6; letter-spacing: .08em; text-transform: uppercase; color: var(--gris-2); transition: color .5s; }
.paso p { padding: 8px 18px 20px; min-height: 5.4em; font-size: 14.5px; line-height: 1.6; color: var(--plata-2); }
.paso.activo .paso__rombo { border-color: var(--neon); background: #062A33; box-shadow: var(--brillo-caja); }
.paso.activo .paso__rombo span { color: var(--neon); text-shadow: var(--brillo-texto); }
.paso.activo .paso__card { box-shadow: 0 0 26px rgba(var(--neon-rgb), .12); }
.paso.activo .paso__img img { filter: none; transform: scale(1); }
.paso.activo .paso__img .escaneo { opacity: 1; }
.paso.activo h3 { color: var(--plata); }

/* ---------- CLIENTES: dos cintas grandes, sin recuadros ---------- */
.una-pantalla .cintas { flex: 1 1 auto; justify-content: center; }
.cintas { display: flex; flex-direction: column; gap: clamp(18px, 5vh, 56px); }
.cinta { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.cinta__pista { display: flex; align-items: center; width: max-content; animation: cinta 55s linear infinite; }
.cinta--der .cinta__pista { animation-direction: reverse; }
.cinta:hover .cinta__pista { animation-play-state: paused; }
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-cli { height: clamp(90px, 15vh, 150px); padding: 0 clamp(30px, 3.6vw, 60px); flex: 0 0 auto; display: grid; place-items: center; }
.logo-cli img { max-height: clamp(48px, 8.5vh, 86px); max-width: clamp(140px, 15vw, 240px); object-fit: contain; opacity: .88; transition: opacity .3s, filter .3s, transform .3s; }
.logo-cli:hover img { opacity: 1; transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(var(--neon-rgb), .7)); }

/* ---------- DIAGNÓSTICO + PIE (una sola sección) ---------- */
.cta .panel__in { overflow: hidden; }
.cta__bloque { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: calc(var(--nav-alto) + 24px) 0 40px; }
.cta__foto { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; }
.cta__foto img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.cta__foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--negro) 0%, rgba(4,7,12,.2) 60%), linear-gradient(0deg, var(--negro) 0%, transparent 25%); }
.cta__bloque > canvas { opacity: .25; }
.cta__in { position: relative; z-index: 2; display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: end; }
.cta__texto { display: flex; flex-direction: column; gap: clamp(16px, 3vh, 26px); }
.cta__titulo { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, min(3vw, 5vh), 40px); line-height: 1.3; text-transform: uppercase; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta__botones { display: flex; gap: 12px; flex-wrap: wrap; }
.cta__datos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 620px; padding-top: 24px; border-top: 1px solid var(--linea); }
.cta__datos div { display: flex; flex-direction: column; gap: 8px; }
.cta__datos span { font-family: var(--f-display); font-size: 10px; letter-spacing: .26em; color: var(--gris); text-transform: uppercase; }
.cta__datos a { font-family: var(--f-display); font-size: 15px; letter-spacing: .06em; }
.cta__hud { justify-self: end; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-align: right; background: rgba(4, 7, 12, .75); border: 1px solid rgba(var(--neon-rgb), .55); box-shadow: 0 0 18px rgba(var(--neon-rgb), .18); font-family: var(--f-display); font-size: 10px; letter-spacing: .2em; line-height: 2; text-transform: uppercase; color: var(--gris); }
.cta__hud b { font-weight: 400; color: var(--neon); text-shadow: var(--brillo-texto); }
.footer { position: relative; z-index: 2; border-top: 1px solid var(--linea); background: var(--negro); }
.footer__in { display: grid; grid-template-columns: 4fr 3fr 3fr 2fr; gap: 32px 24px; padding-top: 56px; padding-bottom: 32px; }
.footer__marca { display: flex; flex-direction: column; gap: 14px; max-width: 220px; }
.footer__col, .footer__menu { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--plata-2); }
.footer address { font-style: normal; }
.footer__menu { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px 20px; font-family: var(--f-display); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.footer__menu .footer__rotulo { grid-column: span 2; }
.footer__rotulo { font-family: var(--f-display); font-size: 10px; letter-spacing: .26em; color: var(--gris); text-transform: uppercase; }
.footer__coord { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; font-family: var(--f-display); font-size: 10px; letter-spacing: .2em; line-height: 2; color: var(--gris); }
.footer__coord b { font-weight: 400; color: var(--neon); text-shadow: var(--brillo-texto); }
.footer__base { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--linea); font-family: var(--f-display); font-size: 10px; letter-spacing: .22em; color: var(--gris); text-transform: uppercase; }

@media (max-width: 860px), (max-width: 1080px) and (orientation: portrait) {
  .tres-d { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilares3d { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proceso__pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta__in, .footer__in { grid-template-columns: 1fr 1fr; }
  .cta__foto { width: 100%; opacity: .35; }
}
@media (max-width: 700px) {
  /* diseño 3D: carrusel con el dedo */
  .tres-d { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--margen)); padding: 0 var(--margen) 4px; scrollbar-width: none; }
  /* diseño 3D: se desliza libre con el dedo, sin imán que lo regrese */
  .tres-d { scroll-snap-type: none; }
  /* título de la 05 (diseño 3D) en máximo tres líneas */
  #t-3d { font-size: 21px; }
  #t-3d br { display: none; }
  .tile3d { flex: 0 0 80%; height: min(54vh, 440px); scroll-snap-align: center; }
  .pilares3d { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin-top: 18px; }
  .pilares3d li { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; }
  .pilares3d li:last-child { grid-column: span 2; flex-direction: row; align-items: center; }
  .pilares3d svg { width: 32px; height: 32px; }
  .pilares3d b { font-size: 10px; }
  .pilares3d span { font-size: 12px; }
  /* cómo funciona: los cuatro pasos en la misma pantalla, cada uno en una fila que reparte el alto */
  #como-funciona .cabecera .texto { font-size: 13.5px; line-height: 1.5; }
  .proceso { flex: 1 1 auto; min-height: 0; display: flex; }
  .proceso__pasos { flex: 1 1 auto; grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px; max-height: 620px; }
  .paso { flex-direction: row; align-items: stretch; gap: 12px; min-height: 0; }
  .paso__rombo { flex: 0 0 auto; align-self: flex-start; width: 28px; height: 28px; margin: 10px 2px 0; }
  .paso__rombo span { font-size: 10px; }
  .paso__card { display: grid; grid-template-columns: 40% 1fr; grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: hidden; }
  .paso__img { grid-row: 1 / span 2; height: 100%; min-height: 0; }
  .paso h3 { padding: 8px 10px 0; font-size: 9.5px; line-height: 1.45; letter-spacing: .06em; }
  .paso p { padding: 3px 10px 8px; min-height: 0; font-size: 12px; line-height: 1.45; overflow: hidden; }
  /* clientes: tres cintas y logos más grandes para llenar la pantalla */
  .cintas { gap: clamp(8px, 2vh, 22px); }
  .logo-cli { height: clamp(96px, 15.5vh, 140px); padding: 0 24px; }
  .logo-cli img { max-height: clamp(56px, 9vh, 84px); max-width: 200px; }
  /* diagnóstico: todo centrado y, con el pie, cabe en una pantalla */
  .cta .panel__in { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
  .cta__bloque { flex: 1 1 auto; min-height: 0; padding: calc(var(--nav-alto) + 18px) 0 22px; }
  .cta__hud { display: none; }
  .cta__in { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
  .cta__texto { align-items: center; gap: 16px; }
  .cta__texto .texto { text-align-last: center; }
  .cta__titulo { font-size: clamp(22px, 6.6vw, 28px); }
  .cta__botones { justify-content: center; }
  .cta__datos { grid-template-columns: 1fr; gap: 12px; width: 100%; padding-top: 16px; justify-items: center; }
  .cta__datos div { align-items: center; gap: 4px; }
  .cta__datos a { font-size: 13px; }
  /* pie de celular: dos líneas (dirección y derechos); teléfono y correo ya están arriba */
  .footer__in { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 14px; padding-bottom: 16px; text-align: center; }
  .footer__marca, .footer__menu, .footer__coord, .footer__rotulo, .footer__col > a { display: none; }
  .footer__col { font-size: 10.5px; line-height: 1.5; color: var(--gris); }
  .footer__base { justify-content: center; padding-top: 0; border-top: 0; font-size: 8.5px; letter-spacing: .2em; }
  .footer__base span + span { display: none; }
}
/* la tercera cinta de clientes solo existe en celular */
@media (min-width: 861px) and (orientation: landscape), (min-width: 1081px) { .cinta--movil { display: none; } }

/* imágenes y marcos de cámara con la misma esquina sutil del logo y los botones */
.paso__card, .pilar__modulos img { border-radius: var(--radio); }
.paso__card { overflow: hidden; }
