import { Link } from "react-router-dom";
import { ArrowRight, CheckCircle2, CalendarDays, Headphones, Building2, Hospital, Globe, Cpu, BarChart3, Eye, Mic, Bot, Database, Shield, BrainCircuit, Lightbulb, ChevronDown } from "lucide-react";
import { ExperienceGuideLink } from "@/components/ExperienceGuideLink";
import { Layout } from "@/components/layout/Layout";
import { Section, SectionHeader } from "@/components/ui/Section";
import { SEO } from "@/components/SEO";
import { RelatedSolutions } from "@/components/RelatedSolutions";
import { ScopeFactors } from "@/components/ScopeFactors";
import { useTranslation } from "react-i18next";
import { useForceLanguage } from "@/hooks/useForceLanguage";
import heroBackground from "@/assets/solutions/ai-hero-bg.jpg";
import postkodlotterieCaseImage from "@/assets/solutions/postkodlotteriet-case.jpg";
import easyfairsCaseImage from "@/assets/solutions/easyfairs-case.jpg";
import mcdonaldsCaseImage from "@/assets/cases/mcdonalds-case.jpg";
import sundbybergCaseImage from "@/assets/cases/sundbyberg-case.jpg";
import karolinskaVrImage from "@/assets/cases/karolinska-karoai-vr.png";
import domstolsverketDomsimImage from "@/assets/cases/domstolsverket-domsim-training.png";
import salesforceLogo from "@/assets/logos/salesforce.png";
import sapLogo from "@/assets/logos/sap.png";
import { useEffect, useRef, useState } from "react";

