import { Link } from "react-router-dom";
import { Layout } from "@/components/layout/Layout";
import { SEOHead } from "@/components/SEOHead";
import { useForceLanguage } from "@/hooks/useForceLanguage";
import { RelatedSolutions } from "@/components/RelatedSolutions";
import { ArrowRight, Gamepad2, PartyPopper, Users } from "lucide-react";
import spotifyImage from "@/assets/cases/spotify-vr.jpg";

const CALENDLY = "https://calendly.com/sutekistudios/strategic-project-discussion";
const ICONS = [PartyPopper, Gamepad2, Users];

const CONTENT = {
  sv: {
    metaTitle: "VR-spel & upplevelser för event | Suteki Studios",
    metaDescription:
      "Suteki Studios skapar VR-upplevelser för events, publikaktivering och interaktiva spel. Engagera publik med immersiv teknologi.",
    eyebrow: "VR",
    h1: "VR-spel & upplevelser",
    heroText:
      "Suteki Studios utvecklar VR-upplevelser för events, publikaktivering och interaktiva spel – skräddarsydda för varumärken, mässor och publika evenemang.",
    primaryCta: "Få ett konkret förslag",
    secondaryCta: "Boka en demo",
    useCasesEyebrow: "Användningsområden",
    useCasesTitle: "Skapa engagerande VR-upplevelser",
    useCases: [
      { title: "Event-upplevelser", description: "Interaktiva VR-upplevelser för mässor, lanseringar och företagsevent som engagerar publik och skapar varaktiga intryck." },
      { title: "Interaktiva spel", description: "Skräddarsydda VR-spel för teambuilding, varumärkesaktivering och publikupplevelser med stöd för flera samtidiga spelare." },
      { title: "Publikupplevelser", description: "Storformatiga VR-installationer för museer, besökscentra och publika evenemang med många samtidiga deltagare." },
    ],
    ctaTitle: "Redo att skapa en VR-upplevelse?",
    ctaText: "Berätta vilket event det gäller och vad ni vill uppnå, så föreslår vi ett upplägg.",
    contactPath: "/kontakt",
  },
  en: {
    metaTitle: "VR Games & Experiences for Events | Suteki Studios",
    metaDescription:
      "Suteki Studios builds VR experiences for events, audience activation and interactive games. Engage visitors with immersive technology.",
    eyebrow: "VR",
    h1: "VR games & experiences",
    heroText:
      "Suteki Studios builds VR experiences for events, audience activation and interactive games — tailored to brands, trade shows and public venues.",
    primaryCta: "Get a tailored proposal",
    secondaryCta: "Book a demo",
    useCasesEyebrow: "Use cases",
    useCasesTitle: "Create VR experiences that hold attention",
    useCases: [
      { title: "Event experiences", description: "Interactive VR experiences for trade shows, launches and corporate events that engage audiences and leave a lasting impression." },
      { title: "Interactive games", description: "Custom VR games for team building, brand activation and audience experiences, with support for multiple simultaneous players." },
      { title: "Audience installations", description: "Large-format VR installations for museums, visitor centres and public events with many concurrent participants." },
    ],
    ctaTitle: "Ready to build a VR experience?",
    ctaText: "Tell us which event you are planning and what you want to achieve, and we will propose an approach.",
    contactPath: "/contact",
  },
} as const;

interface VRGamesEventsProps {
  /** Route language. Swedish route is /vr-spel-events, English is /en/vr-games-events. */
  lang?: "sv" | "en";
}

export default function VRGamesEvents({ lang = "sv" }: VRGamesEventsProps) {
  useForceLanguage(lang);
  const c = CONTENT[lang];

  return (
    <Layout>
      <SEOHead
        title={c.metaTitle}
        description={c.metaDescription}
        forceLang={lang}
        hreflangOverrides={{ sv: "/vr-spel-events", en: "/en/vr-games-events", xDefault: "/vr-spel-events" }}
      />

      {/* ── HERO ─────────────────────────────────────── */}
      <section className="min-h-[70vh] flex items-end relative overflow-hidden" data-hero="true">
        <div className="absolute inset-0 bg-cover bg-center" style={{ backgroundImage: `url(${spotifyImage})` }} />
        <div className="absolute inset-0" style={{ background: 'linear-gradient(to top, rgba(8,12,20,0.92) 0%, rgba(8,12,20,0.50) 50%, rgba(8,12,20,0.25) 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">{c.eyebrow}</p>
            <h1 className="display mb-6">{c.h1}</h1>
            <p className="text-lg hero-text-body max-w-xl mb-8 leading-relaxed">{c.heroText}</p>
            <div className="flex flex-wrap gap-4">
              <Link to={c.contactPath} className="btn-white inline-flex items-center gap-2">
                {c.primaryCta} <ArrowRight className="h-4 w-4" />
              </Link>
              <a
                href={CALENDLY}
                target="_blank"
                rel="noopener noreferrer"
                className="btn-outline inline-flex items-center gap-2"
                style={{ color: '#fff', borderColor: 'rgba(255,255,255,0.25)' }}
              >
                {c.secondaryCta}
              </a>
            </div>
          </div>
        </div>
      </section>

      {/* ── USE CASES ────────────────────────────────── */}
      <section className="section-white py-[var(--space-section)]">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-2xl mb-[var(--space-block)]">
            <p className="eyebrow mb-3">{c.useCasesEyebrow}</p>
            <h2>{c.useCasesTitle}</h2>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {c.useCases.map((uc, i) => {
              const Icon = ICONS[i];
              return (
                <div key={uc.title} className="enterprise-card p-8">
                  <div className="w-12 h-12 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center mb-4">
                    <Icon className="h-5 w-5 text-primary" />
                  </div>
                  <h3 className="text-lg font-semibold mb-3">{uc.title}</h3>
                  <p className="text-muted-foreground leading-relaxed">{uc.description}</p>
                </div>
              );
            })}
          </div>
        </div>
      </section>

      <RelatedSolutions />

      {/* ── CTA ─────────────────────────────────────── */}
      <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-3xl mx-auto text-center">
            <h2 className="mb-4">{c.ctaTitle}</h2>
            <p className="text-lg mb-8" style={{ color: 'rgba(255,255,255,0.7)' }}>{c.ctaText}</p>
            <div className="flex flex-wrap gap-4 justify-center">
              <Link to={c.contactPath} className="btn-white inline-flex items-center gap-2">
                {c.primaryCta} <ArrowRight className="h-4 w-4" />
              </Link>
              <a
                href={CALENDLY}
                target="_blank"
                rel="noopener noreferrer"
                className="btn-outline inline-flex items-center gap-2"
                style={{ color: '#fff', borderColor: 'rgba(255,255,255,0.25)' }}
              >
                {c.secondaryCta}
              </a>
            </div>
          </div>
        </div>
      </section>
    </Layout>
  );
}