/**
 * GSAP & Lenis foundation styles
 * Không đặt will-change / translateZ vĩnh viễn trên card (tốn VRAM -> giật khi scroll).
 * GSAP tự promote layer khi tween chạy.
 */

/* 1. LENIS */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* 2. WORD MASK (split text) - không làm đổi bố cục dòng */
.sw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.swi {
  display: inline-block;
}

/* 3. HOVER ẢNH: chỉ bật sau khi reveal xong để không tranh transform với GSAP */
.gallery-item.is-in img,
.project-card.is-in img {
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

@media (hover: hover) {
  .gallery-item.is-in:hover img,
  .project-card.is-in:hover img {
    transform: scale(1.05);
  }
}

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