/* ===========================================================================
   Colleague Pulse — page sections
   ---------------------------------------------------------------------------
   British English throughout. No em dashes. No banned vocabulary.
   Voice rules from brief are non-negotiable; re-read before editing.
   =========================================================================== */

const { useState, useEffect, useRef, useId } = React;

/* ---------------------------------------------------------------------------
   Utility: scroll-triggered reveal
   --------------------------------------------------------------------------- */
function useReveal() {
  useEffect(() => {
    const els = document.querySelectorAll('.reveal');
    if (!('IntersectionObserver' in window)) {
      els.forEach((e) => e.classList.add('is-visible'));
      return;
    }
    const io = new IntersectionObserver(
      (entries) => {
        entries.forEach((entry) => {
          if (entry.isIntersecting) {
            entry.target.classList.add('is-visible');
            io.unobserve(entry.target);
          }
        });
      },
      { rootMargin: '0px 0px -8% 0px', threshold: 0.08 }
    );
    els.forEach((el) => io.observe(el));
    return () => io.disconnect();
  }, []);
}

/* ---------------------------------------------------------------------------
   Brand wordmark
   --------------------------------------------------------------------------- */
const Wordmark = ({ className = '', variant = 'colour' }) => {
  const src = variant === 'white'
    ? 'assets/colleague-pulse-logo-white.png'
    : 'assets/colleague-pulse-logo.png';
  return (
    <a
      href="index.html"
      className={`inline-flex items-center ${className}`}
      aria-label="Colleague Pulse, home"
    >
      <img
        src={src}
        alt="Colleague Pulse"
        className="h-8 sm:h-9 w-auto block select-none"
        draggable="false"
      />
    </a>
  );
};

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
const BtnPrimary = ({ href = 'Book a demo.html', children, className = '', icon = null, fullWidth = false, accent = false, ...rest }) => {
  const color = accent
    ? 'bg-orange-500 hover:bg-orange-600 active:bg-orange-700 shadow-lg shadow-orange-500/40 hover:shadow-xl hover:shadow-orange-500/50'
    : 'bg-blue-600 hover:bg-blue-700 active:bg-blue-800';
  return (
    <a
      href={href}
      className={`btn inline-flex items-center justify-center gap-2 ${color} text-white font-semibold rounded-lg px-6 py-3 ${fullWidth ? 'w-full' : ''} ${className}`}
      {...rest}
    >
      {children}
      {icon}
    </a>
  );
};

const BtnSecondary = ({ href = '#video', children, className = '', icon = null, ...rest }) => (
  <a
    href={href}
    className={`btn inline-flex items-center justify-center gap-2 bg-white hover:bg-blue-50 active:bg-blue-100 text-blue-600 font-semibold rounded-lg px-6 py-3 border-2 border-blue-600 ${className}`}
    {...rest}
  >
    {icon}
    {children}
  </a>
);

const TextLinkCTA = ({ href, children }) => (
  <a
    href={href}
    className="inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-700 font-semibold group transition-colors"
  >
    <span className="underline-offset-4 group-hover:underline">{children}</span>
    <IconArrowRight size={18} className="transition-transform group-hover:translate-x-1" />
  </a>
);

/* ---------------------------------------------------------------------------
   Image placeholder
   ---------------------------------------------------------------------------
   A calm, labelled stand-in: subtle slate panel, soft frame lines, a tiny
   camera glyph, and an honest alt-text caption inside. Realistic photos
   would replace these one-for-one. */
const ImagePlaceholder = ({ alt, ratio = '4 / 3', tone = 'slate', className = '' }) => {
  const tones = {
    slate: 'from-slate-100 to-slate-200 text-slate-500',
    blue: 'from-blue-50  to-blue-100  text-blue-700',
    warm: 'from-amber-50 to-orange-100 text-amber-800',
  };
  return (
    <figure
      role="img"
      aria-label={alt}
      className={`relative w-full overflow-hidden rounded-xl border border-slate-200 bg-gradient-to-br ${tones[tone]} ${className}`}
      style={{ aspectRatio: ratio }}
    >
      {/* Soft compositional bars to hint at a photograph without faking one */}
      <div className="absolute inset-0 opacity-50" aria-hidden="true">
        <div className="absolute left-0 right-0 top-1/2 h-px bg-current opacity-20" />
        <div className="absolute top-0 bottom-0 left-1/3 w-px bg-current opacity-20" />
      </div>
      <div className="absolute inset-0 flex items-end p-5 sm:p-6">
        <div className="flex items-start gap-3 max-w-[90%]">
          <span className="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-white/80 backdrop-blur-sm shadow-card text-current">
            <IconCamera size={18} />
          </span>
          <span className="text-[13px] font-medium leading-snug text-current">
            <span className="block opacity-70 text-[11px] uppercase tracking-wider font-semibold mb-0.5">Photograph</span>
            {alt}
          </span>
        </div>
      </div>
    </figure>
  );
};

/* ===========================================================================
   1 — Sticky header
   =========================================================================== */