const getAiCases = (isSwedish: boolean) => [
  {
    client: "Postkodlotteriet",
    sector: isSwedish ? "AI-driven kundservice" : "AI-driven Customer Service",
    description: isSwedish 
      ? "Postkodlotteriet hanterar över 22 000 kundserviceärenden årligen. Suteki Studios utvecklade en AI-driven kundservicelösning som fungerar som första linjens support via telefon och e-post. AI:n besvarar vanliga frågor omedelbart och förbereder komplexa ärenden innan eskalering till mänskliga agenter."
      : "Postkodlotteriet handles over 22,000 customer service inquiries annually. Suteki Studios developed an AI-driven customer service solution acting as a first-line support layer across phone and email. The AI answers common questions instantly and prepares complex cases before escalation to human agents.",
    outcomes: isSwedish 
      ? ["Minskad supportbelastning", "Snabbare svarstider", "1 500 timmar frigjorda årligen"]
      : ["Reduced pressure on customer service", "Shorter response times", "Over 1,500 work hours freed annually"],
    image: postkodlotterieCaseImage,
    imageAlt: "AI-driven customer service handling phone and email inquiries",
    href: "/cases/postkodlotteriet-ai-kundservice",
  },
  {
    client: "EasyFairs",
    sector: isSwedish ? "Hewo – Holografisk AI-mässvärd" : "Hewo – Holographic AI Fair Host",
    description: isSwedish 
      ? "Suteki Studios utvecklade Hewo, världens första holografiska AI-mässvärd, som lanserades på Advanced Engineering & Elektronik i Göteborg. Hewo välkomnar besökare, svarar på frågor i realtid och guidar deltagare till utställare på både svenska och engelska."
      : "Suteki Studios developed Hewo, the world's first holographic AI fair host, launched at Advanced Engineering & Elektronik in Gothenburg. Hewo welcomes visitors, answers questions in real time, and guides attendees to exhibitors in both Swedish and English.",
    outcomes: isSwedish 
      ? ["Första holografiska AI-värden globalt", "Minskad personalbelastning", "Bättre besöksflöde och engagemang"]
      : ["First holographic AI host globally", "Reduced staff workload", "Improved visitor flow and engagement"],
    image: easyfairsCaseImage,
    imageAlt: "Holographic AI host interacting with visitors at exhibition",
    href: "/cases/easyfairs-hewo-holografisk-ai-massvaerd",
  },
  {
    client: "Sundbybergs Stad",
    sector: isSwedish ? "WebAR AI-avatarer" : "WebAR AI Avatars",
    description: isSwedish 
      ? "Suteki Studios skapade WebAR-baserade AI-avatarer av kommunala ledare, vilket möjliggjorde för medborgare att interagera med holografiska politiker direkt via mobilwebbläsare på sju språk. Lösningen stärkte den demokratiska dialogen utan att kräva appar eller nedladdningar."
      : "Suteki Studios created WebAR-based AI avatars of municipal leaders, allowing citizens to interact with holographic politicians directly via mobile browser in seven languages. The solution strengthened civic dialogue without requiring apps or downloads.",
    outcomes: isSwedish 
      ? ["Flerspråkig AI på 7 språk", "GDPR-kompatibel avatar", "Ökat medborgarengagemang"]
      : ["Multilingual AI communication", "GDPR-compliant avatar solution", "Improved citizen engagement"],
    image: sundbybergCaseImage,
    imageAlt: "Aerial view of Sundbyberg city - WebAR AI avatars case study",
    href: "/cases/sundbyberg-webar-avatars",
  },
  {
    client: "Specsavers",
    sector: isSwedish ? "AI-kampanj för glaukommedvetenhet" : "AI Glaucoma Awareness Campaign",
    description: isSwedish 
      ? "En AI-driven interaktiv installation som simulerar hur glaukom påverkar synen genom att dynamiskt ta bort objekt från användarens synfält. Kampanjen ökade medvetenheten och ledde till fler bokade synundersökningar."
      : "An AI-driven interactive installation that simulates how glaucoma affects vision by dynamically removing objects from the user's field of view. The campaign raised awareness and increased bookings for eye examinations.",
    outcomes: isSwedish 
      ? ["Ökad glaukommedvetenhet", "Viral räckvidd", "Fler bokade synundersökningar"]
      : ["Increased awareness of glaucoma", "Viral campaign reach", "Higher number of booked eye checks"],
    imageAlt: "AI installation simulating vision loss from glaucoma",
    href: "/cases/specsavers-glaukom-campaign",
    videoUrl: "https://www.youtube.com/watch?v=HE5sJEq0TAY",
  },
  {
    client: "McDonald's Scandinavia",
    sector: isSwedish ? "AI-automation med 260% ROI" : "AI Automation with 260% ROI",
    description: isSwedish 
      ? "Suteki Studios utvecklade ett AI-baserat automationssystem som ersatte manuell finansiell rapportering inom McDonald's skandinaviska verksamhet. Lösningen levererade dataflöden i realtid utan fel."
      : "Suteki Studios developed an AI-based automation system replacing manual financial reporting within McDonald's Scandinavian operations. The solution delivered real-time, error-free data flows.",
    outcomes: isSwedish 
      ? ["260% ROI", "768 timmar sparade/år", "Fel-fri automatisering"]
      : ["260% ROI", "768 hours saved annually", "Fully automated reporting without manual errors"],
    image: mcdonaldsCaseImage,
    imageAlt: "McDonald's restaurant exterior - AI automation case study",
    href: "/cases/mcdonalds-skandinavien-ai-ekonomiautomation",
  },
  {
    client: "Karolinska Universitetssjukhuset",
    sector: isSwedish ? "AI-driven VR-träningsplattform" : "AI-driven VR Training Platform",
    description: isSwedish 
      ? "Suteki Studios utvecklade en AI-driven VR-träningsplattform i samarbete med Karolinska Universitetssjukhuset, som möjliggör för medicinsk personal att träna i realistiska scenarier med intelligent realtidsfeedback. Detta case demonstrerar tillämpad AI i högprecisionsmiljöer."
      : "Suteki Studios developed an AI-driven VR training platform in collaboration with Karolinska Universitetssjukhuset, enabling medical staff to train in realistic scenarios with intelligent real-time feedback. This case demonstrates applied AI in high-precision training environments.",
    outcomes: isSwedish 
      ? ["Bättre beslutsfattande under press", "AI-anpassade scenarier", "Riskfri medicinsk träning"]
      : ["Improved decision-making under pressure", "AI-adapted training scenarios", "Risk-free medical training"],
    image: karolinskaVrImage,
    imageAlt: "AI-driven VR training system for medical education",
    href: "/cases/karolinska-karovr-medical-training",
  },
  {
    client: "Domstolsverket",
    sector: isSwedish ? "DOMSIM – AI-driven dynamisk scenarioträning" : "DOMSIM – AI-Driven Dynamic Scenario Training",
    description: isSwedish 
      ? "DOMSIM är en AI-driven träningsplattform där artificiell intelligens genererar dynamiska rättssalsscenarier som anpassas i realtid baserat på deltagarens handlingar. Istället för statiska eller skriptade övningar modifierar AI:n beteenden, händelser och responser under varje session. Projektet utvecklades i samarbete med Suteki Studios, Knowit och Amazon Web Services (AWS)."
      : "DOMSIM is an AI-driven training platform where artificial intelligence generates dynamic courtroom scenarios that adapt in real time based on the participant's actions. Instead of static or scripted exercises, the AI modifies behavior, events, and responses during each session. The project was developed in collaboration with Suteki Studios, Knowit, and Amazon Web Services (AWS).",
    outcomes: isSwedish 
      ? ["Adaptiva AI-scenarier i realtid", "Skarpare beslutsfattande", "Repeterbar träning utan skript"]
      : ["Realistic and adaptive training scenarios", "Improved decision-making in complex environments", "Repeatable training without scripted limitations"],
    image: domstolsverketDomsimImage,
    imageAlt: "AI-driven dynamic scenario generation for judicial training platform",
    href: "/cases/domstolsverket-courtsim-vr-training",
  },
];

