<script>
import { motion } from '@motionone/svelte';
const features = [
{ title: 'Staggered Animations', desc: 'Smooth list reveals with staggerChildren.', icon: '🚀' },
{ title: 'Scroll Triggers', desc: 'Elements animate on scroll using whileInView.', icon: '⚡' },
{ title: 'Page Transitions', desc: 'Seamless navigation with exit/enter animations.', icon: '✨' },
{ title: 'Variants & Gestures', desc: 'Reusable animations with hover/tap support.', icon: '🎨' }
];
</script>
<section class="text-center">
<!-- Hero -->
<motion.div
initial={{ opacity: 0, scale: 0.8, y: 50 }}
animate={{ opacity: 1, scale: 1, y: 0 }}
transition={{ duration: 0.8, ease: 'easeOut' }}
class="mb-32"
>
<motion.h1
initial={{ opacity: 0, y: 30 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.2, duration: 0.6 }}
class="text-7xl md:text-8xl font-black mb-8 bg-gradient-to-r from-purple-400 via-pink-400 to-slate-400 bg-clip-text text-transparent"
>
Advanced Motion
</motion.h1>
<motion.p
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.4, duration: 0.5 }}
class="text-xl md:text-2xl text-slate-300 mb-12 max-w-2xl mx-auto"
>
Built with SvelteKit + Motion One. Scroll down for magic ✨
</motion.p>
<motion.button
whileHover={{ scale: 1.05, y: -5 }}
whileTap={{ scale: 0.95 }}
class="px-12 py-6 bg-gradient-to-r from-purple-500 to-pink-500 text-xl font-semibold rounded-full shadow-2xl hover:shadow-purple-500/25 transition-shadow"
>
Get Started
</motion.button>
</motion.div>
<!-- Features Grid with Stagger -->
<motion.section
initial="hidden"
whileInView="visible"
viewport={{ once: true, margin: '-100px' }}
variants={{
visible: {
transition: { staggerChildren: 0.15, delayChildren: 0.2 }
}
}}
class="grid md:grid-cols-2 gap-8 mb-32"
>
{#each features as feature, i}
<motion.div
variants={{
hidden: { opacity: 0, y: 60, scale: 0.9 },
visible: { opacity: 1, y: 0, scale: 1, transition: { type: 'spring', stiffness: 300, damping: 30 } }
}}
initial="hidden"
whileInView="visible"
viewport={{ once: true }}
class="group bg-slate-800/50 backdrop-blur-sm p-8 rounded-2xl border border-slate-700 hover:border-purple-500/50 hover:bg-slate-800/80 transition-all duration-500 shadow-xl hover:shadow-2xl hover:shadow-purple-500/20"
>
<div class="text-4xl mb-4">{@html feature.icon}</div>
<h3 class="text-2xl font-bold mb-4 group-hover:text-purple-400 transition-colors">{feature.title}</h3>
<p class="text-slate-400">{feature.desc}</p>
</motion.div>
{/each}
</motion.section>
<!-- CTA -->
<motion.div
initial={{ opacity: 0, scale: 0.8 }}
whileInView={{ opacity: 1, scale: 1 }}
transition={{ duration: 0.6 }}
class="text-center"
>
<h2 class="text-4xl font-black mb-6">Ready to Animate?</h2>
<a href="/about" class="inline-block px-8 py-4 bg-purple-500 hover:bg-purple-600 text-lg font-semibold rounded-xl transition-all duration-300 hover:scale-105">
Learn More
</a>
</motion.div>
</section>