/* CAREKA DIGITAL — MOTION SYSTEM V112
   Visible native-scroll choreography for the approved V110/V106 Home.
   Scope: motion / section transitions / typographic reveal only.
   No layout redesign, no content replacement, no artificial smooth scroll. */

:root{
  --cd-motion-ease-main:cubic-bezier(.16,1,.3,1);
  --cd-motion-ease-micro:cubic-bezier(.2,.8,.2,1);
}

/* Section composition -------------------------------------------------- */
html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene > .sticky-stage{
  transform:translate3d(0,var(--cd-v112-stage-y,0px),0) scale(var(--cd-v112-stage-scale,1));
  opacity:var(--cd-v112-stage-opacity,1);
  transform-origin:center center;
}

html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene{
  position:relative;
}

html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene::after{
  content:"";
  position:absolute;
  z-index:3;
  top:0;
  left:max(var(--cd-gutter,24px),calc((100% - var(--cd-max,1600px))/2));
  right:max(var(--cd-gutter,24px),calc((100% - var(--cd-max,1600px))/2));
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(211,162,93,.70),rgba(211,162,93,.10),transparent);
  transform:scaleX(var(--cd-v112-line,0));
  transform-origin:left center;
  opacity:.62;
}

@media (min-width:1100px) and (min-height:720px){
  html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"]{
    min-height:calc(100svh + var(--cd-v112-travel,56svh));
  }
  html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"] > .sticky-stage{
    position:sticky;
    top:0;
    min-height:100svh;
    box-sizing:border-box;
  }
}

/* Typography / content sequence --------------------------------------- */
html.cd-motion-v112.cd-motion-on .careka-v106-home [data-cd-v112-role]{
  transform:translate3d(0,var(--cd-v112-role-y,0px),0) scale(var(--cd-v112-role-scale,1));
  opacity:var(--cd-v112-role-opacity,1);
}
html.cd-motion-v112.cd-motion-on.cd-v112-depth .careka-v106-home [data-cd-v112-role]{
  filter:blur(var(--cd-v112-role-blur,0px));
}

/* Hero exact exit ------------------------------------------------------ */
html.cd-motion-v112.cd-motion-on .careka-v106-home #inicio .hero-portrait{
  transform:translate3d(var(--cd-v112-hero-image-x,0px),var(--cd-v112-hero-image-y,0px),0)
            scale(var(--cd-v112-hero-image-scale,1));
  transform-origin:center center;
}
html.cd-motion-v112.cd-motion-on .careka-v106-home #hero-title{
  transform:translate3d(0,var(--cd-v112-hero-title-y,0px),0)
            scale(var(--cd-v112-hero-title-scale,1));
  transform-origin:left center;
}
html.cd-motion-v112.cd-motion-on .careka-v106-home #inicio .hero-grid{
  transform:translate3d(var(--cd-v112-hero-grid-x,0px),0,0);
}
html.cd-motion-v112.cd-motion-on .careka-v106-home #inicio .hero-orbit{
  transform:translate3d(var(--cd-v112-hero-orbit-x,0px),var(--cd-v112-hero-orbit-y,0px),0)
            rotate(var(--cd-v112-hero-orbit-r,0deg));
}

/* Portfolio ------------------------------------------------------------ */
html.cd-motion-v112.cd-motion-on .careka-v106-home #portfolio .project-layer--current{
  transform:translate3d(0,var(--cd-v112-portfolio-y,0px),0)
            scale(var(--cd-v112-portfolio-scale,1));
  opacity:var(--cd-v112-portfolio-opacity,1);
  transform-origin:center center;
  clip-path:var(--cd-v112-portfolio-clip,inset(0 0 0 0));
}

/* Pillars -------------------------------------------------------------- */
html.cd-motion-v112.cd-motion-on .careka-v106-home #pilares .pillar-layer--current{
  transform:translate3d(var(--cd-v112-pillar-x,0px),var(--cd-v112-pillar-y,0px),0)
            scale(var(--cd-v112-pillar-scale,1));
  opacity:var(--cd-v112-pillar-opacity,1);
  transform-origin:center center;
  clip-path:var(--cd-v112-pillar-clip,inset(0 0 0 0));
}
.careka-v106-home #pilares .solution-lines{
  display:grid;
  grid-template-columns:repeat(4,1fr);
}
.careka-v106-home #pilares .solution-lines i{
  position:relative;
  display:block;
  border-left:1px solid rgba(211,162,93,.07);
  transform:scaleY(var(--cd-v112-pillar-line,0));
  transform-origin:top;
}
.careka-v106-home #pilares .solution-lines i:last-child{border-right:1px solid rgba(211,162,93,.07)}

/* Editorial ------------------------------------------------------------ */
html.cd-motion-v112.cd-motion-on .careka-v106-home #editorial .story-layer--current{
  transform:translate3d(0,var(--cd-v112-editorial-y,0px),0)
            scale(var(--cd-v112-editorial-scale,1));
  opacity:var(--cd-v112-editorial-opacity,1);
  transform-origin:center center;
  clip-path:var(--cd-v112-editorial-clip,inset(0 0 0 0));
}

