import React from 'react';
import { PublicHeader } from '@/Components/PublicHeader';
import { PublicFooter } from '@/Components/PublicFooter';
import { SEOHead } from '@/Components/SEOHead';
import { Link, usePage } from '@inertiajs/react';
import { MapPin, Calendar, Award, Globe, Shield, Code2, Cpu, Zap, CheckCircle2, ArrowRight, Layers, Sparkles } from 'lucide-react';

interface AboutProps {
    page?: any;
}

export default function About({ page }: AboutProps) {
    const { globalSettings } = usePage().props as any;

    const siteName = globalSettings?.site_name || 'Tech in Soul';
    const officeAddress = globalSettings?.contact_address || 'Ruhia Upazila, Thakurgaon';

    const milestones = [
        {
            year: '2018',
            title: 'Founding & Local Vision',
            description: `${siteName} was established in ${officeAddress}, with a mission to craft world-class digital applications and empower businesses with modern technology.`,
        },

        {
            year: '2020',
            title: 'Expansion into SaaS & Full-Stack Solutions',
            description: 'Expanded capabilities into multi-tenant SaaS architecture, cloud deployments, and custom Laravel & React enterprise platforms.',
        },
        {
            year: '2023',
            title: 'Global Client Partnerships',
            description: 'Crossed 50+ delivered projects across 10+ countries, building high-conversion e-commerce stores, telehealth mobile apps, and analytics platforms.',
        },
        {
            year: '2026',
            title: 'Next-Gen AI & Scalable Engineering',
            description: 'Pioneering AI co-pilot integrations, zero-trust cloud security, high-concurrency microservices, and continuous product innovation.',
        },
    ];

    const coreValues = [
        {
            icon: Shield,
            title: 'Security-First Architecture',
            description: 'Every codebase is built with zero-trust principles, end-to-end data encryption, and stringent vulnerability scanning.',
        },
        {
            icon: Zap,
            title: 'High Performance & Speed',
            description: 'Sub-second response times, optimized database queries, Redis caching, and smooth 60fps user interface transitions.',
        },
        {
            icon: Code2,
            title: 'Clean, Maintainable Code',
            description: 'We strictly follow PSR standards, modular component architectures, and comprehensive Pest automated test coverage.',
        },
        {
            icon: Cpu,
            title: 'Continuous Innovation',
            description: 'Leveraging cutting-edge tech stacks (PHP 8.5, Laravel 12, React, Inertia.js, Tailwind CSS) to deliver state-of-the-art products.',
        },
    ];

    const methodology = [
        {
            step: '01',
            title: 'Discovery & Product Architecture',
            description: 'We analyze target user flows, technical constraints, data models, and business objectives to construct a comprehensive blueprint.',
        },
        {
            step: '02',
            title: 'Human-Centered UI/UX Design',
            description: 'Creating dark-mode glassmorphism design systems, responsive layouts, and micro-animated Figma prototypes before writing a line of code.',
        },
        {
            step: '03',
            title: 'Agile Full-Stack Engineering',
            description: 'Iterative sprint cycles using Laravel, React, and MySQL, backed by daily continuous integration and automated test suites.',
        },
        {
            step: '04',
            title: 'Deployment & 24/7 Monitoring',
            description: 'Automated CI/CD deployments to cloud infrastructure (AWS/GCP/Laravel Cloud), paired with proactive monitoring and ongoing SLA support.',
        },
    ];

    return (
        <div className="min-h-screen bg-[#060B18] text-slate-100 flex flex-col font-sans">
            <SEOHead
                title="About Tech in Soul | Leading IT Solutions Company"
                description="Learn about Tech in Soul mission, leadership, core engineering values, and our global journey in delivering top-tier digital products."
            />

            <PublicHeader />

            <main className="flex-grow pt-32 pb-20">
                {/* Hero Section */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12 text-center space-y-4 mb-20">
                    <span className="text-xs font-bold text-[#00F2FE] uppercase tracking-widest bg-[#00F2FE]/10 px-3.5 py-1 rounded-full border border-[#00F2FE]/20 inline-block">
                        WHO WE ARE
                    </span>
                    <h1 className="text-4xl sm:text-6xl font-extrabold text-white tracking-tight leading-tight">
                        Engineering High-Impact <span className="text-gradient-aqua">Digital Solutions</span>
                    </h1>
                    <p className="text-slate-400 text-base sm:text-lg max-w-2xl mx-auto leading-relaxed">
                        {siteName} is an elite IT solutions and software engineering company committed to building bulletproof software that transforms businesses worldwide.
                    </p>
                </div>

                {/* Key Metrics / Highlights */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12 mb-24">
                    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                        <div className="glass-card rounded-2xl p-8 space-y-3 border border-slate-800 hover:border-[#00F2FE]/40 transition-colors">
                            <div className="w-12 h-12 rounded-xl bg-[#00F2FE]/10 border border-[#00F2FE]/30 flex items-center justify-center text-[#00F2FE]">
                                <Globe className="w-6 h-6" />
                            </div>
                            <h3 className="text-xl font-bold text-white">Global Reach</h3>
                            <p className="text-sm text-slate-400 leading-relaxed">
                                Serving enterprise clients and innovative tech startups across more than 10 countries globally.
                            </p>
                        </div>

                        <div className="glass-card rounded-2xl p-8 space-y-3 border border-slate-800 hover:border-[#00F2FE]/40 transition-colors">
                            <div className="w-12 h-12 rounded-xl bg-[#00F2FE]/10 border border-[#00F2FE]/30 flex items-center justify-center text-[#00F2FE]">
                                <Award className="w-6 h-6" />
                            </div>
                            <h3 className="text-xl font-bold text-white">80+ Delivered Apps</h3>
                            <p className="text-sm text-slate-400 leading-relaxed">
                                Omnichannel retail stores, HIPAA medical apps, B2B SaaS analytics, and mobile solutions.
                            </p>
                        </div>

                        <div className="glass-card rounded-2xl p-8 space-y-3 border border-slate-800 hover:border-[#00F2FE]/40 transition-colors">
                            <div className="w-12 h-12 rounded-xl bg-[#00F2FE]/10 border border-[#00F2FE]/30 flex items-center justify-center text-[#00F2FE]">
                                <MapPin className="w-6 h-6" />
                            </div>
                            <h3 className="text-xl font-bold text-white">Headquartered in Bangladesh</h3>
                            <p className="text-sm text-slate-400 leading-relaxed">
                                Located in {officeAddress}, combining engineering mastery with global client delivery.
                            </p>
                        </div>



                        <div className="glass-card rounded-2xl p-8 space-y-3 border border-slate-800 hover:border-[#00F2FE]/40 transition-colors">
                            <div className="w-12 h-12 rounded-xl bg-[#00F2FE]/10 border border-[#00F2FE]/30 flex items-center justify-center text-[#00F2FE]">
                                <Sparkles className="w-6 h-6" />
                            </div>
                            <h3 className="text-xl font-bold text-white">99.9% Uptime Guarantee</h3>
                            <p className="text-sm text-slate-400 leading-relaxed">
                                Robust microservice backends built for high concurrency, zero latency, and fault tolerance.
                            </p>
                        </div>
                    </div>
                </div>

                {/* Company Mission & Vision */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12 mb-24">
                    <div className="glass-card rounded-3xl p-8 sm:p-12 border border-[#00F2FE]/20 relative overflow-hidden">
                        <div className="absolute -right-10 -bottom-10 w-96 h-96 bg-[#00F2FE]/5 rounded-full blur-3xl pointer-events-none" />
                        
                        <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
                            <div className="space-y-6">
                                <span className="text-xs font-bold text-[#00F2FE] uppercase tracking-widest">
                                    MISSION & PHILOSOPHY
                                </span>
                                <h2 className="text-3xl sm:text-4xl font-extrabold text-white leading-tight">
                                    We Transform Complex Ideas into Clean, High-Impact Technology
                                </h2>
                                <p className="text-slate-300 text-sm sm:text-base leading-relaxed">
                                    At Tech in Soul, we believe software should be elegant inside and out. Code is not just logic—it is the foundation of user experiences that drive growth, foster trust, and automate business operations.
                                </p>
                                <p className="text-slate-400 text-sm leading-relaxed">
                                    Our multidisciplinary team works closely with founders and CTOs to deliver custom platforms that scale effortlessly from day one.
                                </p>
                                
                                <div className="pt-2 flex flex-wrap gap-4">
                                    <Link href="/services" className="btn-aqua px-6 py-3 rounded-xl font-bold text-xs flex items-center gap-2">
                                        Explore Our Services <ArrowRight className="w-4 h-4" />
                                    </Link>
                                    <Link href="/projects" className="px-6 py-3 rounded-xl bg-[#0F172A] border border-slate-700 text-xs font-bold text-white hover:border-[#00F2FE] transition-colors flex items-center gap-2">
                                        View Case Studies
                                    </Link>
                                </div>
                            </div>

                            <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
                                {coreValues.map((val, idx) => {
                                    const Icon = val.icon;
                                    return (
                                        <div key={idx} className="p-6 rounded-2xl bg-[#060B18]/80 border border-slate-800 space-y-3">
                                            <div className="w-10 h-10 rounded-lg bg-[#00F2FE]/10 border border-[#00F2FE]/20 flex items-center justify-center text-[#00F2FE]">
                                                <Icon className="w-5 h-5" />
                                            </div>
                                            <h4 className="text-base font-bold text-white">{val.title}</h4>
                                            <p className="text-xs text-slate-400 leading-relaxed">{val.description}</p>
                                        </div>
                                    );
                                })}
                            </div>
                        </div>
                    </div>
                </div>

                {/* Growth Journey Timeline */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12 mb-24 space-y-12">
                    <div className="text-center max-w-2xl mx-auto space-y-2">
                        <span className="text-xs font-bold text-[#00F2FE] uppercase tracking-widest">
                            OUR JOURNEY
                        </span>
                        <h2 className="text-3xl sm:text-4xl font-bold text-white">How We Evolved Since 2018</h2>
                    </div>

                    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                        {milestones.map((m, idx) => (
                            <div key={idx} className="glass-card rounded-2xl p-6 border border-slate-800 relative space-y-3">
                                <div className="text-2xl font-black text-[#00F2FE] font-mono">{m.year}</div>
                                <h3 className="text-base font-bold text-white">{m.title}</h3>
                                <p className="text-xs text-slate-400 leading-relaxed">{m.description}</p>
                            </div>
                        ))}
                    </div>
                </div>

                {/* Development Methodology */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12 mb-24 space-y-12">
                    <div className="text-center max-w-2xl mx-auto space-y-2">
                        <span className="text-xs font-bold text-[#00F2FE] uppercase tracking-widest">
                            THE TECH IN SOUL WAY
                        </span>
                        <h2 className="text-3xl sm:text-4xl font-bold text-white">Our 4-Step Engineering Process</h2>
                    </div>

                    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                        {methodology.map((step, idx) => (
                            <div key={idx} className="glass-card rounded-2xl p-8 border border-slate-800 space-y-4 relative">
                                <span className="text-3xl font-extrabold text-[#00F2FE]/40 font-mono">{step.step}</span>
                                <h3 className="text-lg font-bold text-white">{step.title}</h3>
                                <p className="text-xs text-slate-400 leading-relaxed">{step.description}</p>
                            </div>
                        ))}
                    </div>
                </div>

                {/* Headquarters Location Banner */}
                <div className="max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-12">
                    <div className="glass-card rounded-3xl p-8 sm:p-12 border border-slate-800 flex flex-col md:flex-row items-center justify-between gap-8">
                        <div className="space-y-3 max-w-2xl">
                            <div className="flex items-center gap-2 text-[#00F2FE] text-xs font-bold uppercase tracking-wider">
                                <MapPin className="w-4 h-4" /> Global Headquarters
                            </div>
                            <h3 className="text-2xl sm:text-3xl font-bold text-white">Located in {officeAddress}</h3>
                            <p className="text-xs sm:text-sm text-slate-400 leading-relaxed">
                                {officeAddress}. We collaborate remotely and on-site with teams across Asia, Europe, and the Americas.
                            </p>
                        </div>

                        <Link href="/contact" className="btn-aqua px-8 py-4 rounded-xl font-bold text-sm shrink-0 flex items-center gap-2">
                            Contact Our Team <ArrowRight className="w-4 h-4" />
                        </Link>
                    </div>
                </div>
            </main>

            <PublicFooter />
        </div>
    );
}
