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 {
  Cloud,
  ArrowRight,
  CheckCircle2,
  TrendingUp,
  Shield,
  Zap,
  Globe,
  Server,
  DollarSign,
  RefreshCw,
  Lock,
  Layers,
  BarChart3,
  Activity,
  Database,
  Network,
  Cpu,
} from 'lucide-react'

export const metadata = {
  title: 'Cloud Services - Drish Infra',
  description:
    'Multi-cloud services for AWS, Azure, and GCP. Cloud architecture, cost optimization, migration, and managed cloud operations for enterprise workloads.',
}

/* ══════════════════════════════════════════════════ */
/*  PAGE  –  Cloud Services                           */
/*  10 Unique Sections                               */
/* ══════════════════════════════════════════════════ */
export default function CloudServicesPage() {
  return (
    <main className="min-h-screen bg-[#f8fafc] text-slate-900">
      <Header />

      {/* ─── SECTION 1 · Hero — Gradient with Cloud Visual ── */}
      <section className="relative overflow-hidden bg-gradient-to-br from-slate-950 via-blue-950 to-blue-900 text-white pt-14 pb-20 lg:pt-16 lg:pb-28">
        {/* cloud dots */}
        <div className="absolute inset-0 opacity-[0.05]" style={{ backgroundImage: 'radial-gradient(circle at 1px 1px, #38bdf8 1.5px, transparent 0)', backgroundSize: '32px 32px' }} />
        <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="flex justify-center lg:justify-start items-center gap-3 mb-6">
              <div className="w-12 h-12 rounded-2xl bg-gradient-to-br from-blue-400 to-blue-500 flex items-center justify-center shadow-lg shadow-blue-500/30">
                <Cloud className="w-6 h-6 text-white" />
              </div>
              <span className="text-xs font-semibold text-blue-300 uppercase tracking-wider border border-blue-500/30 rounded-full px-3 py-1">AWS · Azure · GCP</span>
            </div>
            <h1 className="text-4xl lg:text-5xl xl:text-6xl font-extrabold leading-[1.1] mb-6">
              Cloud Services That <span className="bg-gradient-to-r from-blue-400 to-blue-500 bg-clip-text text-transparent">Scale With You</span>
            </h1>
            <p className="text-lg text-slate-300 leading-relaxed mb-8 max-w-2xl">
              Architecture, migration, optimization, and management across AWS, Azure, and Google Cloud. We design cloud environments that are secure, cost-efficient, and built for growth.
            </p>
            <div className="flex justify-center lg:justify-start flex-wrap gap-4 mb-12">
              <Link href="/contact" className="inline-flex items-center gap-2 bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-400 hover:to-blue-500 text-white font-bold text-sm px-6 py-3 rounded-xl shadow-lg shadow-blue-500/25 hover:shadow-blue-400/40 transition-all duration-300 hover:scale-105">
                Start Your Cloud Journey <ArrowRight className="w-4 h-4" />
              </Link>
              <Link href="#providers" className="inline-flex items-center gap-2 border border-white/20 hover:border-blue-400/40 text-white/80 hover:text-white font-semibold text-sm px-6 py-3 rounded-xl transition-all duration-300">
                Compare Providers
              </Link>
            </div>
            {/* Provider badges */}
            <div className="flex justify-center lg:justify-start flex-wrap gap-4">
              {[
                { name: 'AWS', color: 'from-blue-500 to-blue-600', level: 'Select Partner' },
                { name: 'Azure', color: 'from-blue-500 to-blue-600', level: 'Solutions Partner' },
                { name: 'GCP', color: 'from-blue-500 to-blue-600', level: 'Premier Partner' },
              ].map((p, i) => (
                <div key={i} className="bg-white/5 backdrop-blur border border-white/10 rounded-xl px-5 py-3 flex items-center gap-3">
                  <div className={`w-8 h-8 rounded-lg bg-gradient-to-br ${p.color} flex items-center justify-center`}>
                    <Cloud className="w-4 h-4 text-white" />
                  </div>
                  <div>
                    <p className="text-sm font-bold">{p.name}</p>
                    <p className="text-[10px] text-slate-400">{p.level}</p>
                  </div>
                </div>
              ))}
            </div>
            </div>
            <div className="block order-first lg:order-last">
              <ServiceHeroImage label="Cloud Services" stats={[{ value: 'AWS', label: 'Azure GCP' }, { value: '40%', label: 'Cost Reduced' }, { value: '99.99%', label: 'Uptime' }]}>
              <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">
                <Cloud className="w-8 h-8 text-white" />
              </div>
            </ServiceHeroImage>
            </div>
          </div>
        </div>
      </section>

      {/* ─── SECTION 2 · Cloud Benefits ───────────── */}
      <ScrollReveal>
      <section id="providers" 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-blue-600 uppercase tracking-wider mb-3">Why Cloud</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">The Cloud Advantage</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">Move from CapEx to OpEx, scale elastically, and deploy globally in minutes.</p>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-8">
            {[
              { title: 'Elastic Scalability', desc: 'Handle 10× traffic spikes without provisioning hardware. Auto-scale up or down based on demand.', icon: TrendingUp, color: 'from-blue-500 to-blue-600' },
              { title: 'Global Reach', desc: 'Deploy in 30+ regions worldwide. Serve users from the nearest edge for sub-50ms latency.', icon: Globe, color: 'from-blue-500 to-blue-600' },
              { title: 'Cost Optimization', desc: 'Pay only for what you use. Reserved instances, spot pricing, and right-sizing save 30-60%.', icon: DollarSign, color: 'from-blue-500 to-blue-600' },
              { title: 'Built-in Security', desc: 'Enterprise-grade security — encryption, IAM, VPCs, WAF, and compliance certifications.', icon: Shield, color: 'from-blue-500 to-blue-600' },
              { title: 'High Availability', desc: 'Multi-AZ and multi-region architectures with automated failover and 99.99% uptime SLAs.', icon: RefreshCw, color: 'from-blue-500 to-blue-600' },
              { title: 'Innovation Speed', desc: 'Access 200+ managed services — AI/ML, IoT, analytics, serverless — without managing infrastructure.', icon: Zap, color: 'from-blue-500 to-blue-600' },
            ].map((item, i) => {
              const Icon = item.icon
              return (
                <div key={i} className="group bg-white rounded-2xl border border-slate-200 p-8 hover:shadow-xl hover:-translate-y-1 transition-all duration-300">
                  <div className={`w-14 h-14 rounded-2xl bg-gradient-to-br ${item.color} flex items-center justify-center mb-5 shadow-lg group-hover:scale-110 transition-transform duration-300`}>
                    <Icon className="w-7 h-7 text-white" />
                  </div>
                  <h3 className="font-bold text-xl mb-3">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 3 · Cloud Service Models ─────── */}
      <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-blue-600 uppercase tracking-wider mb-3">Service Models</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">From IaaS to Serverless</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">We recommend the right cloud model for each workload — not a one-size-fits-all approach.</p>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
            {[
              { model: 'IaaS', title: 'Infrastructure as a Service', desc: 'Full control over VMs, networking, and storage. Ideal for lift-and-shift and custom configs.', examples: 'EC2, Azure VMs, GCE', icon: Server, color: 'from-blue-500 to-blue-600' },
              { model: 'PaaS', title: 'Platform as a Service', desc: 'Managed runtime environments. Focus on code, not infrastructure.', examples: 'App Engine, Elastic Beanstalk', icon: Layers, color: 'from-blue-500 to-blue-600' },
              { model: 'CaaS', title: 'Containers as a Service', desc: 'Managed Kubernetes and container orchestration. Deploy microservices at scale.', examples: 'EKS, AKS, GKE', icon: Database, color: 'from-blue-500 to-blue-600' },
              { model: 'FaaS', title: 'Functions as a Service', desc: 'Serverless compute — pay per execution. Zero server management.', examples: 'Lambda, Azure Functions', icon: Zap, color: 'from-blue-500 to-blue-600' },
            ].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="flex items-center gap-3 mb-4">
                    <div className={`w-10 h-10 rounded-xl bg-gradient-to-br ${item.color} flex items-center justify-center`}>
                      <Icon className="w-5 h-5 text-white" />
                    </div>
                    <span className="text-xs font-bold text-blue-500 bg-blue-50 px-2.5 py-1 rounded-full">{item.model}</span>
                  </div>
                  <h3 className="font-bold mb-2">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed mb-3">{item.desc}</p>
                  <p className="text-xs text-blue-600 font-semibold">{item.examples}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 4 · Cloud Architecture ────────── */}
      <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-blue-600 uppercase tracking-wider mb-3">Architecture Services</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Cloud Architecture That Works</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {[
              { title: 'Landing Zone Design', desc: 'Multi-account/subscription setup with guardrails, networking, and security baselines.', icon: Layers },
              { title: 'Cost Optimization', desc: 'Reserved instances, savings plans, spot fleets, and rightsizing recommendations.', icon: DollarSign },
              { title: 'Security Architecture', desc: 'Zero-trust networking, encryption, IAM policies, and compliance automation.', icon: Lock },
              { title: 'Disaster Recovery', desc: 'Multi-region failover, backup strategies, and DR-as-code for cloud workloads.', icon: RefreshCw },
              { title: 'DevOps Integration', desc: 'IaC with Terraform, CI/CD pipelines, and GitOps workflows in the cloud.', icon: Activity },
              { title: 'Performance Tuning', desc: 'CDN configuration, database optimization, and auto-scaling policy design.', icon: Zap },
            ].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-blue-50 flex items-center justify-center mb-4">
                    <Icon className="w-5 h-5 text-blue-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 5 · Cloud Stats ──────────────── */}
      <ScrollReveal>
      <section className="py-12 bg-gradient-to-r from-slate-950 via-blue-950 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: '$2.4B', label: 'Cloud Spend Managed', sub: 'Across all clients' },
              { number: '35%', label: 'Avg. Cost Reduction', sub: 'After optimization' },
              { number: '10K+', label: 'Cloud Resources', sub: 'Managed daily' },
              { number: '99.99%', label: 'Cloud Uptime', sub: 'SLA-backed' },
            ].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-blue-300">{m.label}</p>
                <p className="text-xs text-slate-400 mt-1">{m.sub}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 6 · Pricing Optimization ─────── */}
      <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="grid lg:grid-cols-2 gap-12 items-center">
            <div className="relative">
              <div className="aspect-[4/3] rounded-3xl overflow-hidden bg-gradient-to-br from-blue-100 to-blue-50 border border-blue-100 mb-6">
                <img src="/placeholder.jpg" alt="Cloud Cost Optimization" className="w-full h-full object-cover" />
              </div>
              <div className="absolute -bottom-4 -right-4 bg-white rounded-2xl border border-slate-200 shadow-xl p-4 max-w-[200px]">
                <div className="flex items-center gap-2 mb-2">
                  <div className="w-2 h-2 rounded-full bg-green-500 animate-pulse" />
                  <span className="text-xs font-bold text-green-600 uppercase">Savings</span>
                </div>
                <p className="text-xl font-extrabold text-slate-900">35%</p>
                <p className="text-xs text-slate-500">Average cost reduction</p>
              </div>
            </div>
            <div>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Cost Optimization</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Stop Overpaying for Cloud</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                70% of organizations overpay for cloud resources. Our FinOps practice identifies waste, right-sizes instances, and implements savings strategies that typically reduce bills by 30-50%.
              </p>
            </div>
            <div className="bg-white rounded-3xl border border-slate-200 p-8 shadow-xl">
              <h3 className="font-bold text-lg mb-6">Typical Optimization Breakdown</h3>
              {[
                { label: 'Rightsizing Instances', saving: '25%', color: 'bg-blue-500', width: '25%' },
                { label: 'Reserved Instances / Savings Plans', saving: '30%', color: 'bg-blue-500', width: '30%' },
                { label: 'Spot / Preemptible Instances', saving: '15%', color: 'bg-blue-500', width: '15%' },
                { label: 'Idle Resource Cleanup', saving: '10%', color: 'bg-blue-500', width: '10%' },
                { label: 'Storage Tiering', saving: '8%', color: 'bg-blue-500', width: '8%' },
              ].map((bar, i) => (
                <div key={i} className="mb-4 last:mb-0">
                  <div className="flex justify-between text-sm mb-1.5">
                    <span className="font-medium text-slate-700">{bar.label}</span>
                    <span className="font-bold text-blue-600">{bar.saving} saved</span>
                  </div>
                  <div className="h-2.5 bg-blue-100 rounded-full overflow-hidden">
                    <div className={`h-full rounded-full ${bar.color}`} style={{ width: bar.width }} />
                  </div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 7 · Cloud Use Cases ──────────── */}
      <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-blue-600 uppercase tracking-wider mb-3">Use Cases</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Cloud Solutions for Every Need</h2>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {[
              { title: 'Web Application Hosting', desc: 'Scalable, secure hosting for web apps with auto-scaling, CDN, WAF, and managed databases.', metric: '99.99% uptime' },
              { title: 'Data Analytics & AI/ML', desc: 'Big data pipelines, data lakes, ML model training, and real-time analytics at petabyte scale.', metric: 'Petabyte-scale' },
              { title: 'Enterprise Application Hosting', desc: 'SAP, ERP, and legacy applications modernized and migrated to cloud-native architectures.', metric: '60% cost savings' },
            ].map((uc, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-8 hover:shadow-xl transition-all duration-300">
                <h3 className="font-bold text-lg mb-3">{uc.title}</h3>
                <p className="text-sm text-slate-500 leading-relaxed mb-6">{uc.desc}</p>
                <div className="pt-4 border-t border-slate-100 text-center">
                  <p className="text-xl font-extrabold text-blue-600">{uc.metric}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 8 · Cloud Security ────────────── */}
      <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="grid lg:grid-cols-2 gap-12 items-center">
            <div>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Cloud Security</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Security-First Cloud Architecture</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                We build security into every layer of your cloud environment — from identity and access to network segmentation to data encryption.
              </p>
              <div className="grid grid-cols-2 gap-3">
                {[
                  'Zero-Trust Networking',
                  'IAM & MFA Policies',
                  'VPC / VNet Segmentation',
                  'WAF & DDoS Protection',
                  'Encryption at Rest & Transit',
                  'CloudTrail / Activity Logs',
                  'Security Hub / Sentinel',
                  'CIS Benchmark Compliance',
                ].map((item, i) => (
                  <div key={i} className="flex items-center gap-2 text-sm text-slate-600">
                    <CheckCircle2 className="w-4 h-4 text-blue-500 flex-shrink-0" />
                    {item}
                  </div>
                ))}
              </div>
            </div>
            <div className="bg-gradient-to-br from-blue-50 to-blue-100/50 rounded-3xl border border-blue-100 p-8">
              <h3 className="font-bold text-lg mb-6">Compliance Certifications</h3>
              <div className="grid grid-cols-2 gap-4">
                {['SOC 2 Type II', 'ISO 27001', 'HIPAA', 'PCI-DSS', 'FedRAMP', 'GDPR', 'NIST 800-53', 'CIS Controls'].map((cert, i) => (
                  <div key={i} className="flex items-center gap-2 bg-white rounded-xl px-4 py-3 border border-blue-100">
                    <Shield className="w-4 h-4 text-blue-500" />
                    <span className="text-sm font-medium text-slate-700">{cert}</span>
                  </div>
                ))}
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 9 · Client Success ────────────── */}
      <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-blue-600 uppercase tracking-wider mb-3">Client Success</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Cloud Transformations That Delivered</h2>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {[
              { company: 'StreamCore Media', challenge: 'Video streaming platform needed to handle 1M concurrent users during live events.', solution: 'Multi-region AWS architecture with CloudFront CDN, Auto Scaling Groups, and ElastiCache.', result: '1M concurrent users with zero buffering', saving: '40% cost reduction vs on-prem' },
              { company: 'FinLedger Corp', challenge: 'Regulatory requirements demanded SOC 2 and PCI-DSS compliant cloud infrastructure.', solution: 'Azure landing zone with Azure Policy, Security Center, and encrypted managed databases.', result: 'Full compliance in 6 weeks', saving: '$180K/yr infrastructure savings' },
              { company: 'GreenEnergy IoT', challenge: 'Needed to process 10TB of sensor data daily from 50K IoT devices.', solution: 'GCP data pipeline with Pub/Sub, Dataflow, and BigQuery for real-time analytics.', result: 'Real-time insights from 50K devices', saving: '65% faster time-to-insight' },
            ].map((story, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-xl transition-all duration-300">
                <h3 className="font-bold mb-3">{story.company}</h3>
                <p className="text-sm text-slate-500 mb-4">{story.challenge}</p>
                <div className="bg-blue-50 rounded-xl p-3 mb-4">
                  <p className="text-xs font-bold text-blue-600 mb-1">Solution</p>
                  <p className="text-sm text-slate-600">{story.solution}</p>
                </div>
                <p className="text-sm font-bold text-blue-600 mb-1">{story.result}</p>
                <p className="text-xs text-blue-600 font-semibold">{story.saving}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 10 · CTA ─────────────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-br from-slate-950 via-blue-950 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-blue-500/10 border border-blue-500/20 rounded-full px-4 py-1.5 mb-6">
            <Cloud className="w-3.5 h-3.5 text-blue-400" />
            <span className="text-xs font-semibold text-blue-300 uppercase tracking-wider">Multi-Cloud Experts</span>
          </div>
          <h2 className="text-3xl lg:text-5xl font-extrabold text-white mb-6">
            Ready to Transform Your Cloud Strategy?
          </h2>
          <p className="text-lg text-slate-300 mb-10 max-w-2xl mx-auto">
            Get a free cloud assessment — including cost optimization report, architecture review, and migration roadmap.
          </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-blue-500 to-blue-600 hover:from-blue-400 hover:to-blue-500 text-white font-bold px-8 py-4 rounded-xl shadow-lg shadow-blue-500/25 hover:shadow-blue-400/40 transition-all duration-300 hover:scale-105">
              Free Cloud Assessment <ArrowRight className="w-4 h-4" />
            </Link>
            <Link href="/contact" className="inline-flex items-center gap-2 border border-white/20 hover:border-blue-400/40 text-white/80 hover:text-white font-semibold px-8 py-4 rounded-xl transition-all duration-300">
              Talk to a Cloud Architect
            </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>
  )
}
