/* Herencia Experience 3.0 — motion engine */
:root{--hx-ease:cubic-bezier(.22,.61,.36,1)}
.herencia-experience [data-hx-motion]{--hx-intensity:.4;--hx-duration:800ms;--hx-delay:0ms;position:relative}
.herencia-experience [data-hx-motion] .hx-title-word{display:inline-block;will-change:transform,opacity}
.herencia-experience [data-hx-motion] .hx-split-word{display:inline-block;overflow:hidden;vertical-align:bottom;margin-right:.22em}
.herencia-experience [data-hx-motion] .hx-split-inner{display:inline-block;transform:translateY(115%);opacity:0;transition:transform var(--hx-duration) var(--hx-ease),opacity calc(var(--hx-duration)*.7) ease;transition-delay:calc(var(--hx-delay) + var(--hx-word-index,0)*55ms)}
.herencia-experience [data-hx-motion].hx-inview .hx-split-inner{transform:translateY(0);opacity:1}

/* 1 reveal */
.herencia-experience [data-hx-entry="reveal"]>.container,
.herencia-experience [data-hx-entry="reveal"].hero>.hero-inner{opacity:0;transform:translate3d(0,calc(70px * var(--hx-intensity)),0);transition:opacity var(--hx-duration) ease,transform var(--hx-duration) var(--hx-ease);transition-delay:var(--hx-delay)}
.herencia-experience [data-hx-entry="reveal"].hx-inview>.container,
.herencia-experience [data-hx-entry="reveal"].hero.hx-inview>.hero-inner{opacity:1;transform:none}
/* 7 scale */
.herencia-experience [data-hx-entry="scale"]>.container{opacity:0;transform:scale(calc(1 - .14 * var(--hx-intensity)));transition:opacity var(--hx-duration) ease,transform var(--hx-duration) var(--hx-ease);transition-delay:var(--hx-delay)}
.herencia-experience [data-hx-entry="scale"].hx-inview>.container{opacity:1;transform:scale(1)}
/* 8 slide */
.herencia-experience [data-hx-entry="slide"]>.container{opacity:0;transition:opacity var(--hx-duration) ease,transform var(--hx-duration) var(--hx-ease);transition-delay:var(--hx-delay)}
.herencia-experience [data-hx-entry="slide"][data-hx-direction="left"]>.container{transform:translate3d(calc(-130px * var(--hx-intensity)),0,0)}
.herencia-experience [data-hx-entry="slide"][data-hx-direction="right"]>.container{transform:translate3d(calc(130px * var(--hx-intensity)),0,0)}
.herencia-experience [data-hx-entry="slide"][data-hx-direction="down"]>.container{transform:translate3d(0,calc(-110px * var(--hx-intensity)),0)}
.herencia-experience [data-hx-entry="slide"][data-hx-direction="up"]>.container{transform:translate3d(0,calc(110px * var(--hx-intensity)),0)}
.herencia-experience [data-hx-entry="slide"].hx-inview>.container{opacity:1;transform:none}
/* 16 mask */
.herencia-experience [data-hx-entry="mask"]>.container{clip-path:inset(0 0 100% 0 round 26px);opacity:.4;transition:clip-path var(--hx-duration) var(--hx-ease),opacity var(--hx-duration) ease;transition-delay:var(--hx-delay)}
.herencia-experience [data-hx-entry="mask"].hx-inview>.container{clip-path:inset(0 0 0 0 round 0);opacity:1}
/* 17 stagger */
.herencia-experience [data-hx-entry="stagger"] .hx-stagger-item{opacity:0;transform:translate3d(0,calc(70px * var(--hx-intensity)),0) scale(.97);transition:opacity var(--hx-duration) ease,transform var(--hx-duration) var(--hx-ease);transition-delay:calc(var(--hx-delay) + var(--hx-stagger-index,0)*85ms)}
.herencia-experience [data-hx-entry="stagger"].hx-inview .hx-stagger-item{opacity:1;transform:none}

/* 6 floating objects */
.herencia-experience [data-hx-interaction="float"] img:not(.hero-bg-video),.herencia-experience [data-hx-interaction="float"] .card{animation:hxFloat 5.8s ease-in-out infinite;animation-delay:calc(var(--hx-float-index,0)*-.6s)}
@keyframes hxFloat{0%,100%{transform:translate3d(0,0,0) rotate(0)}50%{transform:translate3d(0,-10px,0) rotate(.6deg)}}
/* 11 hover */
.herencia-experience [data-hx-interaction="hover"] .card,.herencia-experience [data-hx-interaction="hover"] .product-fixed-card,.herencia-experience [data-hx-interaction="hover"] .history-slide{transition:transform .42s var(--hx-ease),box-shadow .42s ease,filter .42s ease}
.herencia-experience [data-hx-interaction="hover"] .card:hover,.herencia-experience [data-hx-interaction="hover"] .product-fixed-card:hover{transform:translateY(-9px) scale(1.018);box-shadow:0 26px 60px rgba(23,59,37,.16);filter:saturate(1.05)}
/* 12 shuffle */
.herencia-experience [data-hx-interaction="shuffle"].hx-shuffled .card:nth-child(3n+1){transform:translate3d(10px,-9px,0) rotate(-1deg)}
.herencia-experience [data-hx-interaction="shuffle"].hx-shuffled .card:nth-child(3n+2){transform:translate3d(-8px,7px,0) rotate(1.1deg)}
.herencia-experience [data-hx-interaction="shuffle"].hx-shuffled .card:nth-child(3n){transform:translate3d(5px,10px,0) rotate(-.7deg)}
.herencia-experience [data-hx-interaction="shuffle"] .card{transition:transform .55s var(--hx-ease)}
/* 18 UI motion */
.herencia-experience [data-hx-interaction="ui"] button,.herencia-experience [data-hx-interaction="ui"] .btn,.herencia-experience .btn{transition:transform .22s var(--hx-ease),box-shadow .22s ease,filter .22s ease}
.herencia-experience [data-hx-interaction="ui"] button:hover,.herencia-experience [data-hx-interaction="ui"] .btn:hover,.herencia-experience .btn:hover{transform:translateY(-2px) scale(1.025)}
.herencia-experience .btn:active{transform:translateY(0) scale(.98)}