function Header() {
  const [scrolled, setScrolled] = useState(false);
  const [mobileOpen, setMobileOpen] = useState(false);

  useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 4);
    onScroll();
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  // Close mobile menu on Escape
  useEffect(() => {
    if (!mobileOpen) return;
    const onKey = (e) => e.key === 'Escape' && setMobileOpen(false);
    window.addEventListener('keydown', onKey);
    document.body.style.overflow = 'hidden';
    return () => {
      window.removeEventListener('keydown', onKey);
      document.body.style.overflow = '';
    };
  }, [mobileOpen]);

  const nav = [
    { label: 'Home', href: 'index.html' },
    { label: 'Features', href: 'Features.html' },
    { label: 'Pricing', href: 'Pricing.html' },
    { label: 'About Us', href: 'About.html' },
    { label: 'Contact Us', href: 'Book a demo.html' },
  ];

  const currentPage = (typeof window !== 'undefined'
    ? decodeURIComponent(window.location.pathname.split('/').pop() || '')
    : '') || 'index.html';
  const isCurrent = (href) => href.toLowerCase() === currentPage.toLowerCase();

  return (
    <header
      className={`fixed top-0 inset-x-0 z-40 bg-white transition-shadow ${scrolled ? 'border-b border-slate-200' : 'border-b border-transparent'}`}
      role="banner"
    >
      <div className="max-w-container mx-auto px-5 sm:px-8 h-16 lg:h-[72px] flex items-center justify-between gap-6">
        <Wordmark />

        <nav className="hidden lg:flex items-center gap-7" aria-label="Primary">
          {nav.map((n) => n.disabled ? (
            <span key={n.label} className="text-[15px] text-slate-400 font-medium cursor-not-allowed select-none" title="Coming soon">
              {n.label}
            </span>
          ) : (
            <a
              key={n.href}
              href={n.href}
              aria-current={isCurrent(n.href) ? 'page' : undefined}
              className={`text-[15px] hover:text-blue-600 transition-colors ${isCurrent(n.href) ? 'text-blue-600 font-bold' : 'text-slate-700 font-medium'}`}
            >
              {n.label}
            </a>
          ))}
        </nav>

        <div className="flex items-center gap-3">
          <a
            href="https://app.colleaguepulse.co.uk/Account/Login"
            className="hidden lg:inline-flex text-[15px] text-slate-700 hover:text-blue-600 font-medium transition-colors px-2"
          >
            Log in
          </a>
          <a
            href="Book a demo.html"
            className="hidden lg:inline-flex btn items-center justify-center bg-orange-500 hover:bg-orange-600 text-white font-semibold rounded-lg px-5 py-2.5 shadow-md shadow-orange-500/30 hover:shadow-lg hover:shadow-orange-500/40"
          >
            Let's Talk
          </a>
          <button
            type="button"
            onClick={() => setMobileOpen(true)}
            className="lg:hidden inline-flex items-center justify-center h-11 w-11 rounded-lg text-slate-700 hover:bg-slate-100"
            aria-label="Open menu"
            aria-expanded={mobileOpen}
            aria-controls="mobile-nav"
          >
            <IconMenu size={22} />
          </button>
        </div>
      </div>

      {/* Mobile slide-in */}
      <div
        id="mobile-nav"
        className={`lg:hidden fixed inset-0 z-50 ${mobileOpen ? '' : 'pointer-events-none'}`}
        aria-hidden={!mobileOpen}
      >
        <div
          className={`absolute inset-0 bg-slate-900/40 transition-opacity ${mobileOpen ? 'opacity-100' : 'opacity-0'}`}
          onClick={() => setMobileOpen(false)}
        />
        <div
          className={`absolute right-0 top-0 bottom-0 w-[88%] max-w-[360px] bg-white shadow-cardlg transform transition-transform ${mobileOpen ? 'translate-x-0' : 'translate-x-full'}`}
          role="dialog"
          aria-modal="true"
          aria-label="Site menu"
        >
          <div className="h-16 px-5 flex items-center justify-between border-b border-slate-200">
            <Wordmark />
            <button
              type="button"
              onClick={() => setMobileOpen(false)}
              className="h-11 w-11 inline-flex items-center justify-center rounded-lg text-slate-700 hover:bg-slate-100"
              aria-label="Close menu"
            >
              <IconX size={22} />
            </button>
          </div>
          <nav className="p-5 flex flex-col gap-1" aria-label="Mobile">
            {nav.map((n) => n.disabled ? (
              <span
                key={n.label}
                className="px-3 py-3 rounded-lg text-slate-400 text-[17px] font-medium cursor-not-allowed select-none"
              >
                {n.label} <span className="text-[12px] text-slate-400 font-normal ml-1.5">(Coming soon)</span>
              </span>
            ) : (
              <a
                key={n.href}
                href={n.href}
                onClick={() => setMobileOpen(false)}
                aria-current={isCurrent(n.href) ? 'page' : undefined}
                className={`px-3 py-3 rounded-lg text-[17px] hover:bg-blue-50 hover:text-blue-700 ${isCurrent(n.href) ? 'text-blue-600 font-bold bg-blue-50' : 'text-slate-800 font-medium'}`}
              >
                {n.label}
              </a>
            ))}
            <a
              href="Book a demo.html"
              onClick={() => setMobileOpen(false)}
              className="btn self-start inline-flex items-center justify-center gap-2 bg-orange-500 hover:bg-orange-600 shadow-md shadow-orange-500/30 text-white font-semibold rounded-lg px-6 py-3"
            >
              Let's Talk
            </a>
            <a
              href="https://app.colleaguepulse.co.uk/Account/Login"
              onClick={() => setMobileOpen(false)}
              className="mt-2 inline-flex items-center justify-center btn bg-slate-100 hover:bg-slate-200 text-slate-800 font-semibold rounded-lg px-5 py-3"
            >
              Log in
            </a>
          </nav>
        </div>
      </div>
    </header>
  );
}

/* ===========================================================================
   2 — Hero
   =========================================================================== */
