All files / src/apps/home/pages Pricing.tsx

76.92% Statements 30/39
92.72% Branches 51/55
58.82% Functions 10/17
76.92% Lines 30/39

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626                                                                              1x       1x                       1x                                                                                                                                                       1x             1x             1x             1x                                                                                               1x                                                         20x                             80x 56x         24x 3x         21x 13x         8x       5x 5x                                                                       1x 1x   1x                                                                         4x                                                                                                                                     24x                                                                                                                                                     4x                                 25x 5x                             20x 20x                         80x                                                                 5x                                                                                                                        
import { BRAND_BLUE } from "@/components/theme/accents";
import { usePageMeta } from "@/contexts/PageContext";
import { APP_EMAILS, APP_NAME, APP_ROUTES } from "@/routes/const";
import {
  Check,
  ChevronDown,
  ChevronUp,
  Minus,
  Sparkles,
  Zap,
} from "lucide-react";
import React, { useState } from "react";
 
// ─── Types ────────────────────────────────────────────────────────────────────
 
/**
 * A paid tier carries no public price until pricing is validated with design
 * partners (docs/business/go-to-market.md#pricing--packaging), and nothing on
 * this page may claim a feature the product doesn't ship. A feature that is
 * planned says so with `roadmap` rather than being left off or ticked.
 */
interface TierItem {
  label: string;
  roadmap?: boolean;
}
 
interface Tier {
  id: TierId;
  name: string;
  badge?: string;
  tagline: string;
  price: string;
  priceNote: string;
  cta: string;
  ctaHref: string;
  highlighted: boolean;
  includes: TierItem[];
}
 
const TIER_IDS = ["free", "partner", "team", "enterprise"] as const;
type TierId = (typeof TIER_IDS)[number];
 
/** Shown in a comparison cell for a feature that isn't available yet. */
const ROADMAP = "Roadmap";
 
type FeatureValue = boolean | string;
 
interface FeatureRow {
  label: string;
  section?: string;
  values?: Record<TierId, FeatureValue>;
}
 
// ─── Data ─────────────────────────────────────────────────────────────────────
 
const TIERS: Tier[] = [
  {
    id: "free",
    name: "Free",
    tagline: "Evaluate the platform on your own.",
    price: "Free",
    priceNote: "for one user",
    cta: "Get Started",
    ctaHref: APP_ROUTES.HOME.signup,
    highlighted: false,
    includes: [
      { label: "Agents, skills and knowledge bases" },
      { label: "Access, input and output rules" },
      { label: "Evaluation with built-in gold datasets" },
      { label: "Version history and activity log" },
      { label: "Shared platform hosted in the UK" },
      { label: "Email support, best effort" },
    ],
  },
  {
    id: "partner",
    name: "Design Partner",
    badge: "Now onboarding",
    tagline: "Pilot on a real use case and help shape what we build.",
    price: "Pilot",
    priceNote: "90 days, credited to year one",
    cta: "Talk to Us",
    ctaHref: APP_ROUTES.HOME.contact,
    highlighted: true,
    includes: [
      { label: "Everything in Free" },
      { label: "A dedicated instance hosted in the UK" },
      { label: "Founder-led onboarding" },
      { label: "Weekly feedback sessions" },
      { label: "Direct input into the roadmap" },
      { label: "Early access to new features" },
    ],
  },
  {
    id: "team",
    name: "Team",
    tagline: "For a business unit running governed AI in production.",
    price: "Annual",
    priceNote: "dedicated UK instance",
    cta: "Talk to Us",
    ctaHref: APP_ROUTES.HOME.contact,
    highlighted: false,
    includes: [
      { label: "Everything in Free, on a dedicated instance" },
      { label: "Team workspace with invitations", roadmap: true },
      { label: "Single sign-on (SAML / OIDC)", roadmap: true },
      { label: "Assurance evidence packs", roadmap: true },
      { label: "Alerts for reviews and regressions", roadmap: true },
      { label: "Business-hours support" },
    ],
  },
  {
    id: "enterprise",
    name: "Enterprise",
    tagline: "Organisation-wide, in your environment.",
    price: "Custom",
    priceNote: "your cloud or ours",
    cta: "Talk to Us",
    ctaHref: APP_ROUTES.HOME.contact,
    highlighted: false,
    includes: [
      { label: "Everything in Team" },
      { label: "Deployment into your own cloud", roadmap: true },
      { label: "Fine-grained roles and permissions", roadmap: true },
      { label: "Managed secrets vault", roadmap: true },
      { label: "Security review support" },
      { label: "Agreed service levels" },
    ],
  },
];
 
