(function(){ 'use strict'; const css = document.createElement('style'); css.textContent = ` .rf-reveal{opacity:0;transform:translateY(32px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)} .rf-reveal.rf-vis{opacity:1;transform:translateY(0)} .rf-reveal-scale{opacity:0;transform:scale(.9);transition:opacity .6s ease-out,transform .6s cubic-bezier(.34,1.56,.64,1)} .rf-reveal-scale.rf-vis{opacity:1;transform:scale(1)} .rf-reveal-left{opacity:0;transform:translateX(-40px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)} .rf-reveal-left.rf-vis{opacity:1;transform:translateX(0)} .rf-reveal-right{opacity:0;transform:translateX(40px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)} .rf-reveal-right.rf-vis{opacity:1;transform:translateX(0)} @keyframes rf-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}} .rf-float{animation:rf-float 5s ease-in-out infinite} @keyframes rf-shimmer{0%{background-position:-200% center}100%{background-position:200% center}} .rf-shimmer{background-size:200% auto!important;animation:rf-shimmer 3s linear infinite} @keyframes rf-pulse{0%,100%{box-shadow:0 0 0 0 rgba(99,102,241,.15)}50%{box-shadow:0 0 0 12px rgba(99,102,241,0)}} .rf-card-hover{transition:transform .25s ease,box-shadow .25s ease} .rf-card-hover:hover{transform:translateY(-6px);box-shadow:0 12px 40px rgba(0,0,0,.1)!important} .rf-count-bounce{animation:rf-bounce .4s cubic-bezier(.34,1.56,.64,1)} @keyframes rf-bounce{0%{transform:scale(1)}50%{transform:scale(1.2)}100%{transform:scale(1)}} .rf-badge-glow{animation:rf-pulse 2.5s ease-in-out infinite} @keyframes rf-page-in{0%{opacity:0}100%{opacity:1}} .min-h-screen{animation:rf-page-in .5s ease-out} .rf-gradient-text{background:linear-gradient(135deg,#6366f1,#8b5cf6,#6366f1);background-size:200%;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:rf-shimmer 4s linear infinite} `; document.head.appendChild(css); function init(){ // Hero section — badge glow + CTA shimmer const badge = document.querySelector('.bg-brand-50, [class*="bg-brand-50"]'); if(badge) badge.classList.add('rf-badge-glow'); const ctas = document.querySelectorAll('a[href="/register"]'); ctas.forEach(c=>{if(c.classList.contains('bg-brand-600')||c.className.includes('bg-brand-600')) c.classList.add('rf-shimmer')}); // Stat counters (500+, 25000+, 150+, 216%) const statsSection = document.querySelector('section'); if(statsSection){ const strongs = statsSection.querySelectorAll('strong'); strongs.forEach(s=>{ s.classList.add('rf-reveal-scale'); const text = s.textContent; const num = parseInt(text.replace(/[^0-9]/g,'')); const suffix = text.replace(/[0-9,]/g,''); if(num>0){ s.dataset.target = num; s.dataset.suffix = suffix; s.dataset.origText = text; } }); } // Section headings document.querySelectorAll('section h2').forEach(h=>{h.classList.add('rf-reveal')}); document.querySelectorAll('section h2 + p').forEach(p=>{p.classList.add('rf-reveal');p.style.transitionDelay='.1s'}); // Feature cards (3-step) document.querySelectorAll('#features .rounded-xl').forEach((c,i)=>{ c.classList.add('rf-reveal','rf-card-hover'); c.style.transitionDelay=(i*.12)+'s'; }); // Module cards document.querySelectorAll('#modules .rounded-xl').forEach((c,i)=>{ c.classList.add(i%2===0?'rf-reveal-left':'rf-reveal-right','rf-card-hover'); c.style.transitionDelay=(i*.08)+'s'; }); // Stats grid (8 mini cards) document.querySelectorAll('.grid-cols-2 .rounded-xl, .md\\:grid-cols-4 .rounded-xl').forEach((c,i)=>{ if(!c.closest('#features')&&!c.closest('#modules')&&!c.closest('#pricing')){ c.classList.add('rf-reveal-scale'); c.style.transitionDelay=(i*.06)+'s'; } }); // Pricing cards document.querySelectorAll('#pricing .rounded-2xl').forEach((c,i)=>{ c.classList.add('rf-reveal','rf-card-hover'); c.style.transitionDelay=(i*.1)+'s'; }); // FAQ items document.querySelectorAll('#faq .rounded-xl').forEach((c,i)=>{ c.classList.add('rf-reveal'); c.style.transitionDelay=(i*.06)+'s'; }); // CTA section const ctaSection = document.querySelector('section:last-of-type'); if(ctaSection&&ctaSection.querySelector('a[href="/register"]')){ ctaSection.querySelectorAll('h2,p,a').forEach(el=>el.classList.add('rf-reveal')); } // Observer const obs = new IntersectionObserver((entries)=>{ entries.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('rf-vis'); // Counter animation if(e.target.dataset.target){ const t=parseInt(e.target.dataset.target); const s=e.target.dataset.suffix||''; const orig=e.target.dataset.origText||''; let cur=0; const step=Math.ceil(t/25); const iv=setInterval(()=>{ cur+=step; if(cur>=t){cur=t;clearInterval(iv);e.target.classList.add('rf-count-bounce');e.target.textContent=orig} else e.target.textContent=cur.toLocaleString()+s; },40); } obs.unobserve(e.target); } }); },{threshold:.12,rootMargin:'0px 0px -40px 0px'}); document.querySelectorAll('.rf-reveal,.rf-reveal-scale,.rf-reveal-left,.rf-reveal-right').forEach(el=>obs.observe(el)); } if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',()=>setTimeout(init,150)); else setTimeout(init,150); })();