/* ga-v2 reveal · IntersectionObserver로 .rev-init → .rev-show 상세페이지 6개 공용 스크립트 */ (function () { if (typeof window === 'undefined' || typeof document === 'undefined') return; var reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; var items = document.querySelectorAll('.ga-v2 .rev-init, .rules-wrap .rev-init'); if (!items || !items.length) return; if (reduce || !('IntersectionObserver' in window)) { items.forEach(function (el) { el.classList.add('rev-show'); }); return; } var io = new IntersectionObserver(function (entries) { entries.forEach(function (en) { if (en.isIntersecting) { en.target.classList.add('rev-show'); io.unobserve(en.target); } }); }, { threshold: 0.12, rootMargin: '0px 0px -10% 0px' }); items.forEach(function (el) { io.observe(el); }); })();