/* Closing -------------------------------------------------------------- */
html.cd-motion-v112.cd-motion-on .careka-v106-home .closing-horizon{
  transform:scaleX(var(--cd-v112-horizon-scale,.55));
  transform-origin:center center;
}
.careka-v106-home .closing-horizon::after{
  content:"";
  position:absolute;
  left:50%;
  top:-2px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--cd-gold2,#e4bd80);
  box-shadow:0 0 0 1px rgba(211,162,93,.15);
  transform:translate3d(var(--cd-v112-marker-x,0px),0,0);
  opacity:.82;
}

/* Microinteractions ---------------------------------------------------- */
@media (hover:hover) and (pointer:fine){
  html.cd-motion-v112 .careka-v106-home .button,
  html.cd-motion-v112 .careka-v106-home .contact-link{
    transition:transform 220ms var(--cd-motion-ease-micro),background-color 220ms var(--cd-motion-ease-micro),border-color 220ms var(--cd-motion-ease-micro),color 220ms var(--cd-motion-ease-micro)!important;
  }
  html.cd-motion-v112 .careka-v106-home .button:hover i,
  html.cd-motion-v112 .careka-v106-home .contact-link:hover i{
    transform:translateX(4px);
  }
  html.cd-motion-v112 .careka-v106-home .button:active,
  html.cd-motion-v112 .careka-v106-home .contact-link:active{
    transform:translateY(1px) scale(.985)!important;
  }
  html.cd-motion-v112 .careka-v106-home :where(.project-link,.story-link,.portfolio-all-link,.service-open){
    position:relative;
    text-decoration:none;
  }
  html.cd-motion-v112 .careka-v106-home :where(.project-link,.story-link,.portfolio-all-link,.service-open)::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-4px;
    width:100%;
    height:1px;
    background:linear-gradient(90deg,var(--cd-gold,#d3a25d),transparent);
    transform:scaleX(0);
    transform-origin:left;
    transition:transform 210ms var(--cd-motion-ease-micro);
  }
  html.cd-motion-v112 .careka-v106-home :where(.project-link,.story-link,.portfolio-all-link,.service-open):hover::after{transform:scaleX(1)}

  html.cd-motion-v112 .careka-v106-home :where(.service-card,.contact-channel){
    transition:transform 220ms var(--cd-motion-ease-micro),border-color 220ms var(--cd-motion-ease-micro),background-color 220ms var(--cd-motion-ease-micro);
  }
  html.cd-motion-v112 .careka-v106-home :where(.service-card,.contact-channel):hover{transform:translateY(-2px)}

  /* Editorial photography only. Safe Media/project imagery remains untouched. */
  html.cd-motion-v112.cd-v112-depth .careka-v106-home .story-visual img{
    transition:transform 280ms var(--cd-motion-ease-main),filter 280ms var(--cd-motion-ease-main)!important;
  }
  html.cd-motion-v112.cd-v112-depth .careka-v106-home .story-visual:hover img{
    transform:scale(1.008)!important;
    filter:saturate(1.025) brightness(1.018)!important;
  }
}

/* Mobile: same language, reduced depth, normal vertical flow ---------- */
@media (max-width:1099px){
  html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"]{
    min-height:0!important;
  }
  html.cd-motion-v112.cd-motion-on .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"] > .sticky-stage{
    position:relative!important;
    top:auto!important;
    min-height:0!important;
  }
  html.cd-motion-v112.cd-motion-on .careka-v106-home [data-cd-v112-role]{filter:none!important}
  .careka-v106-home #pilares .solution-lines{display:none}
}

/* Reduced motion always wins ------------------------------------------ */
@media (prefers-reduced-motion:reduce){
  html.cd-motion-v112 .careka-v106-home .scroll-scene,
  html.cd-motion-v112 .careka-v106-home .scroll-scene > .sticky-stage,
  html.cd-motion-v112 .careka-v106-home [data-cd-v112-role],
  html.cd-motion-v112 .careka-v106-home #inicio .hero-portrait,
  html.cd-motion-v112 .careka-v106-home #hero-title,
  html.cd-motion-v112 .careka-v106-home #inicio .hero-grid,
  html.cd-motion-v112 .careka-v106-home #inicio .hero-orbit,
  html.cd-motion-v112 .careka-v106-home #portfolio .project-layer--current,
  html.cd-motion-v112 .careka-v106-home #pilares .pillar-layer--current,
  html.cd-motion-v112 .careka-v106-home #editorial .story-layer--current,
  html.cd-motion-v112 .careka-v106-home .closing-horizon{
    transform:none!important;
    filter:none!important;
    clip-path:none!important;
    opacity:1!important;
    transition:none!important;
    animation:none!important;
  }
  html.cd-motion-v112 .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"]{min-height:0!important}
  html.cd-motion-v112 .careka-v106-home .scroll-scene[data-cd-v112-sticky="1"] > .sticky-stage{
    position:relative!important;
    top:auto!important;
    min-height:0!important;
  }
  html.cd-motion-v112 .careka-v106-home .scroll-scene::after,
  html.cd-motion-v112 .careka-v106-home .closing-horizon::after{display:none!important}
}
