/* Motion graphics en código (21-10-2026). Todo depende de .mg-on (lo agrega motion.js):
   sin JS el sitio se ve exactamente igual que antes. */

/* --- Rutas del mapa --- */
.mg-route{fill:none;stroke:#2954FF;stroke-width:1.4;stroke-linecap:round;opacity:.35;transition:stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1),opacity .4s,stroke .4s;transition-delay:calc(var(--i,0)*.22s),0s,0s}
.mg-route.is-active{opacity:.9;stroke:#7212C9}
.mg-route-glow{fill:none;stroke:#889BFF;stroke-width:5;stroke-linecap:round;opacity:0;filter:blur(2px);transition:opacity 1.2s .8s}
.mg-drawn .mg-route{stroke-dashoffset:0!important}
.mg-drawn .mg-route-glow{opacity:.18}
.mg-pulse{fill:#26CBE0;opacity:0;filter:drop-shadow(0 0 3px #26CBE0)}
.mg-drawn .country-dot{transform-box:fill-box;transform-origin:center;animation:mgDot 2.6s ease-in-out infinite}
.mg-drawn .country-dot:nth-of-type(2){animation-delay:.5s}.mg-drawn .country-dot:nth-of-type(3){animation-delay:1s}.mg-drawn .country-dot:nth-of-type(4){animation-delay:1.5s}.mg-drawn .country-dot:nth-of-type(5){animation-delay:2s}
@keyframes mgDot{0%,100%{transform:scale(1)}50%{transform:scale(1.45)}}

/* Mapa agregado en Laboratorios (mismo SVG que el Inicio) */
.mg-map{max-width:520px;margin:0 auto 40px}
.mg-map svg{width:100%;height:auto;display:block;overflow:visible}
.mg-map .country-bg{fill:#dfe3fb;stroke:#fff;stroke-width:.6}
.mg-map .country-shape{fill:#b9c3ff;stroke:#fff;stroke-width:.8}
.mg-map .country-shape[data-country="PE"]{fill:#000082}
.mg-map .country-dot{fill:#7212C9;stroke:#fff;stroke-width:1.2}
.mg-map .country-label{fill:#000082;font-family:inherit}

/* --- Embrión (Fertilidad, escena fija) --- */
.mg-embryo{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;opacity:.92;filter:drop-shadow(0 20px 40px rgba(0,0,130,.12))}
.fv-pin .scene-copy{z-index:2}
.fv-rail{z-index:3}

/* --- Hélice del Inicio --- */
.mg-helix{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:0;transition:opacity 1s ease}
.mg-ready .mg-helix{opacity:1}
.mg-ready .hero-video{opacity:0;transition:opacity 1s ease}
.inst-hero.mg-ready:before{opacity:.35;transition:opacity 1s ease}
.inst-hero .brand-button{transition:box-shadow .5s,transform .3s}
.mg-unzip .hero-actions .brand-button{box-shadow:0 0 0 6px rgba(137,155,255,.25),0 12px 34px rgba(41,84,255,.25)}
@media(max-width:760px){.mg-ready .mg-helix{opacity:.8}}

/* --- Titulares palabra por palabra --- */
.mg-split .mg-w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em;margin-bottom:-.08em}
.mg-split .mg-w>span{display:inline-block;transform:translateY(105%);transition:transform .9s cubic-bezier(.2,.8,.2,1);transition-delay:calc(var(--w)*45ms)}
.mg-split.mg-split-in .mg-w>span{transform:none}

/* --- Cortina sobre imágenes --- */
.mg-curtain{clip-path:inset(0 0 100% 0 round 4px);transition:clip-path 1.2s cubic-bezier(.65,0,.15,1)}
.mg-curtain.mg-cin{clip-path:inset(0 0 0 0 round 0)}

/* --- Barras bajo las cifras --- */
.stat-grid>div{position:relative}
.mg-bar{display:block;height:2px;margin-top:10px;background:linear-gradient(90deg,#26CBE0,#889BFF);transform:scaleX(0);transform-origin:left;transition:transform 1.4s cubic-bezier(.2,.8,.2,1);transition-delay:calc(var(--i,0)*.12s);opacity:.8}
.mg-bars-in .mg-bar{transform:scaleX(1)}

/* --- Inclinación 3D y brillo --- */
.mg-tilt{transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .5s cubic-bezier(.2,.8,.2,1);position:relative;will-change:transform}
.mg-tilt.is-tilting{transition:transform .08s linear}
.mg-glare{position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.35),rgba(255,255,255,0) 45%);opacity:0;transition:opacity .4s;z-index:2}
.mg-tilt.is-tilting .mg-glare{opacity:1}

/* --- Botones magnéticos --- */
.mg-mag{transform:translate(var(--mx,0px),var(--my,0px));transition:transform .35s cubic-bezier(.2,.8,.2,1),background .25s,color .25s,box-shadow .25s}

/* --- Movimiento reducido: todo quieto y visible --- */
.motion-off .mg-split .mg-w>span,.mg-static .mg-split .mg-w>span{transform:none;transition:none}
.motion-off .mg-curtain,.mg-static .mg-curtain{clip-path:none;transition:none}
.motion-off .mg-helix,.motion-off .mg-embryo,.mg-static .mg-helix,.mg-static .mg-embryo{display:none}
.motion-off .hero-video{opacity:1}
.motion-off .mg-tilt,.motion-off .mg-mag{transform:none}
.motion-off .country-dot{animation:none}
.motion-off .mg-bar,.mg-static .mg-bar{transform:scaleX(1);transition:none}
@media(prefers-reduced-motion:reduce){.mg-split .mg-w>span{transform:none;transition:none}.mg-curtain{clip-path:none}.mg-helix,.mg-embryo{display:none}.mg-tilt,.mg-mag{transform:none}.mg-route{transition:none}.mg-bar{transform:scaleX(1)}}

/* Revisión del crítico (21-10-2026) */
/* Barras de cifras alineadas aunque las etiquetas ocupen varias líneas */
.stat-grid>div{display:flex;flex-direction:column}
.stat-grid>div>span:not(.mg-bar){line-height:1.4;min-height:2.8em}
.mg-bar{margin-top:auto}
/* Titulares y párrafos sin viudas */
h1,h2,h3{text-wrap:balance}
p{text-wrap:pretty}
/* Partners del Inicio en grilla pareja */
@media(min-width:601px){.partners-logos{display:grid!important;grid-template-columns:repeat(3,1fr)}.partners-logos img{height:44px;width:auto;max-width:200px}}
/* Mapa sin corte recto */
.map-container svg,.nos-map-container svg,.mg-map svg{-webkit-mask-image:linear-gradient(#000 78%,transparent);mask-image:linear-gradient(#000 78%,transparent)}
/* Cabecera móvil más liviana */
@media(max-width:760px){.back-bar{padding-top:6px;padding-bottom:6px}.fv-step{min-height:300px}}
/* Fichas sin foto: marco neutro, sin bloque azul */
.cf-ph{background:#F4F5FF!important;color:#889BFF!important;border:1px solid #e3e6fb}
.cf-ph b,.cf-ph small{color:#889BFF!important}
.cf-ph-mark{opacity:.22!important;filter:grayscale(1) brightness(.4)}
/* «Mi cotización» se corre cuando aparece el pie */
.cf-quote-fab{transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.mg-foot-near .cf-quote-fab{transform:translateY(-84px)}
@media(max-width:900px){.contact-strip [data-scene],.contact-strip canvas{opacity:.5}}
@media(min-width:601px){.partners-logos .partner-logo-item img{height:44px!important;width:auto!important;max-width:200px!important}}