const getUseCaseAreas = (isSwedish: boolean) => [
  {
    icon: Building2,
    title: isSwedish ? "Företag & Storföretag" : "Corporate & Enterprise",
    description: isSwedish 
      ? "AI-system för internt kunskapsstöd, medarbetaronboarding och operativt beslutsfattande i stora organisationer."
      : "AI systems for internal knowledge support, employee onboarding, and operational decision-making across large organizations.",
  },
  {
    icon: Hospital,
    title: isSwedish ? "Vård & Offentlig sektor" : "Healthcare & Public Sector",
    description: isSwedish 
      ? "AI-driven informationsleverans på sjukhus, kliniker och offentliga institutioner – stöd för patienter, besökare och personal."
      : "AI-powered information delivery in hospitals, clinics, and public institutions — supporting patients, visitors, and staff.",
  },
  {
    icon: CalendarDays,
    title: isSwedish ? "Event & Mässor" : "Events & Trade Shows",
    description: isSwedish 
      ? "Skalbar AI-kommunikation för utställningar, konferenser och tillfälliga installationer med hög besöksvolym."
      : "Scalable AI communication for exhibitions, conferences, and temporary installations with high visitor traffic.",
  },
  {
    icon: Headphones,
    title: isSwedish ? "Kundserviceoperationer" : "Customer Service Operations",
    description: isSwedish 
      ? "Multikanal AI-lösningar som hanterar supportförfrågningar, ärendehantering och kundkommunikation i stor skala."
      : "Multi-channel AI solutions handling support inquiries, case management, and customer communication at scale.",
  },
];

const getCapabilities = (isSwedish: boolean) => [
  {
    icon: BrainCircuit,
    title: isSwedish ? "Språkmodeller och LLM-system" : "Large Language Models & LLM Systems",
    description: isSwedish
      ? "Vi bygger enterprise-anpassade applikationer ovanpå stora språkmodeller – med kontroll över data, kontekst och svarskvalitet. Lösningarna kan köras lokalt eller i molnet beroende på krav."
      : "We build enterprise-grade applications on top of large language models — with full control over data, context, and response quality. Solutions can run locally or in the cloud depending on requirements.",
  },
  {
    icon: BarChart3,
    title: isSwedish ? "Maskininlärning och prediktiv analys" : "Machine Learning & Predictive Analytics",
    description: isSwedish
      ? "Från kundchurn-modeller till efterfrågeprognos – vi tränar, validerar och driftsätter ML-modeller som ger faktisk affärsnytta. Vi hanterar hela pipeline från rådata till produktionssystem."
      : "From customer churn models to demand forecasting — we train, validate, and deploy ML models that deliver real business value. We manage the full pipeline from raw data to production systems.",
  },
  {
    icon: Bot,
    title: isSwedish ? "Automatisering och RPA" : "Automation & RPA",
    description: isSwedish
      ? "Vi automatiserar repetitiva processer med en kombination av regelbaserad RPA och AI-driven beslutslogik. Resultatet är snabbare flöden, färre manuella steg och lägre operativ kostnad."
      : "We automate repetitive processes using a combination of rule-based RPA and AI-driven decision logic. The result is faster workflows, fewer manual steps, and lower operational cost.",
  },
  {
    icon: Eye,
    title: isSwedish ? "Computer Vision" : "Computer Vision",
    description: isSwedish
      ? "Vi utvecklar system för bildanalys, kvalitetskontroll, objektigenkänning och visuell inspektion – tränade på era egna data och integrerade i era produktionsflöden."
      : "We develop systems for image analysis, quality control, object recognition, and visual inspection — trained on your data and integrated into your production workflows.",
  },
  {
    icon: Mic,
    title: isSwedish ? "Tal- och röst-AI" : "Speech & Voice AI",
    description: isSwedish
      ? "Avancerad taligenkänning, röstanalys och voice-to-action-system för kundtjänst, utbildning och operativa miljöer. Stöd för svenska och engelska i komplexa domäner."
      : "Advanced speech recognition, voice analytics, and voice-to-action systems for customer service, training, and operational environments. Support for Swedish and English in complex domains.",
  },
  {
    icon: Database,
    title: isSwedish ? "Data-integration och systemkopplingar" : "Data Integration & Enterprise Systems",
    description: isSwedish
      ? "AI är bara så bra som de data det får tillgång till. Vi designar datapipelines och integrationer mot ERP, CRM, databaser och externa API:er för att säkra ett robust informationsflöde."
      : "AI is only as good as the data it can access. We design data pipelines and integrations with ERP, CRM, databases, and external APIs to ensure robust information flow.",
  },
  {
    icon: Shield,
    title: isSwedish ? "Säker driftsättning (enterprise)" : "Secure Deployment (Enterprise)",
    description: isSwedish
      ? "Vi levererar AI-system med enterprise-grade säkerhet – lokal driftsättning, åtkomstkontroll, audit trails och GDPR-compliance. Kritiska system kan köras helt offline."
      : "We deliver AI systems with enterprise-grade security — local deployment, access control, audit trails, and GDPR compliance. Critical systems can run fully offline.",
  },
  {
    icon: Lightbulb,
    title: isSwedish ? "AI-strategi och rådgivning" : "AI Strategy & Advisory",
    description: isSwedish
      ? "Osäker på var AI gör störst nytta i er verksamhet? Vi erbjuder strategiska genomlysningar, use case-prioritering och roadmap-arbete för organisationer i olika mognadsfaser."
      : "Unsure where AI delivers the most value in your organization? We offer strategic assessments, use case prioritization, and roadmap planning for organizations at various maturity stages.",
  },
];


