/* Vyce · Prepared for Conneely Group
   Conneely Group: specialist subcontractor in interior finishes and exterior
   facades. Drylining, facades, recladding, fire testing, loadbearing SFS.
   Head office Braemar House, Stansted, Essex. 35+ years, £45m+ turnover,
   700+ tradesmen, £500k invested in H&S/quality training and Training Academy
   in 5 years. LSEG 'Company to Inspire Britain' three years running. FIS Gold
   2021. Sectors: residential, commercial, educational. Sourced from conneely.group. */

const { useState, useEffect, useRef } = React;

const C = {
  navy: "#2C2F33",
  navyDeep: "#1D1F22",
  purple: "#8A00FF",
  purpleDark: "#6A00C4",
  aqua: "#01FFB4",
  pale: "#F2F3F5",
  white: "#FFFFFF",
  inkSoft: "rgba(44,47,51,0.66)",
  inkLine: "rgba(44,47,51,0.12)"
};

/* ============================================================ */
/* Icons                                                        */
/* ============================================================ */
const Icon = {
  Check: ({ size = 13, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><polyline points="20 6 9 17 4 12" /></svg>,

  Arrow: ({ size = 16, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"><line x1="5" y1="12" x2="19" y2="12" /><polyline points="13 6 19 12 13 18" /></svg>,

  Shield: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" /><polyline points="9 12 11 14 15 10" /></svg>,

  Users: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M23 21v-2a4 4 0 0 0-3-3.87" /><path d="M16 3.13a4 4 0 0 1 0 7.75" /></svg>,

  Id: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="4" width="20" height="16" rx="2" /><circle cx="8" cy="10" r="2" /><path d="M6 16c0-1.66 1.34-3 3-3s3 1.34 3 3" /><line x1="15" y1="9" x2="19" y2="9" /><line x1="15" y1="13" x2="19" y2="13" /></svg>,

  Clock: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="9" /><polyline points="12 7 12 12 16 14" /></svg>,

  Award: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="8" r="6" /><path d="M15.5 13.5 17 22l-5-3-5 3 1.5-8.5" /></svg>,

  File: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="9" y1="13" x2="15" y2="13" /><line x1="9" y1="17" x2="15" y2="17" /></svg>,

  Chat: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /></svg>,

  Card: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="5" width="20" height="14" rx="2" /><line x1="2" y1="10" x2="22" y2="10" /><line x1="6" y1="15" x2="10" y2="15" /></svg>,

  Grid: ({ size = 22, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5" /><rect x="14" y="3" width="7" height="7" rx="1.5" /><rect x="3" y="14" width="7" height="7" rx="1.5" /><rect x="14" y="14" width="7" height="7" rx="1.5" /></svg>,

  Mail: ({ size = 16, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" /><polyline points="22 6 12 13 2 6" /></svg>,

  PhoneCall: ({ size = 16, color = "currentColor" }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" /></svg>
};

function VyceLogo({ mono = false, height = 28 }) {
  const src = mono ? "assets/vyce-logo-white.png" : "assets/vyce-logo.png";
  return <img src={src} alt="Vyce" style={{ height, width: "auto", display: "block" }} />;
}

/* ============================================================ */
/* Reveal-on-scroll                                             */
/* ============================================================ */
function Reveal({ children, delay = 0, as: Tag = "div", style, className = "", ...rest }) {
  const ref = useRef(null);
  const [visible, setVisible] = useState(false);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const io = new IntersectionObserver(
      (entries) => entries.forEach((e) => { if (e.isIntersecting) { setVisible(true); io.unobserve(e.target); } }),
      { threshold: 0.12, rootMargin: "0px 0px -40px 0px" }
    );
    io.observe(el);
    return () => io.disconnect();
  }, []);
  return (
    <Tag ref={ref} className={`reveal ${visible ? "in" : ""} ${className}`} style={{ transitionDelay: `${delay}ms`, ...style }} {...rest}>
      {children}
    </Tag>);
}

/* ============================================================ */
/* NAV                                                          */
/* ============================================================ */
function Nav() {
  const links = [
    { label: "The opportunity", href: "#opportunity" },
    { label: "Modules", href: "#modules" },
    { label: "Your sites", href: "#pipeline" },
    { label: "Why now", href: "#whynow" }];
  return (
    <nav className="nav">
      <div className="container" style={{ display: "flex", alignItems: "center", justifyContent: "space-between", height: 74 }}>
        <div style={{ display: "flex", alignItems: "center", gap: 16 }}>
          <a href="#top" style={{ display: "inline-flex", alignItems: "center" }}><VyceLogo /></a>
          <span style={{
            fontSize: 11, fontWeight: 700, letterSpacing: "0.14em", textTransform: "uppercase",
            color: C.inkSoft, borderLeft: `1px solid ${C.inkLine}`, paddingLeft: 16
          }} className="nav-tag">Prepared for Conneely Group</span>
        </div>
        <div style={{ display: "flex", alignItems: "center", gap: 28 }} className="nav-links">
          {links.map((l) =>
            <a key={l.href} href={l.href} style={{ fontSize: 14, fontWeight: 600, color: C.navy, opacity: 0.78 }}
              onMouseEnter={(e) => e.currentTarget.style.opacity = 1} onMouseLeave={(e) => e.currentTarget.style.opacity = 0.78}>
              {l.label}
            </a>
          )}
          <a href="https://www.vyce.io/" target="_blank" rel="noreferrer" style={{ fontSize: 14, fontWeight: 600, color: C.navy, opacity: 0.78 }}
            onMouseEnter={(e) => e.currentTarget.style.opacity = 1} onMouseLeave={(e) => e.currentTarget.style.opacity = 0.78}>
            Find out more
          </a>
          <a className="btn btn-primary" href="#cta" style={{ padding: "11px 18px", fontSize: 14 }}>
            Book a chat <Icon.Arrow size={14} />
          </a>
        </div>
      </div>
      <style>{`
        .nav-links a { white-space: nowrap; }
        .nav-tag { white-space: nowrap; margin-right: 16px; }
        @media (max-width: 1080px) { .nav-links a:not(.btn) { display: none; } }
        @media (max-width: 900px) { .nav-tag { display: none; } }
      `}</style>
    </nav>);
}

/* ============================================================ */
/* HERO                                                         */
/* ============================================================ */
function Hero() {
  return (
    <section id="top" style={{ position: "relative", paddingTop: 64, paddingBottom: 84, overflow: "hidden" }}>
      <div aria-hidden="true" style={{
        position: "absolute", inset: 0, zIndex: 0, pointerEvents: "none",
        background: "radial-gradient(60% 60% at 88% 0%, rgba(44,47,51,0.06) 0%, rgba(44,47,51,0) 60%), radial-gradient(50% 50% at 0% 20%, rgba(138,0,255,0.07) 0%, rgba(138,0,255,0) 60%)"
      }} />
      <div className="container" style={{ position: "relative", zIndex: 1 }}>
        <div className="rise" style={{ animationDelay: "60ms" }}>
          <span className="pill" style={{ background: "rgba(138,0,255,0.08)", color: C.purple, border: "1px solid rgba(138,0,255,0.20)" }}>
            <span style={{ width: 8, height: 8, borderRadius: 999, background: C.purple }} className="dot-pulse" />
            Prepared for Conneely Group
          </span>
        </div>

        <h1 className="vh rise" style={{ animationDelay: "180ms", marginTop: 22, fontSize: "clamp(40px, 6vw, 80px)", maxWidth: 1040 }}>
          The command centre for the{" "}
          <span style={{ position: "relative", display: "inline-block", color: "var(--accent)", whiteSpace: "nowrap" }}>
            <span style={{ position: "relative", zIndex: 1 }}>Conneely</span>
            <span aria-hidden="true" className="hi-bar" style={{
              position: "absolute", left: -2, right: -2, bottom: "0.05em", height: 10, borderRadius: 4, opacity: 0.85, zIndex: 0, transform: "skewX(-8deg)"
            }} />
          </span>{" "}
          <span style={{ position: "relative", display: "inline-block", color: "var(--accent)", whiteSpace: "nowrap" }}>
            <span style={{ position: "relative", zIndex: 1 }}>Group</span>
            <span aria-hidden="true" className="hi-bar" style={{
              position: "absolute", left: -2, right: -2, bottom: "0.05em", height: 10, borderRadius: 4, opacity: 0.85, zIndex: 0, transform: "skewX(-8deg)"
            }} />
          </span>{" "}
          workforce.
        </h1>

        <p className="rise" style={{ animationDelay: "320ms", marginTop: 26, maxWidth: 740, fontSize: 19, lineHeight: 1.55, color: C.inkSoft, fontWeight: 500 }}>
          One live view of all 700+ tradesmen, across every drylining, facade and recladding site. Onboarding, right to work, CSCS cards, time and attendance, digital forms and contractor payments, all in one place. Modular, so you take the whole platform or just the parts you need.
        </p>

        <div className="rise" style={{ animationDelay: "480ms", marginTop: 34, display: "flex", gap: 12, flexWrap: "wrap" }}>
          <a href="#cta" className="btn btn-primary">Book a chat <Icon.Arrow /></a>
          <a href="#opportunity" className="btn btn-outline">See how it works</a>
        </div>

        {/* Visual grid */}
        <div className="rise" style={{ animationDelay: "580ms", marginTop: 64, display: "grid", gridTemplateColumns: "1.5fr 1fr", gap: 18 }}>
          <div style={{ position: "relative", aspectRatio: "16 / 10", borderRadius: 16, overflow: "hidden", background: C.navy, boxShadow: "0 18px 44px rgba(44,47,51,0.20)" }}>
            <video src="assets/hero-film.mp4" poster="assets/hero-still.jpg" autoPlay muted playsInline preload="auto" style={{ width: "100%", height: "100%", objectFit: "cover", display: "block" }} />
            <div aria-hidden="true" style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: "42%", background: "linear-gradient(180deg, rgba(29,31,34,0) 0%, rgba(29,31,34,0.55) 100%)", pointerEvents: "none" }} />
            <div style={{
              position: "absolute", left: 16, bottom: 16, display: "inline-flex", alignItems: "center", gap: 8,
              padding: "6px 12px", borderRadius: 999, background: "rgba(29,31,34,0.6)", backdropFilter: "blur(8px)",
              color: C.white, fontSize: 11, fontWeight: 700, letterSpacing: "0.14em", textTransform: "uppercase"
            }}>
              <span style={{ width: 6, height: 6, borderRadius: 999, background: C.aqua }} className="dot-pulse" />
              Live and deployable today
            </div>
          </div>

          <div style={{ display: "grid", gridTemplateRows: "1fr 1fr", gap: 18 }}>
            {/* Supply chain card */}
            <div className="lift" style={{
              background: C.navy, color: C.white, borderRadius: 24, padding: 28,
              display: "flex", flexDirection: "column", justifyContent: "space-between",
              boxShadow: "0 18px 40px rgba(44,47,51,0.20)", position: "relative", overflow: "hidden"
            }}>
              <div aria-hidden="true" style={{ position: "absolute", right: -40, top: -40, width: 180, height: 180, borderRadius: 999, background: "radial-gradient(closest-side, rgba(138,0,255,0.35), transparent 70%)" }} />
              <div style={{ position: "relative" }}>
                <div className="eyebrow" style={{ color: C.aqua }}>One live picture</div>
                <div style={{ fontSize: 30, fontWeight: 700, letterSpacing: "-0.02em", lineHeight: 1.2, marginTop: 14 }}>
                  Every dryliner, plasterer and facade installer, verified and tracked in real time.
                </div>
              </div>
              <div style={{ fontSize: 13, lineHeight: 1.45, color: "rgba(255,255,255,0.78)", position: "relative", marginTop: 16 }}>
                Right to work, CSCS cards, fire-stopping and access competencies in one dashboard. Clock in and clock out doubles as your live record of which crew is on which site, for which client.
              </div>
            </div>

            {/* Modular card */}
            <div className="lift" style={{
              background: C.purple, color: C.white, borderRadius: 24, padding: 28,
              display: "flex", flexDirection: "column", justifyContent: "flex-start",
              boxShadow: "0 18px 40px rgba(138,0,255,0.26)"
            }}>
              <div className="eyebrow" style={{ color: "rgba(255,255,255,0.75)" }}>Modular by design</div>
              <div style={{ fontSize: 22, lineHeight: 1.35, fontWeight: 600, letterSpacing: "-0.01em", marginTop: 12 }}>
                Start by onboarding your team and keeping every card compliant, effortlessly. Then switch on the rest.
              </div>
            </div>
          </div>
        </div>
      </div>

      <style>{`
        @media (max-width: 880px) {
          section#top > div > div[style*="grid-template-columns: 1.5fr 1fr"] { grid-template-columns: 1fr !important; }
        }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION A — THE CHALLENGE                                    */
/* ============================================================ */
function Challenge() {
  return (
    <section id="opportunity" style={{ padding: "8px 0 88px" }}>
      <div className="container">
        <Reveal style={{ maxWidth: 960 }}>
          <div className="eyebrow" style={{ color: C.purple }}>The opportunity</div>
          <h2 className="vh" style={{ marginTop: 14, fontSize: "clamp(32px, 4.6vw, 56px)", maxWidth: 900 }}>
Expertise you can see. <em className="not-italic">A workforce you can trust.</em>
          </h2>
          <p style={{ marginTop: 22, fontSize: 18, lineHeight: 1.6, color: C.inkSoft, maxWidth: 820 }}>
Delivering drylining, facades and recladding with a workforce of 700+ tradesmen means crews moving between residential blocks, hospitals, offices and universities for the UK's most prestigious main contractors. On building safety work, every client expects evidence on demand: who is on site, whether their CSCS cards, competencies and right to work are current, and that every RAMS, inspection, quality check and induction is signed. Gathering that by hand across hundreds of operatives slows everyone down. Vyce replaces all of it with one live system.
          </p>
        </Reveal>
      </div>
    </section>);
}

/* ============================================================ */
/* SECTION B — HOW VYCE HELPS (three cards)                     */
/* ============================================================ */
function HowVyceHelps() {
  const cards = [
    {
      tag: "Lead priority",
      icon: <Icon.Shield size={26} />,
      title: "Every scaffolder and every card, one live view",
      body: "Your whole workforce, onboarded, verified and tracked in real time. Right to work, CSCS cards, competencies, health and safety training and insurances in one dashboard, with alerts before anything expires. Evidence for a main contractor, client or building safety audit in seconds, not days.",
      dark: true
    },
    {
      tag: "On every site",
      icon: <Icon.Clock size={26} />,
      title: "Time and attendance, without the chasing",
      body: "A live record of who clocked in and out, on which site and for how long, flowing straight into contractor payments. No paper timesheets, no re-keying, and real labour cost against every job.",
      dark: false
    },
    {
      tag: "Contractor payments",
      icon: <Icon.Card size={26} />,
      title: "Contractor payments that match how you engage people",
      body: "CIS and self-employed workers paid correctly and on time, on one consolidated invoice. Self-serve or fully outsourced, whichever suits your team.",
      dark: false
    }];
  return (
    <section style={{ padding: "0 0 40px" }}>
      <div className="container">
        <Reveal>
          <div className="eyebrow" style={{ color: C.purple }}>How Vyce helps</div>
          <h2 className="vh" style={{ marginTop: 14, fontSize: "clamp(30px, 4.4vw, 52px)", maxWidth: 900 }}>
Built for how Conneely <em className="not-italic">delivers.</em>
          </h2>
        </Reveal>

        <div style={{ marginTop: 40, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 18 }} className="help-grid">
          {cards.map((c, i) =>
            <Reveal key={i} delay={i * 100}>
              <div className="lift" style={{
                height: "100%", borderRadius: 24, padding: 36,
                background: c.dark ? C.navy : C.white,
                color: c.dark ? C.white : C.navy,
                border: c.dark ? "none" : `1px solid ${C.inkLine}`,
                display: "flex", flexDirection: "column"
              }}>
                <div style={{
                  width: 56, height: 56, borderRadius: 16, display: "flex", alignItems: "center", justifyContent: "center",
                  background: c.dark ? "rgba(1,255,180,0.14)" : "rgba(138,0,255,0.10)",
                  color: c.dark ? C.aqua : C.purple
                }}>{c.icon}</div>
                <div className="eyebrow" style={{ marginTop: 22, color: c.dark ? C.aqua : C.purple }}>{c.tag}</div>
                <h3 className="vh" style={{ marginTop: 10, fontSize: 25, color: c.dark ? C.white : C.navy }}>{c.title}</h3>
                <p style={{ marginTop: 16, fontSize: 15, lineHeight: 1.6, color: c.dark ? "rgba(255,255,255,0.80)" : C.inkSoft }}>{c.body}</p>
              </div>
            </Reveal>
          )}
        </div>

        <Reveal delay={220}>
          <p style={{ marginTop: 26, fontSize: 17, lineHeight: 1.55, color: C.navy, fontWeight: 600, maxWidth: 820 }}>
Take the full suite, or a single module. Start on one division, prove it, then roll out.
          </p>
        </Reveal>
      </div>
      <style>{`
        @media (max-width: 900px) { .help-grid { grid-template-columns: 1fr !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION C — MODULAR SUITE                                    */
/* ============================================================ */
function ModularSuite() {
  const modules = [
    { icon: <Icon.Id />, name: "Onboarding and identity", body: "ID and right-to-work verification" },
    { icon: <Icon.Shield />, name: "Teams and compliance", body: "CSCS cards, competencies, training, insurances, expiry alerts" },
    { icon: <Icon.Clock />, name: "Time and attendance", body: "Live on-site record, hours worked, labour cost per site" },
    { icon: <Icon.File />, name: "Digital forms", body: "RAMS, quality inspections, fire-stopping sign-offs, toolbox talks and inductions, signed on a phone, 100% paperless" },
    { icon: <Icon.Chat />, name: "Secure site messaging", body: "Job comms in one auditable place, off personal WhatsApp groups" },
    { icon: <Icon.Card />, name: "Contractor payments", body: "CIS and self-employed, one consolidated invoice, self-serve or outsourced" }];
  return (
    <section id="modules" style={{ padding: "40px 0 88px" }}>
      <div className="container">
        <Reveal>
          <div className="eyebrow" style={{ color: C.purple }}>The modular suite</div>
          <h2 className="vh" style={{ marginTop: 14, fontSize: "clamp(30px, 4.4vw, 52px)", maxWidth: 900 }}>
            A modular suite. <em className="not-italic">Switch on what you need.</em>
          </h2>
          <p style={{ marginTop: 18, maxWidth: 680, fontSize: 17, lineHeight: 1.55, color: C.inkSoft }}>
            Start with the modules that add the most value today, then add the rest when it suits you. Nothing to rip out, no long procurement cycle.
          </p>
        </Reveal>

        <div style={{ marginTop: 40, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 16 }} className="mod-grid">
          {modules.map((m, i) =>
            <Reveal key={i} delay={i * 70}>
              <div className="lift" style={{
                height: "100%", background: C.white, border: `1px solid ${C.inkLine}`, borderRadius: 20, padding: 28,
                display: "flex", flexDirection: "column"
              }}>
                <div style={{ width: 48, height: 48, borderRadius: 13, background: "rgba(138,0,255,0.10)", color: C.purple, display: "flex", alignItems: "center", justifyContent: "center" }}>{m.icon}</div>
                <h3 style={{ marginTop: 20, fontSize: 19, fontWeight: 700, letterSpacing: "-0.01em", color: C.navy, lineHeight: 1.25 }}>{m.name}</h3>
                <p style={{ marginTop: 10, fontSize: 14, lineHeight: 1.55, color: C.inkSoft }}>{m.body}</p>
              </div>
            </Reveal>
          )}
        </div>
      </div>
      <style>{`
        @media (max-width: 900px) { .mod-grid { grid-template-columns: repeat(2, 1fr) !important; } }
        @media (max-width: 560px) { .mod-grid { grid-template-columns: 1fr !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION D — YOUR CLIENTS                                     */
/* ============================================================ */
function Pipeline() {
  const tiles = [
    "Drylining",
    "Facades",
    "Recladding",
    "Fire testing",
    "Loadbearing SFS"];
  return (
    <section id="pipeline" style={{ padding: "0 0 88px" }}>
      <div className="container">
        <Reveal style={{
          background: C.navy, color: C.white, borderRadius: 24, padding: "56px 48px", position: "relative", overflow: "hidden"
        }} className="div-wrap">
          <div aria-hidden="true" style={{ position: "absolute", right: "-6%", top: "-40%", width: 420, height: 420, borderRadius: 999, background: "radial-gradient(closest-side, rgba(138,0,255,0.30), transparent 70%)" }} />
          <div style={{ position: "relative" }}>
            <div className="eyebrow" style={{ color: C.aqua }}>Across every division</div>
            <h2 className="vh" style={{ color: C.white, marginTop: 14, fontSize: "clamp(28px, 4vw, 48px)", maxWidth: 820 }}>
Every site, every service. <em className="not-italic" style={{ color: C.aqua }}>One live workforce picture.</em>
            </h2>
            <p style={{ marginTop: 20, fontSize: 17, lineHeight: 1.6, color: "rgba(255,255,255,0.82)", maxWidth: 720 }}>
Vyce gives every site, from luxury apartments to hospitals and universities, the same live view of who is working, where, and whether they are cleared to be there.
            </p>

            <div style={{ marginTop: 36, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 14 }} className="div-grid">
              {tiles.map((t, i) =>
                <Reveal key={i} delay={i * 70}>
                  <div className="lift" style={{
                    background: "rgba(255,255,255,0.06)", border: "1px solid rgba(255,255,255,0.16)", borderRadius: 16,
                    padding: "24px 26px", display: "flex", alignItems: "center", gap: 14, height: "100%"
                  }}>
                    <Icon.Grid size={20} color={C.aqua} />
                    <span style={{ fontSize: 17, fontWeight: 600, letterSpacing: "-0.01em" }}>{t}</span>
                  </div>
                </Reveal>
              )}
              <Reveal delay={5 * 70}>
                <div style={{
                  background: "rgba(138,0,255,0.14)", border: "1px solid rgba(138,0,255,0.30)", borderRadius: 16,
                  padding: "24px 26px", display: "flex", flexDirection: "column", gap: 4, height: "100%", justifyContent: "center"
                }}>
                  <span style={{ fontSize: 22, fontWeight: 700, letterSpacing: "-0.02em" }}>700+ tradesmen</span>
                  <span style={{ fontSize: 13, color: "rgba(255,255,255,0.78)" }}>£45m+ turnover and a London Stock Exchange 'Company to Inspire Britain' three years running</span>
                </div>
              </Reveal>
            </div>
          </div>
        </Reveal>
      </div>
      <style>{`
        @media (max-width: 820px) { .div-grid { grid-template-columns: 1fr !important; } .div-wrap { padding: 40px 28px !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION E — WHY NOW                                          */
/* ============================================================ */
function WhyNow() {
  return (
    <section id="whynow" style={{ padding: "0 0 88px" }}>
      <div className="container">
        <Reveal style={{
          background: C.pale, borderRadius: 24, padding: "56px 48px"
        }} className="why-grid">
          <div>
            <div className="eyebrow" style={{ color: C.purple }}>Why now</div>
            <h2 className="vh" style={{ marginTop: 14, fontSize: "clamp(28px, 3.8vw, 46px)", maxWidth: 720 }}>
Raising standards. <em className="not-italic">One system behind it.</em>
            </h2>
            <p style={{ marginTop: 20, fontSize: 17, lineHeight: 1.65, color: C.inkSoft, maxWidth: 820 }}>
Raising standards to save lives depends on the right people, trained and carded, on the right site, with every inspection signed and every operative paid correctly. With £500,000 invested in health, safety and quality training and the Training Academy in the last five years, Conneely already treats competence as pivotal. Holding it in spreadsheets and folders across 700+ tradesmen costs time every week and creates risk on the day it matters. One modern system for workforce visibility, compliance, forms and contractor payments carries the load as Conneely keeps growing. Vyce is that system. Modular, proven, and live today.
            </p>
          </div>
        </Reveal>
      </div>
      <style>{`
        @media (max-width: 880px) { .why-grid { padding: 40px 28px !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION F — PROOF                                            */
/* ============================================================ */
function Proof() {
  return (
    <section style={{ padding: "0 0 88px" }}>
      <div className="container">
        <Reveal style={{ maxWidth: 980 }}>
          <div className="eyebrow" style={{ color: C.purple }}>Proof</div>
          <h2 className="vh" style={{ marginTop: 14, fontSize: "clamp(30px, 4.4vw, 52px)", maxWidth: 760 }}>
            Proven on <em className="not-italic">live UK sites.</em>
          </h2>
        </Reveal>

        <div style={{ marginTop: 36 }}>
          <Reveal>
            <div style={{
              background: C.white, border: `1px solid ${C.inkLine}`, borderRadius: 24, padding: 48, maxWidth: 980,
              display: "flex", flexDirection: "column"
            }}>
              <p style={{ fontSize: 18, lineHeight: 1.6, color: C.inkSoft, fontWeight: 500, maxWidth: 780 }}>
                Vyce runs the workforce for construction firms across the UK, including Swift Brickwork.
              </p>
              <p className="vh" style={{ marginTop: 24, fontSize: "clamp(24px, 2.8vw, 34px)", fontWeight: 600, lineHeight: 1.3, maxWidth: 820 }}>
                “Vyce has totally streamlined and automated our people management processes. <em className="not-italic">Highly recommend it.</em>”
              </p>
              <div style={{ marginTop: 28, display: "flex", alignItems: "center", gap: 14 }}>
                <img src="assets/mike-walsh.jpeg" alt="Mike Walsh" style={{ width: 52, height: 52, borderRadius: 999, objectFit: "cover", border: "2px solid rgba(138,0,255,0.18)" }} />
                <div>
                  <div style={{ fontSize: 15, fontWeight: 700, color: C.navy }}>Mike Walsh</div>
                  <div style={{ fontSize: 13, color: C.inkSoft }}>Chairman, Swift Brickwork Contractors Limited</div>
                </div>
              </div>
            </div>
          </Reveal>
        </div>
      </div>
    </section>);
}

/* ============================================================ */
/* AWARDS STRIP                                                 */
/* ============================================================ */
function Awards() {
  const items = [
    { year: "2025", title: "Construction Software of the Year", body: "Finalist, London Construction Awards" },
    { year: "2018", title: "Innovation of the Year", body: "Winner, Building Innovation Awards" },
    { year: "2017", title: "Digital Efficiency Initiative of the Year", body: "Winner, Building Awards" }];
  return (
    <section style={{ padding: "0 0 88px" }}>
      <div className="container">
        <Reveal style={{
          border: `1px solid ${C.inkLine}`, borderRadius: 24, padding: "44px 48px", background: C.white
        }} className="awards-wrap">
          <div style={{ display: "flex", alignItems: "flex-end", justifyContent: "space-between", gap: 24, flexWrap: "wrap" }}>
            <div>
              <div className="eyebrow" style={{ color: C.purple }}>Recognition</div>
              <h2 className="vh" style={{ marginTop: 12, fontSize: "clamp(24px, 3.2vw, 38px)", maxWidth: 620 }}>
                Recognised by the industry <em className="not-italic">and our peers.</em>
              </h2>
            </div>
            <a href="https://www.vyce.io/awards" target="_blank" rel="noreferrer" className="btn btn-outline" style={{ padding: "12px 20px", fontSize: 14 }}>
              See all our awards <Icon.Arrow size={14} />
            </a>
          </div>

          <div style={{ marginTop: 36, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 16 }} className="awards-grid">
            {items.map((a, i) =>
              <Reveal key={i} delay={i * 80}>
                <div style={{
                  height: "100%", borderTop: `2px solid ${C.inkLine}`, paddingTop: 22,
                  display: "flex", flexDirection: "column", gap: 10
                }}>
                  <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
                    <Icon.Award size={20} color={C.purple} />
                    <span style={{ fontSize: 13, fontWeight: 700, letterSpacing: "0.06em", color: C.inkSoft }}>{a.year}</span>
                  </div>
                  <div style={{ fontSize: 18, fontWeight: 700, letterSpacing: "-0.01em", color: C.navy, lineHeight: 1.25 }}>{a.title}</div>
                  <div style={{ fontSize: 14, lineHeight: 1.5, color: C.inkSoft }}>{a.body}</div>
                </div>
              </Reveal>
            )}
          </div>
        </Reveal>
      </div>
      <style>{`
        @media (max-width: 780px) { .awards-grid { grid-template-columns: 1fr !important; } .awards-wrap { padding: 36px 28px !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* SECTION G — FINAL CTA + CONTACT                              */
/* ============================================================ */
function FinalCTA() {
  return (
    <section id="cta" style={{ padding: "0 0 110px" }}>
      <div className="container">
        <Reveal style={{
          background: C.navy, color: C.white, borderRadius: 28, padding: "72px 56px", position: "relative", overflow: "hidden"
        }} className="cta-wrap">
          <div aria-hidden="true" style={{ position: "absolute", left: "-8%", bottom: "-50%", width: 480, height: 480, borderRadius: 999, background: "radial-gradient(closest-side, rgba(138,0,255,0.34), transparent 70%)" }} />
          <div aria-hidden="true" style={{ position: "absolute", right: "-6%", top: "-40%", width: 380, height: 380, borderRadius: 999, background: "radial-gradient(closest-side, rgba(1,255,180,0.18), transparent 70%)" }} />
          <div style={{ position: "relative", display: "grid", gridTemplateColumns: "1.2fr 0.8fr", gap: 56, alignItems: "center" }} className="cta-grid">
            <div>
              <div className="eyebrow" style={{ color: C.aqua }}>Next step</div>
              <h2 className="vh" style={{ color: C.white, marginTop: 16, fontSize: "clamp(40px, 6vw, 76px)" }}>
                Let's <em className="not-italic" style={{ color: C.aqua }}>talk.</em>
              </h2>
              <p style={{ marginTop: 22, fontSize: 18, lineHeight: 1.6, color: "rgba(255,255,255,0.82)", maxWidth: 520 }}>
                A short conversation to hear how your team manages the workforce today, and where Vyce could take the weight.
              </p>
              <div style={{ marginTop: 32, display: "flex", gap: 12, flexWrap: "wrap" }}>
                <a className="btn btn-primary" href="https://meetings.hubspot.com/matt2053" target="_blank" rel="noreferrer">Book a chat with Matt <Icon.Arrow /></a>
                <a className="btn btn-ghost-light" href="mailto:matt@vyce.io">Email Matt directly</a>
              </div>
            </div>

            {/* Contact card */}
            <div style={{
              background: "rgba(255,255,255,0.07)", border: "1px solid rgba(255,255,255,0.16)", borderRadius: 20,
              padding: 32, backdropFilter: "blur(8px)"
            }}>
              <div className="eyebrow" style={{ color: C.aqua }}>Your contact</div>
              <div style={{ marginTop: 16, fontSize: 22, fontWeight: 700, letterSpacing: "-0.01em" }}>Matt Rantell</div>
              <div style={{ marginTop: 4, fontSize: 14, color: "rgba(255,255,255,0.72)" }}>CEO and Founder, Vyce</div>
              <div style={{ marginTop: 24, display: "grid", gap: 12 }}>
                <a href="mailto:matt@vyce.io" className="footer-link" style={{ display: "inline-flex", alignItems: "center", gap: 10, color: C.white, fontSize: 15 }}>
                  <Icon.Mail size={16} color={C.aqua} /> matt@vyce.io
                </a>
                <a href="tel:02038686303" className="footer-link" style={{ display: "inline-flex", alignItems: "center", gap: 10, color: C.white, fontSize: 15 }}>
                  <Icon.PhoneCall size={16} color={C.aqua} /> 0203 868 6303
                </a>
              </div>
            </div>
          </div>
        </Reveal>
      </div>
      <style>{`
        @media (max-width: 880px) { .cta-grid { grid-template-columns: 1fr !important; } .cta-wrap { padding: 48px 32px !important; } }
      `}</style>
    </section>);
}

/* ============================================================ */
/* FOOTER                                                       */
/* ============================================================ */
function Footer() {
  const cols = [
    { label: "The opportunity", href: "#opportunity" },
    { label: "Modules", href: "#modules" },
    { label: "Your sites", href: "#pipeline" },
    { label: "Book a chat", href: "#cta" },
    { label: "Find out more", href: "https://www.vyce.io/", external: true }];
  return (
    <footer style={{ background: C.navyDeep, color: C.white }}>
      <div className="container" style={{ padding: "56px 32px 36px" }}>
        <div style={{ display: "grid", gridTemplateColumns: "1.4fr 1fr", gap: 32, alignItems: "start" }} className="footer-grid">
          <div>
            <VyceLogo mono />
            <div style={{ marginTop: 18, fontSize: 14, lineHeight: 1.6, color: "rgba(255,255,255,0.65)", maxWidth: 420 }}>
              A tailored proposal from Vyce, prepared for Conneely Group. Vyce is not affiliated with, endorsed by, or partnered with Conneely Group. Trademarks and brand names are the property of their respective owners.
            </div>
          </div>
          <div style={{ display: "flex", flexWrap: "wrap", gap: 32, justifyContent: "flex-end" }} className="footer-links">
            {cols.map((c) =>
              <a key={c.href} href={c.href} {...(c.external ? { target: "_blank", rel: "noreferrer" } : {})} className="footer-link" style={{ fontSize: 14, fontWeight: 600, color: "rgba(255,255,255,0.85)" }}>{c.label}</a>
            )}
          </div>
        </div>

        <div style={{
          marginTop: 40, paddingTop: 22, borderTop: "1px solid rgba(255,255,255,0.12)",
          display: "flex", alignItems: "center", justifyContent: "space-between", gap: 16, flexWrap: "wrap",
          fontSize: 13, color: "rgba(255,255,255,0.6)"
        }}>
          <div style={{ display: "inline-flex", alignItems: "center", gap: 18, flexWrap: "wrap" }}>
            <span style={{ display: "inline-flex", alignItems: "center", gap: 8 }}>
              <Icon.Mail size={14} color="rgba(255,255,255,0.6)" />
              <a href="mailto:matt@vyce.io" className="footer-link" style={{ color: "rgba(255,255,255,0.6)" }}>matt@vyce.io</a>
            </span>
            <span style={{ display: "inline-flex", alignItems: "center", gap: 8 }}>
              <Icon.PhoneCall size={14} color="rgba(255,255,255,0.6)" />
              <a href="tel:02038686303" className="footer-link" style={{ color: "rgba(255,255,255,0.6)" }}>0203 868 6303</a>
            </span>
          </div>
          <div>© Vyce Group Limited. All rights reserved.</div>
        </div>
      </div>
      <style>{`
        @media (max-width: 720px) {
          .footer-grid { grid-template-columns: 1fr !important; }
          .footer-links { justify-content: flex-start !important; }
        }
      `}</style>
    </footer>);
}

/* ============================================================ */
/* APP                                                          */
/* ============================================================ */
function App() {
  const t = useTweaks(/*EDITMODE-BEGIN*/{
    "accent": "vyce",
    "density": "showcase"
  } /*EDITMODE-END*/);

  useEffect(() => {
    const body = document.body;
    body.classList.toggle("density-compact", t.density === "compact");
  }, [t.accent, t.density]);

  return (
    <div data-screen-label="01 Vyce for Conneely Group">
      <Nav />
      <Hero />
      <Challenge />
      <HowVyceHelps />
      <ModularSuite />
      <Pipeline />
      <WhyNow />
      <Proof />
      <Awards />
      <FinalCTA />
      <Footer />

      <TweaksPanel title="Tweaks">
        <TweakSection title="Density" subtitle="Showcase vs. tighter proposal">
          <TweakRadio value={t.density} onChange={(v) => t.setTweak("density", v)} options={[
            { value: "showcase", label: "Showcase" },
            { value: "compact", label: "Compact" }]} />
        </TweakSection>
      </TweaksPanel>
    </div>);
}

ReactDOM.createRoot(document.getElementById("root")).render(<App />);