const ALL: Record<TierId, FeatureValue> = {
  free: true,
  partner: true,
  team: true,
  enterprise: true,
};
 
const PAID_ROADMAP: Record<TierId, FeatureValue> = {
  free: false,
  partner: ROADMAP,
  team: ROADMAP,
  enterprise: ROADMAP,
};
 
const ALL_ROADMAP: Record<TierId, FeatureValue> = {
  free: ROADMAP,
  partner: ROADMAP,
  team: ROADMAP,
  enterprise: ROADMAP,
};
 
const FEATURE_ROWS: FeatureRow[] = [
  { section: "Governance", label: "" },
  { label: "Access, input and output rules on every invocation", values: ALL },
  { label: "Governance activity log", values: ALL },
  { label: "Review queue for flagged responses and regressions", values: ALL },
  { label: "Version history and diffing on every resource", values: ALL },
  { label: "Require evaluation evidence before an agent answers", values: ALL },
  { label: "Cost metering, cost caps and rate limits", values: ALL },
 
  { section: "Evaluation", label: "" },
  { label: "Datasets, experiments and regression verdicts", values: ALL },
  { label: "Built-in gold datasets with pass marks", values: ALL },
  { label: "Assurance status per agent version", values: ALL },
  { label: "Scheduled re-evaluation", values: PAID_ROADMAP },
 
  { section: "Agents & Knowledge", label: "" },
  { label: "Agents, skill graphs and human-in-the-loop", values: ALL },
  { label: "Document, graph and website knowledge with citations", values: ALL },
  { label: "MCP servers for your own tools", values: ALL_ROADMAP },
  { label: "Dashboards", values: ALL },
 
  { section: "Deployment & Security", label: "" },
  {
    label: "Hosting",
    values: {
      free: "Shared, UK",
      partner: "Dedicated, UK",
      team: "Dedicated, UK",
      enterprise: "Dedicated or your cloud",
    },
  },
  { label: "Data encrypted in transit and at rest", values: ALL },
  { label: "Data region shown for every model", values: ALL },
  { label: "Single sign-on", values: PAID_ROADMAP },
  { label: "Governed API for your own applications", values: PAID_ROADMAP },
 
  { section: "Support", label: "" },
  {
    label: "Support",
    values: {
      free: "Email, best effort",
      partner: "Weekly sessions",
      team: "Business hours",
      enterprise: "Agreed SLA",
    },
  },
];
 
const FAQ_ITEMS = [
  {
    question: "Why don't the paid plans show a price?",
    answer:
      "We're onboarding a small group of design partners and setting prices with them. Design partners pay a pilot fee for 90 days, credited against their first year. Talk to us and we'll give you a quote.",
  },
  {
    question: "What do design partners get?",
    answer:
      "A dedicated instance hosted in the UK, founder-led onboarding, weekly feedback sessions, and direct input into what we build next. In return we ask for regular feedback and, if the pilot succeeds, a case study.",
  },
  {
    question: `What does "Roadmap" mean?`,
    answer:
      "It marks a feature we're building, not one you can use today. When we talk, we'll tell you exactly where each one stands.",
  },
  {
    question: "Where is my data stored, and is it used to train models?",
    answer: `Your data is stored in the UK (London) and encrypted in transit and at rest. ${APP_NAME} never uses it to train models. When you run an agent, the request goes to the service that runs the model you chose and is processed in the region that model declares. Every model's data region is shown in the catalogue.`,
  },
  {
    question: "Do you offer discounts for non-profits or academia?",
    answer: `Yes. Contact us at ${APP_EMAILS.sales} and we'll discuss an arrangement.`,
  },
];
 
