/* Shared motion system: restrained reveals with consistent timing and distance. */
:root{
  --m-ease:cubic-bezier(.22,.61,.36,1);
  --m-micro:.18s;
  --m-ui:.24s;
  --m-reveal:.58s;
  --m-distance:16px;
  --ease-out:var(--m-ease);
  --ease-soft:var(--m-ease);
  --dur-micro:var(--m-micro);
  --dur-ui:var(--m-ui);
  --dur-reveal:var(--m-reveal);
}

/* Keep the hero message immediately readable. Image stages and decoration ease in. */
@keyframes motion-image-in{from{opacity:0}to{opacity:1}}
:is(.sub-stage,.duo-main,.route-wrap,.hm-stage,.hero-stage,.about-stamp,.duo-inset,.hero-frame){
  animation:motion-image-in .62s var(--m-ease) both;
}
@media(prefers-reduced-motion:reduce){
  :is(.sub-stage,.duo-main,.route-wrap,.hm-stage,.hero-stage,.about-stamp,.duo-inset,.hero-frame){animation:none}
}

/* One reveal per content group; grid/timeline children can be lightly staggered. */
.motion-reveal,.motion-reveal-child{
  opacity:0;
  transform:translate3d(0,var(--m-distance),0);
  transition:opacity var(--m-reveal) var(--m-ease) var(--motion-delay,0ms),transform var(--m-reveal) var(--m-ease) var(--motion-delay,0ms);
}
.motion-reveal.is-visible,.motion-reveal-child.is-visible{opacity:1;transform:none}
.motion-reveal-child{--motion-delay:0ms}
@media(prefers-reduced-motion:reduce){
  .motion-reveal,.motion-reveal-child{opacity:1;transform:none;transition:none}
}

/* Small, consistent hover and focus feedback. */
a,button,.home-button,.home-button b,.mertako-button,.mertako-button b,.contact-route,.contact-submit,.contact-submit b,.contact-whatsapp-link,.contact-whatsapp-link b,.home-whatsapp,.home-whatsapp b,.home-text-link b,.global-nav>a,.global-footer a{transition-timing-function:var(--m-ease)}
.home-button,.contact-submit,.contact-whatsapp-link,.home-whatsapp,.home-contact-actions button,.mertako-button,.contact-route{transition-duration:var(--m-ui)}
.home-button b,.contact-submit b,.contact-whatsapp-link b,.home-whatsapp b,.home-contact-actions button b,.mertako-button b,.contact-route b,.home-text-link b,.home-service-grid a b{transition-duration:var(--m-ui)}
.global-nav>a,.global-footer a,.home-hero-phone strong,.home-hero-services a{transition-duration:var(--m-micro)}
.sub-grid li,.home-service-grid article{transition-duration:var(--m-ui);transition-timing-function:var(--m-ease)}
.home-service-grid img,.sub-steps img{transition-duration:.4s;transition-timing-function:var(--m-ease)}
.contact-field input,.contact-field select,.contact-field textarea,.contact-consent input,.home-contact input,.home-contact textarea{transition-duration:var(--m-ui);transition-timing-function:var(--m-ease)}
:is(a,button,input,select,textarea,summary):focus-visible{transition-duration:var(--m-micro)}
.home-button:active,.contact-submit:active,.contact-whatsapp-link:active,.home-whatsapp:active,.home-contact-actions button:active{transform:scale(.98)}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* A single subtle scroll-linked movement remains on hero photography. */
.fx-hero{--p:1}
.fx-hero>img{translate:0 calc((1 - var(--p)) * 10px);scale:calc(1.005 + (1 - var(--p)) * .01)}
@media(max-width:800px){
  .fx-hero>img{translate:0 calc((1 - var(--p)) * 5px);scale:calc(1.002 + (1 - var(--p)) * .005)}
}
@media(prefers-reduced-motion:reduce){.fx-hero>img{translate:none;scale:none}}
