class RevealAnimator {
  constructor() {
    const reveals = document.querySelectorAll('.reveal');
    if (!reveals.length) return;
    const io = new IntersectionObserver(entries => {
      entries.forEach(e => {
        if (e.isIntersecting) {
          e.target.classList.add('visible');
          io.unobserve(e.target);
        }
      });
    }, { threshold: 0.12, rootMargin: '0px 0px -30px 0px' });
    reveals.forEach(el => io.observe(el));
  }
}
