<?php
// Enhanced security headers
// Session for CSRF token
ini_set('session.cookie_samesite', 'Lax');
ini_set('session.cookie_httponly', '1');
ini_set('session.cookie_secure', '1');
session_start();
$nonce = base64_encode(random_bytes(16));

// Allow private caching with revalidation (CSRF token requires session)
header("Cache-Control: public, max-age=3600, stale-while-revalidate=86400");
if (!isset($_SESSION['csrf_token'])) {
    $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
header('Strict-Transport-Security: max-age=31536000; includeSubDomains');
header("Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-{$nonce}' https://cdnjs.cloudflare.com https://www.googletagmanager.com https://www.google-analytics.com https://www.clarity.ms https://www.google.com https://www.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.google-analytics.com; connect-src 'self' https://www.google-analytics.com https://analytics.google.com https://region1.google-analytics.com https://www.google.com; frame-src https://www.google.com;");

// SEO and performance optimizations
$page_title = "UK AI Automation Consultancy | Legal & Consulting";
$page_description = "Specialist UK AI automation consultancy for legal & consulting firms. Cut manual data work by 80% with bespoke AI workflows. Book a free call today.";
$canonical_url = "https://ukaiautomation.co.uk/";
$keywords = "AI automation consulting UK, AI automation, document data extraction, legal AI automation, research automation, data pipeline consulting, AI agents UK";
$author = "UK AI Automation";
$og_image = "https://ukaiautomation.co.uk/assets/images/ukaiautomation-og.png";
$twitter_card_image = "https://ukaiautomation.co.uk/assets/images/ukaiautomation-og.png";
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($page_title); ?></title>
    <meta name="description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta name="keywords" content="<?php echo htmlspecialchars($keywords); ?>">
    <meta name="author" content="<?php echo htmlspecialchars($author); ?>">
    <meta name="google-site-verification" content="la6e0_PDdHFkUn8NbHI-cMofozMcxtgrf73zwqKz6Ec" />
    <meta name="robots" content="index, follow">
    <meta name="googlebot" content="index, follow">
    <meta name="bingbot" content="index, follow">
    <link rel="canonical" href="<?php echo htmlspecialchars($canonical_url); ?>">
    
    <!-- Open Graph / Social Media -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta property="og:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta property="og:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta property="og:image" content="<?php echo htmlspecialchars($og_image); ?>">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="630">
    <meta property="og:site_name" content="UK AI Automation">
    <meta property="og:locale" content="en_GB">
    
    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@ukaiautomation">
    <meta name="twitter:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta name="twitter:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta name="twitter:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta name="twitter:image" content="<?php echo htmlspecialchars($twitter_card_image); ?>">
    
    <!-- Favicon and App Icons -->
    <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg">
    <link rel="icon" type="image/svg+xml" sizes="16x16" href="/assets/images/favicon-16x16.svg">
    <link rel="icon" type="image/svg+xml" sizes="32x32" href="/assets/images/favicon-32x32.svg">
    <link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-touch-icon.svg">
    <link rel="manifest" href="/manifest.json">
    <meta name="theme-color" content="#7c3aed">
    <meta name="msapplication-TileColor" content="#6d28d9">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="apple-mobile-web-app-title" content="UK AI Automation">
    
    <!-- Google Analytics 4 (GA4) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-GK41JM8DK0"></script>
    <script nonce="<?php echo $nonce; ?>">
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-GK41JM8DK0', {
            page_title: document.title,
            page_location: window.location.href
        });
    </script>
    
    <!-- Google Tag Manager (Optional - if you use GTM) -->
    <!-- TODO: Replace GTM-XXXXXXX with your Google Tag Manager container ID -->
    <!-- 
    <script nonce="<?php echo $nonce; ?>">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
    -->
    
    <!-- Microsoft Clarity (Optional) -->
    <!-- TODO: Replace CLARITY_PROJECT_ID with your Clarity project ID -->
    <!--
    <script type="text/javascript" nonce="<?php echo $nonce; ?>">
        (function(c,l,a,r,i,t,y){
            c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
            t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
            y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
        })(window, document, "clarity", "script", "CLARITY_PROJECT_ID");
    </script>
    -->
    
    <!-- reCAPTCHA v3 -->
    <?php require_once '.recaptcha-config.php'; ?>
    <script src="https://www.google.com/recaptcha/api.js?render=<?php echo RECAPTCHA_SITE_KEY; ?>"></script>
    <script nonce="<?php echo $nonce; ?>">window.recaptchaSiteKey = '<?php echo RECAPTCHA_SITE_KEY; ?>';</script>
    
    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Lato:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
    
    <!-- Resource Preloading for Performance -->
    <link rel="preload" href="/assets/css/main.min.css?v=1.1.4" as="style">
    <link rel="preload" href="/assets/images/ukaiautomation-logo.svg" as="image">
    <link rel="preload" href="/assets/js/main.min.js?v=1.1.1" as="script">
    
    <!-- Critical CSS for Above-the-Fold -->
    <style nonce="<?php echo $nonce; ?>">
    *{margin:0;padding:0;box-sizing:border-box}
    body{font-family:'Roboto Slab','Lato',sans-serif;line-height:1.6;color:#444;background:#fff}
    .container{max-width:1200px;margin:0 auto;padding:0 20px}
    .navbar{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,0.1);position:fixed;top:0;width:100%;z-index:1000;transition:all 0.3s ease}
    .nav-container{display:flex;justify-content:space-between;align-items:center;height:70px}
    .nav-logo img{height:40px;width:auto}
    .nav-menu{display:flex;align-items:center;gap:30px}
    .nav-link{text-decoration:none;color:#1a1a1a;font-weight:500;transition:color 0.3s ease}
    .hero{background:linear-gradient(135deg,#7c3aed 0%,#6d28d9 100%);color:white;min-height:100vh;display:flex;align-items:center;position:relative;overflow:hidden}
    .hero-container{position:relative;z-index:2;width:100%}
    .hero-content{text-align:center;max-width:800px;margin:0 auto}
    .hero-title{font-size:3.5rem;font-weight:700;margin-bottom:24px;line-height:1.2}
    .hero-eyebrow{font-size:0.85rem;font-weight:600;text-transform:uppercase;letter-spacing:0.12em;opacity:0.75;margin-bottom:16px}
    .hero-subtitle{font-size:1.3rem;margin-bottom:40px;opacity:0.95;line-height:1.5}
    .btn{display:inline-flex;align-items:center;justify-content:center;padding:14px 28px;border:none;border-radius:8px;text-decoration:none;font-weight:500;font-size:16px;cursor:pointer;transition:all 0.3s ease;box-shadow:0 2px 8px rgba(0,0,0,0.1);min-height:48px}
    .btn-primary{background:#4f46e5;color:white!important}
    .btn-secondary{background:white;color:#7c3aed!important;border:2px solid #7c3aed}
    .hero-buttons{display:flex;gap:20px;justify-content:center;flex-wrap:wrap}
    </style>
    
    <!-- Styles -->
    <link rel="stylesheet" id="main-css" href="/assets/css/main.min.css?v=1.1.4" media="print">
    <noscript><link rel="stylesheet" href="/assets/css/main.min.css?v=1.1.4"></noscript>
    <script nonce="<?php echo $nonce; ?>">(function(){var l=document.getElementById('main-css');if(l.sheet){l.media='all';}else{l.addEventListener('load',function(){this.media='all';});}})();</script>
    
    <!-- Enhanced Local SEO Schema -->
    <script type="application/ld+json" nonce="<?php echo $nonce; ?>">
    {
        "@context": "https://schema.org",
        "@type": "Organization",
        "@id": "https://ukaiautomation.co.uk#organization",
        "name": "UK AI Automation",
        "legalName": "UK AI Automation Ltd",
        "url": "https://ukaiautomation.co.uk",
        "logo": {
            "@type": "ImageObject",
            "url": "https://ukaiautomation.co.uk/assets/images/ukaiautomation-logo.svg",
            "width": 300,
            "height": 100
        },
        "image": "https://ukaiautomation.co.uk/assets/images/ukaiautomation-logo.svg",
        "description": "UK-based AI automation consultant. We help legal and consultancy firms automate document extraction, research, and data workflows.",
        "address": {
            "@type": "PostalAddress",
            "addressLocality": "North Walsham",
            "addressRegion": "Norfolk",
            "addressCountry": "GB"
        },
        "contactPoint": [
            {
                "@type": "ContactPoint",
                
                "contactType": "Customer Service",
                "areaServed": "GB",
                "availableLanguage": "English",
                "hoursAvailable": {
                    "@type": "OpeningHoursSpecification",
                    "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
                    "opens": "09:00",
                    "closes": "17:30"
                }
            },
            {
                "@type": "ContactPoint",
                "email": "info@ukaiautomation.co.uk",
                "contactType": "Business Enquiries",
                "areaServed": "GB"
            }
        ],
        "sameAs": [
            "https://www.linkedin.com/company/ukaiautomation",
            "https://x.com/ukaiautomation"
        ],
        "founder": {
            "@type": "Person",
            "name": "UK AI Automation"
        },
        "foundingDate": "2013",
        "numberOfEmployees": {
            "@type": "QuantitativeValue",
            "value": "15"
        },
        "areaServed": [
            {
                "@type": "Country",
                "name": "United Kingdom"
            },
            {
                "@type": "City",
                "name": "London"
            },
            {
                "@type": "City",
                "name": "Manchester"
            },
            {
                "@type": "City",
                "name": "Birmingham"
            },
            {
                "@type": "City",
                "name": "Edinburgh"
            },
            {
                "@type": "City",
                "name": "Cardiff"
            }
        ],
        "serviceArea": {
            "@type": "GeoCircle",
            "geoMidpoint": {
                "@type": "GeoCoordinates",
                "latitude": 52.3555,
                "longitude": -1.1743
            },
            "geoRadius": "500000"
        },
        "hasOfferCatalog": {
            "@type": "OfferCatalog",
            "name": "Data Services",
            "itemListElement": [
                {
                    "@type": "Offer",
                    "itemOffered": {
                        "@type": "Service",
                        "name": "AI Automation Services",
                        "description": "Professional AI Automation and data extraction services"
                    }
                },
                {
                    "@type": "Offer",
                    "itemOffered": {
                        "@type": "Service",
                        "name": "Business Intelligence",
                        "description": "Data analytics and business intelligence solutions"
                    }
                },
                {
                    "@type": "Offer",
                    "itemOffered": {
                        "@type": "Service",
                        "name": "Data Processing",
                        "description": "Data cleaning, transformation, and processing services"
                    }
                }
            ]
        },
        "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "4.9",
            "reviewCount": "127",
            "bestRating": "5",
            "worstRating": "1"
        },
        "review": [
            {
                "@type": "Review",
                "reviewRating": {
                    "@type": "Rating",
                    "ratingValue": "5",
                    "bestRating": "5"
                },
                "author": {
                    "@type": "Person",
                    "name": "Sarah Thompson"
                },
                "reviewBody": "UK AI Automation transformed our pricing strategy completely. We now have real-time visibility into competitor pricing and can react instantly to market changes."
            }
        ]
    }
    </script>
    
    <!-- WebSite Schema for Search Box -->
    <script type="application/ld+json" nonce="<?php echo $nonce; ?>">
    {
        "@context": "https://schema.org",
        "@type": "WebSite",
        "@id": "https://ukaiautomation.co.uk#website",
        "url": "https://ukaiautomation.co.uk",
        "name": "UK AI Automation",
        "description": "Professional AI Automation and data analytics services",
        "publisher": {
            "@id": "https://ukaiautomation.co.uk#organization"
        },
        "potentialAction": {
            "@type": "SearchAction",
            "target": {
                "@type": "EntryPoint",
                "urlTemplate": "https://ukaiautomation.co.uk/search?q={search_term_string}"
            },
            "query-input": "required name=search_term_string"
        }
    }
    </script>
    
    <!-- Service Schema -->
    <script type="application/ld+json" nonce="<?php echo $nonce; ?>">
    {
        "@context": "https://schema.org",
        "@type": "Service",
        "name": "AI Automation Services UK",
        "description": "Comprehensive AI Automation, data extraction, and business intelligence services for UK businesses",
        "provider": {
            "@id": "https://ukaiautomation.co.uk#organization"
        },
        "areaServed": {
            "@type": "Country",
            "name": "United Kingdom"
        },
        "hasOfferCatalog": {
            "@type": "OfferCatalog",
            "name": "Data Services Portfolio",
            "itemListElement": [
                {
                    "@type": "Offer",
                    "itemOffered": {
                        "@type": "Service",
                        "name": "AI Automation",
                        "description": "Automated data extraction from websites"
                    },
                    "priceRange": "£500-£50000"
                },
                {
                    "@type": "Offer",
                    "itemOffered": {
                        "@type": "Service",
                        "name": "Business Intelligence",
                        "description": "Data analytics and reporting solutions"
                    },
                    "priceRange": "£1000-£25000"
                }
            ]
        }
    }
    </script>
    
    <!-- Breadcrumb Schema -->
    <script type="application/ld+json" nonce="<?php echo $nonce; ?>">
    {
        "@context": "https://schema.org",
        "@type": "BreadcrumbList",
        "itemListElement": [
            {
                "@type": "ListItem",
                "position": 1,
                "name": "Home",
                "item": "https://ukaiautomation.co.uk/"
            }
        ]
    }
    </script>

    <!-- WebPage Schema -->
    <script type="application/ld+json" nonce="<?php echo $nonce; ?>">
    {
        "@context": "https://schema.org",
        "@type": "WebPage",
        "@id": "https://ukaiautomation.co.uk/#webpage",
        "url": "https://ukaiautomation.co.uk/",
        "name": "AI Automation Consulting UK | Legal & Consultancy",
        "description": "Leading UK AI Automation and data analytics provider. Expert data extraction, business intelligence, and GDPR-compliant solutions. Trusted by 50+ businesses.",
        "isPartOf": {
            "@id": "https://ukaiautomation.co.uk#website"
        },
        "about": {
            "@id": "https://ukaiautomation.co.uk#organization"
        },
        "primaryImageOfPage": {
            "@type": "ImageObject",
            "url": "https://ukaiautomation.co.uk/assets/images/ukaiautomation-logo.svg"
        },
        "datePublished": "2018-01-01",
        "dateModified": "2026-03-19",
        "inLanguage": "en-GB",
        "potentialAction": {
            "@type": "ReadAction",
            "target": "https://ukaiautomation.co.uk/"
        }
    }
    </script>

</head>
<body>
    <!-- Skip to content link for accessibility -->
    
    <!-- Google Tag Manager (noscript) -->
    <!-- TODO: Replace GTM-XXXXXXX with your Google Tag Manager container ID -->
    <!-- 
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    -->
    <!-- Navigation -->
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/includes/nav.php"); ?>

    <!-- Hero Section -->
    <main id="main-content">
    <section id="home" class="hero">
        <div class="hero-container">
            <div class="hero-content">
                <p class="hero-eyebrow">Your team shouldn't be doing this manually.</p>
                <h1 class="hero-title">AI Automation for UK Law Firms &amp; Consultancies</h1>
                <p class="hero-subtitle" id="hero-subtitle">We automate the manual document and research work that costs your team hours every week. Fixed-price projects delivered in 2–4 weeks.</p>
                <div class="hero-buttons">
                    <a href="/quote" class="btn btn-primary">Get a Free Quote</a>
                    <a href="/case-studies" class="btn btn-secondary">See Use Cases</a>
                </div>
                <div class="hero-stats">
                    <div class="stat">
                        <span class="stat-number">10+</span>
                        <span class="stat-label">Years Automation Experience</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number">20-40</span>
                        <span class="stat-label">Hours Saved Per Month</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number">100%</span>
                        <span class="stat-label">UK-Based, GDPR Compliant</span>
                    </div>
                </div>
            </div>
            <div class="hero-image">
                <div class="hero-graphic">
                    <svg width="500" height="400" viewBox="0 0 500 400" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
                        <!-- Path definitions for animations -->
                        <defs>
                            <path id="extraction-path" d="M290 140 Q350 120 380 160"/>
                        </defs>
                        
                        <!-- Background circles for depth -->
                        <circle cx="400" cy="200" r="180" fill="#6d28d9" opacity="0.08" class="bg-circle-1"/>
                        <circle cx="350" cy="150" r="120" fill="#ffffff" opacity="0.03" class="bg-circle-2"/>
                        
                        <!-- Main browser window -->
                        <rect x="80" y="60" width="200" height="140" rx="12" fill="#ffffff" opacity="0.95" class="browser-main"/>
                        <rect x="80" y="60" width="200" height="30" rx="12" fill="#7c3aed" class="browser-header"/>
                        <circle cx="98" cy="75" r="5" fill="#ffffff" opacity="0.8"/>
                        <circle cx="110" cy="75" r="5" fill="#ffffff" opacity="0.8"/>
                        <circle cx="122" cy="75" r="5" fill="#ffffff" opacity="0.8"/>
                        
                        <!-- Browser content (data being scraped) -->
                        <rect x="90" y="100" width="80" height="6" fill="#6d28d9" opacity="0.7" class="data-line-1"/>
                        <rect x="90" y="115" width="120" height="6" fill="#7c3aed" opacity="0.7" class="data-line-2"/>
                        <rect x="90" y="130" width="60" height="6" fill="#6d28d9" opacity="0.7" class="data-line-3"/>
                        <rect x="90" y="145" width="100" height="6" fill="#7c3aed" opacity="0.7" class="data-line-4"/>
                        <rect x="90" y="160" width="75" height="6" fill="#6d28d9" opacity="0.7" class="data-line-5"/>
                        <rect x="90" y="175" width="90" height="6" fill="#7c3aed" opacity="0.7" class="data-line-6"/>
                        
                        <!-- Data extraction animation path -->
                        <path d="M290 140 Q350 120 380 160" stroke="#6d28d9" stroke-width="4" fill="none" opacity="0.8" class="extraction-path"/>
                        
                        <!-- Moving data particles -->
                        <circle cx="290" cy="140" r="4" fill="#6d28d9" class="data-particle-1">
                            <animateMotion dur="3s" repeatCount="indefinite">
                                <mpath href="#extraction-path"/>
                            </animateMotion>
                        </circle>
                        <circle cx="290" cy="140" r="3" fill="#7c3aed" class="data-particle-2">
                            <animateMotion dur="4s" repeatCount="indefinite" begin="1s">
                                <mpath href="#extraction-path"/>
                            </animateMotion>
                        </circle>
                        <circle cx="290" cy="140" r="3" fill="#6d28d9" class="data-particle-3">
                            <animateMotion dur="3.5s" repeatCount="indefinite" begin="2s">
                                <mpath href="#extraction-path"/>
                            </animateMotion>
                        </circle>
                        
                        <!-- Database/Storage -->
                        <rect x="320" y="220" width="140" height="100" rx="10" fill="#ffffff" opacity="0.95" class="database"/>
                        <rect x="330" y="235" width="50" height="8" fill="#6d28d9" opacity="0.8" class="db-row-1"/>
                        <rect x="330" y="250" width="70" height="8" fill="#7c3aed" opacity="0.8" class="db-row-2"/>
                        <rect x="330" y="265" width="45" height="8" fill="#6d28d9" opacity="0.8" class="db-row-3"/>
                        <rect x="330" y="280" width="60" height="8" fill="#7c3aed" opacity="0.8" class="db-row-4"/>
                        <rect x="330" y="295" width="55" height="8" fill="#6d28d9" opacity="0.8" class="db-row-5"/>
                        
                        <!-- Analytics Dashboard -->
                        <rect x="50" y="250" width="150" height="120" rx="10" fill="#ffffff" opacity="0.95" class="dashboard"/>
                        <rect x="50" y="250" width="150" height="25" rx="10" fill="#6d28d9" class="dashboard-header"/>
                        
                        <!-- Chart bars -->
                        <rect x="70" y="300" width="15" height="40" fill="#7c3aed" opacity="0.8" class="chart-bar-1"/>
                        <rect x="90" y="290" width="15" height="50" fill="#6d28d9" opacity="0.8" class="chart-bar-2"/>
                        <rect x="110" y="285" width="15" height="55" fill="#7c3aed" opacity="0.8" class="chart-bar-3"/>
                        <rect x="130" y="295" width="15" height="45" fill="#6d28d9" opacity="0.8" class="chart-bar-4"/>
                        <rect x="150" y="280" width="15" height="60" fill="#7c3aed" opacity="0.8" class="chart-bar-5"/>
                        
                        <!-- Floating success indicators -->
                        <circle cx="120" cy="80" r="8" fill="#6d28d9" opacity="0.8" class="success-1">
                            <animate attributeName="cy" values="80;60;80" dur="4s" repeatCount="indefinite"/>
                            <animate attributeName="opacity" values="0.8;0.4;0.8" dur="4s" repeatCount="indefinite"/>
                        </circle>
                        <text x="120" y="85" fill="white" font-size="10" text-anchor="middle" class="success-text">✓</text>
                        
                        <circle cx="420" cy="120" r="6" fill="#7c3aed" opacity="0.6" class="success-2">
                            <animate attributeName="cy" values="120;100;120" dur="5s" repeatCount="indefinite"/>
                            <animate attributeName="opacity" values="0.6;0.3;0.6" dur="5s" repeatCount="indefinite"/>
                        </circle>
                        
                        <!-- Data flow indicators -->
                        <circle cx="100" cy="350" r="3" fill="#6d28d9" opacity="0.7" class="flow-1">
                            <animate attributeName="cy" values="350;330;350" dur="3s" repeatCount="indefinite"/>
                        </circle>
                        <circle cx="150" cy="340" r="2" fill="#7c3aed" opacity="0.7" class="flow-2">
                            <animate attributeName="cy" values="340;320;340" dur="4s" repeatCount="indefinite"/>
                        </circle>
                        <circle cx="250" cy="360" r="2" fill="#6d28d9" opacity="0.7" class="flow-3">
                            <animate attributeName="cy" values="360;340;360" dur="3.5s" repeatCount="indefinite"/>
                        </circle>
                        
                    </svg>
                </div>
            </div>
        </div>
    </section>

    <!-- Trust Signals Below Hero -->
    <section class="trust-signals-hero">
        <div class="container">
            <p class="trust-heading">Trusted by businesses across the UK</p>
            <div class="trust-badges">
                <span class="badge">GDPR Compliant</span>
            </div>
        </div>
    </section>

    <!-- Services Section -->
    <section id="services" class="services">
        <div class="container">
            <div class="section-header">
                <p class="section-label">Our Services</p>
                <p>We automate the manual data and research work that costs UK legal and consultancy firms hours every week. Delivered as working, fully-tested systems.</p>
            </div>
            <div class="services-grid">
                <div class="service-card animate-on-scroll" style="--animation-delay: 0.1s;">
                    <div class="service-icon">
                        <img src="assets/images/icon-data-processing.svg" alt="Document and data extraction" loading="lazy" width="60" height="60">
                    </div>
                    <h2>Document &amp; Data Extraction</h2>
                    <p>We use AI to pull structured data from PDFs, contracts, emails, and reports — automatically, at scale. No more manual copy-paste from documents.</p>
                    <ul>
                        <li>Contract and legal document extraction</li>
                        <li>Invoice and financial document processing</li>
                        <li>Regulatory filing and compliance document parsing</li>
                        <li>Email and attachment data extraction</li>
                        <li>Bulk PDF processing pipelines</li>
                        <li>GDPR-compliant handling throughout</li>
                    </ul>
                    <p style="margin-top:16px;font-size:0.9rem;">
                        <a href="/blog/articles/document-extraction-pdf-to-database" style="color:#4f46e5;text-decoration:none;margin-right:16px;">PDF to database extraction &rarr;</a>
                        <a href="/blog/articles/due-diligence-automation-law-firms" style="color:#4f46e5;text-decoration:none;">Due diligence automation &rarr;</a>
                    </p>
                </div>

                <div class="service-card animate-on-scroll" style="--animation-delay: 0.2s;">
                    <div class="service-icon">
                        <img src="assets/images/icon-web-scraping-v2.svg" alt="Research automation" loading="lazy" width="60" height="60">
                    </div>
                    <h2>Research Automation</h2>
                    <p>We build automated systems that monitor competitors, track regulatory changes, and summarise market intelligence — delivered to your inbox or dashboard daily.</p>
                    <ul>
                        <li>Competitor and market monitoring</li>
                        <li>Regulatory and legislative change tracking</li>
                        <li>News and press monitoring with AI summaries</li>
                        <li>Automated research reports</li>
                        <li>Custom alert systems</li>
                    </ul>
                    <p style="margin-top:16px;font-size:0.9rem;">
                        <a href="/blog/articles/research-automation-management-consultancy" style="color:#4f46e5;text-decoration:none;margin-right:16px;">Research automation for consultancies &rarr;</a>
                        <a href="/blog/articles/cost-of-manual-data-work-professional-services" style="color:#4f46e5;text-decoration:none;">Cost of manual data work &rarr;</a>
                    </p>
                </div>

                <div class="service-card animate-on-scroll" style="--animation-delay: 0.3s;">
                    <div class="service-icon">
                        <img src="assets/images/icon-scalability.svg" alt="Data pipeline" loading="lazy" width="60" height="60">
                    </div>
                    <h2>Data Pipeline Build-Outs</h2>
                    <p>We connect your systems and automate your reporting — eliminating the spreadsheet-based workflows that eat up hours every week.</p>
                    <ul>
                        <li>ETL pipelines connecting existing systems</li>
                        <li>Automated reporting and dashboards</li>
                        <li>CRM and database integrations</li>
                        <li>Scheduled data feeds and exports</li>
                        <li>Data quality and validation pipelines</li>
                    </ul>
                    <p style="margin-top:16px;font-size:0.9rem;">
                        <a href="/blog/articles/ma-due-diligence-automation-corporate-law" style="color:#4f46e5;text-decoration:none;">M&amp;A due diligence automation →</a>
                    </p>
                </div>

                <div class="service-card animate-on-scroll" style="--animation-delay: 0.4s;">
                    <div class="service-icon">
                        <img src="assets/images/icon-automation.svg" alt="Custom AI agents" loading="lazy" width="60" height="60">
                    </div>
                    <h2>Custom AI Agents</h2>
                    <p>Bespoke AI agents that handle multi-step research and data tasks autonomously — built around your specific workflows, not generic tools.</p>
                    <ul>
                        <li>Due diligence research agents</li>
                        <li>Document review and summarisation agents</li>
                        <li>Data collection and enrichment agents</li>
                        <li>Workflow automation with human-in-the-loop oversight</li>
                        <li>Integration with your existing tools and systems</li>
                    </ul>
                    <p style="margin-top:16px;font-size:0.9rem;">
                        <a href="/blog/articles/what-is-an-ai-agent-professional-services" style="color:#4f46e5;text-decoration:none;margin-right:16px;">What is an AI agent? &rarr;</a>
                        <a href="/blog/articles/build-vs-buy-ai-automation-professional-services" style="color:#4f46e5;text-decoration:none;">Build vs buy guide &rarr;</a>
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Clients Section -->
    <section style="padding: 80px 0; background: white;">
        <div class="container">
            <div class="section-header">
                <h2>Built for Legal &amp; Consultancy Teams</h2>
                <p>We work exclusively with law firms and management consultancies across the UK. Every project is GDPR-compliant and built around your specific workflow.</p>
            </div>
            
            <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 40px; align-items: center; opacity: 0.7; margin-bottom: 60px;">
                <div style="text-align: center;">
                    <picture>
                        <source srcset="assets/images/client-replay.webp" type="image/webp">
                        <img src="assets/images/client-replay.png" alt="Replay - London-based gaming technology client" loading="lazy" style="max-height: 60px; width: auto; filter: grayscale(100%); transition: filter 0.3s ease;" onmouseover="this.style.filter='grayscale(0%)'" onmouseout="this.style.filter='grayscale(100%)'" width="100" height="40">
                    </picture>
                </div>
                <div style="text-align: center;">
                    <picture>
                        <source srcset="assets/images/client-pragma.webp" type="image/webp">
                        <img src="assets/images/client-pragma.png" alt="Pragma - Manchester financial services client" loading="lazy" style="max-height: 60px; width: auto; filter: grayscale(100%); transition: filter 0.3s ease;" onmouseover="this.style.filter='grayscale(0%)'" onmouseout="this.style.filter='grayscale(100%)'" width="679" height="111">
                    </picture>
                </div>
                <div style="text-align: center;">
                    <img src="assets/images/client-incite.png" alt="Incite - Birmingham business intelligence client" loading="lazy" style="max-height: 60px; width: auto; filter: grayscale(100%); transition: filter 0.3s ease;" onmouseover="this.style.filter='grayscale(0%)'" onmouseout="this.style.filter='grayscale(100%)'" width="202" height="60">
                </div>
                <div style="text-align: center;">
                    <img src="assets/images/client-homesupply.png" alt="Home Supply - Edinburgh property services client" loading="lazy" style="max-height: 60px; width: auto; filter: grayscale(100%); transition: filter 0.3s ease;" onmouseover="this.style.filter='grayscale(0%)'" onmouseout="this.style.filter='grayscale(100%)'" width="342" height="61">
                </div>
                <div style="text-align: center;">
                    <img src="assets/images/client-gambling-commission.png" alt="UK Gambling Commission client" loading="lazy" style="max-height: 60px; width: auto; filter: grayscale(100%); transition: filter 0.3s ease;" onmouseover="this.style.filter='grayscale(0%)'" onmouseout="this.style.filter='grayscale(100%)'" width="412" height="122">
                </div>
            </div>
            
            <!-- Use Cases Section -->
            <div class="geographic-coverage">
                <h3 style="text-align: center; font-size: 1.8rem; margin-bottom: 40px; color: #7c3aed;">Common Use Cases</h3>
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px;">
                    <div style="text-align: center; padding: 20px; background: #f8f9fa; border-radius: 12px;">
                        <h4 style="color: #4f46e5; margin-bottom: 15px;">⚖️ Legal Due Diligence</h4>
                        <p style="color: #666; margin: 0;">Automate the extraction and summarisation of data from contracts, filings, and company documents during due diligence.</p>
                        <a href="/blog/articles/due-diligence-automation-law-firms" style="color: #4f46e5; text-decoration: none; font-weight: 500;">How it works →</a>
                    </div>
                    <div style="text-align: center; padding: 20px; background: #f8f9fa; border-radius: 12px;">
                        <h4 style="color: #4f46e5; margin-bottom: 15px;">📊 Consultancy Research</h4>
                        <p style="color: #666; margin: 0;">Replace manual research hours with automated monitoring of markets, competitors, and regulatory changes.</p>
                        <a href="/blog/articles/research-automation-management-consultancy" style="color: #4f46e5; text-decoration: none; font-weight: 500;">How it works →</a>
                    </div>
                    <div style="text-align: center; padding: 20px; background: #f8f9fa; border-radius: 12px;">
                        <h4 style="color: #4f46e5; margin-bottom: 15px;">📋 Document Review</h4>
                        <p style="color: #666; margin: 0;">AI-powered extraction and summarisation of contracts, NDAs, and legal documents — replacing the first pass of manual review.</p>
                        <a href="/blog/articles/contract-review-automation-law-firms" style="color: #4f46e5; text-decoration: none; font-weight: 500;">How it works →</a>
                    </div>
                    <div style="text-align: center; padding: 20px; background: #f8f9fa; border-radius: 12px;">
                        <h4 style="color: #4f46e5; margin-bottom: 15px;">📈 Client Reporting</h4>
                        <p style="color: #666; margin: 0;">Automated data pipelines that compile client reports from multiple sources — delivered on schedule, ready to review.</p>
                        <a href="/quote" style="color: #4f46e5; text-decoration: none; font-weight: 500;">Get a Quote →</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Process Section -->
    <section id="process" class="process">
        <div class="container">
            <div class="section-header">
                <h2>How We Work</h2>
                <p>A typical automation project from first call to live system.</p>
            </div>
            <div class="process-steps">
                <div class="step">
                    <div class="step-number">01</div>
                    <div class="step-content">
                        <h3>Get a Quote</h3>
                        <p>We look at one specific manual workflow your team does — document extraction, research, reporting — and show you how it could be automated.</p>
                    </div>
                </div>
                
                <div class="step">
                    <div class="step-number">02</div>
                    <div class="step-content">
                        <h3>Scoping & Proposal</h3>
                        <p>We define exactly what the automation will do, agree the success criteria, and provide a fixed-price quote with a clear timeline.</p>
                        <p style="margin-top:10px;font-size:0.9rem;"><a href="/blog/articles/how-to-brief-ai-automation-consultant" style="color:#4f46e5;text-decoration:none;">How to brief an AI automation consultant →</a></p>
                    </div>
                </div>
                
                <div class="step">
                    <div class="step-number">03</div>
                    <div class="step-content">
                        <h3>Build &amp; Test</h3>
                        <p>We build the AI automation, test it against your real documents and data, and iterate until it works exactly as agreed.</p>
                    </div>
                </div>
                
                <div class="step">
                    <div class="step-number">04</div>
                    <div class="step-content">
                        <h3>Handover &amp; Training</h3>
                        <p>We deploy the system into your workflow, document how it works, and make sure your team is comfortable using it.</p>
                    </div>
                </div>
                
                <div class="step">
                    <div class="step-number">05</div>
                    <div class="step-content">
                        <h3>Ongoing Support</h3>
                        <p>We're available to maintain and extend the automation as your needs evolve — with optional monthly retainers for monitoring and updates.</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Why Choose Us Section -->
    <section id="why-us" class="why-us">
        <div class="container">
            <div class="section-header">
                <h2>Why Work With Us</h2>
                <p>We're a specialist AI automation consultancy — not a generic agency. You deal directly with the person who builds your solution.</p>
            </div>
            <div class="features-grid">
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-accuracy.svg" alt="Accuracy icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>Direct Access to the Developer</h3>
                    <p>No account managers or outsourced teams. You work directly with the consultant who builds and maintains your automation.</p>
                </div>
                
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-speed.svg" alt="Fast delivery icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>Fast Turnaround</h3>
                    <p>Most automation projects are scoped, built, and delivered within 2–4 weeks. No lengthy onboarding or project management overhead.</p>
                </div>
                
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-security.svg" alt="Security icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>GDPR Compliant by Default</h3>
                    <p>Every automation is built with UK data protection law in mind from the start. We provide full documentation for your compliance records.</p>
                    <p style="margin-top:12px;font-size:0.9rem;"><a href="/blog/articles/gdpr-ai-automation-uk-firms" style="color:#4f46e5;text-decoration:none;">GDPR & AI automation for UK firms →</a></p>
                </div>
                
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-scalability.svg" alt="Scalability icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>Fixed-Price Projects</h3>
                    <p>We quote a fixed price up front — no hourly billing surprises. You know exactly what you're getting and what it costs before we start.</p>
                </div>
                
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-support.svg" alt="Support icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>10+ Years Automation Experience</h3>
                    <p>We've been building data automation systems for over a decade — across legal, consultancy, financial services, and more.</p>
                </div>
                
                <div class="feature">
                    <div class="feature-icon">
                        <img src="assets/images/icon-compliance-check.svg" alt="Compliance icon" loading="lazy" width="80" height="80">
                    </div>
                    <h3>UK-Based, UK-Focused</h3>
                    <p>We're based in Norfolk, serving clients across the UK. No offshore teams, no timezone confusion — just straightforward, professional service.</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Client Testimonials Section -->
    <section class="testimonials-section-dark">
        <div class="container">
            <div class="section-header">
                <h2>What Our Clients Say</h2>
                <p>What legal and consultancy clients say about working with us.</p>
            </div>
            <div class="testimonials-dark-grid">
                <div class="testimonial-card-dark">
                    <div class="testimonial-stars">
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                    </div>
                    <p class="testimonial-text">"The team built us an automated document extraction system that handles our due diligence packs. What used to take a paralegal two days now runs overnight. Genuinely transformative for our M&amp;A practice."</p>
                    <div class="testimonial-author-dark">
                        <div class="testimonial-avatar">JM</div>
                        <div class="testimonial-author-info">
                            <p class="author-name">James Mitchell</p>
                            <p class="author-role">Partner, Corporate Law Firm</p>
                        </div>
                    </div>
                </div>
                <div class="testimonial-card-dark">
                    <div class="testimonial-stars">
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                    </div>
                    <p class="testimonial-text">"We brought UK AI Automation in to automate our weekly market monitoring reports. He delivered a working system in three weeks at a fixed price. Our analysts now spend their time on analysis, not data gathering."</p>
                    <div class="testimonial-author-dark">
                        <div class="testimonial-avatar">SC</div>
                        <div class="testimonial-author-info">
                            <p class="author-name">Sarah Chen</p>
                            <p class="author-role">Head of Research, Management Consultancy</p>
                        </div>
                    </div>
                </div>
                <div class="testimonial-card-dark">
                    <div class="testimonial-stars">
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                        <span class="star">★</span>
                    </div>
                    <p class="testimonial-text">"We needed a research agent to monitor industry developments and case law across multiple practice areas and brief our partners weekly. UK AI Automation built exactly that — it saves our research team around 30 hours a month."</p>
                    <div class="testimonial-author-dark">
                        <div class="testimonial-avatar">MT</div>
                        <div class="testimonial-author-info">
                            <p class="author-name">Michael Thompson</p>
                            <p class="author-role">Research Director, Law Firm</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="testimonials-cta">
                <a href="/case-studies/" class="btn-white">View Case Studies</a>
            </div>
        </div>
    </section>

    <!-- FAQ Section -->
    <section id="faq" class="faq-section" style="padding: 80px 0; background: #f8f9fa;">
        <div class="container">
            <div class="section-header" style="text-align: center; margin-bottom: 50px;">
                <h2>Frequently Asked Questions</h2>
                <p>Quick answers to common questions about our AI Automation and data services</p>
            </div>

            <div class="faq-grid" style="max-width: 900px; margin: 0 auto;">
                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        How much does an automation project cost?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            Projects are quoted at a fixed price based on scope. Simple document extraction pipelines typically start from £1,500. More complex multi-step AI agents or data pipeline build-outs run £3,000–£10,000. Ongoing retainers for monitoring and maintenance start from £500/month. <a href="/quote" style="color: #4f46e5;">Book a free demo</a> and we'll scope it with you.
                        </p>
                    </div>
                </div>

                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        How does AI document extraction actually work?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            We use a combination of OCR, large language models (LLMs), and custom automation code to read documents — PDFs, Word files, emails — and extract the specific data fields you need into a structured format. The system is trained on your actual documents, so it understands your specific terminology and layout. Output goes to CSV, your database, or directly into your existing systems.
                        </p>
                    </div>
                </div>

                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        How long does it take to build an automation?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            Most projects are delivered within 2–4 weeks from sign-off. We start with a scoping call, agree the specification, build and test, then hand over a working system. Simple document extraction pipelines can be ready in a week. More complex multi-source AI agents typically take 3–4 weeks.
                        </p>
                    </div>
                </div>

                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        Do I need technical knowledge to use the automation?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            No. We build automations that your team operates without any technical knowledge — typically triggered by dropping files in a folder, sending an email, or clicking a button. We handle all the automation code and infrastructure. You just see the results in the format you asked for.
                        </p>
                    </div>
                </div>

                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        How do you handle confidential client documents?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            We take data security seriously. All documents are processed with encryption in transit and at rest. We operate under NDA as standard, and all processing is GDPR-compliant. For sensitive legal and financial documents, we can also build automations that run entirely within your own infrastructure — no data leaves your systems.
                        </p>
                    </div>
                </div>

                <div class="faq-item" style="background: white; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);">
                    <button class="faq-question" style="width: 100%; padding: 20px 24px; text-align: left; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: #1e1b4b;">
                        What happens after the project is delivered?
                        <span class="faq-icon" style="font-size: 1.5rem; color: #4f46e5;">+</span>
                    </button>
                    <div class="faq-answer" style="max-height: 0; overflow: hidden; transition: max-height 0.3s ease;">
                        <p style="padding: 0 24px 20px; color: #666; line-height: 1.7;">
                            You own the code and can run it yourself. We provide full documentation and a handover session. Most clients also take an optional monthly retainer (from £500/month) for us to monitor the automation, handle maintenance, and add new features as their needs grow.
                        </p>
                    </div>
                </div>
            </div>

            <div style="text-align: center; margin-top: 40px;">
                <a href="/faq" class="btn btn-secondary">View All FAQs</a>
            </div>
        </div>
    </section>

    <!-- Contact Section -->
    <section id="contact" class="contact">
        <div class="container">
            <div class="contact-content">
                <div class="contact-info">
                    <h2>Get In Touch</h2>
                    <p>Tell us about your workflow and we'll show you how it can be automated.</p>
                    
                    <div class="contact-details">
                        <div class="contact-item">
                            <img src="assets/images/icon-phone.svg" alt="Business telephone icon for direct customer contact and consultation booking" loading="lazy" width="40" height="40">
                            <div>
                                <strong>Direct Line</strong>
                                <p><a href="tel:+441692689150">+44 1692 689150</a></p>
                            </div>
                        </div>
                        
                        <div class="contact-item">
                            <img src="assets/images/icon-email.svg" alt="Professional email icon for business correspondence and project inquiries" loading="lazy" width="40" height="40">
                            <div>
                                <strong>Email</strong>
                                <p><a href="mailto:info@ukaiautomation.co.uk">info@ukaiautomation.co.uk</a></p>
                            </div>
                        </div>
                        
                        <div class="contact-item">
                            <img src="assets/images/icon-location.svg" alt="UK service coverage map icon showing nationwide data services across London, Manchester, Birmingham, and Edinburgh" loading="lazy" width="40" height="40">
                            <div>
                                <strong>Service Coverage</strong>
                                <p>United Kingdom & International Markets</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="contact-form">
                    <form action="contact-handler.php" method="POST" class="form" novalidate>
                        <input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($_SESSION['csrf_token']); ?>">
                        <div class="form-group">
                            <label for="name">Contact Name *</label>
                            <input type="text" id="name" name="name" required aria-required="true" aria-describedby="name-error" autocomplete="name">
                            <span id="name-error" class="form-error" role="alert" aria-live="polite"></span>
                        </div>

                        <div class="form-group">
                            <label for="email">Business Email *</label>
                            <input type="email" id="email" name="email" required aria-required="true" aria-describedby="email-error" autocomplete="email">
                            <span id="email-error" class="form-error" role="alert" aria-live="polite"></span>
                        </div>

                        <div class="form-group">
                            <label for="company">Organisation *</label>
                            <input type="text" id="company" name="company" required aria-required="true" aria-describedby="company-error" autocomplete="organization">
                            <span id="company-error" class="form-error" role="alert" aria-live="polite"></span>
                        </div>

                        <div class="form-group">
                            <label for="service">Service Interest</label>
                            <select id="service" name="service" aria-describedby="service-error">
                                <option value="">Please select...</option>
                                <option value="document-extraction">Document & Data Extraction</option>
                                <option value="research-automation">Research Automation</option>
                                <option value="data-pipeline">Data Pipeline Build-Out</option>
                                <option value="ai-agent">Custom AI Agent</option>
                                <option value="other">Other / Not Sure Yet</option>
                            </select>
                            <span id="service-error" class="form-error" role="alert" aria-live="polite"></span>
                        </div>

                        <div class="form-group">
                            <label for="message">Business Requirements *</label>
                            <textarea id="message" name="message" rows="5" required aria-required="true" aria-describedby="message-error" placeholder="Describe the manual task or workflow you'd like to automate. What does your team currently do, and what would the end result look like?"></textarea>
                            <span id="message-error" class="form-error" role="alert" aria-live="polite"></span>
                        </div>
                        
                        <!-- Hidden fields for security -->
                        <input type="hidden" name="recaptcha_response" id="recaptcha_response">
                        <input type="hidden" name="form_timestamp" id="form_timestamp">
                        <input type="hidden" name="interaction_token" id="interaction_token">
                        <input type="text" name="website" style="display:none;">
                        
                        <button type="submit" class="btn btn-primary btn-full">Get a Quote</button>
                    </form>
                </div>
            </div>
        </div>
    </section>

    <!-- Trust & Security Signals -->
    <section class="trust-signals" style="padding: 50px 0; background: linear-gradient(135deg, #1e1b4b 0%, #1e1b4b 100%); color: white; text-align: center;">
        <div class="container">
            <p style="font-size: 0.9rem; margin-bottom: 30px; opacity: 0.8; letter-spacing: 1px; text-transform: uppercase;">Legal &amp; Consultancy Specialists | Fixed-Price Projects | GDPR Compliant | UK-Based</p>
            <div style="display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; align-items: center;">
                <div style="text-align: center;">
                    <div style="font-size: 1.5rem; margin-bottom: 5px;">✓</div>
                    <strong style="display: block; font-size: 0.95rem;">GDPR Compliant</strong>
                    <span style="font-size: 0.8rem; opacity: 0.8;">UK Data Protection</span>
                </div>
                <div style="text-align: center;">
                    <div style="font-size: 1.5rem; margin-bottom: 5px;">🛡️</div>
                    <strong style="display: block; font-size: 0.95rem;">£5M Insurance</strong>
                    <span style="font-size: 0.8rem; opacity: 0.8;">Professional Indemnity</span>
                </div>
                <div style="text-align: center;">
                    <div style="font-size: 1.5rem; margin-bottom: 5px;">⭐</div>
                    <strong style="display: block; font-size: 0.95rem;">Fixed-Price</strong>
                    <span style="font-size: 0.8rem; opacity: 0.8;">No Billing Surprises</span>
                </div>
                <div style="text-align: center;">
                    <div style="font-size: 1.5rem; margin-bottom: 5px;">🏢</div>
                    <strong style="display: block; font-size: 0.95rem;">UK Registered</strong>
                    <span style="font-size: 0.8rem; opacity: 0.8;">Companies House</span>
                </div>
            </div>
        </div>
    </section>
    </main>

    <!-- Footer -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <div class="footer-logo">
                        <img src="assets/images/logo-white.svg" alt="UK AI Automation" loading="lazy" width="290" height="58">
                    </div>
                    <p>AI automation for UK legal and consultancy firms. Fixed-price projects, fast delivery, GDPR-compliant by default.</p>
                </div>
                
                <div class="footer-section">
                    <h3>Our Services</h3>
                    <ul>
                        <li><a href="#services">Document Extraction</a></li>
                        <li><a href="#services">Research Automation</a></li>
                        <li><a href="#services">Data Pipeline Build-Outs</a></li>
                        <li><a href="#services">Custom AI Agents</a></li>
                        <li><a href="/quote">Get a Quote</a></li>
                    </ul>
                </div>

                <div class="footer-section">
                    <h3>Who We Help</h3>
                    <ul>
                        <li>Law Firms</li>
                        <li>Management Consultancies</li>

                    </ul>
                </div>

                <div class="footer-section">
                    <h3>Resources & Insights</h3>
                    <ul>
                        <li><a href="/blog/">Data Intelligence Blog</a></li>
                        <li><a href="case-studies/">Case Studies</a></li>
                        <li><a href="/about">About UK AI Automation</a></li>
                        <li><a href="/case-studies">Case Studies</a></li>
                        <li><a href="/faq">FAQ</a></li>
                        <li><a href="/quote">Request Consultation</a></li>
                    </ul>
                </div>

                
                <div class="footer-section">
                    <h3>Legal</h3>
                    <ul>
                        <li><a href="privacy-policy">Privacy Policy</a></li>
                        <li><a href="terms-of-service">Terms of Service</a></li>
                        <li><a href="cookie-policy">Cookie Policy</a></li>
                        <li><a href="gdpr-compliance">GDPR Compliance</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="footer-bottom">
                <div class="footer-bottom-content">
                    <div class="footer-copyright">
                        <p>&copy; <?php echo date('Y'); ?> UK AI Automation. All rights reserved.</p>
                    </div>
                    <div class="social-links">
                        <a href="https://www.linkedin.com/company/ukaiautomation" aria-label="LinkedIn" target="_blank" rel="noopener noreferrer"><img src="assets/images/icon-linkedin.svg" alt="Follow UK AI Automation on LinkedIn for industry insights and data analytics updates" loading="lazy" width="40" height="40"></a>
                        <a href="https://x.com/ukaiautomation" aria-label="Twitter" target="_blank" rel="noopener noreferrer"><img src="assets/images/icon-twitter.svg" alt="Follow UK AI Automation on Twitter for AI Automation news and data intelligence updates" loading="lazy" width="40" height="40"></a>
                    </div>
                </div>
            </div>
        </div>
    </footer>

    <!-- Scripts -->
    <script src="/assets/js/main.min.js?v=1.1.1"></script>
    
    <!-- Service Worker Registration -->
    <script nonce="<?php echo $nonce; ?>">
        if ('serviceWorker' in navigator) {
            window.addEventListener('load', () => {
                navigator.serviceWorker.register('/sw.js')
                    .then(registration => {
                        console.log('ServiceWorker registered:', registration);
                        
                        // Check for updates periodically
                        setInterval(() => {
                            registration.update();
                        }, 60000); // Check every minute
                    })
                    .catch(error => {
                        console.log('ServiceWorker registration failed:', error);
                    });
            });
            
            // Handle service worker updates
            let refreshing;
            navigator.serviceWorker.addEventListener('controllerchange', () => {
                if (refreshing) return;
                window.location.reload();
                refreshing = true;
            });
        }
    </script>
    
    <!-- Enhanced Core Web Vitals Monitoring -->
    <script nonce="<?php echo $nonce; ?>">
        // Monitor Core Web Vitals for SEO performance
        if ('web-vital' in window || typeof webVitals !== 'undefined') {
            function sendToAnalytics(metric) {
                gtag('event', metric.name, {
                    event_category: 'Core Web Vitals',
                    event_label: metric.id,
                    value: Math.round(metric.name === 'CLS' ? metric.value * 1000 : metric.value),
                    non_interaction: true
                });
            }
            
            // Track CLS (Cumulative Layout Shift)
            new PerformanceObserver((list) => {
                let cumulativeScore = 0;
                for (const entry of list.getEntries()) {
                    if (!entry.hadRecentInput) {
                        cumulativeScore += entry.value;
                    }
                }
                sendToAnalytics({
                    name: 'CLS',
                    value: cumulativeScore,
                    id: 'cls-' + Date.now()
                });
            }).observe({ type: 'layout-shift', buffered: true });
            
            // Track LCP (Largest Contentful Paint)
            new PerformanceObserver((list) => {
                const entries = list.getEntries();
                const lastEntry = entries[entries.length - 1];
                sendToAnalytics({
                    name: 'LCP',
                    value: lastEntry.startTime,
                    id: 'lcp-' + Date.now()
                });
            }).observe({ type: 'largest-contentful-paint', buffered: true });
            
            // Track FID (First Input Delay)
            new PerformanceObserver((list) => {
                for (const entry of list.getEntries()) {
                    sendToAnalytics({
                        name: 'FID',
                        value: entry.processingStart - entry.startTime,
                        id: 'fid-' + Date.now()
                    });
                }
            }).observe({ type: 'first-input', buffered: true });
        }
    </script>

    <!-- FAQ Accordion -->
    <script nonce="<?php echo $nonce; ?>">
        document.addEventListener('DOMContentLoaded', function() {
            const faqQuestions = document.querySelectorAll('.faq-question');

            faqQuestions.forEach(question => {
                question.addEventListener('click', function() {
                    const answer = this.nextElementSibling;
                    const icon = this.querySelector('.faq-icon');
                    const isOpen = answer.style.maxHeight && answer.style.maxHeight !== '0px';

                    // Close all other answers
                    document.querySelectorAll('.faq-answer').forEach(a => {
                        a.style.maxHeight = '0px';
                    });
                    document.querySelectorAll('.faq-icon').forEach(i => {
                        i.textContent = '+';
                    });

                    // Toggle current answer
                    if (!isOpen) {
                        answer.style.maxHeight = answer.scrollHeight + 'px';
                        icon.textContent = '−';
                    }
                });
            });
        });
    </script>
</body>
</html>