interface SolutionAIProps {
  forceLang?: "sv" | "en";
}

const getTechPlatformCards = (isSwedish: boolean) => [
  {
    title: isSwedish ? "AI-plattformar" : "AI Platforms",
    logos: ["OpenAI", "Anthropic", "Google AI", "Azure AI"],
    description: isSwedish
      ? "Språkmodeller och maskininlärning för kunddialog, analys och automatisering."
      : "Language models and machine learning for customer dialogue, analysis, and automation.",
  },
  {
    title: isSwedish ? "Data & Backend" : "Data & Backend",
    logos: ["Supabase", "PostgreSQL", "AWS", "GitHub"],
    description: isSwedish
      ? "Säker datalagring, versionshantering och skalbar drift av AI-system."
      : "Secure data storage, version control, and scalable operation of AI systems.",
  },
  {
    title: isSwedish ? "Röst & Kommunikation" : "Voice & Communication",
    logos: ["Twilio", "ElevenLabs", "Web Speech API"],
    description: isSwedish
      ? "Röststyrning, notifieringar och automatiserad kundkommunikation."
      : "Voice control, notifications, and automated customer communication.",
  },
  {
    title: isSwedish ? "Enterprise-integration" : "Enterprise Integration",
    logos: ["SAP", "Salesforce", "Microsoft Dynamics"],
    description: isSwedish
      ? "Integration mot CRM, HR-system och interna databaser."
      : "Integration with CRM, HR systems, and internal databases.",
  },
];

function TechPlatformsSection({ isSwedish }: { isSwedish: boolean }) {
  const ref = useRef<HTMLDivElement>(null);
  const [visible, setVisible] = useState(false);

  useEffect(() => {
    const observer = new IntersectionObserver(
      ([entry]) => { if (entry.isIntersecting) setVisible(true); },
      { threshold: 0.15 }
    );
    if (ref.current) observer.observe(ref.current);
    return () => observer.disconnect();
  }, []);

  const cards = getTechPlatformCards(isSwedish);

  return (
    <Section className="section-white">
      <SectionHeader
        eyebrow={isSwedish ? "TEKNIKPLATTFORMAR" : "TECHNOLOGY PLATFORMS"}
        title={isSwedish ? "Teknikplattformar bakom våra AI\u2011lösningar" : "Technology Platforms Behind Our AI Solutions"}
        subtitle={isSwedish
          ? "Suteki Studios bygger AI-lösningar på beprövade plattformar – säkra, skalbara och integrerade i kundens verkliga system."
          : "Suteki Studios builds AI solutions on proven platforms — secure, scalable, and integrated into each client's real systems."}
      />
      <div
        ref={ref}
        className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl"
      >
        {cards.map((card, cardIdx) => (
          <div
            key={card.title}
            className="p-6 rounded-lg border border-border/40 bg-card"
            style={{
              opacity: visible ? 1 : 0,
              transform: visible ? 'translateY(0)' : 'translateY(12px)',
              transition: `opacity 0.4s ease ${cardIdx * 0.08}s, transform 0.4s ease ${cardIdx * 0.08}s`,
            }}
          >
            <h3 className="text-sm font-semibold mb-4">{card.title}</h3>
            <div className="flex flex-wrap gap-2 mb-4">
              {card.logos.map((name) => (
                <span
                  key={name}
                  className="text-xs font-medium px-2.5 py-1 rounded-full bg-muted text-muted-foreground transition-colors duration-200 hover:bg-accent/10 hover:text-accent"
                >
                  {name}
                </span>
              ))}
            </div>
            <p className="text-sm text-muted-foreground leading-relaxed">{card.description}</p>
          </div>
        ))}
      </div>
      <p className="text-sm text-muted-foreground mt-8 max-w-3xl">
        {isSwedish
          ? "Plattforms-oberoende – vi väljer teknik efter kundens behov."
          : "Platform-agnostic — we choose technology based on each client's needs."}
      </p>
    </Section>
  );
}

