/* =====================================================================
   [MJ] NEURALIX · EFECTOS DE MOTION · componente definitivo
   Crossfade · Shared element · Magnification · Blur
   Activos en las 30 paginas cuando <html> lleva .mj-motion-on.
   Desactivables con ?motion=off; respetan prefers-reduced-motion.
   Paleta: #0D0D0D · #161616 · #151515 · #D9B872 · blanco
   ===================================================================== */

/* --- 1 · CROSSFADE ---------------------------------------------------- */
/* El fantasma es una copia de la tarjeta que sale; entra la nueva al
   mismo tiempo. El JS fuerza scroll instantaneo para que no se solape
   con el deslizamiento del scroll-snap.                                */
.mj-motion-ghost {
  position: fixed !important;
  z-index: 9998;
  pointer-events: none;
  margin: 0 !important;
  opacity: 1;
  transform-origin: top left;
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
}
html.mj-motion-on .mj-testi-track { scroll-behavior: auto !important; }

/* --- 2 · SHARED ELEMENT ----------------------------------------------- */
/* Clon de la tarjeta del portafolio que crece hasta el area del hero
   antes de navegar; la pagina destino remata con una entrada suave.    */
.mj-motion-morph {
  position: fixed !important;
  z-index: 9999;
  pointer-events: none;
  margin: 0 !important;
  transform-origin: top left;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
@keyframes mj-motion-hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
html.mj-motion-on .mj-motion-entrada {
  animation: mj-motion-hero-in 520ms cubic-bezier(.22,.8,.2,1) both;
}

/* --- 3 · MAGNIFICATION ------------------------------------------------ */
/* Escalado por proximidad (curva gaussiana) sobre las iniciales oro.
   Maximo 1.38x para no desbordar el overflow:hidden de la tarjeta.    */
html.mj-motion-on .mj-testi-avatar {
  transition: transform .12s linear;
  transform-origin: center center;
  will-change: transform;
}
html.mj-motion-on .mj-testi-person { overflow: visible; }

/* --- 4 · BLUR / GLASSMORPHISM ----------------------------------------- */
/* El aviso de cookies era casi opaco: se vuelve traslucido para que se
   vea el desenfoque del fondo. Se refuerza el contraste del texto.     */
html.mj-motion-on .mj-cookie-notice {
  background:
    radial-gradient(circle at 0% 0%, rgba(217,184,114,.20), transparent 32%),
    linear-gradient(145deg, rgba(18,18,18,.72), rgba(4,4,4,.78)) !important;
  border-color: rgba(217,184,114,.38) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
html.mj-motion-on .mj-cookie-content h3,
html.mj-motion-on .mj-cookie-content p { text-shadow: 0 1px 3px rgba(0,0,0,.55); }
html.mj-motion-on .mj-legal-modal-backdrop {
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
@supports not (backdrop-filter: blur(2px)) {
  html.mj-motion-on .mj-cookie-notice {
    background: linear-gradient(145deg, #121212, #040404) !important;
  }
}

/* --- Interruptor de la prueba ---------------------------------------- */
.mj-motion-chip {
  position: fixed; left: 14px; bottom: 14px; z-index: 100002;
  font: 600 10.5px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .12em; padding: 9px 12px; border-radius: 999px;
  border: 1px solid rgba(217,184,114,.50);
  background: rgba(13,13,13,.88); color: #D9B872; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mj-motion-chip:hover { border-color: #D9B872; }
.mj-motion-chip[aria-pressed="false"] { color: #A9A69E; border-color: rgba(169,166,158,.35); }
.mj-motion-chip:focus-visible { outline: 2px solid #D9B872; outline-offset: 3px; }

/* --- Cartel de prueba oculto (decision del usuario, 04-nov-2026) ---
   Los cuatro efectos quedan ACTIVOS por defecto en produccion.
   El interruptor sigue existiendo en el DOM pero no se muestra;
   se pueden desactivar puntualmente con ?motion=off en la URL.    */
.mj-motion-chip { display: none !important; }

/* --- Accesibilidad ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.mj-motion-on .mj-motion-entrada { animation: none; }
  html.mj-motion-on .mj-testi-avatar { transition: none; }
  .mj-motion-ghost, .mj-motion-morph { display: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  html.mj-motion-on .mj-cookie-notice,
  html.mj-motion-on .mj-legal-modal-backdrop,
  .mj-motion-chip {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html.mj-motion-on .mj-cookie-notice {
    background: linear-gradient(145deg,#121212,#040404) !important;
  }
}
@media (max-width: 600px) {
  .mj-motion-chip { left: 10px; bottom: 10px; font-size: 9.5px; }
}


/* =====================================================================
   AMPLIACION · LOS 4 EFECTOS EN TODA LA WEB (05-nov-2026)
   ===================================================================== */

/* --- 1 · CROSSFADE universal ------------------------------------------ */
/* Entrada suave de cada pagina + fundido entre imagenes de los
   contenedores hover. La navegacion entre paginas usa View Transitions
   inyectadas por JS (progresivas, solo si los efectos estan activos).  */
@keyframes mj-motion-page-in { from { opacity: 0 } to { opacity: 1 } }
html.mj-motion-on body { animation: mj-motion-page-in 340ms ease both; }
html.mj-motion-on .service-hover-image .image img,
html.mj-motion-on .mj-facetas-card,
html.mj-motion-on .case-block-three .image img {
  transition: opacity .42s ease, transform .6s cubic-bezier(.22,.8,.2,1), filter .42s ease;
}
html.mj-motion-on .mj-motion-img-ghost {
  position: fixed !important; z-index: 9997; pointer-events: none;
  margin: 0 !important; object-fit: cover; opacity: 1;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

/* --- 2 · SHARED ELEMENT universal ------------------------------------- */
/* El logo y el hero conservan su identidad entre paginas (asignado por
   JS con view-transition-name), ademas del morph FLIP ya existente.    */
html.mj-motion-on .mj-motion-entrada { animation-duration: 520ms; }

/* --- 3 · MAGNIFICATION universal -------------------------------------- */
/* Escalado gaussiano sobre iconos, numeros de fase, avatares, botones
   y logos presentes en todas las paginas.                                */
html.mj-motion-on .mj-testi-avatar,
html.mj-motion-on .num-icon,
html.mj-motion-on .social-icon,
html.mj-motion-on .icon,
html.mj-motion-on .mj-cookie-btn,
html.mj-motion-on .mj-facetas-cta,
html.mj-motion-on .circle-box,
html.mj-motion-on .mj-brand-logo,
html.mj-motion-on .service-block-three .head .num {
  transition: transform .12s linear;
  transform-origin: center center;
  will-change: transform;
}

/* --- 4 · BLUR / GLASS universal --------------------------------------- */
/* Superficies oscuras traslucidas con desenfoque del fondo. Se mantienen
   el borde oro y el contraste del texto (sin cambiar la paleta).         */
html.mj-motion-on .mj-facetas-card,
html.mj-motion-on .service-block-three,
html.mj-motion-on .mj-testi-card,
html.mj-motion-on .mj-legal-modal-card,
html.mj-motion-on .mj-hover-services-preview .inner,
html.mj-motion-on .inner-box {
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-color: rgba(217,184,114,.22);
}
html.mj-motion-on .mj-facetas-card,
html.mj-motion-on .service-block-three,
html.mj-motion-on .mj-testi-card,
html.mj-motion-on .inner-box {
  background-color: rgba(18,18,18,.66);
}
html.mj-motion-on .mj-facetas-card h3,
html.mj-motion-on .service-block-three .title,
html.mj-motion-on .mj-testi-quote { text-shadow: 0 1px 3px rgba(0,0,0,.55); }
html.mj-motion-on .mj-motion-glass {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background-color: rgba(13,13,13,.70);
  border: 1px solid rgba(217,184,114,.20);
}
@supports not (backdrop-filter: blur(2px)) {
  html.mj-motion-on .mj-facetas-card,
  html.mj-motion-on .service-block-three,
  html.mj-motion-on .mj-testi-card,
  html.mj-motion-on .inner-box { background-color: #121212; }
}
@media (prefers-reduced-motion: reduce) {
  html.mj-motion-on body { animation: none; }
  html.mj-motion-on .service-hover-image .image img { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  html.mj-motion-on .mj-facetas-card,
  html.mj-motion-on .service-block-three,
  html.mj-motion-on .mj-testi-card,
  html.mj-motion-on .inner-box,
  html.mj-motion-on .mj-motion-glass {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background-color: #121212;
  }
}


/* =====================================================================
   CONTRASTE DE TEXTO · 05-nov-2026
   El tema declaraba b,strong{color:#333} de forma global, ilegible sobre
   los fondos oscuros (#0D0D0D / #161616 / #151515). Corregido en origen
   a color:inherit; este bloque refuerza las secciones oscuras y deja
   intactos los textos oscuros sobre fondo dorado (.positioning, CTA).
   ===================================================================== */
b, strong { color: inherit; }

/* Secciones de fondo oscuro: negritas siempre en blanco de maxima legibilidad */
.mj-cm-intro-text strong, .mj-cm-intro-text b,
.mj-cm-intro-title strong, .mj-cm-intro-title b,
.mj-cm-benefit strong, .mj-cm-benefit b,
.mj-facetas-card strong, .mj-facetas-card b,
.mj-facetas-section strong, .mj-facetas-section b,
.mj-testimonials-section strong, .mj-testimonials-section b,
.mj-legal-modal-body strong, .mj-legal-modal-body b,
.mj-cookie-notice strong, .mj-cookie-notice b,
.footer-section strong, .footer-section b,
.mj-hover-services-preview .mj-cm-intro strong,
.mj-hover-services-preview .mj-cm-intro b,
.mj-hover-services-preview .mj-differentiation-description strong {
  color: #ffffff;
  font-weight: 700;
}

/* Los dos enfasis senalados: precio y limites honestos, en oro de marca */
.mj-cm-intro-text strong.mj-texto-destacado,
.mj-cm-intro-text > strong { color: #D9B872; }

/* === Responsive · red de seguridad anti-desbordamiento horizontal =======
   `clip` no crea contexto de scroll, por lo que no rompe position:sticky.
   El @supports cubre navegadores que aun no soportan overflow-x:clip.   */
html { max-width: 100%; }
body { max-width: 100%; overflow-x: clip; }
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }
}
@media (max-width: 300px) {
  .page-wrapper { min-width: 0; }
}
