/* 文字向上浮动动画效果 */
.text-float-section {
  --speed: 1.3s;
  --delay: 0.2;
  --stagger: 0.06s;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: opacity, transform;
}

.text-float-section.is-inview {
  opacity: 1;
}

.text-float-line {
  overflow: hidden;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  padding-bottom: 0.2em;
}

/* 确保Business Amplified在一行显示 */
.text-float-line.whitespace-nowrap {
  white-space: nowrap !important;
  overflow: visible !important;
  width: auto !important;
}

.text-float-word {
  --index: 0;
  position: relative;
  display: inline-block;
  transform: translate3D(0, 120%, 0);
  padding-right: 0.25rem;
  padding-bottom: 0.1em;
  opacity: 0;
  will-change: transform, opacity;
}

/* 确保带有whitespace-nowrap类的元素不换行显示 */
.text-float-word.whitespace-nowrap {
  white-space: nowrap !important;
  display: inline-block !important;
}

.text-float-section.is-inview .text-float-word {
  transform: translateZ(0);
  opacity: 1;
  transition: transform var(--speed) cubic-bezier(.19, 1, .22, 1) calc(var(--index) * var(--stagger) + var(--delay) * var(--speed)),
              opacity calc(var(--speed) * 0.75) ease-out calc(var(--index) * var(--stagger) + var(--delay) * var(--speed) * 0.5);
}

/* 当元素离开视口后，重置状态以便再次进入时触发动画 */
.text-float-section:not(.is-inview) .text-float-word {
  transform: translate3D(0, 120%, 0);
  opacity: 0;
  transition: transform 0.1s, opacity 0.1s;
} 