export default function SolutionAI({ forceLang = "en" }: SolutionAIProps) {
  const { t, i18n } = useTranslation();
  useForceLanguage(forceLang);
  const isSwedish = i18n.language === 'sv';

  const capabilities = getCapabilities(isSwedish);

  return (
    <Layout>
      {isSwedish ? (
        <SEO
          title="AI-lösningar för företag – Automatisering och AI-agenter | Suteki Studios"
          description="AI-lösningar som automatiserar arbete och förbättrar kundupplevelsen. Från AI-reception till smarta agenter för företag."
          lang="sv"
          canonicalUrl="https://sutekistudios.com/ai-losningar"
          alternateSv="https://sutekistudios.com/ai-losningar"
          alternateEn="https://sutekistudios.com/ai"
        />
      ) : (
        <SEO
          title="AI Solutions for Business – Automation and AI Agents | Suteki Studios"
          description="AI solutions that automate workflows and improve customer experience. From AI reception to intelligent agents."
          lang="en"
          canonicalUrl="https://sutekistudios.com/ai"
          alternateSv="https://sutekistudios.com/ai-losningar"
          alternateEn="https://sutekistudios.com/ai"
        />
      )}

      {/* JSON-LD: Service + FAQPage schema */}
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify({
          "@context": "https://schema.org",
          "@graph": [
            {
              "@type": "Service",
              "name": "AI-lösningar för företag",
              "provider": { "@type": "Organization", "name": "Suteki Studios", "url": "https://sutekistudios.com" },
              "description": "Intelligenta AI-system för kundkommunikation, reception och automatisering. Enterprise-beprövat med mätbara resultat.",
              "url": "https://sutekistudios.com/ai-losningar",
              "areaServed": "SE",
              "serviceType": "AI Solutions"
            },
            {
              "@type": "FAQPage",
              "mainEntity": (isSwedish ? [
                { q: "Vad är enterprise AI-driftsättning?", a: "Enterprise AI-driftsättning innebär skräddarsydd AI som integreras direkt i er befintliga infrastruktur – ERP, CRM, databaser och interna system." },
                { q: "Vilka branscher arbetar ni med?", a: "Vi levererar enterprise AI-lösningar inom vård, bank, retail, offentlig sektor och industri." },
                { q: "Hur hanterar ni säkerhet och GDPR?", a: "Alla enterprise AI-lösningar levereras med GDPR-compliance, åtkomstkontroll och audit trails. Kritiska system kan köras helt offline." },
                { q: "Hur lång tid tar en AI-driftsättning?", a: "En pilot kan vara i drift inom 4–8 veckor. Fullskalig enterprise AI-driftsättning tar typiskt 3–6 månader." },
                { q: "Kan ni integrera AI med våra befintliga system?", a: "Ja. Vi integrerar mot SAP, Salesforce, Microsoft Dynamics, egenutvecklade system och legacy-databaser." },
              ] : [
                { q: "What is enterprise AI deployment?", a: "Custom AI integrated directly into your existing infrastructure — ERP, CRM, databases, and internal systems." },
                { q: "Which industries do you work with?", a: "Healthcare, banking, retail, public sector, and industry." },
                { q: "How do you handle security and GDPR?", a: "GDPR compliance, access control, and audit trails. Critical systems can run fully offline." },
                { q: "How long does an AI deployment take?", a: "A pilot can be live within 4–8 weeks. Full-scale deployment typically takes 3–6 months." },
                { q: "Can you integrate AI with our existing systems?", a: "Yes. We integrate with SAP, Salesforce, Microsoft Dynamics, custom-built systems, and legacy databases." },
              ]).map(f => ({ "@type": "Question", "name": f.q, "acceptedAnswer": { "@type": "Answer", "text": f.a } }))
            }
          ]
        }) }}
      />

      {/* SECTION 1 — HERO */}
      <section className="min-h-[70vh] flex items-end relative overflow-hidden" data-hero="true">
        <div className="absolute inset-0 bg-cover bg-center bg-no-repeat" style={{ backgroundImage: `url(${heroBackground})`, filter: 'blur(3px)', transform: 'scale(1.02)' }} />
        <div className="absolute inset-0" style={{ background: 'linear-gradient(90deg, rgba(5,10,25,0.95) 0%, rgba(5,10,25,0.80) 38%, rgba(5,10,25,0.35) 100%)' }} />
        <div className="container mx-auto px-6 lg:px-8 relative z-10 pb-20 pt-40">
          <div className="max-w-3xl">
            <p className="hero-eyebrow mb-5 animate-fade-up">{isSwedish ? "ENTERPRISE AI-LÖSNINGAR" : "ENTERPRISE AI SOLUTIONS"}</p>
            <h1 className="display mb-6 hero-text-white animate-fade-up">
              {isSwedish
                ? "Enterprise AI-lösningar – från strategi till driftsättning i Sverige"
                : "Enterprise AI Solutions — From Strategy to Deployment"}
            </h1>
            <p className="text-lg hero-text-body mb-8 max-w-xl animate-fade-up-delay-1">
              {isSwedish
                ? "Sedan 2012: Affärskritisk enterprise AI-lösningar för Europa, Mellanöstern, Nordamerika. Integrerade, säkra efter era krav."
                : "Since 2012: Business-critical enterprise AI solutions for Europe, the Middle East, and North America. Integrated and secured to your standards."}
            </p>
            <div className="flex flex-col sm:flex-row gap-4 animate-fade-up-delay-2">
              <Link to={isSwedish ? "/kontakt" : "/contact"} className="btn-white inline-flex items-center gap-2">
                {isSwedish ? "Få ett konkret förslag" : "Get a concrete proposal"}
                <ArrowRight className="h-4 w-4" />
              </Link>
              <a href="#cases" className="btn-outline inline-flex items-center gap-2" style={{ color: '#fff', borderColor: 'rgba(255,255,255,0.2)' }}>
                {isSwedish ? "Se våra leveranser" : "View Our Deliveries"}
              </a>
            </div>
          </div>
          {/* Stats bar */}
          <div className="grid grid-cols-2 md:grid-cols-4 gap-6 mt-16 pt-8 border-t border-white/10">
            {[
              { stat: "12+", label: isSwedish ? "År AI-erfarenhet" : "Years AI Experience" },
              { stat: "30+", label: isSwedish ? "Aktiva enterprise-klienter" : "Active Enterprise Clients" },
              { stat: isSwedish ? "Global" : "Global", label: isSwedish ? "Närvaro" : "Presence" },
              { stat: "100%", label: isSwedish ? "Skräddarsydda lösningar" : "Custom-Built Solutions" },
            ].map((item) => (
              <div key={item.label} className="text-center md:text-left">
                <p className="text-2xl font-semibold text-white mb-1">{item.stat}</p>
                <p className="text-sm" style={{ color: 'rgba(255,255,255,0.55)' }}>{item.label}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* SECTION 2 — INTRO TEXT */}
      <Section className="section-white">
        <div className="max-w-3xl">
          <p className="eyebrow mb-4">{isSwedish ? "VÅR APPROACH" : "OUR APPROACH"}</p>
          <h2 className="text-2xl md:text-3xl font-semibold mb-6">
            {isSwedish ? "Skräddarsydd enterprise AI-driftsättning" : "Custom Enterprise AI Deployment"}
          </h2>
          <p className="text-muted-foreground text-base leading-relaxed mb-4">
            {isSwedish
              ? "Suteki Studios designar och driftsätter skräddarsydda enterprise AI-lösningar för företag som ställer höga krav på tillförlitlighet, säkerhet och integration. Inga färdiga SaaS-verktyg – vi bygger AI-driftsättning för just din infrastruktur, data och processer."
              : "Suteki Studios designs and deploys custom enterprise AI solutions for organizations with high demands on reliability, security, and integration. No off-the-shelf SaaS tools — we build AI deployment for your infrastructure, your data, and your processes."}
          </p>
          <p className="text-muted-foreground text-base leading-relaxed">
            {isSwedish
              ? "Våra klienter – bland dem McDonald's, Domstolsverket, Specsavers, Karolinska Universitetssjukhuset och British American Tobacco – väljer oss för att vi kombinerar djup teknisk kompetens med förmågan att leverera i produktion. Vi tar AI från proof-of-concept till driftsatt system."
              : "Our clients — including McDonald's, Domstolsverket, Specsavers, Karolinska Universitetssjukhuset, and British American Tobacco — choose us because we combine deep technical expertise with the ability to deliver in production. We take AI from proof-of-concept to deployed system."}
          </p>
        </div>
      </Section>

      {/* SECTION 3 — AI COMPETENCE AREAS (rich 2×4 card grid) */}
      <Section className="section-beige">
        <SectionHeader
          eyebrow={isSwedish ? "KOMPETENSOMRÅDEN" : "COMPETENCE AREAS"}
          title={isSwedish ? "Teknisk bredd i varje leverans" : "Technical Breadth in Every Delivery"}
          subtitle={isSwedish
            ? "Suteki Studios kombinerar djup teknisk kompetens med operativ leveransförmåga."
            : "Suteki Studios combines deep technical expertise with operational delivery capability."}
        />
        <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl">
          {capabilities.map((cap) => {
            const Icon = cap.icon;
            return (
              <div key={cap.title} className="p-6 rounded-lg border border-border/40 bg-card">
                <Icon className="h-5 w-5 text-accent mb-4" />
                <h3 className="text-sm font-semibold mb-2">{cap.title}</h3>
                <p className="text-sm text-muted-foreground leading-relaxed">{cap.description}</p>
              </div>
            );
          })}
        </div>
      </Section>

      {/* SECTION 4 — TECHNOLOGY PARTNERS */}
      <TechPlatformsSection isSwedish={isSwedish} />

      {/* SECTION 5 — AI AGENTS CALLOUT */}
      <section className="section-dark py-16" data-theme="dark">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-3xl">
            <h2 className="text-2xl md:text-3xl font-semibold mb-4">
              {isSwedish
                ? "Letar du efter färdiga AI-agenter för fysiska miljöer?"
                : "Looking for Deployed AI Agents for Physical Environments?"}
            </h2>
            <p className="text-base mb-6" style={{ color: 'rgba(226,232,240,0.7)' }}>
              {isSwedish
                ? "Suteki Studios deployerar även AI-agenter byggda för den fysiska världen – för receptioner, butiker, mässor och publika miljöer där AI möter riktiga människor i realtid."
                : "Suteki Studios also deploys AI agents built for the physical world — for receptions, retail, trade shows, and public environments where AI meets real people in real time."}
            </p>
            <Link
              to="/ai-reception-concierge"
              className="inline-flex items-center gap-2 text-sm font-medium border border-white/20 rounded-md px-5 py-2.5 transition-colors hover:bg-white/10"
              style={{ color: '#fff' }}
            >
              {isSwedish
                ? "Utforska våra deployerade AI-agenter för fysiska miljöer"
                : "Explore Our Deployed AI Agents for Physical Environments"}
              <ArrowRight className="h-4 w-4" />
            </Link>
          </div>
        </div>
      </section>

      {/* SECTION 6 — AI CASES */}
      <Section id="cases" className="section-white">
        <SectionHeader
          eyebrow={isSwedish ? "LEVERERADE KUNDLÖSNINGAR" : "DELIVERED CLIENT SOLUTIONS"}
          title={isSwedish ? "AI i verkliga miljöer" : "AI in Real Environments"}
          subtitle={isSwedish ? "Samtliga exempel nedan är verkliga kunduppdrag där AI-lösningar har levererats och driftsatts i aktiva miljöer." : "All examples below are real client cases where AI solutions have been delivered and deployed in active environments."}
        />
        <div className="grid md:grid-cols-2 gap-8">
          {getAiCases(isSwedish).map((caseItem) => (
            <div key={caseItem.client} className="rounded-lg border border-border bg-background flex flex-col overflow-hidden">
              {caseItem.videoUrl ? (
                <div className="aspect-video w-full overflow-hidden">
                  <iframe
                    src={
                      caseItem.videoUrl.includes("youtube.com") || caseItem.videoUrl.includes("youtu.be")
                        ? `https://www.youtube.com/embed/${new URL(caseItem.videoUrl).searchParams.get("v") || caseItem.videoUrl.split("/").pop()}`
                        : `https://player.vimeo.com/video/${caseItem.videoUrl.split('/').pop()}?badge=0&autopause=0&player_id=0&app_id=58479`
                    }
                    className="w-full h-full"
                    frameBorder="0"
                    allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
                    allowFullScreen
                    title={caseItem.client}
                  />
                </div>
              ) : caseItem.image ? (
                <div className="aspect-video w-full overflow-hidden">
                  <img 
                    src={caseItem.image} 
                    alt={caseItem.imageAlt}
                    loading="lazy"
                    decoding="async"
                    className="w-full h-full object-cover"
                  />
                </div>
              ) : null}
              <div className="p-6 flex flex-col flex-1">
                <p className="text-xs text-muted-foreground uppercase tracking-wider mb-1">{caseItem.sector}</p>
                <p className="text-sm font-semibold mb-3">{caseItem.client}</p>
                <p className="text-base text-muted-foreground mb-4">{caseItem.description}</p>
                <ul className="space-y-1 mb-4 flex-1">
                  {caseItem.outcomes.map((outcome, idx) => (
                    <li key={idx} className="text-sm font-medium text-accent">
                      ✓ {outcome}
                    </li>
                  ))}
                </ul>
                <Link 
                  to={caseItem.href}
                  className="text-sm font-medium text-accent hover:text-primary transition-colors inline-flex items-center gap-1"
                >
                  {isSwedish ? "Visa fullständigt case →" : "View full case →"}
                </Link>
              </div>
            </div>
          ))}
        </div>
      </Section>

      {/* SECTION 7 — USE CASE AREAS (Var AI skapar värde) */}
      <Section className="section-beige">
        <SectionHeader
          title={isSwedish ? "Var AI-lösningar skapar värde" : "Where AI Solutions Create Impact"}
          subtitle={isSwedish ? "AI-lösningar är effektiva i en rad olika miljöer och operativa sammanhang." : "AI solutions are effective across a wide range of environments and operational contexts."}
        />
        <div className="grid md:grid-cols-2 gap-10">
          {getUseCaseAreas(isSwedish).map((useCase) => {
            const Icon = useCase.icon;
            return (
              <div key={useCase.title} className="p-8 rounded-lg border border-border/40 bg-card shadow-lg">
                <div className="flex items-center gap-3 mb-3">
                  <Icon className="h-5 w-5 text-accent flex-shrink-0" />
                  <h3 className="text-xl font-semibold">{useCase.title}</h3>
                </div>
                <p className="text-muted-foreground text-base leading-normal">{useCase.description}</p>
              </div>
            );
          })}
        </div>
      </Section>

      {/* SECTION 7B — FAQ */}
      <Section className="section-white">
        <SectionHeader
          title={isSwedish ? "Vanliga frågor om enterprise AI-lösningar" : "Frequently Asked Questions About Enterprise AI"}
        />
        <div className="max-w-3xl space-y-0">
          {(isSwedish ? [
            { q: "Vad är enterprise AI-driftsättning?", a: "Enterprise AI-driftsättning innebär skräddarsydd AI som integreras direkt i er befintliga infrastruktur – ERP, CRM, databaser och interna system. Till skillnad från SaaS-verktyg äger ni data, logik och drift." },
            { q: "Vilka branscher arbetar ni med?", a: "Vi levererar enterprise AI-lösningar inom vård, bank, retail, offentlig sektor och industri. Se våra cases med McDonald's, Karolinska Universitetssjukhuset och Domstolsverket." },
            { q: "Hur hanterar ni säkerhet och GDPR?", a: "Alla enterprise AI-lösningar levereras med GDPR-compliance, åtkomstkontroll och audit trails. Kritiska system kan köras helt offline utan molnberoende." },
            { q: "Hur lång tid tar en AI-driftsättning?", a: "En pilot kan vara i drift inom 4–8 veckor. Fullskalig enterprise AI-driftsättning tar typiskt 3–6 månader beroende på integrationsdjup och datakomplexitet." },
            { q: "Kan ni integrera AI med våra befintliga system?", a: "Ja. Vi integrerar mot SAP, Salesforce, Microsoft Dynamics, egenutvecklade system och legacy-databaser. Enterprise AI-lösningar kräver djup systemförståelse – det är vår kärnkompetens." },
          ] : [
            { q: "What is enterprise AI deployment?", a: "Enterprise AI deployment means custom AI integrated directly into your existing infrastructure — ERP, CRM, databases, and internal systems. Unlike SaaS tools, you own the data, logic, and operations." },
            { q: "Which industries do you work with?", a: "We deliver enterprise AI solutions in healthcare, banking, retail, public sector, and industry. See our cases with McDonald's, Karolinska University Hospital, and the Swedish National Courts Administration." },
            { q: "How do you handle security and GDPR?", a: "All enterprise AI solutions are delivered with GDPR compliance, access control, and audit trails. Critical systems can run fully offline without cloud dependency." },
            { q: "How long does an AI deployment take?", a: "A pilot can be live within 4–8 weeks. Full-scale enterprise AI deployment typically takes 3–6 months depending on integration depth and data complexity." },
            { q: "Can you integrate AI with our existing systems?", a: "Yes. We integrate with SAP, Salesforce, Microsoft Dynamics, custom-built systems, and legacy databases. Enterprise AI solutions require deep systems understanding — that's our core competence." },
          ]).map((faq, idx) => (
            <details key={idx} className="group border-b border-border/40">
              <summary className="flex items-center justify-between cursor-pointer py-5 text-base font-medium">
                {faq.q}
                <ChevronDown className="h-4 w-4 text-muted-foreground transition-transform group-open:rotate-180" />
              </summary>
              <p className="pb-5 text-sm text-muted-foreground leading-relaxed">{faq.a}</p>
            </details>
          ))}
        </div>
      </Section>

      {/* SECTION 8 — RELATED SERVICES */}
      <RelatedSolutions excludeHrefs={["/ai", "/ai-losningar"]} />

      {/* SECTION 9 — CTA FOOTER */}
      <ScopeFactors
        title={isSwedish ? "Det här påverkar upplägg och investering" : "What shapes scope and investment"}
        intro={
          isSwedish
            ? "En AI-lösning formas av era system, er data och era krav på kontroll. Följande faktorer avgör upplägget."
            : "An AI solution is shaped by your systems, your data and your control requirements. These factors define the setup."
        }
        items={
          isSwedish
            ? [
                "Vilka processer och kanaler som ska automatiseras",
                "Datakällornas kvalitet, struktur och tillgänglighet",
                "Integrationer mot befintliga system och behörighetsmodell",
                "Krav på säkerhet, spårbarhet och regelefterlevnad",
                "Antal språk och tonalitet i dialogen",
                "Hur eskalering till människa och löpande förvaltning ska fungera",
              ]
            : [
                "Which processes and channels are to be automated",
                "Quality, structure and availability of your data sources",
                "Integrations with existing systems and the permission model",
                "Requirements on security, traceability and compliance",
                "Number of languages and the tone of the dialogue",
                "How escalation to a human and ongoing operation should work",
              ]
        }
      />

      <section className="section-dark py-[var(--space-section)]" data-theme="dark">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-2xl mx-auto text-center">
            <h2 className="mb-5">{isSwedish ? "Ta AI till nästa nivå – boka samtal nu." : "Take AI to the Next Level — Book a Call Now."}</h2>
            <p className="text-lg mb-3" style={{ color: 'rgba(226,232,240,0.7)' }}>
              {isSwedish ? "Berätta om er verksamhet, era utmaningar och era mål." : "Tell us about your business, your challenges, and your goals."}
            </p>
            <p className="mb-10" style={{ color: 'rgba(226,232,240,0.55)' }}>
              {isSwedish ? "Boka ett strategiskt samtal om AI-lösningar anpassade för er organisation." : "Book a strategic meeting about AI solutions tailored for your organization."}
            </p>
            <div className="flex flex-col sm:flex-row gap-4 justify-center">
              <Link to={isSwedish ? "/kontakt" : "/contact"} className="btn-white inline-flex items-center gap-2">
                {isSwedish ? "Få ett konkret förslag" : "Get a concrete proposal"}
                <ArrowRight className="h-4 w-4" />
              </Link>
              <a
                href="https://calendly.com/sutekistudios/strategic-project-discussion"
                target="_blank"
                rel="noopener noreferrer"
                className="inline-flex items-center justify-center gap-2 px-6 py-3.5 rounded-md border border-white/30 text-white hover:bg-white/10 transition-colors"
              >
                {isSwedish ? "Boka ett samtal" : "Book a call"}
              </a>
            </div>
          </div>
        </div>
      </section>
      <ExperienceGuideLink lang={isSwedish ? "sv" : "en"} />
    </Layout>
  );
}
