export type CaseStudy = {
  slug: string;
  client: string;
  industry: string;
  service: string;
  problem: string;
  solution: string;
  timeline: string;
  results: { label: string; before: string; after: string }[];
  testimonial: { quote: string; author: string; role: string };
  excerpt: string;
  tags: string[];
};

export const CASE_STUDIES: CaseStudy[] = [
  {
    slug: "bloom-skincare-malware-recovery",
    client: "Bloom Skincare",
    industry: "E-commerce / Beauty",
    service: "Malware Removal & Hacked Site Recovery",
    excerpt:
      "WooCommerce store hit with redirect malware on Black Friday weekend. Fully cleaned and hardened in under 6 hours — zero data loss.",
    problem:
      "Bloom Skincare's WooCommerce store started redirecting visitors to a scam pharmacy site at 2am on the Friday before their biggest sale of the year. Google Safe Browsing flagged the domain within hours, ads were paused, and organic traffic collapsed. The team had no recent off-site backup.",
    solution:
      "We isolated the site behind a maintenance screen, took a forensic snapshot, then performed a file-level diff against a clean WordPress + WooCommerce baseline. We removed 412 injected backdoors across the theme, mu-plugins, and uploads directory, purged 3 rogue admin accounts, rotated all keys/salts, and hardened wp-config, file permissions, and the login surface. Finally we submitted a reconsideration request to Google and re-verified Search Console.",
    timeline: "5 hours 48 minutes (overnight emergency)",
    results: [
      { label: "Safe Browsing status", before: "Deceptive site", after: "Clean (within 14h)" },
      { label: "Malicious files", before: "412 infected", after: "0" },
      { label: "Black Friday revenue", before: "Projected loss", after: "112% of target" },
      { label: "Re-infection in 30 days", before: "—", after: "None" },
    ],
    testimonial: {
      quote:
        "Our store was hacked overnight. They had it cleaned, hardened and back online before our first European customer woke up. Genuinely a lifesaver.",
      author: "Priya Nair",
      role: "Founder, Bloom Skincare",
    },
    tags: ["WooCommerce", "Malware", "Emergency"],
  },
  {
    slug: "mehta-exports-speed-optimization",
    client: "Mehta Exports",
    industry: "B2B Manufacturing",
    service: "Speed Optimization & Core Web Vitals",
    excerpt:
      "Took a slow 41-score WordPress site to a consistent 96 PageSpeed — and doubled organic enquiries in 60 days.",
    problem:
      "Mehta Exports' lead-gen site was bloated by a multi-purpose theme, 38 active plugins, and 4MB hero images. Mobile PageSpeed was 41, LCP was 6.8s, and Google had moved the site to the 'poor' Core Web Vitals bucket. Organic enquiries had dropped 34% YoY.",
    solution:
      "We migrated off the page-builder theme to a lightweight block-based child theme, audited and removed 19 plugins, replaced the slider with a static LCP image preloaded via fetchpriority, and converted all images to AVIF with responsive srcsets. We added critical CSS, deferred non-essential JS, enabled full-page caching via the host, and tuned the database (autoload trimmed from 4.1MB to 380KB).",
    timeline: "9 working days",
    results: [
      { label: "Mobile PageSpeed", before: "41", after: "96" },
      { label: "LCP", before: "6.8s", after: "1.4s" },
      { label: "CWV status", before: "Poor", after: "Good (all URLs)" },
      { label: "Organic enquiries (60d)", before: "Baseline", after: "+108%" },
    ],
    testimonial: {
      quote:
        "PageSpeed went from 41 to 96 and enquiries from organic traffic doubled in two months. Best WordPress investment we've made.",
      author: "Rahul Mehta",
      role: "CEO, Mehta Exports",
    },
    tags: ["Speed", "Core Web Vitals", "SEO"],
  },
  {
    slug: "fortify-academy-white-screen-fix",
    client: "Fortify Academy",
    industry: "Online Education",
    service: "Critical Error / White Screen Recovery",
    excerpt:
      "Course platform went down minutes before a paid launch webinar. Diagnosed and back online in 38 minutes.",
    problem:
      "A routine plugin update triggered a fatal PHP error 22 minutes before Fortify Academy's flagship course launch webinar with 1,800 registered attendees. The site was throwing a white screen, the admin was inaccessible, and the team's checkout pages were offline.",
    solution:
      "We connected via SFTP, identified a conflict between an outdated LMS plugin and PHP 8.2's stricter type handling, restored the previous plugin version, patched the affected function, and re-enabled the site. We also set up a one-click staging environment so future plugin updates can be tested before going live.",
    timeline: "38 minutes from first ping to live",
    results: [
      { label: "Downtime", before: "Total outage", after: "38 minutes" },
      { label: "Webinar attendance", before: "At risk", after: "1,612 live attendees" },
      { label: "Launch revenue", before: "Projected zero", after: "$84,000 in 48h" },
      { label: "Future update safety", before: "Production only", after: "Staging workflow" },
    ],
    testimonial: {
      quote:
        "White screen of death on my biggest launch day. Fixed in under 40 minutes and communication was perfect throughout. We now keep them on retainer.",
      author: "Sara Lopez",
      role: "Founder, Fortify Academy",
    },
    tags: ["White Screen", "Emergency", "LMS"],
  },
  {
    slug: "harbor-collective-redesign-fixes",
    client: "Harbor Collective",
    industry: "Agency / Creative",
    service: "Design Fixes & Mobile Responsive",
    excerpt:
      "Rescued a half-finished agency rebuild — fixed broken layouts on 14 templates and shipped a fully responsive site in 6 days.",
    problem:
      "Harbor Collective inherited a half-finished site from a previous developer: misaligned grids on every other template, hero images cropping people's faces on mobile, a navigation drawer that wouldn't close on iOS, and a contact form silently dropping submissions.",
    solution:
      "We rebuilt the layout system using a consistent 12-column grid with clamp-based fluid spacing, rewrote the mobile nav with proper focus trapping, switched hero images to object-position-aware art direction, and rewired the contact form through a reliable SMTP provider with delivery logging. Every template was QA'd on 9 viewport sizes.",
    timeline: "6 working days",
    results: [
      { label: "Templates fixed", before: "14 broken", after: "14 audited & shipped" },
      { label: "Mobile bounce rate", before: "71%", after: "39%" },
      { label: "Contact form delivery", before: "~60% lost", after: "100% logged" },
      { label: "Lighthouse a11y", before: "72", after: "98" },
    ],
    testimonial: {
      quote:
        "Honest pricing, no upsells, fast turnaround. They finished what another team couldn't and the result is genuinely better than our brief.",
      author: "Jenna Park",
      role: "Creative Director, Harbor Collective",
    },
    tags: ["Design", "Mobile", "Accessibility"],
  },
];
