diff --git a/frontend/src/components/landing/Hero.tsx b/frontend/src/components/landing/Hero.tsx index ad506a2..a1b9e2e 100644 --- a/frontend/src/components/landing/Hero.tsx +++ b/frontend/src/components/landing/Hero.tsx @@ -1,25 +1,11 @@ import React from 'react' import { useTranslation, Trans } from 'react-i18next' import { useNavigate } from 'react-router-dom' -import { motion } from 'framer-motion' import { Sparkles, ArrowRight } from 'lucide-react' import { useParticles } from '../../hooks/useParticles' import { useTypingAnimation } from '../../hooks/useTypingAnimation' import styles from './Hero.module.css' -const containerVariants = { - hidden: { opacity: 0 }, - visible: { - opacity: 1, - transition: { staggerChildren: 0.12, delayChildren: 0.2 }, - }, -} as const - -const itemVariants = { - hidden: { opacity: 0, y: 20 }, - visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: 'easeOut' as const } }, -} as const - const Hero: React.FC = () => { const { t } = useTranslation() const navigate = useNavigate() @@ -45,29 +31,29 @@ const Hero: React.FC = () => { {/* Centered Logo Mark */} -
a
- +
{/* Status Pill */} -
{t('landing.hero.badge')} {/* Headline */} - { {/* Subtext */} - {t('landing.hero.subtitle')} {/* CTAs */} - - - +
+ ) } diff --git a/frontend/src/styles/animations.css b/frontend/src/styles/animations.css new file mode 100644 index 0000000..ac315e7 --- /dev/null +++ b/frontend/src/styles/animations.css @@ -0,0 +1,70 @@ +.fade-in { + animation: fadeIn 0.3s ease forwards; +} + +.slide-up { + animation: slideUp 0.3s ease forwards; +} + +.scale-in { + animation: scaleIn 0.3s ease forwards; +} + +.pulse { + animation: pulse 2s infinite ease-in-out; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes slideUp { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes scaleIn { + from { + opacity: 0; + transform: scale(0.95); + } + to { + opacity: 1; + transform: scale(1); + } +} + +@keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.6; + } + 100% { + opacity: 1; + } +} + +@media (prefers-reduced-motion: reduce) { + .fade-in, + .slide-up, + .scale-in, + .pulse { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + animation-delay: 0.01ms !important; + } +} diff --git a/frontend/src/styles/global.css b/frontend/src/styles/global.css index 7399858..32cbeea 100644 --- a/frontend/src/styles/global.css +++ b/frontend/src/styles/global.css @@ -2,6 +2,9 @@ @tailwind components; @tailwind utilities; +@import './animations.css'; +@import './micro-interactions.css'; + :root { --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; --bg-primary: #0A0E14; diff --git a/frontend/src/styles/micro-interactions.css b/frontend/src/styles/micro-interactions.css new file mode 100644 index 0000000..14a7aa7 --- /dev/null +++ b/frontend/src/styles/micro-interactions.css @@ -0,0 +1,62 @@ +.hover-lift { + transition-property: transform, box-shadow; + transition-duration: 300ms; + transition-timing-function: ease; +} + +.hover-lift:hover { + transform: translateY(-4px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); +} + +.hover-glow { + transition-property: box-shadow; + transition-duration: 300ms; + transition-timing-function: ease; +} + +.hover-glow:hover { + box-shadow: 0 0 15px var(--accent-cyan); +} + +.hover-scale { + transition-property: transform; + transition-duration: 300ms; + transition-timing-function: ease; +} + +.hover-scale:hover { + transform: scale(1.05); +} + +.focus-ring { + outline: none; +} + +.focus-ring:focus-visible { + outline: 2px solid var(--accent-cyan); + outline-offset: 2px; +} + +.transition-fast { + transition-duration: 150ms; +} + +.transition-normal { + transition-duration: 300ms; +} + +.transition-slow { + transition-duration: 500ms; +} + +@media (prefers-reduced-motion: reduce) { + .hover-lift, + .hover-glow, + .hover-scale, + .transition-fast, + .transition-normal, + .transition-slow { + transition-duration: 0.01ms !important; + } +}