/* Shared motion language for institutional, product and legal pages.
   The Home portfolio (#solucoes) is intentionally excluded to preserve its composition. */
:root{--motion-ease:cubic-bezier(.16,1,.3,1);--motion-accent:var(--accent,var(--green,var(--pulse,#00b894)));--motion-glow:color-mix(in srgb,var(--motion-accent) 24%,transparent)}

.motion-suite .hero-panel,
.motion-suite .visual-card{isolation:isolate}

.motion-suite .hero-panel::after,
.motion-suite .visual-card::after{
  content:"";position:absolute;z-index:4;inset:0;border-radius:inherit;padding:1px;pointer-events:none;
  background:conic-gradient(from 205deg,transparent 0 72%,color-mix(in srgb,var(--motion-accent) 78%,white) 80%,transparent 89%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;
  opacity:.54;animation:motion-border 14s linear infinite
}

.motion-suite .visual-card{position:relative}
.motion-suite .visual-card::before{
  content:"";position:absolute;z-index:0;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 35%,color-mix(in srgb,var(--motion-accent) 8%,transparent) 49%,transparent 63%);
  transform:translateX(-115%);animation:motion-scan 9s var(--motion-ease) infinite
}
.motion-suite .visual-card>*{position:relative;z-index:1}

@keyframes motion-border{to{transform:rotate(360deg)}}
@keyframes motion-scan{0%,18%{transform:translateX(-115%)}55%,100%{transform:translateX(115%)}}

/* Animated data rails. */
.motion-suite .rtu-flow,
.motion-suite .flow,
.motion-suite .five-flow{position:relative;isolation:isolate}
.motion-suite .rtu-flow::before,
.motion-suite .flow::before,
.motion-suite .five-flow::before{
  content:"";position:absolute;z-index:0;left:4%;right:4%;top:28px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--motion-accent) 68%,transparent),transparent)
}
.motion-suite .rtu-flow::after,
.motion-suite .flow::after,
.motion-suite .five-flow::after{
  content:"";position:absolute;z-index:2;top:25px;left:4%;width:7px;height:7px;border-radius:50%;pointer-events:none;
  background:var(--motion-accent);box-shadow:0 0 0 5px var(--motion-glow),0 0 18px var(--motion-accent);
  animation:motion-rail 6.2s linear infinite
}
.motion-suite .rtu-flow>*,.motion-suite .flow>*,.motion-suite .five-flow>*{position:relative;z-index:1}
@keyframes motion-rail{from{left:4%;opacity:0}8%,90%{opacity:1}to{left:calc(96% - 7px);opacity:0}}

/* Calm interaction language across cards. */
.motion-suite :is(.rtu-card,.benefit-card,.card,.flow-step,.five-step,.proof-card,.offer-card,.about-value):not(#solucoes *){
  transition:transform .35s var(--motion-ease),box-shadow .35s var(--motion-ease),border-color .3s ease,background .3s ease
}
.motion-suite :is(.rtu-card,.benefit-card,.card,.flow-step,.five-step,.proof-card,.offer-card,.about-value):not(#solucoes *):hover{
  transform:translateY(-4px);border-color:color-mix(in srgb,var(--motion-accent) 42%,transparent);
  box-shadow:0 22px 55px color-mix(in srgb,var(--motion-accent) 9%,rgba(13,17,23,.1))
}

/* Viewport reveals. Elements remain visible when JS is unavailable. */
.motion-suite.motion-ready [data-site-reveal]{opacity:0;filter:blur(5px);transform:translateY(14px);transition:opacity .65s var(--motion-ease),filter .65s var(--motion-ease),transform .65s var(--motion-ease)}
.motion-suite.motion-ready [data-site-reveal].is-visible{opacity:1;filter:blur(0);transform:none}

/* Product-specific accents remain authoritative. */
html.oex-theme{--motion-accent:#d6a62e}
body[data-motion-product="mes"]{--motion-accent:var(--orange,#ff7a00)}
body[data-motion-product="cmms"]{--motion-accent:var(--blue,#2563eb)}
body[data-motion-product="pulse"]{--motion-accent:var(--purple,#7c3aed)}

/* Legal pages use only restrained motion. */
.motion-suite.motion-legal .legal-hero::after{transition:transform 1.2s var(--motion-ease)}
.motion-suite.motion-legal .legal-hero:hover::after{transform:translate(-12px,10px)}
.motion-suite.motion-legal .summary-card,.motion-suite.motion-legal .legal-section{transition:border-color .25s ease,box-shadow .3s var(--motion-ease),transform .3s var(--motion-ease)}
.motion-suite.motion-legal .summary-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--green) 34%,var(--line));box-shadow:0 14px 35px rgba(13,17,23,.055)}

@media(max-width:760px){
  .motion-suite .rtu-flow::before,.motion-suite .flow::before,.motion-suite .five-flow::before{left:28px;right:auto;top:5%;bottom:5%;width:1px;height:auto}
  .motion-suite .rtu-flow::after,.motion-suite .flow::after,.motion-suite .five-flow::after{left:25px;top:5%;animation-name:motion-rail-mobile}
  @keyframes motion-rail-mobile{from{top:5%;opacity:0}8%,90%{opacity:1}to{top:calc(95% - 7px);opacity:0}}
}

@media(prefers-reduced-motion:reduce){
  .motion-suite *,.motion-suite *::before,.motion-suite *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .motion-suite.motion-ready [data-site-reveal]{opacity:1;filter:none;transform:none}
}
