import React, { Suspense, lazy } from 'react';
import usePerformanceMonitor from '../../hooks/usePerformanceMonitor';
import {
Box,
Button,
Container,
Typography,
Stack,
Grid,
Card,
CardContent,
Chip,
Avatar,
useTheme,
alpha,
CircularProgress
} from '@mui/material';
import { keyframes } from '@mui/system';
import {
Analytics,
Psychology,
AccessTime,
MonetizationOn,
TrendingDown,
Group,
CalendarToday,
Create,
Publish,
Chat,
Refresh,
OpenInNew
} from '@mui/icons-material';
import { motion } from 'framer-motion';
import HeroSection from './HeroSection';
import { ScrambleText } from '../ScrambleText';
// Scrambling text component for multiple phrases
const ScramblingText: React.FC<{ phrases: string[]; interval?: number; duration?: number; delay?: number; style?: React.CSSProperties }> = ({
phrases,
interval = 3000,
duration = 400,
delay = 200,
style = {}
}) => {
const [currentIndex, setCurrentIndex] = React.useState(0);
React.useEffect(() => {
const timer = setInterval(() => {
setCurrentIndex((prev) => (prev + 1) % phrases.length);
}, interval);
return () => clearInterval(timer);
}, [phrases.length, interval]);
return (
);
};
// Lazy load components for better performance
const FeatureShowcase = lazy(() => import('./FeatureShowcase'));
const SolopreneurDilemma = lazy(() => import('./SolopreneurDilemma'));
const EnterpriseCTA = lazy(() => import('./EnterpriseCTA'));
const IntroducingAlwrity = lazy(() => import('./IntroducingAlwrity'));
const Landing: React.FC = () => {
const theme = useTheme();
// Monitor performance
usePerformanceMonitor('Landing');
// Optimized Framer Motion variants for better performance
// Cinematic lifecycle section animations
const backgroundFade = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: { duration: 1, ease: "easeInOut" as const }
}
};
const titleFlyIn = {
hidden: { opacity: 0, y: -80, scale: 0.8 },
visible: {
opacity: 1,
y: 0,
scale: 1,
transition: {
delay: 1,
duration: 0.8,
ease: [0.22, 1, 0.36, 1] as const // Custom easing
}
}
};
const chipsFlyIn = {
hidden: { opacity: 0, y: 60 },
visible: {
opacity: 1,
y: 0,
transition: {
delay: 1.3,
duration: 0.7,
ease: "easeOut" as const
}
}
};
const descriptionFade = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: {
delay: 1.6,
duration: 0.6
}
}
};
// Card zoom animations from different directions
const cardVariants = [
// Top-left
{
hidden: { opacity: 0, scale: 0.3, x: -200, y: -200, rotate: -15 },
visible: { opacity: 1, scale: 1, x: 0, y: 0, rotate: 0 }
},
// Top
{
hidden: { opacity: 0, scale: 0.3, y: -250, rotate: 0 },
visible: { opacity: 1, scale: 1, y: 0, rotate: 0 }
},
// Top-right
{
hidden: { opacity: 0, scale: 0.3, x: 200, y: -200, rotate: 15 },
visible: { opacity: 1, scale: 1, x: 0, y: 0, rotate: 0 }
},
// Bottom-left
{
hidden: { opacity: 0, scale: 0.3, x: -200, y: 200, rotate: 15 },
visible: { opacity: 1, scale: 1, x: 0, y: 0, rotate: 0 }
},
// Bottom
{
hidden: { opacity: 0, scale: 0.3, y: 250, rotate: 0 },
visible: { opacity: 1, scale: 1, y: 0, rotate: 0 }
},
// Bottom-right
{
hidden: { opacity: 0, scale: 0.3, x: 200, y: 200, rotate: -15 },
visible: { opacity: 1, scale: 1, x: 0, y: 0, rotate: 0 }
}
];
const cardsStagger = {
hidden: {},
visible: {
transition: {
delayChildren: 2,
staggerChildren: 0.15
}
}
};
const features = [
{
icon: ,
title: 'Content Planning',
description: 'ALwrity builds a living strategy and calendar from your goals, audience and market signals. Drag-and-drop calendar, briefs, topics and distribution plans generated automatically.',
badge: 'Strategy'
},
{
icon: ,
title: 'Content Generation',
description: 'Generate text, images, audio, video and channel-ready posts for LinkedIn, Facebook, Instagram and blogs. Templates, brand voice and Personas baked in.',
badge: 'Multi‑Format'
},
{
icon: ,
title: 'Content Publishing',
description: 'Publish and schedule directly to connected social channels and your website. One-click cross‑posting while preserving native formats.',
badge: 'Automated'
},
{
icon: ,
title: 'Content Analytics',
description: 'Pulls analytics from connected platforms, analyzes with AI and surfaces actionable insights. Signals flow back to strategy and calendar for adaptive learning.',
badge: 'AI Insights'
},
{
icon: ,
title: 'Content Engagement',
description: 'Monitor comments, DMs and reactions. Research communities and reply with AI assistance from within ALwrity to grow audience authentically.',
badge: 'Community'
},
{
icon: ,
title: 'Content Remarketing',
description: 'Analyzes historic performance, suggests edits, variants and redistribution. Measures KPI attainment and explains what worked—and what did not.',
badge: 'Optimization'
}
];
const glassCardSx = {
background: `linear-gradient(135deg, ${alpha(theme.palette.common.white, 0.05)} 0%, ${alpha(theme.palette.common.white, 0.015)} 100%)`,
backdropFilter: 'blur(14px)',
border: '1px solid rgba(255,255,255,0.12)',
borderRadius: 3,
boxShadow: '0 10px 25px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06)',
p: 0
} as const;
// Shimmer animation for lifecycle chip line
const shimmer = keyframes`
0% { background-position: 0% 50%; }
100% { background-position: 100% 50%; }
`;
// Glow pulse animation for chips
const glowPulse = keyframes`
0%, 100% {
box-shadow: 0 0 10px ${alpha(theme.palette.primary.main, 0.3)},
0 0 20px ${alpha(theme.palette.primary.main, 0.2)},
inset 0 0 10px ${alpha(theme.palette.primary.main, 0.1)};
}
50% {
box-shadow: 0 0 20px ${alpha(theme.palette.primary.main, 0.6)},
0 0 30px ${alpha(theme.palette.primary.main, 0.4)},
inset 0 0 15px ${alpha(theme.palette.primary.main, 0.2)};
}
`;
// Loading component for Suspense
const LoadingSpinner = () => (
);
return (
{/* Hero Section - Extracted to separate component */}
{/* Lifecycle Section with Background Image */}
{/* Background Image Layer */}
{/* Dark overlay for readability */}
{/* Content Layer */}
{/* Title */}
ALwrity Content Lifecycle
End‑to‑End, HITL by Design
{/* Phases chips with animated connector */}
{/* animated line */}
{/* chips */}
{[
{ label: 'Plan', variations: ['Plan', 'Strategy', 'Research', 'Blueprint'] },
{ label: 'Generate', variations: ['Generate', 'Create', 'Produce', 'Craft'] },
{ label: 'Publish', variations: ['Publish', 'Launch', 'Deploy', 'Release'] },
{ label: 'Analyze', variations: ['Analyze', 'Measure', 'Track', 'Monitor'] },
{ label: 'Engage', variations: ['Engage', 'Interact', 'Connect', 'Respond'] },
{ label: 'Remarket', variations: ['Remarket', 'Repurpose', 'Recycle', 'Amplify'] }
].map((item, idx) => (
{idx+1}
}
size="medium"
sx={{
px: { xs: 1, md: 2 },
py: { xs: 1.5, md: 2 },
fontWeight: 700,
letterSpacing: 0.5,
background: `linear-gradient(135deg,
${alpha(theme.palette.primary.main, 0.3)},
${alpha(theme.palette.secondary.main, 0.3)})`,
border: `2px solid ${alpha(theme.palette.primary.main, 0.6)}`,
backdropFilter: 'blur(12px)',
animation: `${glowPulse} 3s ease-in-out infinite`,
animationDelay: `${idx * 0.3}s`,
transition: 'all 0.3s ease',
'&:hover': {
transform: 'scale(1.1) translateY(-2px)',
background: `linear-gradient(135deg,
${alpha(theme.palette.primary.main, 0.5)},
${alpha(theme.palette.secondary.main, 0.5)})`,
boxShadow: `0 8px 30px ${alpha(theme.palette.primary.main, 0.7)}`
}
}}
/>
))}
{/* Description */}
ALwrity automates each phase with AI while you review and approve as the human‑in‑the‑loop.
{/* Cards with zoom animations */}
{features.map((feature, index) => (
{feature.icon}
{feature.title}
{feature.description}
}
sx={{
textTransform: 'none',
fontWeight: 600,
px: 0,
minWidth: 0,
color: theme.palette.primary.main,
'&:hover': {
color: theme.palette.primary.light
}
}}
href="#"
>
Learn more
))}
{/* Feature Showcase with Carousel - Lazy Loaded */}
}>
{/* The Solopreneur's Dilemma Section - Lazy Loaded */}
}>
{/* Pricing Section - Embedded in Landing */}
Choose Your Plan
Start with a free plan or upgrade for advanced features
{/* Introducing ALwrity Section with Background - Lazy Loaded */}
}>
{/* Final CTA Section - Lazy Loaded */}
}>
);
};
export default Landing;