"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import HeroBillboard from '@/components/sections/hero/HeroBillboard';
import FeatureBento from '@/components/sections/feature/FeatureBento';
import MetricSplitMediaAbout from '@/components/sections/about/MetricSplitMediaAbout';
import TestimonialCardThirteen from '@/components/sections/testimonial/TestimonialCardThirteen';
import MetricCardEleven from '@/components/sections/metrics/MetricCardEleven';
import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia';
import ContactText from '@/components/sections/contact/ContactText';
import FooterSimple from '@/components/sections/footer/FooterSimple';
import { Brain, User, Flame, Zap, Star, Moon, Heart, Droplets, Sunrise, Target, TrendingUp, HelpCircle, Sparkles } from 'lucide-react';

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="directional-hover"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="smallMedium"
      sizing="largeSmallSizeMediumTitles"
      background="noiseDiagonalGradient"
      cardStyle="gradient-bordered"
      primaryButtonStyle="diagonal-gradient"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleApple
          brandName="LifeOS"
          navItems={[
            { name: "Features", id: "features" },
            { name: "How It Works", id: "about" },
            { name: "Testimonials", id: "testimonials" },
            { name: "FAQ", id: "faq" }
          ]}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboard
          title="Your personal operating system for life"
          description="Manage goals, habits, health, and finances in one place. Get AI-powered daily guidance and unlock your potential through streaks, insights, and real-time progress tracking."
          background={{ variant: "sparkles-gradient" }}
          tag="AI-Powered Life Management"
          tagIcon={Sparkles}
          tagAnimation="slide-up"
          buttons={[
            { text: "Start Your Life OS Today", href: "#contact" }
          ]}
          buttonAnimation="slide-up"
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-sleek-personal-dashboard-interface-sho-1773626187010-8689cba4.png"
          imageAlt="LifeOS personal dashboard interface"
          mediaAnimation="slide-up"
        />
      </div>

      <div id="features" data-section="features">
        <FeatureBento
          title="Unified Life Management"
          description="Everything you need to optimize across all dimensions of your life—integrated into one intuitive dashboard."
          tag="Core Features"
          tagIcon={Zap}
          tagAnimation="slide-up"
          features={[
            {
              title: "AI Life Assistant",              description: "Personalized daily recommendations analyzing your habits, goals, and patterns to guide you toward your best self.",              bentoComponent: "chat",              aiIcon: Brain,
              userIcon: User,
              exchanges: [
                {
                  userMessage: "How can I improve my morning routine?",                  aiResponse: "Based on your sleep data and goals, try waking 30 mins earlier with a 5-min meditation before checking messages."
                },
                {
                  userMessage: "Should I focus on fitness or productivity today?",                  aiResponse: "Your energy levels are high today and you've been consistent with workouts. Perfect time for a focused work session—aim for 90 minutes."
                }
              ],
              placeholder: "Ask me anything about optimizing your life..."
            },
            {
              title: "Habit Tracker",              description: "Build unstoppable momentum with streak tracking, trend analysis, and motivational achievement badges.",              bentoComponent: "3d-stack-cards",              items: [
                {
                  icon: Flame,
                  title: "Current Streak",                  subtitle: "45 Days",                  detail: "Morning Meditation"
                },
                {
                  icon: Zap,
                  title: "This Week",                  subtitle: "6 of 7",                  detail: "Workout Completed"
                },
                {
                  icon: Star,
                  title: "Best Streak",                  subtitle: "92 Days",                  detail: "Reading Daily"
                }
              ]
            },
            {
              title: "Goal Tracker",              description: "Visualize milestones, track progress, and stay motivated with real-time goal advancement metrics.",              bentoComponent: "timeline",              heading: "Your Goals",              subheading: "Q1 2024 Roadmap",              items: [
                {
                  label: "Complete 12-Week Fitness Program",                  detail: "Week 8 of 12 - On Track"
                },
                {
                  label: "Learn Advanced Data Analysis",                  detail: "75% Complete - 3 Modules Left"
                },
                {
                  label: "Read 24 Books This Year",                  detail: "6 of 24 Books - 2 Months In"
                }
              ],
              completedLabel: "Milestones Achieved"
            },
            {
              title: "Health & Wellness",              description: "Monitor sleep quality, workouts, mood, hydration, and wellness metrics in one integrated view.",              bentoComponent: "icon-info-cards",              items: [
                {
                  icon: Moon,
                  label: "Sleep Quality",                  value: "8h 24m"
                },
                {
                  icon: Heart,
                  label: "Mood Today",                  value: "Energized"
                },
                {
                  icon: Droplets,
                  label: "Hydration",                  value: "8 Cups"
                }
              ]
            },
            {
              title: "Finance Tracker",              description: "Simple spending insights and budget oversight without overwhelming complexity.",              bentoComponent: "animated-bar-chart"
            },
            {
              title: "Daily Life Report",              description: "Wake up to AI-curated insights: your priorities, habits, calendar events, and personalized motivation for the day ahead.",              bentoComponent: "marquee",              centerIcon: Sunrise,
              variant: "text",              texts: [
                "Morning: 90-min focus block (your best time)",                "Habit Check: 2 of 3 streaks on track",                "Health: Aim for 8h sleep tonight",                "Finance: You're 12% under budget this month",                "Goal Update: 8% progress toward Q1 targets"
              ]
            }
          ]}
          textboxLayout="default"
          animationType="blur-reveal"
          useInvertedBackground={false}
        />
      </div>

      <div id="about" data-section="about">
        <MetricSplitMediaAbout
          title="Why LifeOS?"
          description="Stop toggling between scattered apps. LifeOS unifies goal tracking, habit management, productivity, finances, and health monitoring into one elegant interface—delivering personalized AI insights so you can focus on what matters: becoming your best self."
          tag="Built for Ambitious Professionals"
          tagIcon={Target}
          tagAnimation="slide-up"
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/an-abstract-illustration-representing-li-1773626186746-6caa8edf.png"
          imageAlt="Life management integration illustration"
          mediaAnimation="slide-up"
          useInvertedBackground={true}
          metrics={[
            { value: "1", title: "Unified Dashboard" },
            { value: "5", title: "Life Dimensions" },
            { value: "∞", title: "Potential" }
          ]}
          metricsAnimation="slide-up"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardThirteen
          title="Users Love LifeOS"
          description="See how ambitious professionals are transforming their lives with unified management and AI-powered insights."
          tag="Real Stories"
          tagIcon={Heart}
          tagAnimation="slide-up"
          testimonials={[
            {
              id: "1",              name: "Sarah Johnson",              handle: "@sarah.growth",              testimonial: "LifeOS consolidated 7 different apps I was using. Now I spend 5 minutes each morning reviewing my AI report instead of 45 minutes juggling tools. My productivity has skyrocketed.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-a-succe-1773626188334-6957cba0.png",              imageAlt: "Sarah Johnson"
            },
            {
              id: "2",              name: "Michael Chen",              handle: "@michael.health",              testimonial: "The habit streak system kept me accountable like nothing else. Combined with the daily recommendations, I've maintained a 120-day meditation streak and completely transformed my wellness.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-a-healt-1773626185686-1e62f802.png",              imageAlt: "Michael Chen"
            },
            {
              id: "3",              name: "Emily Rodriguez",              handle: "@emily.goals",              testimonial: "Seeing my goals, habits, and finances all in one place changed how I think about progress. The AI insights are eerily accurate and genuinely helpful.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-a-tech--1773626186632-9a9f735b.png",              imageAlt: "Emily Rodriguez"
            },
            {
              id: "4",              name: "David Kim",              handle: "@david.optimize",              testimonial: "I've tried every productivity app out there. LifeOS is the first one that actually understands that life is holistic. Finance, health, goals—it all matters, and LifeOS gets it.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-a-goal--1773626186765-08f353de.png",              imageAlt: "David Kim"
            },
            {
              id: "5",              name: "Jessica Liu",              handle: "@jessica.momentum",              testimonial: "The gamification elements are subtle but powerful. Streaks and achievement badges keep me motivated without feeling gimmicky. This is what daily life management should feel like.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-a-young-1773626186449-78b95474.png",              imageAlt: "Jessica Liu"
            },
            {
              id: "6",              name: "Thomas Wells",              handle: "@thomas.integrate",              testimonial: "Finally, a platform that lets me see the interconnection between my sleep, productivity, and financial stress. LifeOS doesn't just track—it helps me understand and optimize my whole life.",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-professional-portrait-photo-of-an-acco-1773626186205-89ad8b81.png",              imageAlt: "Thomas Wells"
            }
          ]}
          showRating={true}
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardEleven
          title="The LifeOS Impact"
          description="Numbers that show why thousands of professionals trust LifeOS to optimize their lives."
          tag="Performance Metrics"
          tagIcon={TrendingUp}
          tagAnimation="slide-up"
          metrics={[
            {
              id: "1",              value: "50K+",              title: "Active Users",              description: "Across 85+ countries managing their lives on LifeOS",              videoSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-sleek-personal-dashboard-interface-sho-1773626187010-8689cba4.png",              videoAriaLabel: "Active users metric video"
            },
            {
              id: "2",              value: "42 Days",              title: "Average Streak",              description: "Users maintain consistent habit tracking and momentum",              videoSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-sleek-personal-dashboard-interface-sho-1773626187010-8689cba4.png",              videoAriaLabel: "Average streak metric video"
            },
            {
              id: "3",              value: "3.2x",              title: "Productivity Boost",              description: "Reported increase in goal achievement within 90 days",              videoSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-sleek-personal-dashboard-interface-sho-1773626187010-8689cba4.png",              videoAriaLabel: "Productivity boost metric video"
            },
            {
              id: "4",              value: "94%",              title: "Retention Rate",              description: "Of users continue after their first month",              videoSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B0UgXe9DqUj1Urwo8qubE153ay/a-sleek-personal-dashboard-interface-sho-1773626187010-8689cba4.png",              videoAriaLabel: "Retention rate metric video"
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqSplitMedia
          title="Frequently Asked Questions"
          description="Everything you need to know about LifeOS and how it works."
          tag="Support"
          tagIcon={HelpCircle}
          tagAnimation="slide-up"
          faqs={[
            {
              id: "1",              title: "How does the AI assistant work?",              content: "LifeOS learns your patterns, goals, and preferences over time. The AI analyzes your habit data, sleep, mood, productivity metrics, and goal progress to deliver personalized recommendations each morning. The more you use it, the smarter it becomes."
            },
            {
              id: "2",              title: "Can I integrate my data from other apps?",              content: "Yes! LifeOS integrates with popular fitness trackers (Apple Health, Fitbit, Oura), calendar apps, and financial tools. We're constantly adding new integrations. Native tracking is also available for all metrics."
            },
            {
              id: "3",              title: "What happens to my data?",              content: "Your data is encrypted end-to-end and stored securely. We never sell your data to third parties. You have full control over what you track and can export everything anytime. Privacy is core to LifeOS."
            },
            {
              id: "4",              title: "Is there a free trial?",              content: "Absolutely. Start with our 30-day free trial—full access to all features, no credit card required. If you love it, upgrade to a flexible subscription plan that works for you."
            },
            {
              id: "5",              title: "How do I use the habit streaks feature?",              content: "Log your daily completions (meditation, workout, reading, etc.) and LifeOS tracks your streak. Miss a day and your streak resets—but don't worry, you can freeze streaks for planned breaks. The visual motivation keeps you accountable."
            },
            {
              id: "6",              title: "Can I share my progress with others?",              content: "Yes, you can create shareable summary reports and set goals with accountability partners. You control what's shared—everything else stays private."
            }
          ]}
          faqsAnimation="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          mediaAnimation="slide-up"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactText
          text="Ready to optimize your life? Start your 30-day free trial today—no credit card required. Join thousands of ambitious professionals who've unified their life management with LifeOS."
          background={{ variant: "gradient-bars" }}
          buttons={[
            { text: "Start Free Trial", href: "#" },
            { text: "Schedule Demo", href: "#" }
          ]}
          useInvertedBackground={true}
          animationType="reveal-blur"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterSimple
          columns={[
            {
              title: "Product",              items: [
                { label: "Features", href: "#features" },
                { label: "Pricing", href: "#" },
                { label: "Security", href: "#" },
                { label: "Roadmap", href: "#" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About", href: "#about" },
                { label: "Blog", href: "#" },
                { label: "Careers", href: "#" },
                { label: "Contact", href: "#contact" }
              ]
            },
            {
              title: "Resources",              items: [
                { label: "Help Center", href: "#" },
                { label: "Community", href: "#" },
                { label: "API Docs", href: "#" },
                { label: "Status", href: "#" }
              ]
            },
            {
              title: "Legal",              items: [
                { label: "Privacy", href: "#" },
                { label: "Terms", href: "#" },
                { label: "Cookies", href: "#" },
                { label: "Compliance", href: "#" }
              ]
            }
          ]}
          bottomLeftText="© 2024 LifeOS. All rights reserved."
          bottomRightText="Made for ambitious people."
        />
      </div>
    </ThemeProvider>
  );
}
