import { ServiceHeroImage } from '@/components/ui/service-hero-image'
import { Header } from '@/components/layout/header'
import { Footer } from '@/components/layout/footer'
import { ScrollReveal } from '@/components/ui/scroll-reveal'
import Link from 'next/link'
import {
  Server,
  ArrowRight,
  CheckCircle2,
  TrendingUp,
  Shield,
  Zap,
  RefreshCw,
  Activity,
  Clock,
  Users,
  BarChart3,
  Globe,
  Lock,
  Target,
  Layers,
  Settings,
} from 'lucide-react'

export const metadata = {
  title: 'Managed Infrastructure Services - Drish Infra',
  description:
    'Fully managed IT infrastructure services. We design, deploy, monitor, and maintain your entire infrastructure so you can focus on your business.',
}

export default function ManagedInfrastructurePage() {
  return (
    <main className="min-h-screen bg-[#f8fafc] text-slate-900">
      <Header />

      {/* ─── SECTION 1 · Hero — Managed vs In-House ── */}
      <section className="relative overflow-hidden bg-gradient-to-br from-slate-900 via-blue-900 to-blue-900 text-white pt-14 pb-20 lg:pt-16 lg:pb-28">
        <div className="absolute inset-0 opacity-[0.04]" style={{ backgroundImage: 'linear-gradient(45deg, #94a3b8 1px, transparent 1px), linear-gradient(-45deg, #94a3b8 1px, transparent 1px)', backgroundSize: '40px 40px' }} />
        <div className="relative max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid lg:grid-cols-2 gap-12 items-center">
            <div className="max-w-3xl mx-auto text-center lg:text-left">
            <div className="w-14 h-14 rounded-2xl bg-gradient-to-br from-slate-400 to-blue-500 flex items-center justify-center mb-6 shadow-lg shadow-slate-500/30">
              <Settings className="w-7 h-7 text-white" />
            </div>
            <h1 className="text-4xl lg:text-5xl xl:text-6xl font-extrabold leading-[1.1] mb-6">
              Managed Infrastructure <span className="bg-gradient-to-r from-slate-300 to-blue-400 bg-clip-text text-transparent">Done Right</span>
            </h1>
            <p className="text-lg text-slate-300 leading-relaxed mb-8 max-w-2xl">
              Stop spending 70% of your IT budget on keeping the lights on. Our managed infrastructure services handle everything — so your team can focus on innovation, not operations.
            </p>
            <div className="flex justify-center lg:justify-start flex-wrap gap-4 mb-10">
              <Link href="/contact" className="inline-flex items-center gap-2 bg-gradient-to-r from-slate-500 to-blue-600 hover:from-slate-400 hover:to-blue-500 text-white font-bold text-sm px-6 py-3 rounded-xl shadow-lg shadow-slate-500/25 hover:shadow-slate-400/40 transition-all duration-300 hover:scale-105">
                Get Assessment <ArrowRight className="w-4 h-4" />
              </Link>
            </div>
            {/* Stats strip */}
            <div className="grid grid-cols-3 gap-4">
              {[
                { val: '500+', label: 'Infra Managed' },
                { val: '99.99%', label: 'Uptime SLA' },
                { val: '40%', label: 'Cost Savings' },
              ].map((m, i) => (
                <div key={i} className="bg-white/5 backdrop-blur border border-white/10 rounded-xl px-4 py-3 text-center">
                  <p className="text-xl font-extrabold text-white">{m.val}</p>
                  <p className="text-[10px] text-slate-400 uppercase tracking-wider">{m.label}</p>
                </div>
              ))}
            </div>
            </div>
            <div className="block order-first lg:order-last">
              <ServiceHeroImage label="Managed Infrastructure" stats={[{ value: '5K+', label: 'Assets Managed' }, { value: '99.99%', label: 'SLA Uptime' }, { value: '40%', label: 'Cost Reduced' }]}>
              <div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center shadow-lg shadow-blue-500/20">
                <Server className="w-8 h-8 text-white" />
              </div>
            </ServiceHeroImage>
            </div>
          </div>
        </div>
      </section>

      {/* ─── SECTION 2 · Managed Services ──────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">What We Manage</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Every Layer of Your Infrastructure</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
            {[
              { title: 'Compute', desc: 'Servers, VMs, containers, and serverless — provisioned, patched, and optimized.', icon: Server },
              { title: 'Storage', desc: 'SAN, NAS, object storage, and backup targets — managed and monitored.', icon: Layers },
              { title: 'Network', desc: 'Switches, routers, firewalls, VPNs, and SD-WAN — configured and secured.', icon: Globe },
              { title: 'Security', desc: 'Firewalls, IAM, encryption, and compliance — continuously enforced.', icon: Shield },
            ].map((item, i) => {
              const Icon = item.icon
              return (
                <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300">
                  <div className="w-11 h-11 rounded-xl bg-slate-50 flex items-center justify-center mb-4">
                    <Icon className="w-5 h-5 text-slate-600" />
                  </div>
                  <h3 className="font-bold mb-2">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 3 · Managed vs In-House ────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">The Comparison</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">In-House vs Managed Infrastructure</h2>
          </div>
          <div className="grid md:grid-cols-2 gap-8">
            {/* In-House */}
            <div className="rounded-2xl border-2 border-blue-200 bg-blue-50/50 p-8">
              <h3 className="text-xl font-extrabold text-blue-700 mb-4">In-House IT Team</h3>
              <ul className="space-y-3">
                {[
                  'Hiring, training, and retaining skilled engineers',
                  '24/7 coverage requires 3+ shifts minimum',
                  'Emergency on-call rotation and burnout',
                  'Technology keeps changing — constant upskilling',
                  'Single point of failure when key person leaves',
                  'Fixed cost regardless of workload volume',
                ].map((item, i) => (
                  <li key={i} className="flex items-start gap-2 text-sm text-slate-600">
                    <span className="text-blue-400 mt-0.5">✗</span>
                    {item}
                  </li>
                ))}
              </ul>
            </div>
            {/* Managed */}
            <div className="rounded-2xl border-2 border-blue-200 bg-blue-50/50 p-8">
              <h3 className="text-xl font-extrabold text-blue-700 mb-4">Drish Infra Managed Services</h3>
              <ul className="space-y-3">
                {[
                  'Access to 50+ certified engineers instantly',
                  '24/7/365 coverage with follow-the-sun model',
                  'No burnout — we handle the heavy lifting',
                  'Continuous training on latest technologies',
                  'Team depth — no single point of failure',
                  'Predictable monthly cost, scalable as needed',
                ].map((item, i) => (
                  <li key={i} className="flex items-start gap-2 text-sm text-slate-600">
                    <CheckCircle2 className="w-4 h-4 text-blue-500 mt-0.5 flex-shrink-0" />
                    {item}
                  </li>
                ))}
              </ul>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 4 · Support Levels ────────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">Support Levels</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Choose Your Support Tier</h2>
          </div>
          <div className="grid md:grid-cols-4 gap-6">
            {[
              { tier: 'Bronze', response: '8 hours', coverage: 'Business hours', features: ['Health monitoring', 'Monthly reports', 'Email support'], price: '$3K/mo' },
              { tier: 'Silver', response: '4 hours', coverage: 'Extended hours', features: ['Proactive maintenance', 'Weekly reports', 'Email & phone'], price: '$6K/mo' },
              { tier: 'Gold', response: '1 hour', coverage: '24/7', features: ['All Silver features', 'Incident management', 'Dedicated TAM'], price: '$12K/mo', popular: true },
              { tier: 'Platinum', response: '15 min', coverage: '24/7 + On-site', features: ['All Gold features', 'Embedded engineer', 'Strategic reviews'], price: 'Custom' },
            ].map((t, i) => (
              <div key={i} className={`rounded-2xl border-2 p-6 transition-all duration-300 hover:-translate-y-1 ${t.popular ? 'border-slate-500 bg-gradient-to-b from-slate-50/50 to-white shadow-xl shadow-slate-500/10' : 'border-slate-200 bg-white hover:shadow-xl'}`}>
                <p className="text-xs font-bold text-slate-500 uppercase tracking-wider mb-2">{t.tier}</p>
                <p className="text-2xl font-extrabold text-slate-900 mb-1">{t.price}</p>
                <div className="flex gap-3 mb-4">
                  <span className="text-xs text-slate-500">{t.response} response</span>
                </div>
                <ul className="space-y-2 mb-6">
                  {t.features.map((f, j) => (
                    <li key={j} className="flex items-start gap-2 text-sm text-slate-600">
                      <CheckCircle2 className="w-4 h-4 text-slate-500 mt-0.5 flex-shrink-0" />
                      {f}
                    </li>
                  ))}
                </ul>
                <Link href="/contact" className={`block text-center font-bold text-sm py-2.5 rounded-xl transition-all duration-300 ${t.popular ? 'bg-gradient-to-r from-slate-500 to-blue-600 text-white shadow-lg' : 'bg-slate-100 text-slate-700 hover:bg-slate-200'}`}>
                  Get Started
                </Link>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 5 · Stats ────────────────────── */}
      <ScrollReveal>
      <section className="py-12 bg-gradient-to-r from-slate-900 via-blue-900 to-blue-900">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid grid-cols-2 md:grid-cols-4 gap-8">
            {[
              { number: '500+', label: 'Infra Environments', sub: 'Managed across clients' },
              { number: '99.99%', label: 'Uptime Delivered', sub: 'SLA-backed guarantee' },
              { number: '40%', label: 'Cost Reduction', sub: 'Average savings vs in-house' },
              { number: '<15 min', label: 'Response Time', sub: 'Critical incident triage' },
            ].map((m, i) => (
              <div key={i} className="text-center">
                <p className="text-3xl lg:text-4xl font-extrabold text-white mb-1">{m.number}</p>
                <p className="text-sm font-semibold text-slate-300">{m.label}</p>
                <p className="text-xs text-slate-400 mt-1">{m.sub}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 6 · Transition Process ─────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">Transition Process</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Smooth Handoff in 30 Days</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-5 gap-6">
            {[
              { step: '1', title: 'Assessment', desc: 'Full infrastructure audit and documentation.' },
              { step: '2', title: 'Planning', desc: 'Transition plan with milestones and rollback.' },
              { step: '3', title: 'Knowledge Transfer', desc: 'Document every system, process, and vendor.' },
              { step: '4', title: 'Parallel Run', desc: 'Run alongside your team for 2 weeks.' },
              { step: '5', title: 'Full Handoff', desc: 'Complete management with 24/7 support.' },
            ].map((s, i) => (
              <div key={i} className="text-center">
                <div className="w-14 h-14 rounded-2xl bg-gradient-to-br from-slate-500 to-blue-600 flex items-center justify-center mx-auto mb-4 shadow-lg">
                  <span className="text-xl font-extrabold text-white">{s.step}</span>
                </div>
                <h3 className="font-bold mb-1">{s.title}</h3>
                <p className="text-sm text-slate-500">{s.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 7 · Industries ────────────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">Industries</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Managed Infra for Every Industry</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {[
              { industry: 'Healthcare', desc: 'HIPAA-compliant managed infrastructure with audit trails and encryption.', metric: '50+ providers' },
              { industry: 'Financial Services', desc: 'PCI-DSS and SOX compliant infrastructure with 99.999% uptime.', metric: 'Zero breaches' },
              { industry: 'SaaS & Technology', desc: 'Multi-tenant infrastructure with auto-scaling and 99.99% SLA.', metric: '100+ SaaS companies' },
              { industry: 'E-Commerce', desc: 'High-traffic infrastructure with seasonal scaling and zero downtime.', metric: '$2B+ transactions' },
              { industry: 'Manufacturing', desc: 'OT/IT convergence with edge computing and IoT infrastructure.', metric: 'Real-time ops' },
              { industry: 'Government', desc: 'FedRAMP and IL5 compliant infrastructure with air-gapped support.', metric: 'FedRAMP certified' },
            ].map((ind, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300">
                <h3 className="font-bold text-lg mb-2">{ind.industry}</h3>
                <p className="text-sm text-slate-500 mb-3">{ind.desc}</p>
                <p className="text-sm font-bold text-slate-600">{ind.metric}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 8 · What's Included ──────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-slate-600 uppercase tracking-wider mb-3">What's Included</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Everything in One Fixed Monthly Fee</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
            {[
              '24/7 Infrastructure Monitoring', 'Incident Response & Management',
              'Patch Management & Updates', 'Capacity Planning & Forecasting',
              'Backup & Disaster Recovery', 'Security Hardening & Compliance',
              'Performance Optimization', 'Vendor Management',
              'Monthly Executive Reports', 'Quarterly Business Reviews',
              'Asset Lifecycle Management', 'Documentation & Runbooks',
            ].map((item, i) => (
              <div key={i} className="flex items-center gap-2.5 bg-white rounded-xl border border-slate-100 px-4 py-3 hover:border-slate-200 hover:bg-slate-50 transition-all duration-200">
                <CheckCircle2 className="w-4 h-4 text-slate-500 flex-shrink-0" />
                <span className="text-sm text-slate-700 font-medium">{item}</span>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 9 · Client Results ────────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid md:grid-cols-3 gap-8">
            {[
              { company: 'GrowthTech SaaS', result: 'Reduced IT ops team from 8 to 3', metric: '60% Staff Reduction', detail: 'Moved to fully managed infrastructure. Internal team now focuses on product development.' },
              { company: 'RetailMax Corp', result: '99.99% uptime achieved after 98.5%', metric: '99.99% Uptime', detail: 'Managed infrastructure with proactive monitoring eliminated 12 outages per year.' },
              { company: 'MedData Systems', result: 'HIPAA compliance achieved in 6 weeks', metric: '100% Compliance', detail: 'Managed infrastructure with built-in compliance controls and audit logging.' },
            ].map((story, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-xl transition-all duration-300">
                <p className="font-bold mb-2">{story.company}</p>
                <p className="text-sm font-semibold text-slate-600 mb-2">{story.result}</p>
                <p className="text-xs text-slate-500 mb-4">{story.detail}</p>
                <div className="text-center pt-3 border-t border-slate-100">
                  <p className="text-lg font-extrabold text-slate-600">{story.metric}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 10 · CTA ─────────────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-br from-slate-900 via-blue-900 to-blue-900">
        <div className="max-w-4xl mx-auto px-6 lg:px-8 text-center">
          <div className="inline-flex items-center gap-2 bg-slate-500/10 border border-slate-500/20 rounded-full px-4 py-1.5 mb-6">
            <Settings className="w-3.5 h-3.5 text-slate-400" />
            <span className="text-xs font-semibold text-slate-300 uppercase tracking-wider">Managed Infrastructure</span>
          </div>
          <h2 className="text-3xl lg:text-5xl font-extrabold text-white mb-6">
            Focus on Your Business. We Handle the Rest.
          </h2>
          <p className="text-lg text-slate-300 mb-10 max-w-2xl mx-auto">
            Get a free infrastructure assessment — including cost comparison, gap analysis, and a custom management proposal.
          </p>
          <div className="flex flex-wrap justify-center gap-4">
            <Link href="/contact" className="inline-flex items-center gap-2 bg-gradient-to-r from-slate-500 to-blue-600 hover:from-slate-400 hover:to-blue-500 text-white font-bold px-8 py-4 rounded-xl shadow-lg shadow-slate-500/25 hover:shadow-slate-400/40 transition-all duration-300 hover:scale-105">
              Free Assessment <ArrowRight className="w-4 h-4" />
            </Link>
            <Link href="/contact" className="inline-flex items-center gap-2 border border-white/20 hover:border-slate-400/40 text-white/80 hover:text-white font-semibold px-8 py-4 rounded-xl transition-all duration-300">
              Talk to an Expert
            </Link>
          </div>
          <p className="text-xs text-slate-400 mt-8">No commitment · Assessment in 5 days · NDA available</p>
        </div>
      </section>
      </ScrollReveal>

      <Footer />
    </main>
  )
}