/* 9 sticky */
.herencia-experience [data-hx-scroll="sticky"]{min-height:145vh!important}
.herencia-experience [data-hx-scroll="sticky"]>.container{position:sticky;top:96px}
/* 20 editorial */
.herencia-experience [data-hx-scroll="editorial"]{overflow:clip}
.herencia-experience [data-hx-scroll="editorial"]>.container{will-change:transform,clip-path,opacity}
/* 14 morph */
.herencia-experience [data-hx-scroll="morph"]>.container{overflow:hidden;will-change:border-radius,transform}
/* 19 video */
.herencia-experience [data-hx-scroll="video"] video{will-change:transform,filter;transform-origin:center}

.herencia-motion-preset-soft [data-hx-motion]{--hx-preset-factor:.55}
.herencia-motion-preset-balanced [data-hx-motion]{--hx-preset-factor:.82}
.herencia-motion-preset-full [data-hx-motion]{--hx-preset-factor:1}

/* Intro behaves as a motion target too */
.herencia-start-screen[data-hx-motion]{transition:background-color .6s ease}
.herencia-start-screen[data-hx-entry="mask"] .herencia-start-content{clip-path:inset(100% 0 0 0);opacity:0;transition:clip-path var(--hx-duration) var(--hx-ease),opacity var(--hx-duration) ease;transition-delay:var(--hx-delay)}
.herencia-start-screen[data-hx-entry="mask"].hx-inview .herencia-start-content{clip-path:inset(0);opacity:1}
.herencia-start-screen[data-hx-entry="scale"] .herencia-start-content{opacity:0;transform:scale(.8);transition:all var(--hx-duration) var(--hx-ease)}
.herencia-start-screen[data-hx-entry="scale"].hx-inview .herencia-start-content{opacity:1;transform:scale(1)}
.herencia-start-screen[data-hx-interaction="float"] .herencia-start-logo{animation:hxLogoFloat 5s ease-in-out infinite}
@keyframes hxLogoFloat{0%,100%{transform:translate3d(-8px,-3px,0) rotate(-1deg)}50%{transform:translate3d(12px,9px,0) rotate(1.2deg)}}

/* Accessibility / lower-power */
body.herencia-no-motion:not(.hx-engine-active) [data-hx-motion],body.herencia-no-motion:not(.hx-engine-active) [data-hx-motion] *{animation:none!important;transition:none!important;transform:none!important;clip-path:none!important;opacity:1!important}
@media (prefers-reduced-motion:reduce){body.hx-respect-reduced [data-hx-motion],body.hx-respect-reduced [data-hx-motion] *{animation:none!important;transition-duration:.01ms!important;transform:none!important;clip-path:none!important;opacity:1!important}}
@media(max-width:760px){.herencia-experience [data-hx-scroll="sticky"]{min-height:auto!important}.herencia-experience [data-hx-scroll="sticky"]>.container{position:relative;top:auto}}


/* V3.1 — robustez y mayor visibilidad del motor */
body.hx-engine-active [data-hx-motion]{position:relative}
body.hx-engine-active [data-hx-entry="reveal"]>.container{transform:translate3d(0,calc(95px * var(--hx-intensity)),0)}
body.hx-engine-active [data-hx-entry="slide"][data-hx-direction="left"]>.container{transform:translate3d(calc(-170px * var(--hx-intensity)),0,0)}
body.hx-engine-active [data-hx-entry="slide"][data-hx-direction="right"]>.container{transform:translate3d(calc(170px * var(--hx-intensity)),0,0)}
body.hx-engine-active [data-hx-entry="slide"][data-hx-direction="up"]>.container{transform:translate3d(0,calc(145px * var(--hx-intensity)),0)}
body.hx-engine-active [data-hx-entry="slide"][data-hx-direction="down"]>.container{transform:translate3d(0,calc(-145px * var(--hx-intensity)),0)}
body.hx-engine-active [data-hx-entry="slide"].hx-inview>.container,
body.hx-engine-active [data-hx-entry="reveal"].hx-inview>.container{transform:none}
body.hx-engine-active [data-hx-interaction="hover"] .card:hover,
body.hx-engine-active [data-hx-interaction="hover"] .product-fixed-card:hover{
  transform:translateY(-14px) scale(1.035)!important;
  box-shadow:0 30px 70px rgba(23,59,37,.22)!important
}


/* V3.2 — el motor Experience tiene prioridad sobre el antiguo 'sin animaciones' */
body.herencia-no-motion.hx-engine-active [data-hx-motion],
body.herencia-no-motion.hx-engine-active [data-hx-motion] *{
  animation-play-state:running!important;
}
body.herencia-no-motion.hx-engine-active [data-hx-motion]{
  opacity:1!important;
}
