"use client";

import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import HeroBillboardCarousel from '@/components/sections/hero/HeroBillboardCarousel';
import MetricCardSeven from '@/components/sections/metrics/MetricCardSeven';
import FeatureCardTwentyFive from '@/components/sections/feature/FeatureCardTwentyFive';
import PricingCardFive from '@/components/sections/pricing/PricingCardFive';
import SocialProofOne from '@/components/sections/socialProof/SocialProofOne';
import TeamCardSix from '@/components/sections/team/TeamCardSix';
import ContactCTA from '@/components/sections/contact/ContactCTA';
import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis';
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import { Shield, AlertTriangle, Zap, Lightbulb, Trophy, Globe, Users, Rocket } from 'lucide-react';

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="directional-hover"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="small"
      sizing="large"
      background="noise"
      cardStyle="soft-shadow"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          brandName="KAVACH"
          navItems={[
            { name: "Platform", id: "platform" },
            { name: "Technology", id: "technology" },
            { name: "Why KAVACH", id: "differentiators" },
            { name: "About", id: "team" },
            { name: "Contact", id: "contact" }
          ]}
          bottomLeftText="Space Safety Intelligence"
          bottomRightText="hello@kavach.space"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardCarousel
          title="Protecting Space Infrastructure with AI-Powered Collision Intelligence"
          description="ML-enhanced orbit prediction that slashes false alarms by 60%+ while catching 99.5% of real threats. Stop wasting fuel on unnecessary avoidance maneuvers. Catch the threats that matter."
          tag="Space Safety"
          tagIcon={Shield}
          tagAnimation="slide-up"
          background={{ variant: "radial-gradient" }}
          buttons={[
            { text: "Request a Demo", href: "#contact" },
            { text: "See How It Works", href: "#technology" }
          ]}
          buttonAnimation="blur-reveal"
          mediaItems={[
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/a-cinematic-space-visualization-showing--1772476476154-67de61a5.png?_wi=1",              imageAlt: "Orbital debris collision visualization with Earth and neon trajectories"
            },
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=1",              imageAlt: "KAVACH platform dashboard showing real-time conjunction screening"
            },
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/abstract-orbital-mechanics-visualization-1772476476004-b3b43d67.png?_wi=1",              imageAlt: "Abstract orbital mechanics visualization with collision zones"
            },
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/orbital-altitude-band-risk-heatmap-showi-1772476476691-2cafc8d3.png?_wi=1",              imageAlt: "Orbital altitude band risk heatmap visualization"
            },
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=1",              imageAlt: "Technology pipeline data flow diagram"
            }
          ]}
          className="min-h-screen"
          containerClassName="relative z-10"
        />
      </div>

      <div id="crisis-stats" data-section="crisis-stats">
        <MetricCardSeven
          title="The Crisis in Orbit"
          description="Current physics-only models degrade rapidly beyond 3 days. Operators waste millions on unnecessary avoidance maneuvers while real threats slip through. The space economy is under unprecedented risk."
          tag="Critical Threat"
          tagIcon={AlertTriangle}
          tagAnimation="slide-up"
          metrics={[
            {
              id: "debris",              value: "1.2M+",              title: "Tracked Debris Objects in Orbit",              items: ["Average speed: 28,000 km/h", "Each collision creates cascading debris"]
            },
            {
              id: "false-alarms",              value: "90%+",              title: "False Alarm Rate in Current Systems",              items: ["Operators overwhelmed by noise", "Expensive fuel burns on non-threats"]
            },
            {
              id: "economy-risk",              value: "$630B+",              title: "Global Space Economy at Risk",              items: ["Satellites, constellations, infrastructure", "Insurance implications growing"]
            },
            {
              id: "kessler-risk",              value: "Unstoppable",              title: "Kessler Syndrome Threat",              items: ["One cascade event makes orbits unusable", "Irreversible damage to space economy"]
            },
            {
              id: "starlink-loss",              value: "40+",              title: "Starlink Satellites Lost (Feb 2022 Geomagnetic Storm)",              items: ["Cascading failures from single event", "Demonstrates vulnerability of constellations"]
            }
          ]}
          carouselMode="auto"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="platform" data-section="platform">
        <FeatureCardTwentyFive
          title="Platform Overview: The KAVACH Dashboard"
          description="Real-time orbital intelligence that transforms raw debris data into actionable insights. Every feature built for operators who make life-or-death satellite decisions."
          tag="Core Capabilities"
          tagIcon={Zap}
          tagAnimation="slide-up"
          features={[
            {
              title: "Real-Time Conjunction Screening",              description: "Continuous monitoring of 40,000+ tracked objects with millisecond-precision data ingestion from CelesTrak and Space-Track.",              icon: Radar,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=2",                  imageAlt: "Real-time conjunction dashboard"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/orbital-altitude-band-risk-heatmap-showi-1772476476691-2cafc8d3.png?_wi=2",                  imageAlt: "Threat heatmap visualization"
                }
              ]
            },
            {
              title: "ML-Calibrated Collision Probability",              description: "Ensemble machine learning models (XGBoost + LSTM) scoring collision probability with confidence intervals that operators can trust.",              icon: Brain,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=2",                  imageAlt: "ML data flow pipeline"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/comparison-chart-showing-sgp4-only-predi-1772476476091-ab187b45.png?_wi=1",                  imageAlt: "KAVACH vs traditional comparison"
                }
              ]
            },
            {
              title: "Precise Miss Distance Prediction",              description: "Closest-approach forecasting with along-track accuracy 75%+ better than traditional SGP4-only methods.",              icon: Crosshair,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/abstract-orbital-mechanics-visualization-1772476476004-b3b43d67.png?_wi=2",                  imageAlt: "Orbital trajectory visualization"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=3",                  imageAlt: "Miss distance metrics panel"
                }
              ]
            },
            {
              title: "Optimal Maneuver Recommendations",              description: "Automated delta-v burn calculations for avoidance, minimizing fuel waste while maximizing safety margin.",              icon: Rocket,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=3",                  imageAlt: "Maneuver calculation pipeline"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/a-cinematic-space-visualization-showing--1772476476154-67de61a5.png?_wi=2",                  imageAlt: "Orbital correction visualization"
                }
              ]
            },
            {
              title: "3D Interactive Orbital Visualization",              description: "Real-time 3D globe showing orbital paths, conjunction geometry, and altitude-band risk heatmaps in immersive interface.",              icon: Globe,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/orbital-altitude-band-risk-heatmap-showi-1772476476691-2cafc8d3.png?_wi=3",                  imageAlt: "3D orbital visualization"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/abstract-orbital-mechanics-visualization-1772476476004-b3b43d67.png?_wi=3",                  imageAlt: "Orbital mechanics visualization"
                }
              ]
            },
            {
              title: "Explainable AI Alerts",              description: "SHAP-powered explanations showing exactly why a conjunction is flagged. Build operator trust with transparent AI.",              icon: Eye,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=4",                  imageAlt: "Alert explanation interface"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=4",                  imageAlt: "Explainable AI process"
                }
              ]
            }
          ]}
          animationType="depth-3d"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="technology" data-section="technology">
        <FeatureCardTwentyFive
          title="Technology: The Hybrid Approach"
          description="Not pure physics. Not pure ML. KAVACH's fusion architecture backed by IEEE research showing 75%+ improvement in along-track prediction accuracy."
          tag="Innovation"
          tagIcon={Lightbulb}
          tagAnimation="slide-up"
          features={[
            {
              title: "Data Ingestion Layer",              description: "Real-time TLE data from CelesTrak & Space-Track (40K+ objects), solar/geomagnetic NOAA data, historical debris catalogs from ESA DISCOS.",              icon: Database,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=5",                  imageAlt: "Data ingestion pipeline stage"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/abstract-orbital-mechanics-visualization-1772476476004-b3b43d67.png?_wi=4",                  imageAlt: "Data collection overview"
                }
              ]
            },
            {
              title: "Physics Engine Foundation",              description: "SGP4 orbit propagation establishes baseline predictions. Time-tested foundation ensures physics integrity.",              icon: Zap,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=5",                  imageAlt: "Physics calculation display"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/comparison-chart-showing-sgp4-only-predi-1772476476091-ab187b45.png?_wi=2",                  imageAlt: "SGP4 baseline accuracy"
                }
              ]
            },
            {
              title: "ML Correction Layer",              description: "Ensemble model (XGBoost + LSTM) learns and corrects systematic physics errors—atmospheric drag, solar radiation, gravitational perturbations.",              icon: Brain,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/technology-pipeline-data-flow-diagram-sh-1772476476078-e585d173.png?_wi=6",                  imageAlt: "ML correction architecture"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/comparison-chart-showing-sgp4-only-predi-1772476476091-ab187b45.png?_wi=3",                  imageAlt: "ML improvement metrics"
                }
              ]
            },
            {
              title: "Calibrated Risk Assessment",              description: "Collision probability, miss distance, and time-to-closest-approach computed with confidence intervals operators can act on.",              icon: Shield,
              mediaItems: [
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/orbital-altitude-band-risk-heatmap-showi-1772476476691-2cafc8d3.png?_wi=4",                  imageAlt: "Risk assessment visualization"
                },
                {
                  imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/advanced-space-debris-tracking-dashboard-1772476487705-7ba10ac8.png?_wi=6",                  imageAlt: "Risk scoring interface"
                }
              ]
            }
          ]}
          animationType="blur-reveal"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="differentiators" data-section="differentiators">
        <PricingCardFive
          title="Why KAVACH Leads"
          description="Purpose-built for operators who demand both accuracy and clarity in critical decisions."
          tag="Competitive Edge"
          tagIcon={Trophy}
          tagAnimation="slide-up"
          plans={[
            {
              id: "false-alarms",              tag: "Operational Efficiency",              price: "60%+",              period: "Fewer False Alarms",              description: "ML-calibrated risk scoring eliminates the noise that wastes operator time and precious fuel reserves.",              button: { text: "Learn More", href: "#contact" },
              featuresTitle: "Impact:",              features: ["Reduce conjunction review burden", "Minimize unnecessary maneuvers", "Lower mission costs dramatically"]
            },
            {
              id: "threat-detection",              tag: "Safety Assurance",              price: "99.5%+",              period: "Threat Detection Rate",              description: "Never miss a genuine collision risk. Comprehensive threat coverage with explainable confidence levels.",              button: { text: "Learn More", href: "#contact" },
              featuresTitle: "Assurance:",              features: ["Catch real threats reliably", "Sleep better at night", "Protect billion-dollar assets"]
            },
            {
              id: "explainability",              tag: "Transparency",              price: "100%",              period: "Explainable AI",              description: "See exactly why KAVACH flagged a conjunction. SHAP-powered explanations build operator trust for critical go/no-go decisions.",              button: { text: "Learn More", href: "#contact" },
              featuresTitle: "Trust:",              features: ["Understand every alert", "Build confidence in AI", "Regulatory compliance ready"]
            },
            {
              id: "real-data",              tag: "Validation",              price: "40K+",              period: "Objects Trained On",              description: "Trained and validated on actual TLE data for real orbital objects—not synthetic toy datasets. Real data, real performance.",              button: { text: "Learn More", href: "#contact" },
              featuresTitle: "Proven:",              features: ["Validated against reality", "Immediate applicability", "Production-ready accuracy"]
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="market-opportunity" data-section="market-opportunity">
        <SocialProofOne
          title="Built for Global Space Leaders"
          description="KAVACH serves national space agencies, commercial constellation operators, and space situational awareness providers protecting critical orbital infrastructure."
          tag="Market Focus"
          tagIcon={Globe}
          tagAnimation="slide-up"
          names=[
            "ISRO (52+ satellites launching in 5 years)",            "ESA & Copernicus Program",            "NASA & NORAD",            "Starlink & OneWeb Constellations",            "Amazon Kuiper",            "Commercial SSA Providers",            "Satellite Insurance Market"
          ]
          logos={[
            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/isro-indian-space-research-organisation--1772476475688-3304a5cb.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/esa-european-space-agency-official-logo--1772476475805-994394c4.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/nasa-official-logo-design-iconic-space-a-1772476476494-0f328385.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/starlink-company-logo-design-stylized-sa-1772476476030-20510ec2.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/oneweb-company-logo-design-orbital-netwo-1772476476641-36f8be0d.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/digantara-company-logo-design-space-tech-1772476475988-b8f15eef.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/leolabs-company-logo-or-inspired-design--1772476475827-03989ae2.png"
          ]}
          textboxLayout="default"
          useInvertedBackground={false}
          speed={40}
          showCard={true}
        />
      </div>

      <div id="team" data-section="team">
        <TeamCardSix
          title="Built by Team AKX"
          description="Aayush and Aryaman launched KAVACH from a Hacksagon (IITM × IEEE) winning concept into an operational platform protecting orbital infrastructure. Backed by space industry expertise and machine learning innovation."
          tag="Team"
          tagIcon={Users}
          tagAnimation="slide-up"
          gridVariant="uniform-all-items-equal"
          animationType="blur-reveal"
          members={[
            {
              id: "aayush",              name: "Aayush",              role: "Founder & CEO",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/professional-headshot-of-young-tech-foun-1772476475947-d850b4df.png",              imageAlt: "Aayush - CEO and Founder of KAVACH"
            },
            {
              id: "aryaman",              name: "Aryaman",              role: "CTO & Co-Founder",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AOuiKQ01soUlXC4y9dERy6QOnP/professional-headshot-of-young-tech-foun-1772476476571-e9c73b82.png",              imageAlt: "Aryaman - CTO and Co-Founder of KAVACH"
            }
          ]}
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCTA
          tag="Get Started"
          tagIcon={Rocket}
          tagAnimation="slide-up"
          title="Stop Burning Fuel on False Alarms"
          description="Ready to protect your constellation with AI-powered collision intelligence? Request a demo and see how KAVACH transforms orbital safety. The future of space operations starts here."
          buttons={[
            { text: "Request a Demo", href: "#contact" },
            { text: "Email: hello@kavach.space", href: "mailto:hello@kavach.space" }
          ]}
          buttonAnimation="blur-reveal"
          background={{ variant: "sparkles-gradient" }}
          useInvertedBackground={false}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterLogoEmphasis
          logoText="KAVACH"
          columns={[
            {
              items: [
                { label: "Platform", href: "#platform" },
                { label: "Technology", href: "#technology" },
                { label: "Why KAVACH", href: "#differentiators" }
              ]
            },
            {
              items: [
                { label: "About", href: "#team" },
                { label: "Contact", href: "#contact" },
                { label: "Email", href: "mailto:hello@kavach.space" }
              ]
            },
            {
              items: [
                { label: "Privacy Policy", href: "#" },
                { label: "Terms of Service", href: "#" },
                { label: "LinkedIn", href: "https://linkedin.com" }
              ]
            }
          ]}
        />
      </div>
    </ThemeProvider>
  );
}
