import re

with open('index.html', 'r', encoding='utf-8') as f:
    content = f.read()

old_gsap = '''        if (heroWords.length > 0) {
            timeline.to(heroWords, {
                opacity: 1,
                y: 0,
                stagger: 0.08,
                duration: 0.7,
                ease: "power4.out"
            }, "-=0.1"); // Start at the same time as the circle expands
        }'''

new_gsap = '''        if (heroWords.length > 0) {
            timeline.fromTo(heroWords, {
                opacity: 0,
                y: 25
            }, {
                opacity: 1,
                y: 0,
                stagger: 0.08,
                duration: 0.7,
                ease: "power4.out"
            }, "-=0.1"); // Start at the same time as the circle expands
        }'''

content = content.replace(old_gsap, new_gsap)

with open('index.html', 'w', encoding='utf-8') as f:
    f.write(content)

print("Changed to fromTo.")