function Hero({ bg = '#FFFFFF', accent = '#2563EB' }) {
  // Decide trust-line + eyebrow tone based on background lightness; keep AA contrast.
  const lowercaseHex = (bg || '#FFFFFF').toLowerCase();
  const isWhite = lowercaseHex === '#ffffff' || lowercaseHex === '#fff';
  return (
    <section
      id="top"
      className="relative pt-32 lg:pt-40 pb-20 lg:pb-28"
      aria-labelledby="hero-h1"
      style={{ backgroundColor: bg }}
    >
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="max-w-[920px]">
          <p className="eyebrow reveal mb-5" style={{ color: accent }}>Employee engagement, for UK social housing</p>
          <h1 id="hero-h1" className="h1 reveal" style={{ transitionDelay: '60ms' }}>
            The employee engagement platform built for UK social housing.
          </h1>
          <p className="mt-7 body-lg text-slate-600 max-w-[760px] reveal" style={{ transitionDelay: '120ms' }}>
            Pulse surveys, exit and onboarding journeys, and targeted staff messaging. Built by the team behind CX-Feedback, the platform 110 UK social landlords already use.
          </p>
          <div className="mt-9 flex flex-col sm:flex-row gap-3 sm:gap-4 reveal" style={{ transitionDelay: '180ms' }}>
            <BtnPrimary href="Book a demo.html" accent>Let's Talk</BtnPrimary>
            <BtnSecondary href="Features.html" icon={<IconArrowRight size={16} />}>
              See the features
            </BtnSecondary>
          </div>
          <p className="mt-6 text-[14px] text-slate-500 flex items-center gap-2 reveal" style={{ transitionDelay: '240ms' }}>
            <IconLock size={14} className="text-slate-400" />
            UK-built. EU-hosted.
          </p>
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   3 — Explainer video block
   =========================================================================== */
function VideoBlock() {
  const [playing, setPlaying] = useState(false);
  return (
    <section id="video" className="bg-blue-50 py-20 lg:py-28" aria-labelledby="video-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <h2 id="video-h" className="sr-only">Watch the explainer</h2>
        <div className="max-w-[1040px] mx-auto reveal">
          <div className="relative rounded-2xl overflow-hidden border-2 border-blue-100 shadow-cardlg bg-slate-900 aspect-video">
            {/* Placeholder thumbnail — gradient + faint compositional grid */}
            <div className="absolute inset-0 bg-gradient-to-br from-slate-800 via-slate-900 to-blue-900" aria-hidden="true" />
            <div className="absolute inset-0 opacity-20" aria-hidden="true">
              <div className="absolute left-12 top-12 right-12 bottom-12 border border-white/30 rounded-lg" />
              <div className="absolute left-1/4 top-1/3 w-32 h-2 bg-white/40 rounded" />
              <div className="absolute left-1/4 top-1/3 mt-6 w-48 h-2 bg-white/30 rounded" />
              <div className="absolute left-1/4 top-1/3 mt-12 w-24 h-2 bg-white/25 rounded" />
            </div>
            <div className="absolute bottom-5 left-6 right-6 text-white/75 text-[12px] tracking-wide uppercase font-semibold" aria-hidden="true">
              Colleague Pulse · 0:00 / 1:00
            </div>
            <button
              type="button"
              onClick={() => setPlaying((p) => !p)}
              aria-label={playing ? 'Pause video' : 'Play video'}
              className="absolute inset-0 flex items-center justify-center group"
            >
              <span className="inline-flex items-center justify-center h-20 w-20 sm:h-24 sm:w-24 rounded-full bg-white text-blue-600 shadow-cardlg transition-transform group-hover:scale-105 group-active:scale-100">
                {playing ? (
                  <span className="flex gap-1.5">
                    <span className="block w-2 h-7 bg-blue-600 rounded-sm" />
                    <span className="block w-2 h-7 bg-blue-600 rounded-sm" />
                  </span>
                ) : (
                  <IconPlay size={32} className="ml-1" />
                )}
              </span>
            </button>
            <p className="sr-only">Captions and a full transcript are available with the published video.</p>
          </div>
          <p className="mt-6 text-center body-md text-slate-600">
            60 seconds. What Colleague Pulse does, and why housing teams trust it.
          </p>
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   4 — Problem strip (Trio C — problem-led copy, sits under the hero)
   =========================================================================== */
function ProblemStrip() {
  const items = [
    {
      n: '01',
      headline: 'Your repairs team has never seen the intranet.',
      body: 'They are in vans, on schemes, at jobs. The all-staff email reaches the people who least need it and misses the people who matter most. We reach the frontline on the channel they actually use.',
    },
    {
      n: '02',
      headline: 'Culture is your remit. The data is not.',
      body: 'Boards want a number on engagement; you want a feeling for how the patch teams are doing. Short pulses give both, often enough that a wobble in one team shows up before it becomes a resignation.',
    },
    {
      n: '03',
      headline: 'Comms goes out. The data never comes back.',
      body: 'Read rates, replies and acknowledgements per message, broken down by team and role. The policy update, the CEO message, the safeguarding reminder: you can prove they landed and you can prove who still needs a nudge.',
    },
  ];
  return (
    <section className="py-20 lg:py-24 bg-white border-y border-slate-100" aria-label="What HR Directors recognise">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="grid md:grid-cols-3 gap-10 lg:gap-14">
          {items.map((it, i) => (
            <div key={it.n} className="reveal" style={{ transitionDelay: `${i * 80}ms` }}>
              <div className="text-[13px] font-bold tabular-nums text-blue-600 mb-4 tracking-[0.18em]">{it.n}</div>
              <h3 className="text-[22px] sm:text-[24px] leading-[1.2] font-bold text-slate-900 tracking-tight mb-3 text-balance">
                {it.headline}
              </h3>
              <p className="text-[16px] leading-relaxed text-slate-600">{it.body}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   4b — Credibility strip — the old trust-signal content, compacted and moved
   further down the page (sits just before the final CTA).
   =========================================================================== */
function CredibilityStrip() {
  const items = [
    {
      Icon: IconShield,
      text: 'UK-built, EU-hosted. UK GDPR compliant out of the box.',
    },
    {
      Icon: IconUsers,
      text: 'By the team behind CX-Feedback. 110 UK social landlords already use us; 98% renew every year.',
    },
    {
      Icon: IconPhoneCall,
      text: 'Trading since 2008. A support team that picks up the phone, included in every contract.',
    },
  ];
  return (
    <section className="py-14 lg:py-16 bg-slate-50 border-y border-slate-200" aria-label="Procurement reassurance">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="grid md:grid-cols-3 gap-8 lg:gap-10">
          {items.map(({ Icon, text }, i) => (
            <div key={i} className="reveal flex items-start gap-3" style={{ transitionDelay: `${i * 60}ms` }}>
              <span className="inline-flex items-center justify-center h-10 w-10 rounded-lg bg-white border border-slate-200 text-blue-600 shrink-0">
                <Icon size={18} />
              </span>
              <p className="text-[15px] leading-relaxed text-slate-700">{text}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   5 — Four pain points (alternating)
   =========================================================================== */
const PAINS = [
  {
    id: 'pain-turnover',
    headline: 'The cost of losing your people',
    pain: 'Replacing one employee costs around £42,000. A 200-employee landlord loses roughly £1 million a year to turnover. The cost is hidden because it never lands as one big bill. It shows up as advert spend, agency fees, induction time, and the months of half-staffed productivity after every regrettable resignation. Most HR teams know the signal was there. It was sitting in question 17 of the staff survey three months ago. Nobody read it because nobody had the time.',
    solutionHead: 'Catch the signal in time',
    solution: 'Colleague Pulse runs the surveys for you on a cadence the platform keeps. AI reads every open-text response and surfaces the themes that matter. The first regrettable resignation you stop pays for the platform several times over.',
    cta: 'See how it works',
    ctaHref: '#features',
    alt: 'An empty office desk; a coat still draped over the back of the chair, papers and a cold mug of tea left as they were.',
    tone: 'slate',
    imageSide: 'right',
    bg: 'soft',
  },
  {
    id: 'pain-trust',
    headline: 'Staff do not trust your anonymity claims',
    pain: "Send the survey from your own domain and the honest feedback never lands. Every HR Director knows this and not many say it out loud. A survey sent from your employer's email address gets the guarded version of the answer. The people who most need to be heard go quiet. The CIPD names biased results from distrust around anonymous surveys as one of the headline issues HR teams face.",
    solutionHead: 'A survey from outside the building gets the honest answer',
    solution: 'Surveys go out from a Colleague Pulse address, not your domain. Staff fill them in because they believe the anonymity claim. Trade union conversations land easier with that in hand.',
    cta: 'Read the response-rate brief',
    ctaHref: '#resources',
    alt: 'Someone reading a survey on a phone in a quiet kitchen, soft natural daylight from a window behind them.',
    tone: 'blue',
    imageSide: 'left',
    bg: 'white',
  },
  {
    id: 'pain-reporting',
    headline: 'Reporting eats your week',
    pain: 'Exporting from a third-party tool into Power BI is not how the board paper should get written. Open the engagement tool. Export to CSV. Pull it into Power BI. Chart the data. Paste the charts into Word. Write the narrative. Re-do half of it after the board asks for one more comparison the day before the meeting. Days of work, every quarter. The CIPD lists weak reporting with no clear actions as one of the headline issues HR teams face. It is not a creativity problem; it is a tooling problem.',
    solutionHead: 'The board pack writes itself in an hour',
    solution: 'Bespoke dashboards with drag-and-drop charts. AI summary of every open-text response in plain English. Word export branded with your logo and colours, ready for the board pack.',
    cta: 'See the reporting',
    ctaHref: '#features',
    alt: 'A printed board paper on a desk next to an open laptop showing a Colleague Pulse dashboard.',
    tone: 'slate',
    imageSide: 'right',
    bg: 'soft',
  },
  {
    id: 'pain-hybrid',
    headline: 'Keeping a hybrid workforce in the loop',
    pain: 'Half your team works from home, half are out on visits, the new starters need a different set of messages every week. Repairs operatives in the field. Housing officers on the patch. Contact-centre staff at home. New starters in week one, leavers in their final fortnight. They all need different information at different times, and most of them never see the all-staff email.',
    solutionHead: 'The right message, to the right person, at the right moment. Automatically.',
    solution: 'Targeted push messaging across work email, work SMS, personal email and personal SMS. Audiences built from any employee attribute. Automated onboarding, exit and training journeys. The frontline staff who never read all-staff email finally hear from you.',
    cta: 'See the messaging',
    ctaHref: '#features',
    alt: 'A triptych of three workers: a repairs operative beside a van, a housing officer at a doorstep, a contact-centre worker at a home desk.',
    tone: 'warm',
    imageSide: 'left',
    bg: 'white',
  },
];

function PainBlock({ p, i }) {
  const wrapBg = p.bg === 'soft' ? 'bg-blue-50' : 'bg-white';
  const imgFirst = p.imageSide === 'left';
  return (
    <section
      id={p.id}
      className={`${wrapBg} py-20 lg:py-28`}
      aria-labelledby={`${p.id}-h`}
    >
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="grid lg:grid-cols-2 gap-10 lg:gap-16 items-center">
          <div className={`order-2 ${imgFirst ? 'lg:order-1' : 'lg:order-2'} reveal`}>
            <ImagePlaceholder alt={p.alt} ratio="4 / 3" tone={p.tone} />
          </div>
          <div className={`order-1 ${imgFirst ? 'lg:order-2' : 'lg:order-1'} reveal`} style={{ transitionDelay: '80ms' }}>
            <p className="eyebrow mb-4 text-slate-500" style={{ color: '#64748b' }}>Pain {i + 1} of 4</p>
            <h2 id={`${p.id}-h`} className="h2 mb-5">{p.headline}</h2>
            <p className="body-lg">{p.pain}</p>

            <div className="mt-8 pt-7 border-t border-slate-200">
              <h3 className="text-[20px] sm:text-[22px] font-semibold text-blue-600 mb-3 leading-snug">
                {p.solutionHead}
              </h3>
              <p className="body-lg">{p.solution}</p>
              <div className="mt-6">
                <TextLinkCTA href={p.ctaHref}>{p.cta}</TextLinkCTA>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

function PainsSection() {
  return (
    <div id="pains">
      {PAINS.map((p, i) => <PainBlock key={p.id} p={p} i={i} />)}
    </div>
  );
}

/* ===========================================================================
   6 — Three things, built properly
   =========================================================================== */
function ThreeThings() {
  const cards = [
    {
      Icon: IconClipboardList,
      title: 'Surveys',
      body: 'Pulse, annual, exit, onboarding and custom surveys. One builder, every cadence.',
      bullets: [
        'Trigger-based automation, including the ten-days-before-leave-date exit survey',
        'Send by work email, work SMS, personal email or personal SMS',
        'AI reads every open-text response and surfaces the themes',
      ],
      // Survey screen mock
      preview: 'survey',
    },
    {
      Icon: IconSend,
      title: 'Targeted push messaging',
      body: 'The right message, to the right person, at the right moment.',
      bullets: [
        'Build an audience from any employee attribute',
        'Send across all four channels with branded templates',
        'Automated onboarding, exit and training journeys',
      ],
      preview: 'message',
    },
    {
      Icon: IconShieldAlert,
      title: 'AI Critical Concern detection',
      body: "Catch bullying, harassment and mental health signals the day they're raised, not the day a resignation lands.",
      bullets: [
        'Reads every response for harm, harassment and wellbeing risk',
        'Configurable routing to the right person',
        'Audit trail built in',
      ],
      preview: 'alert',
    },
  ];

  return (
    <section id="features" className="py-24 lg:py-32 bg-white" aria-labelledby="features-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="text-center max-w-prose-wide mx-auto reveal">
          <h2 id="features-h" className="h2">Three things, built properly.</h2>
          <p className="mt-5 body-lg text-slate-600">
            Surveys, targeted messaging and an AI safeguard. None of them is bolted on; all of them are how the product was designed from the first line of code.
          </p>
        </div>

        <div className="mt-14 lg:mt-20 grid md:grid-cols-3 gap-6 lg:gap-7">
          {cards.map(({ Icon, title, body, bullets, preview }, i) => (
            <article
              key={title}
              className="reveal flex flex-col rounded-xl bg-white border border-slate-200 p-7 lg:p-8 shadow-card hover:shadow-cardlg transition-shadow"
              style={{ transitionDelay: `${i * 80}ms` }}
            >
              <div className="inline-flex items-center justify-center h-12 w-12 rounded-lg bg-blue-50 text-blue-600 mb-5">
                <Icon size={24} />
              </div>
              <h3 className="h3 mb-2.5">{title}</h3>
              <p className="body-md mb-5">{body}</p>
              <ul className="space-y-3 mb-7">
                {bullets.map((b) => (
                  <li key={b} className="flex items-start gap-2.5 text-[15px] leading-snug text-slate-700">
                    <span className="mt-1 inline-flex items-center justify-center h-4 w-4 shrink-0 rounded-full bg-blue-600 text-white">
                      <IconCheck size={12} strokeWidth={3} />
                    </span>
                    <span>{b}</span>
                  </li>
                ))}
              </ul>
              <div className="mt-auto">
                <FeaturePreview kind={preview} />
                <div className="mt-5">
                  <TextLinkCTA href="#demo">Learn more</TextLinkCTA>
                </div>
              </div>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
}

/* Small screen-grab placeholders inside each card. Lightly styled to suggest
   the product without faking real screens. */
function FeaturePreview({ kind }) {
  if (kind === 'survey') {
    return (
      <div className="rounded-lg border border-slate-200 bg-slate-50 p-4" aria-hidden="true">
        <div className="text-[10px] uppercase tracking-wider font-semibold text-slate-400 mb-2">Survey · Q4 / 10</div>
        <div className="text-[13px] font-semibold text-slate-900 leading-snug mb-3">How likely are you to recommend us as a place to work?</div>
        <div className="flex gap-1">
          {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((n, idx) => (
            <div key={n} className={`flex-1 h-7 rounded text-[10px] flex items-center justify-center font-semibold ${idx === 7 ? 'bg-blue-600 text-white' : 'bg-white text-slate-500 border border-slate-200'}`}>
              {n}
            </div>
          ))}
        </div>
      </div>
    );
  }
  if (kind === 'message') {
    return (
      <div className="rounded-lg border border-slate-200 bg-slate-50 p-4 space-y-2" aria-hidden="true">
        <div className="text-[10px] uppercase tracking-wider font-semibold text-slate-400">Audience</div>
        <div className="flex flex-wrap gap-1.5">
          {['Repairs operatives', 'Started in last 14 days', 'Patch: South'].map(t => (
            <span key={t} className="inline-flex items-center text-[11px] font-medium bg-white border border-slate-200 text-slate-700 px-2 py-1 rounded-md">{t}</span>
          ))}
        </div>
        <div className="pt-1 flex gap-1.5">
          {['Work email', 'Work SMS', 'Personal email', 'Personal SMS'].map((c, i) => (
            <span key={c} className={`text-[10px] font-semibold px-2 py-1 rounded ${i < 3 ? 'bg-blue-600 text-white' : 'bg-white border border-slate-200 text-slate-500'}`}>{c}</span>
          ))}
        </div>
      </div>
    );
  }
  // alert
  return (
    <div className="rounded-lg border border-amber-200 bg-amber-50 p-4" aria-hidden="true">
      <div className="flex items-start gap-2.5">
        <div className="inline-flex items-center justify-center h-6 w-6 rounded-full bg-amber-500 text-white shrink-0 mt-0.5">
          <IconShieldAlert size={14} />
        </div>
        <div>
          <div className="text-[11px] uppercase tracking-wider font-semibold text-amber-800">Critical concern flagged</div>
          <div className="text-[13px] font-semibold text-slate-900 leading-snug mt-1">Possible bullying reference, response #4127</div>
          <div className="text-[12px] text-slate-600 mt-1">Routed to: Head of People · 9:14am</div>
        </div>
      </div>
    </div>
  );
}

/* ===========================================================================
   7 — Built for social housing
   =========================================================================== */
function SectorBlock() {
  return (
    <section id="about" className="py-24 lg:py-32 bg-blue-50" aria-labelledby="sector-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="grid lg:grid-cols-2 gap-12 lg:gap-16 items-center">
          <div className="reveal">
            <p className="eyebrow mb-4">Built for the sector</p>
            <h2 id="sector-h" className="h2">Built for social housing, not adapted to it.</h2>
            <p className="mt-6 body-lg">
              Every other engagement platform was built for tech companies, banks or professional services firms and adapted to public-sector customers. Colleague Pulse was built for UK social housing from the first line of code.
            </p>
          </div>
          <div className="reveal" style={{ transitionDelay: '80ms' }}>
            <div className="relative rounded-2xl overflow-hidden bg-white shadow-card border border-slate-200">
              <img
                src="assets/hero-bg.webp"
                alt="Housing colleagues collaborating"
                className="w-full object-cover aspect-[5/4]"
              />
            </div>
            <p className="mt-4 text-[14px] text-slate-600 italic">Built for the people who make social housing work.</p>
          </div>
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   8 — The numbers
   =========================================================================== */
function NumbersBlock() {
  const stats = [
    { num: '2008', cap: 'Trading from a Glasgow office since 2008, building software the UK social housing sector actually uses.' },
    { num: '110', cap: 'UK social landlords already use our sister platform, CX-Feedback. Around 30% of the market.' },
    { num: '98%', cap: "Customer retention across the team's products, multi-year average." },
  ];
  return (
    <section id="customers" className="py-24 lg:py-32 bg-blue-50" aria-labelledby="numbers-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="text-center reveal">
          <h2 id="numbers-h" className="h2">The numbers.</h2>
        </div>
        <div className="mt-14 lg:mt-20 grid md:grid-cols-3 gap-12 lg:gap-10">
          {stats.map((s, i) => (
            <div key={s.num} className="text-center reveal" style={{ transitionDelay: `${i * 100}ms` }}>
              <div className="stat-num">{s.num}</div>
              <p className="mt-5 body-md text-slate-700 max-w-[34ch] mx-auto">{s.cap}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   9 — Pricing summary
   =========================================================================== */
function PricingBlock() {
  const rows = [
    ['1 to 49 employees', '£5,000'],
    ['50 to 99 employees', '£6,000'],
    ['100 to 199 employees', '£12,000'],
    ['200 to 499 employees', '£18,000'],
    ['500+ employees', 'Call for a quote'],
  ];
  return (
    <section id="pricing" className="py-24 lg:py-32 bg-white" aria-labelledby="pricing-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="text-center max-w-prose-wide mx-auto reveal">
          <h2 id="pricing-h" className="h2">Honest pricing. One annual figure. Unlimited everything.</h2>
          <p className="mt-5 body-lg text-slate-600">
            Most engagement platforms quote per-employee, per-month, with a call-us button for the real number. We publish ours.
          </p>
        </div>

        <div className="mt-12 lg:mt-14 max-w-[720px] mx-auto reveal">
          <div className="rounded-xl border border-slate-200 bg-white overflow-hidden shadow-card">
            <table className="w-full text-left">
              <caption className="sr-only">Annual price by headcount band</caption>
              <thead className="bg-slate-50">
                <tr>
                  <th scope="col" className="px-6 py-4 text-[13px] uppercase tracking-wider font-semibold text-slate-500">Headcount</th>
                  <th scope="col" className="px-6 py-4 text-[13px] uppercase tracking-wider font-semibold text-slate-500 text-right">Annual price</th>
                </tr>
              </thead>
              <tbody>
                {rows.map(([k, v], i) => (
                  <tr key={k} className={`${i !== rows.length - 1 ? 'border-b border-slate-200' : ''}`}>
                    <td className="px-6 py-5 text-[17px] text-slate-800 font-medium">{k}</td>
                    <td className="px-6 py-5 text-[17px] text-slate-900 font-semibold text-right tabular-nums">{v}</td>
                  </tr>
                ))}
              </tbody>
            </table>
          </div>

          <p className="mt-7 text-center body-md text-slate-600">
            Every tier includes integration to your HR system, unlimited surveys and messages, AI Critical Concern detection, Word report export and unlimited phone support.
          </p>

          <div className="mt-8 text-center">
            <a
              href="#pricing-full"
              className="btn inline-flex items-center justify-center gap-2 bg-white hover:bg-blue-50 text-blue-600 font-semibold rounded-lg px-6 py-3 border-2 border-blue-600"
            >
              See full pricing
              <IconArrowRight size={18} />
            </a>
          </div>
        </div>
      </div>
    </section>
  );
}

/* ===========================================================================
   10 — Demo CTA + form
   =========================================================================== */
function DemoBlock() {
  return (
    <section id="demo" className="py-24 lg:py-32 bg-blue-50" aria-labelledby="demo-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="grid lg:grid-cols-2 gap-12 lg:gap-16 items-start">
          <div className="reveal">
            <div className="mb-8">
              <ImagePlaceholder
                alt="A friendly support adviser at a desk in a UK office, wearing a headset and smiling."
                ratio="5 / 4"
                tone="blue"
              />
            </div>
            <h2 id="demo-h" className="h2">See it running on a workforce like yours.</h2>
            <p className="mt-6 body-lg">
              Let's Talk. A colleague will show you Colleague Pulse running on a workforce shaped like yours, walk through the ROI for your headcount, and answer the procurement questions.
            </p>
            <p className="mt-6 italic text-slate-700 body-md">
              We pick up the phone because that is how we have always done it.
            </p>
          </div>
          <div className="reveal" style={{ transitionDelay: '80ms' }}>
            <DemoForm />
          </div>
        </div>
      </div>
    </section>
  );
}

function DemoForm() {
  const [values, setValues] = useState({
    name: '', email: '', org: '', prompting: '',
  });
  const [errors, setErrors] = useState({});
  const [submitted, setSubmitted] = useState(false);
  const [touched, setTouched] = useState({});
  const [sending, setSending] = useState(false);
  const [serverError, setServerError] = useState('');

  const set = (k) => (e) => {
    const v = e.target.type === 'checkbox' ? e.target.checked : e.target.value;
    setValues((s) => ({ ...s, [k]: v }));
    if (errors[k]) setErrors((s) => ({ ...s, [k]: undefined }));
  };

  const blur = (k) => () => setTouched((t) => ({ ...t, [k]: true }));

  function validate(v) {
    const e = {};
    if (!v.name.trim()) e.name = 'Please add your full name.';
    if (!v.email.trim()) e.email = 'Please add your work email.';
    else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.email.trim())) e.email = 'That email does not look quite right.';
    if (!v.org.trim()) e.org = 'Please add your organisation name.';
    return e;
  }

  async function onSubmit(e) {
    e.preventDefault();
    const errs = validate(values);
    setErrors(errs);
    setTouched({
      name: true, email: true, org: true,
    });
    if (Object.keys(errs).length !== 0) return;

    setSending(true);
    setServerError('');
    try {
      const res = await fetch('/api/demo', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          name: values.name.trim(),
          email: values.email.trim(),
          org: values.org.trim(),
          prompting: values.prompting,
        }),
      });
      if (!res.ok) {
        const data = await res.json().catch(() => ({}));
        throw new Error(data.detail || data.error || 'Sorry, we could not send your request. Please call us on 0141 810 2599.');
      }
      setSubmitted(true);
      setTimeout(() => {
        document.getElementById('demo-success')?.focus();
      }, 50);
    } catch (err) {
      setServerError(err.message || 'Something went wrong. Please try again.');
    } finally {
      setSending(false);
    }
  }

  if (submitted) {
    return (
      <div
        id="demo-success"
        role="status"
        tabIndex={-1}
        className="rounded-xl border border-slate-200 bg-white p-8 lg:p-10 shadow-card text-center"
      >
        <div className="inline-flex items-center justify-center h-14 w-14 rounded-full bg-blue-600 text-white mb-5">
          <IconCheck size={28} strokeWidth={3} />
        </div>
        <h3 className="h3 mb-3">Thank you.</h3>
        <p className="body-md max-w-prose-wide mx-auto">
          A colleague will be in touch soon.
        </p>
      </div>
    );
  }

  const counter = 500 - values.prompting.length;

  return (
    <form
      onSubmit={onSubmit}
      noValidate
      className="rounded-xl border border-slate-200 bg-white p-5 sm:p-8 shadow-card"
      aria-labelledby="demo-form-h"
    >
      <h3 id="demo-form-h" className="sr-only">Let's Talk</h3>

      <div className="space-y-5">
        <Field
          id="full-name" label="Full name" required
          value={values.name} onChange={set('name')} onBlur={blur('name')}
          error={touched.name && errors.name}
          autoComplete="name"
        />
        <Field
          id="work-email" label="Work email" required type="email" inputMode="email"
          value={values.email} onChange={set('email')} onBlur={blur('email')}
          error={touched.email && errors.email}
          autoComplete="email"
        />
        <Field
          id="org" label="Organisation name" required
          value={values.org} onChange={set('org')} onBlur={blur('org')}
          error={touched.org && errors.org}
          autoComplete="organization"
        />
        <TextareaField
          id="prompting" label="Anything else we should know?" optional
          value={values.prompting} onChange={set('prompting')} maxLength={500}
          counter={counter}
        />

        {serverError && (
          <div role="alert" className="rounded-lg border border-red-200 bg-red-50 text-red-800 px-4 py-3 text-[14px]">
            {serverError}
          </div>
        )}

        <button
          type="submit"
          disabled={sending}
          className="btn w-full inline-flex items-center justify-center bg-blue-600 hover:bg-blue-700 active:bg-blue-800 disabled:bg-blue-400 disabled:cursor-not-allowed text-white font-semibold rounded-lg px-6 py-3.5 text-[17px] transition-colors"
        >
          {sending ? 'Sending…' : 'Book my demo'}
        </button>
      </div>
    </form>
  );
}

const fieldBase =
  "w-full rounded-lg border bg-white px-4 py-3 text-[16px] text-slate-900 placeholder-slate-400 transition-colors focus:outline-none";

function Field({ id, label, required, error, ...rest }) {
  const errId = `${id}-error`;
  return (
    <div>
      <label htmlFor={id} className="block text-[14px] font-semibold text-slate-800 mb-1.5">
        {label} {required && <span className="text-slate-400 font-normal">(required)</span>}
      </label>
      <input
        id={id}
        required={required}
        aria-required={required || undefined}
        aria-invalid={!!error || undefined}
        aria-describedby={error ? errId : undefined}
        className={`${fieldBase} ${error ? 'border-red-500 focus:border-red-600 focus:shadow-[0_0_0_3px_rgba(220,38,38,0.18)]' : 'border-slate-300 focus:border-blue-600 focus:shadow-focus'}`}
        {...rest}
      />
      {error && (
        <p id={errId} role="alert" className="mt-2 text-[14px] text-red-700 font-medium">{error}</p>
      )}
    </div>
  );
}

function SelectField({ id, label, required, error, options, ...rest }) {
  const errId = `${id}-error`;
  return (
    <div>
      <label htmlFor={id} className="block text-[14px] font-semibold text-slate-800 mb-1.5">
        {label} {required && <span className="text-slate-400 font-normal">(required)</span>}
      </label>
      <div className="relative">
        <select
          id={id}
          required={required}
          aria-required={required || undefined}
          aria-invalid={!!error || undefined}
          aria-describedby={error ? errId : undefined}
          className={`${fieldBase} appearance-none pr-10 ${error ? 'border-red-500 focus:border-red-600 focus:shadow-[0_0_0_3px_rgba(220,38,38,0.18)]' : 'border-slate-300 focus:border-blue-600 focus:shadow-focus'}`}
          {...rest}
        >
          {options.map((o) => (
            <option key={o.value} value={o.value} disabled={o.value === ''}>
              {o.label}
            </option>
          ))}
        </select>
        <IconChevronDown size={18} className="absolute right-3.5 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none" />
      </div>
      {error && (
        <p id={errId} role="alert" className="mt-2 text-[14px] text-red-700 font-medium">{error}</p>
      )}
    </div>
  );
}

function TextareaField({ id, label, optional, counter, ...rest }) {
  return (
    <div>
      <div className="flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 mb-1.5">
        <label htmlFor={id} className="block text-[14px] font-semibold text-slate-800">
          {label} {optional && <span className="text-slate-400 font-normal">(optional)</span>}
        </label>
        <span className="text-[12px] text-slate-500 tabular-nums" aria-live="polite">{counter} characters left</span>
      </div>
      <textarea
        id={id}
        rows={4}
        className={`${fieldBase} resize-y border-slate-300 focus:border-blue-600 focus:shadow-focus`}
        {...rest}
      />
    </div>
  );
}

/* ===========================================================================
   11 — Footer
   =========================================================================== */
function Footer() {
  return (
    <footer className="bg-slate-900 text-slate-300" role="contentinfo">
      <div className="max-w-container mx-auto px-5 sm:px-8 pt-20 pb-12">
        <div className="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-8">
          <p className="text-[26px] sm:text-[30px] font-bold text-white max-w-[600px] leading-tight tracking-tight">
            Built for the people who make social housing work.
          </p>
          <a
            href="Book a demo.html"
            className="btn self-start inline-flex items-center justify-center gap-2 bg-orange-500 hover:bg-orange-600 text-white font-semibold rounded-lg px-6 py-3 shadow-lg shadow-orange-500/40 hover:shadow-xl hover:shadow-orange-500/50"
          >
            Let's Talk
          </a>
        </div>

        <div className="mt-16 grid sm:grid-cols-3 gap-10">
          <div>
            <h3 className="text-[12px] uppercase tracking-wider text-slate-400 font-semibold mb-4">Product</h3>
            <ul className="space-y-2.5 text-[15px]">
              <li><a className="hover:text-white transition-colors" href="Features.html">Features</a></li>
              <li><a className="hover:text-white transition-colors" href="Pricing.html">Pricing</a></li>
            </ul>
          </div>
          <div>
            <h3 className="text-[12px] uppercase tracking-wider text-slate-400 font-semibold mb-4">Company</h3>
            <ul className="space-y-2.5 text-[15px]">
              <li><a className="hover:text-white transition-colors" href="About.html">About</a></li>
              <li><a className="hover:text-white transition-colors" href="Book a demo.html">Contact</a></li>
            </ul>
            <a
              href="https://www.cx-feedback.co.uk"
              className="group mt-5 block rounded-lg border border-slate-700 bg-slate-800/40 hover:bg-slate-800/70 hover:border-slate-600 transition-colors p-4"
            >
              <div className="text-[11px] uppercase tracking-wider font-semibold text-slate-400 mb-2">Sister platform</div>
              <img
                src="assets/cx_feedback_logo_no_strap_light_cropped.png"
                alt="CX-Feedback"
                className="h-6 w-auto object-contain mb-2"
                loading="lazy"
              />
              <p className="text-[13px] text-slate-300 leading-snug">Tenant engagement software for social housing.</p>
            </a>
          </div>
          <div>
            <h3 className="text-[12px] uppercase tracking-wider text-slate-400 font-semibold mb-4">Legal</h3>
            <ul className="space-y-2.5 text-[15px]">
              <li><a className="hover:text-white transition-colors" href="Privacy.html">Privacy policy</a></li>
            </ul>
          </div>
        </div>

        <hr className="border-slate-700 mt-14" />

        <div className="mt-8 flex flex-col sm:flex-row gap-6 sm:gap-10 sm:items-start">
          <Wordmark variant="white" className="shrink-0" />
          <div className="space-y-3 text-[13px] text-slate-400 leading-relaxed">
            <div className="flex flex-col sm:flex-row sm:flex-wrap sm:items-center gap-x-6 gap-y-2">
              <a href="tel:+441418102599" className="inline-flex items-center gap-2 text-white text-[15px] font-semibold hover:text-blue-300 transition-colors">
                <IconPhoneCall size={16} className="text-blue-400" />
                0141 810 2599
              </a>
              <a href="mailto:info@colleaguepulse.co.uk" className="inline-flex items-center gap-2 text-white text-[15px] font-semibold hover:text-blue-300 transition-colors">
                <IconSend size={16} className="text-blue-400" />
                info@colleaguepulse.co.uk
              </a>
              <span className="text-slate-400">Monday to Friday, 9am to 5pm UK time</span>
              <a
                href="https://www.linkedin.com/company/colleaguepulse/?viewAsMember=true"
                target="_blank"
                rel="noopener noreferrer"
                aria-label="Colleague Pulse on LinkedIn"
                className="inline-flex items-center gap-2 text-white text-[15px] font-semibold hover:text-blue-300 transition-colors"
              >
                <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="text-blue-400">
                  <path d="M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.36V9h3.41v1.56h.05c.47-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.72V1.72C24 .77 23.2 0 22.22 0z" />
                </svg>
                LinkedIn
              </a>
            </div>
            <p>Target Applications Ltd, Centura Court, Hillington, Glasgow G52 4PR</p>
            <p>UK-built, EU-hosted, fully UK GDPR compliant.</p>
          </div>
        </div>
      </div>
    </footer>
  );
}

/* ===========================================================================
   Home page final CTA — focused push to demo
   =========================================================================== */
function HomeFinalCTA() {
  return (
    <section id="next-steps" className="py-24 lg:py-32 bg-white border-t border-slate-100" aria-labelledby="next-h">
      <div className="max-w-container mx-auto px-5 sm:px-8">
        <div className="text-center max-w-prose-wide mx-auto reveal">
          <p className="eyebrow mb-4">Ready to take the next step?</p>
          <h2 id="next-h" className="h2">See how it works for your team.</h2>
        </div>
        <div className="mt-14 max-w-[800px] mx-auto">
          {/* Let's Talk card */}
          <a
            href="Book a demo.html"
            className="reveal group relative flex flex-col items-center text-center rounded-2xl bg-blue-600 text-white p-10 lg:p-14 shadow-card hover:shadow-cardlg transition-shadow overflow-hidden focus-visible:outline-white"
          >
            <div className="absolute -top-10 -right-10 h-40 w-40 rounded-full bg-blue-500/30" aria-hidden="true" />
            <div className="absolute -bottom-10 -left-10 h-40 w-40 rounded-full bg-blue-500/30" aria-hidden="true" />
            <h3 className="mt-2 text-[32px] sm:text-[38px] leading-tight font-bold tracking-tight">Let's Talk</h3>
            <p className="mt-5 text-[18px] leading-relaxed text-blue-50 max-w-[600px]">
              A colleague will show you Colleague Pulse running on a workforce shaped like yours, walk through the ROI for your headcount, and answer the procurement questions.
            </p>
            <div className="mt-8 inline-flex items-center gap-2 bg-white text-blue-600 font-bold rounded-lg px-8 py-4 text-[18px] shadow-sm transition-transform group-hover:scale-[1.02]">
              <span>Let's Talk</span>
              <IconArrowRight size={20} className="transition-transform group-hover:translate-x-1" />
            </div>
          </a>
        </div>
      </div>
    </section>
  );
}

Object.assign(window, {
  Header, Hero, VideoBlock, ProblemStrip, CredibilityStrip, PainsSection, ThreeThings,
  SectorBlock, NumbersBlock, PricingBlock, DemoBlock, HomeFinalCTA, Footer,
  useReveal, Wordmark, BtnPrimary, BtnSecondary, TextLinkCTA, ImagePlaceholder,
  Field, SelectField, TextareaField, DemoForm,
  /* Back-compat aliases — keep the old TrustStrip name pointing somewhere sensible
     so any stray references on Pricing / Book pages still resolve. */
  TrustStrip: CredibilityStrip,
});