// ─── Helpers ──────────────────────────────────────────────────────────────────
 
function RoadmapPill({ onDark = false }: { onDark?: boolean }) {
  return (
    <span
      className="shrink-0 px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider"
      style={
        onDark
          ? { background: "rgba(255,255,255,0.16)", color: "white" }
          : { background: "rgba(59,130,246,0.1)", color: BRAND_BLUE }
      }
    >
      {ROADMAP}
    </span>
  );
}
 
function FeatureCell({ value }: { value: FeatureValue }) {
  if (value === true)
    return (
      <span className="flex justify-center">
        <Check className="size-5 text-blue-500" />
      </span>
    );
  if (value === false)
    return (
      <span className="flex justify-center opacity-30">
        <Minus className="size-4" />
      </span>
    );
  if (value === ROADMAP)
    return (
      <span className="flex justify-center">
        <RoadmapPill />
      </span>
    );
  return <span className="text-sm text-center block font-medium">{value}</span>;
}
 
function FAQItem({ question, answer }: { question: string; answer: string }) {
  const [open, setOpen] = useState(false);
  return (
    <div
      className="rounded-2xl overflow-hidden"
      style={{ border: "1px solid rgba(59,130,246,0.15)" }}
    >
      <button
        className="w-full flex justify-between items-center p-5 text-left font-medium transition-colors"
        style={{
          background: open ? "rgba(59,130,246,0.05)" : "transparent",
        }}
        onClick={() => setOpen(!open)}
      >
        <span>{question}</span>
        {open ? (
          <ChevronUp className="size-5 shrink-0 text-blue-500" />
        ) : (
          <ChevronDown className="size-5 shrink-0 opacity-40" />
        )}
      </button>
      {open && (
        <div
          className="px-5 pb-5 text-sm leading-relaxed"
          style={{
            color: "var(--color-gray-600, #4B5563)",
            borderTop: "1px solid rgba(59,130,246,0.1)",
          }}
        >
          <div className="pt-4">{answer}</div>
        </div>
      )}
    </div>
  );
}
 
// ─── Page ─────────────────────────────────────────────────────────────────────
 
