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 { Shield, ArrowRight, CheckCircle2, TrendingUp, ShieldCheck, Zap, AlertTriangle, Target, Globe, Layers, Lock, Server, Database, Code, Users, Clock, Activity, BarChart3, ChevronRight, TrendingDown, Ban, Eye } from 'lucide-react'

export const metadata = {
  title: 'Penetration Testing - Drish Infra',
  description: 'Expert penetration testing for networks, applications, cloud, and APIs. Simulated attacks to find real vulnerabilities before hackers do.',
}

export default function PenetrationTestingPage() {
  return (
    <main className="min-h-screen bg-[#f8fafc] text-slate-900">
      <Header />

      {/* ─── SECTION 1 · Hero ──────────────────────────── */}
      <section className="relative overflow-hidden bg-gradient-to-br from-slate-950 via-blue-950 to-neutral-950 text-white pt-14 pb-20 lg:pt-16 lg:pb-28">
        <div className="absolute inset-0 opacity-[0.05]" style={{ backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(148,163,184,0.3) 20px, rgba(148,163,184,0.3) 21px)' }} />
        <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:max-w-none">
              <div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-slate-400 to-blue-500 flex items-center justify-center mx-auto mb-6 shadow-lg shadow-slate-500/30"><Shield className="w-8 h-8 text-white" /></div>
              <h1 className="text-4xl lg:text-5xl xl:text-6xl font-extrabold leading-[1.1] mb-6">Penetration Testing <span className="bg-gradient-to-r from-slate-300 to-blue-400 bg-clip-text text-transparent">That Thinks Like an Attacker</span></h1>
              <p className="text-lg text-slate-300 leading-relaxed mb-8 max-w-2xl mx-auto">Our certified ethical hackers simulate real-world attacks on your infrastructure, applications, and people — finding the vulnerabilities that automated scanners miss.</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 text-sm px-6 py-3 rounded-xl shadow-lg shadow-slate-500/25 transition-all duration-300 hover:scale-105">Schedule Pen Test <ArrowRight className="w-4 h-4" /></Link>
              </div>
            </div>
            <div className="block order-first lg:order-last">
              <ServiceHeroImage label="Penetration Testing" stats={[{ value: '200+', label: 'Tests Done' }, { value: '95%', label: 'Findings Rate' }, { value: 'OWASP', label: 'Top 10 Covered' }]}>
                <div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-slate-500 to-blue-600 flex items-center justify-center shadow-lg shadow-blue-500/20">
                  <Shield className="w-8 h-8 text-white" />
                </div>
              </ServiceHeroImage>
            </div>
          </div>
        </div>
      </section>

      {/* ─── SECTION 2 · Stats Bar ─────────────────────── */}
      <ScrollReveal>
      <section className="py-16 bg-gradient-to-r from-slate-950 via-blue-950 to-neutral-950">
        <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: '1,000+', label: 'Pen Tests Completed', sub: 'Across all industries' },
              { number: 'OSCP/OSCE', label: 'Certified Testers', sub: 'Industry-leading certifications' },
              { number: '95%', label: 'Client Retention', sub: 'Year-over-year' },
              { number: '<5%', label: 'False Positive Rate', sub: 'Every finding is validated' },
            ].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 3 · Why Pen Testing Matters — Split Image ─── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid lg:grid-cols-2 gap-16 items-center">
            <div className="relative">
              <div className="aspect-[4/3] rounded-3xl overflow-hidden bg-gradient-to-br from-slate-100 to-blue-50 border border-slate-100">
                <img src="/placeholder.jpg" alt="Penetration Testing" className="w-full h-full object-cover" />
              </div>
              <div className="absolute -bottom-6 -right-6 bg-white rounded-2xl border border-slate-200 shadow-xl p-5 max-w-[220px]">
                <div className="flex items-center gap-2 mb-2">
                  <div className="w-2 h-2 rounded-full bg-red-500 animate-pulse" />
                  <span className="text-xs font-bold text-red-600 uppercase">Critical Finding</span>
                </div>
                <p className="text-2xl font-extrabold text-slate-900">3 Vulns</p>
                <p className="text-xs text-slate-500">Critical vulns found this week</p>
              </div>
            </div>
            <div>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Why It Matters</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Why Penetration Testing Matters</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                The average organization faces <strong className="text-slate-900">thousands of vulnerabilities</strong> at any given time. Without active exploitation testing, you never know which ones an attacker can actually use. Pen testing bridges the gap between scanning and real security.
              </p>
              <div className="space-y-4">
                {[
                  { stat: '95% of apps', label: 'Have at least one unpatched vulnerability exploitable by attackers', icon: AlertTriangle },
                  { stat: '$4.45M', label: 'Average cost of a single data breach in 2023', icon: TrendingDown },
                  { stat: '73% of orgs', label: 'Failed at least one penetration test in the last 12 months', icon: Ban },
                ].map((item, i) => {
                  const Icon = item.icon
                  return (
                    <div key={i} className="flex items-start gap-4 bg-slate-50 rounded-xl p-4">
                      <div className="w-10 h-10 rounded-lg bg-blue-50 flex items-center justify-center flex-shrink-0">
                        <Icon className="w-5 h-5 text-blue-600" />
                      </div>
                      <div>
                        <p className="font-bold text-slate-900">{item.stat}</p>
                        <p className="text-sm text-slate-500">{item.label}</p>
                      </div>
                    </div>
                  )
                })}
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 4 · Service Grid ──────────────────── */}
      <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-16">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Testing Services</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Our Penetration Testing Services</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">Full-spectrum adversary simulation covering networks, applications, cloud, APIs, and human factors.</p>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {[
              { title: 'Network Pen Test', desc: 'Internal and external network testing — firewalls, routers, switches, VPNs, and wireless infrastructure.', icon: Globe, highlight: 'Full Scope' },
              { title: 'App Pen Test', desc: 'Web and mobile application testing for OWASP Top 10, business logic flaws, and injection vulnerabilities.', icon: Code, highlight: 'OWASP Top 10' },
              { title: 'Cloud Pen Test', desc: 'AWS, Azure, GCP security testing — IAM misconfigs, storage exposure, compute vulnerabilities, and network segmentation.', icon: Server, highlight: 'Multi-Cloud' },
              { title: 'Social Engineering', desc: 'Phishing campaigns, pretexting, vishing, and physical security testing to evaluate human resilience.', icon: Users, highlight: 'Real-World' },
              { title: 'API Pen Test', desc: 'REST, GraphQL, and SOAP API security testing including authentication bypass, injection, and data exposure.', icon: Layers, highlight: 'GraphQL' },
              { title: 'Red Team', desc: 'Full-scope adversary simulation with zero-knowledge of the defensive team — real-world attack chains.', icon: Target, highlight: 'Advanced' },
            ].map((item, i) => {
              const Icon = item.icon
              return (
                <div key={i} className="group bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-xl hover:border-blue-200 transition-all duration-300 hover:-translate-y-1">
                  <div className="flex items-center justify-between mb-4">
                    <div className="w-11 h-11 rounded-xl bg-blue-50 flex items-center justify-center group-hover:bg-blue-100 transition-colors">
                      <Icon className="w-5 h-5 text-blue-600" />
                    </div>
                    <span className="text-[10px] font-bold text-blue-600 bg-blue-50 px-2.5 py-1 rounded-full">{item.highlight}</span>
                  </div>
                  <h3 className="font-bold text-lg mb-2">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
                  <div className="mt-4 pt-4 border-t border-slate-100">
                    <Link href="/contact" className="text-sm font-semibold text-blue-600 hover:text-blue-700 flex items-center gap-1 transition-colors">
                      Learn more <ChevronRight className="w-3.5 h-3.5" />
                    </Link>
                  </div>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 5 · Comparison Table ──────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-16">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Comparison</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">With vs Without Pen Testing</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">See what organizations face without active penetration testing versus those with continuous adversary simulation.</p>
          </div>
          <div className="bg-white rounded-3xl border border-slate-200 overflow-hidden shadow-xl">
            <div className="grid grid-cols-3 bg-slate-50 border-b border-slate-200">
              <div className="p-5 font-bold text-sm text-slate-600">Metric</div>
              <div className="p-5 font-bold text-sm text-center text-red-600 bg-red-50/50">Without Pen Testing</div>
              <div className="p-5 font-bold text-sm text-center text-blue-600 bg-blue-50/50">With Drish Pen Testing</div>
            </div>
            {[
              { metric: 'Vulnerability Discovery', without: 'Scanner-only (surface level)', with: 'Deep exploitation + logic flaws' },
              { metric: 'Attack Simulation', without: 'Theoretical / assumed', with: 'Real-world attack chains' },
              { metric: 'Compliance', without: 'Check-the-box audits', with: 'Continuous validation' },
              { metric: 'Risk Prioritization', without: 'CVSS scores only', with: 'Exploitability + business impact' },
              { metric: 'Business Logic Flaws', without: 'Never discovered', with: 'Actively hunted & exploited' },
              { metric: 'Security Posture', without: 'Unknown weaknesses', with: 'Validated with evidence' },
              { metric: 'False Confidence', without: 'Scans pass = secure?', with: 'Verified secure or remediated' },
              { metric: 'Breach Prevention', without: 'Reactive — after breach', with: 'Proactive — before attackers' },
            ].map((row, i) => (
              <div key={i} className={`grid grid-cols-3 border-b border-slate-100 last:border-0 ${i % 2 === 0 ? 'bg-white' : 'bg-slate-50/50'}`}>
                <div className="p-5 font-semibold text-sm text-slate-700">{row.metric}</div>
                <div className="p-5 text-sm text-center text-red-500 font-medium">{row.without}</div>
                <div className="p-5 text-sm text-center text-blue-600 font-bold">{row.with}</div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 6 · Market Growth + Stats ─────────── */}
      <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-16 items-center">
            <div>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Market Insights</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">The Pen Testing Market Is Surging</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                The global penetration testing market is projected to reach <strong className="text-slate-900">$3.2 billion by 2027</strong>, growing at 15.7% CAGR. Organizations are shifting from annual pen tests to continuous adversary simulation for real-time security validation.
              </p>
              <div className="space-y-4">
                {[
                  { label: 'Pen Test Adoption (Fortune 500)', value: '82%', width: '82%' },
                  { label: 'Cloud Pen Testing Growth', value: '34%', width: '34%' },
                  { label: 'Red Team Engagement Growth', value: '47%', width: '47%' },
                  { label: 'Compliance-Driven Testing', value: '68%', width: '68%' },
                ].map((bar, i) => (
                  <div key={i}>
                    <div className="flex justify-between mb-1">
                      <span className="text-sm font-semibold text-slate-700">{bar.label}</span>
                      <span className="text-sm font-bold text-blue-600">{bar.value}</span>
                    </div>
                    <div className="h-2.5 bg-slate-100 rounded-full overflow-hidden">
                      <div className="h-full bg-gradient-to-r from-blue-500 to-blue-600 rounded-full" style={{ width: bar.width }} />
                    </div>
                  </div>
                ))}
              </div>
            </div>
            <div className="grid grid-cols-2 gap-4">
              <div className="bg-white rounded-2xl border border-slate-200 p-6 text-center hover:shadow-lg transition-all duration-300">
                <div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center mx-auto mb-3"><TrendingUp className="w-6 h-6 text-blue-600" /></div>
                <p className="text-3xl font-extrabold text-slate-900 mb-1">$3.2B</p>
                <p className="text-xs text-slate-500">Pen Test Market by 2027</p>
              </div>
              <div className="bg-white rounded-2xl border border-slate-200 p-6 text-center hover:shadow-lg transition-all duration-300">
                <div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center mx-auto mb-3"><Activity className="w-6 h-6 text-blue-600" /></div>
                <p className="text-3xl font-extrabold text-slate-900 mb-1">15.7%</p>
                <p className="text-xs text-slate-500">Annual Growth Rate</p>
              </div>
              <div className="bg-white rounded-2xl border border-slate-200 p-6 text-center hover:shadow-lg transition-all duration-300">
                <div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center mx-auto mb-3"><Target className="w-6 h-6 text-blue-600" /></div>
                <p className="text-3xl font-extrabold text-slate-900 mb-1">1,000+</p>
                <p className="text-xs text-slate-500">Tests Completed</p>
              </div>
              <div className="bg-white rounded-2xl border border-slate-200 p-6 text-center hover:shadow-lg transition-all duration-300">
                <div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center mx-auto mb-3"><CheckCircle2 className="w-6 h-6 text-blue-600" /></div>
                <p className="text-3xl font-extrabold text-slate-900 mb-1">95%</p>
                <p className="text-xs text-slate-500">Testing Accuracy</p>
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 7 · Engagement Tiers ──────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-16">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Engagement Tiers</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Choose Your Testing Level</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">From one-time assessments to full adversary simulation — pick the engagement tier that matches your security maturity.</p>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {[
              {
                tier: 'One-Time Assessment',
                desc: 'Annual or quarterly penetration test with full report and retest.',
                price: 'From $15K',
                popular: false,
                features: ['Network + application scope', 'Full exploit evidence', 'Detailed remediation guide', 'Executive summary', 'One retest included'],
              },
              {
                tier: 'Continuous Testing',
                desc: 'Monthly pen tests with continuous vulnerability discovery and validation.',
                price: 'From $8K/mo',
                popular: true,
                features: ['Everything in One-Time', 'Monthly testing cycles', 'Continuous attack surface', 'Real-time dashboard', 'Dedicated tester team'],
              },
              {
                tier: 'Red Team Engagement',
                desc: 'Multi-week adversary simulation with zero-knowledge defense team.',
                price: 'From $50K',
                popular: false,
                features: ['Everything in Continuous', 'Full-scope adversary sim', 'Physical + social engineering', 'Defense team evaluation', 'Purple team debrief'],
              },
            ].map((t, i) => (
              <div key={i} className={`relative rounded-2xl border-2 p-8 transition-all duration-300 hover:-translate-y-1 ${t.popular ? 'border-blue-500 bg-gradient-to-b from-blue-50/50 to-white shadow-xl shadow-blue-500/10' : 'border-slate-200 bg-white hover:shadow-xl'}`}>
                {t.popular && <div className="absolute -top-3.5 left-1/2 -translate-x-1/2 bg-gradient-to-r from-blue-500 to-blue-600 text-white text-[10px] font-bold uppercase tracking-wider px-4 py-1 rounded-full whitespace-nowrap">Most Popular</div>}
                <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-2">{t.tier}</p>
                <p className="text-2xl font-extrabold text-slate-900 mb-1">{t.price}</p>
                <p className="text-sm text-slate-500 mb-4">{t.desc}</p>
                <ul className="space-y-2.5 mb-8">
                  {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-blue-500 mt-0.5 flex-shrink-0" />{f}
                    </li>
                  ))}
                </ul>
                <Link href="/contact" className={`block text-center font-bold text-sm py-3 rounded-xl transition-all duration-300 ${t.popular ? 'bg-gradient-to-r from-blue-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 8 · Client Results ────────────────── */}
      <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-16">
            <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">Real Results from Our Pen Tests</h2>
          </div>
          <div className="grid md:grid-cols-3 gap-6">
            {[
              {
                company: 'FinServe Corp',
                industry: 'Banking',
                result: 'Found critical RCE in payment API before launch',
                metric: 'Critical Vulnerability Found',
                roi: '$2.1M breach averted',
                detail: 'Pen test identified a remote code execution vulnerability in their payment processing API that could have allowed complete system compromise and direct financial theft.',
              },
              {
                company: 'HealthTech Inc.',
                industry: 'Healthcare',
                result: 'Full red team engagement uncovered supply chain risk',
                metric: 'Supply Chain Risk Mitigated',
                roi: '$800K compliance saved',
                detail: 'Red team operation revealed that a third-party vendor had unmonitored access to production systems with no MFA enabled — a direct path to PHI exposure.',
              },
              {
                company: 'CloudRetail Co',
                industry: 'E-Commerce',
                result: 'Discovered 12 critical API vulnerabilities in checkout flow',
                metric: '12 Critical Vulns Found',
                roi: '$1.5M fraud prevented',
                detail: 'Deep API penetration testing uncovered authentication bypass, IDOR vulnerabilities, and business logic flaws in the checkout flow that automated scanners completely missed.',
              },
            ].map((story, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-8 hover:shadow-xl transition-all duration-300">
                <div className="flex items-center justify-between mb-4">
                  <h3 className="font-bold text-lg">{story.company}</h3>
                  <span className="text-[10px] font-bold text-blue-600 bg-blue-50 px-2.5 py-1 rounded-full">{story.industry}</span>
                </div>
                <p className="text-sm font-semibold text-blue-600 mb-2">{story.result}</p>
                <p className="text-sm text-slate-500 mb-4 leading-relaxed">{story.detail}</p>
                <div className="flex items-center justify-between pt-4 border-t border-slate-100">
                  <p className="text-sm font-extrabold text-blue-600">{story.metric}</p>
                  <span className="text-xs font-bold text-green-600 bg-green-50 px-2.5 py-1 rounded-full">{story.roi}</span>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 9 · CTA ───────────────────────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16 bg-gradient-to-br from-slate-950 via-blue-950 to-neutral-950">
        <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">
            <Shield className="w-3.5 h-3.5 text-slate-400" />
            <span className="text-xs font-semibold text-slate-300 uppercase tracking-wider">Certified Ethical Hackers</span>
          </div>
          <h2 className="text-3xl lg:text-5xl font-extrabold text-white mb-6">
            Test Your Defenses Before Attackers Do
          </h2>
          <p className="text-lg text-slate-300 mb-10 max-w-2xl mx-auto">
            Schedule a penetration test and discover what real attackers can find — with detailed remediation guidance to fix every vulnerability.
          </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-blue-400/40 transition-all duration-300 hover:scale-105">
              Schedule Pen Test <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 a Tester
            </Link>
          </div>
          <p className="text-xs text-slate-400 mt-8">No commitment · Scoping call in 24h · NDA available</p>
        </div>
      </section>
      </ScrollReveal>

      <Footer />
    </main>
  )
}
