/* ==========================================================================
   UNIVEXA MARKETING — MOTION LAYER
   Scroll-driven reveals, split-text headlines, rolling button labels,
   scroll progress and velocity-aware marquee.
   Every hidden/initial state below is added by js/motion.js, so the page
   stays fully visible if JavaScript is unavailable.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Gradient headline accent (shared by all section titles)
   -------------------------------------------------------------------------- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------------------
   2. Scroll progress bar
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1100;
  pointer-events: none;
  background: var(--gradient-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* --------------------------------------------------------------------------
   3. Split-text headline reveal (word mask)
   -------------------------------------------------------------------------- */
.is-split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0 .05em .16em;
  margin: 0 -.05em -.16em;
}

.is-split .wi {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  transform-origin: 0 100%;
  will-change: transform;
  transition: transform 1.05s cubic-bezier(.16, 1, .3, 1) calc(var(--base, 0ms) + var(--i) * 65ms);
}

.is-split.is-in .wi {
  transform: none;
}

/* Gradient words: each word carries the gradient so transforms never break the clip */
.gradient-text.split-gradient,
.hero-title .gradient-text.split-gradient {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit;
}

.split-gradient .wi {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------------------
   4. Scroll reveal (animated through the Web Animations API)
   -------------------------------------------------------------------------- */
.rv {
  opacity: 0;
  translate: 0 36px;
}

/* --------------------------------------------------------------------------
   5. Rolling button / link labels
   -------------------------------------------------------------------------- */
.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: bottom;
}

.roll .ra,
.roll .rb {
  display: block;
}

.roll .rb {
  position: absolute;
  inset: 0;
}

.roll i {
  display: inline-block;
  font-style: normal;
  white-space: pre;
  will-change: transform;
}

.roll .rb i {
  transform: translateY(115%) rotate(18deg);
}

@media (hover: hover) and (pointer: fine) {

  a:hover .roll .ra i,
  button:hover .roll .ra i,
  a:focus-visible .roll .ra i,
  button:focus-visible .roll .ra i {
    transform: translateY(-115%);
    transition: transform .26s cubic-bezier(.55, .085, .68, .53) calc(var(--ci) * 8ms);
  }

  a:hover .roll .rb i,
  button:hover .roll .rb i,
  a:focus-visible .roll .rb i,
  button:focus-visible .roll .rb i {
    transform: none;
    transition: transform .55s cubic-bezier(.165, .84, .44, 1) calc(.12s + var(--ci) * 8ms);
  }
}

/* --------------------------------------------------------------------------
   6. Reduced motion: no movement, content simply appears
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  .rv,
  .is-split .wi,
  .roll .rb i {
    opacity: 1 !important;
    translate: none !important;
    transform: none !important;
    transition: none !important;
  }

  .scroll-progress {
    display: none;
  }
}