const Pricing: React.FC = () => {
  usePageMeta("Pricing", false);
 
  return (
    <div className="overflow-hidden">
      {/* ─── Header ─────────────────────────────────────────────────────────── */}
      <section className="py-20 px-8 text-center">
        <div
          className="inline-flex items-center gap-2 mb-6 px-4 py-1.5 rounded-full text-xs font-semibold tracking-widest uppercase"
          style={{
            background: "rgba(59,130,246,0.08)",
            border: "1px solid rgba(59,130,246,0.25)",
          }}
        >
          <Sparkles className="size-3" />
          Pricing
        </div>
        <h1
          className="text-4xl md:text-6xl font-black mb-4 leading-tight"
          style={{
            background:
              "linear-gradient(135deg, #1e40af 0%, #3b82f6 55%, #06b6d4 100%)",
            WebkitBackgroundClip: "text",
            WebkitTextFillColor: "transparent",
            backgroundClip: "text",
          }}
        >
          Start Free. Pilot With Us.
        </h1>
        <p className="text-lg text-gray-500 max-w-xl mx-auto">
          Evaluate {APP_NAME} free on our UK-hosted platform, or join the
          design-partner programme for a dedicated instance and a hand in what
          we build next.
        </p>
      </section>
 
      {/* ─── Tier Cards ──────────────────────────────────────────────────────── */}
      <section className="px-8 pb-20">
        <div className="max-w-6xl mx-auto grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
          {TIERS.map((tier) => (
            <div
              key={tier.id}
              className="relative rounded-2xl flex flex-col"
              style={{
                padding: "28px 24px",
                background: tier.highlighted
                  ? "linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%)"
                  : undefined,
                border: tier.highlighted
                  ? "none"
                  : "1px solid rgba(59,130,246,0.18)",
                boxShadow: tier.highlighted
                  ? "0 20px 60px rgba(37,99,235,0.35)"
                  : undefined,
                color: tier.highlighted ? "white" : undefined,
              }}
            >
              {tier.badge && (
                <div
                  className="absolute -top-3.5 left-1/2 -translate-x-1/2 px-4 py-1 rounded-full text-xs font-bold flex items-center gap-1 whitespace-nowrap"
                  style={{ background: "#facc15", color: "#713f12" }}
                >
                  <Zap className="size-3" />
                  {tier.badge}
                </div>
              )}
 
              <div className="mb-6">
                <h3
                  className="text-lg font-bold mb-1"
                  style={{ color: tier.highlighted ? "white" : undefined }}
                >
                  {tier.name}
                </h3>
                <p
                  className="text-sm leading-relaxed"
                  style={{
                    color: tier.highlighted
                      ? "rgba(255,255,255,0.75)"
                      : "#6b7280",
                  }}
                >
                  {tier.tagline}
                </p>
              </div>
 
              <div className="mb-8">
                <span
                  className="block text-4xl font-black"
                  style={{ color: tier.highlighted ? "white" : "#1e40af" }}
                >
                  {tier.price}
                </span>
                <span
                  className="text-sm"
                  style={{
                    color: tier.highlighted
                      ? "rgba(255,255,255,0.65)"
                      : "#9ca3af",
                  }}
                >
                  {tier.priceNote}
                </span>
              </div>
 
              <ul className="flex flex-col gap-2.5 mb-8 flex-1 text-sm">
                {tier.includes.map((item) => (
                  <li
                    key={item.label}
                    className="flex items-start gap-2"
                    style={{
                      color: tier.highlighted
                        ? "rgba(255,255,255,0.85)"
                        : undefined,
                    }}
                  >
                    <Check
                      className="size-4 shrink-0 mt-0.5"
                      style={{
                        color: tier.highlighted ? "white" : BRAND_BLUE,
                        opacity: item.roadmap ? 0.35 : 1,
                      }}
                    />
                    <span className="flex-1">{item.label}</span>
                    {item.roadmap && <RoadmapPill onDark={tier.highlighted} />}
                  </li>
                ))}
              </ul>
 
              <a
                href={tier.ctaHref}
                className="block text-center py-3 px-6 rounded-xl font-bold text-sm transition-all"
                style={
                  tier.highlighted
                    ? {
                        background: "white",
                        color: "#1d4ed8",
                        transition: "transform 0.15s",
                      }
                    : {
                        background: "rgba(37,99,235,0.08)",
                        color: "#1d4ed8",
                        border: "1px solid rgba(37,99,235,0.25)",
                        transition: "background 0.15s, transform 0.15s",
                      }
                }
                onMouseEnter={(e) => {
                  e.currentTarget.style.transform = "scale(1.03)";
                }}
                onMouseLeave={(e) => {
                  e.currentTarget.style.transform = "scale(1)";
                }}
              >
                {tier.cta}
              </a>
            </div>
          ))}
        </div>
        <p className="text-center text-xs text-gray-400 mt-6">
          Paid plans are annual agreements. Features marked {ROADMAP} are in
          development and not yet available.
        </p>
      </section>
 
      {/* ─── Feature Comparison Table ────────────────────────────────────────── */}
      <section className="px-8 pb-24">
        <div className="max-w-6xl mx-auto">
          <h2 className="text-2xl md:text-3xl font-black text-center mb-2">
            Compare Plans
          </h2>
          <p className="text-center text-gray-500 mb-10 text-sm">
            What each plan includes today, and what's on the way.
          </p>
          <div
            className="rounded-2xl overflow-x-auto"
            style={{ border: "1px solid rgba(59,130,246,0.15)" }}
          >
            <table className="w-full min-w-[640px] text-sm">
              <thead>
                <tr style={{ borderBottom: "1px solid rgba(59,130,246,0.12)" }}>
                  <th className="text-left p-4 font-semibold w-2/5">Feature</th>
                  {TIERS.map((t) => (
                    <th
                      key={t.id}
                      className="p-4 font-bold text-center"
                      style={{
                        color: t.highlighted ? "#1d4ed8" : undefined,
                        background: t.highlighted
                          ? "rgba(37,99,235,0.05)"
                          : undefined,
                      }}
                    >
                      {t.name}
                    </th>
                  ))}
                </tr>
              </thead>
              <tbody>
                {FEATURE_ROWS.map((row, i) => {
                  if (row.section || !row.values) {
                    return (
                      <tr
                        key={`section-${i}`}
                        style={{ background: "rgba(59,130,246,0.04)" }}
                      >
                        <td
                          colSpan={TIER_IDS.length + 1}
                          className="px-4 py-2 font-bold text-xs uppercase tracking-wider"
                          style={{ color: BRAND_BLUE }}
                        >
                          {row.section}
                        </td>
                      </tr>
                    );
                  }
                  const values = row.values;
                  return (
                    <tr
                      key={`row-${i}`}
                      style={{
                        borderTop: "1px solid rgba(59,130,246,0.07)",
                        background:
                          i % 2 === 0
                            ? "transparent"
                            : "rgba(59,130,246,0.015)",
                      }}
                    >
                      <td className="p-4 text-gray-600">{row.label}</td>
                      {TIER_IDS.map((id) => (
                        <td
                          key={id}
                          className="p-4"
                          style={{
                            background:
                              id === "partner"
                                ? "rgba(37,99,235,0.035)"
                                : undefined,
                          }}
                        >
                          <FeatureCell value={values[id]} />
                        </td>
                      ))}
                    </tr>
                  );
                })}
              </tbody>
            </table>
          </div>
        </div>
      </section>
 
      {/* ─── FAQ ─────────────────────────────────────────────────────────────── */}
      <section className="px-8 pb-24">
        <div className="max-w-3xl mx-auto">
          <h2 className="text-2xl md:text-3xl font-black text-center mb-2">
            Frequently Asked Questions
          </h2>
          <p className="text-center text-gray-500 mb-10 text-sm">
            Everything you need to know about {APP_NAME} pricing.
          </p>
          <div className="flex flex-col gap-3">
            {FAQ_ITEMS.map((item, i) => (
              <FAQItem key={i} question={item.question} answer={item.answer} />
            ))}
          </div>
        </div>
      </section>
 
      {/* ─── Final CTA ───────────────────────────────────────────────────────── */}
      <section
        className="py-24 px-8 text-center text-white"
        style={{
          background:
            "linear-gradient(135deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 50%, rgba(0,212,255,0.85) 100%)",
        }}
      >
        <h2 className="text-3xl md:text-4xl font-black mb-4">
          Not Sure Which Plan Is Right?
        </h2>
        <p className="text-blue-100 text-lg mb-8 max-w-lg mx-auto">
          Start with the Free plan, or talk to us about a guided demo and the
          design-partner programme.
        </p>
        <div className="flex flex-col sm:flex-row gap-4 justify-center">
          <a
            href={APP_ROUTES.HOME.signup}
            className="px-8 py-4 rounded-xl font-bold text-lg bg-white text-blue-900"
            style={{ transition: "transform 0.15s" }}
            onMouseEnter={(e) =>
              (e.currentTarget.style.transform = "scale(1.04)")
            }
            onMouseLeave={(e) => (e.currentTarget.style.transform = "scale(1)")}
          >
            Start for Free
          </a>
          <a
            href={APP_ROUTES.HOME.contact}
            className="px-8 py-4 rounded-xl font-bold text-lg"
            style={{
              background: "rgba(255,255,255,0.12)",
              border: "1px solid rgba(255,255,255,0.4)",
              color: "white",
              transition: "background 0.15s, transform 0.15s",
            }}
            onMouseEnter={(e) => {
              e.currentTarget.style.background = "rgba(255,255,255,0.22)";
              e.currentTarget.style.transform = "scale(1.02)";
            }}
            onMouseLeave={(e) => {
              e.currentTarget.style.background = "rgba(255,255,255,0.12)";
              e.currentTarget.style.transform = "scale(1)";
            }}
          >
            Book a Demo
          </a>
        </div>
      </section>
    </div>
  );
};
 
export default Pricing;