Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): rebuild the homepage feature sections

Richie McIlroy85e1b0ee762d
diff --git a/apps/web/components/pages/HomeTwo/Agents.tsx b/apps/web/components/pages/HomeTwo/Agents.tsx
deleted file mode 100644
index d738f1ced..000000000
--- a/apps/web/components/pages/HomeTwo/Agents.tsx
+++ /dev/null
@@ -1,250 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { ArrowUpRight } from "lucide-react";
-import Link from "next/link";
-import { useRef, useState } from "react";
-import { Eyebrow } from "./Eyebrow";
-import { AGENT } from "./scenes";
-import { LazyMount, useInView, useReducedMotion } from "./scenes/engine";
-import {
- BAND,
- BODY_TEXT,
- BTN_SECONDARY,
- GRAIN,
- grainBg,
- H_SECTION,
- MODE_THEME,
- MONO,
-} from "./theme";
-
-const DARK = {
- backgroundColor: "#111111",
- backgroundImage: GRAIN,
- backgroundSize: "200px 200px",
-} as const;
-
-const SURFACES = ["CLI", "MCP server", "JSON on every command", "REST API"];
-
-const FACTS = [
- {
- title: "One prompt to set up",
- body: "Paste one prompt from the docs and your agent installs the CLI, the Cap skill, and the MCP server for Claude Code, Cursor, or Codex.",
- snippet: "cap agents install --target claude --component all",
- mode: "instant" as const,
- },
- {
- title: "Every command speaks JSON",
- body: "Add one flag and the answer comes back as data. Recording and export stream NDJSON events as they happen.",
- snippet: "cap guide --json",
- mode: "studio" as const,
- },
- {
- title: "76 MCP tools, zero secrets",
- body: "Read and manage Caps, comments, sharing, and analytics over MCP. Capture and upload stay in the CLI, so no secret passes through the model.",
- snippet: "cap mcp serve",
- mode: "screenshot" as const,
- },
- {
- title: "Least privilege login",
- body: "Sign in with the creator profile by default, and the agent asks before anything records, uploads, or costs money.",
- snippet: "cap auth login",
- mode: "share" as const,
- },
-];
-
-type Tab = { key: "cli" | "mcp"; label: string; lines: string[]; note: string };
-
-const CLI_TAB: Tab = {
- key: "cli",
- label: "CLI",
- lines: [
- "cap record start --screen 1 --mode instant --duration 20 --json",
- 'cap upload ./recording.cap --export --name "Checkout bug repro" --json',
- ],
- note: "Record in the background, stop it later, and upload a .cap or .mp4 for a link. Works from any shell, script, or agent tool call.",
-};
-
-const MCP_TAB: Tab = {
- key: "mcp",
- label: "MCP",
- lines: [
- "{",
- ' "mcpServers": {',
- ' "cap": { "command": "cap", "args": ["mcp", "serve"] }',
- " }",
- "}",
- ],
- note: "Point any MCP client at the Cap server and it gets 76 tools for listing, reading, commenting on, and sharing Caps. Capture and upload stay in the CLI.",
-};
-
-const TABS: Tab[] = [CLI_TAB, MCP_TAB];
-
-export const Agents = () => {
- const [chapter, setChapter] = useState(0);
- const [tab, setTab] = useState(0);
- const cardRef = useRef<HTMLDivElement | null>(null);
- const inView = useInView(cardRef);
- const reducedMotion = useReducedMotion();
- const playing = inView && !reducedMotion;
- const active = TABS[tab] ?? CLI_TAB;
-
- return (
- <section className="px-5 py-20 lg:py-28">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.studio.accent}>Cap for Agents</Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
- >
- Your agent can record, share, and read Caps
- </h2>
- <p
- className={`${BODY_TEXT} mt-6 max-w-[640px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
- >
- Cap ships a CLI and a local MCP server, so Claude Code, Cursor,
- Codex, OpenCode, or any shell capable agent can record your screen,
- upload the result, and read back the transcript and summary. One
- pasted prompt installs everything, and the agent asks before
- anything records, uploads, or costs money.
- </p>
- </div>
-
- <div
- ref={cardRef}
- className="mt-14 rounded-[24px] p-4 lg:p-6"
- style={DARK}
- >
- <LazyMount w={1200} h={520}>
- <AGENT.Scene
- chapter={chapter}
- playing={playing}
- onChapterEnd={() =>
- setChapter((current) => (current + 1) % AGENT.chapters.length)
- }
- />
- </LazyMount>
- <ul className="mt-5 flex flex-wrap items-center gap-2">
- {SURFACES.map((surface) => (
- <li
- key={surface}
- className={classNames(
- MONO,
- "rounded-full border border-white/15 px-3 py-1.5 text-[11px] uppercase leading-none tracking-[0.05em] text-[rgba(255,255,255,0.72)]",
- )}
- >
- {surface}
- </li>
- ))}
- <li className="ml-auto">
- <Link
- href="/docs/agents"
- className={classNames(
- MONO,
- "flex items-center gap-1.5 rounded-full bg-white px-3.5 py-2 text-[11px] uppercase leading-none tracking-[0.05em] text-[#111111] transition-colors duration-200 hover:bg-[#EDF1F6]",
- )}
- >
- Agent docs
- <ArrowUpRight className="size-3" />
- </Link>
- </li>
- </ul>
- </div>
-
- <div className="mt-4 grid gap-4 lg:grid-cols-[1.05fr_1fr]">
- <ul className="grid gap-4 sm:grid-cols-2">
- {FACTS.map((fact) => {
- const theme = MODE_THEME[fact.mode];
- return (
- <li
- key={fact.title}
- className="flex flex-col justify-between rounded-[20px] p-6"
- style={grainBg(BAND)}
- >
- <div>
- <span
- aria-hidden="true"
- className="block size-[7px]"
- style={{ background: theme.accent }}
- />
- <h3 className="mt-5 text-[19px] font-normal leading-[1.1] tracking-[-0.02em] text-[#111111]">
- {fact.title}
- </h3>
- <p
- className={`${BODY_TEXT} mt-2 text-[14.5px] leading-[1.45] text-[rgba(17,17,17,0.7)]`}
- >
- {fact.body}
- </p>
- </div>
- <code
- className={classNames(
- MONO,
- "mt-5 block whitespace-pre-wrap break-words rounded-[10px] bg-white px-3 py-2 text-[12px] leading-[1.6] text-[#111111] shadow-[0_0_0_1px_rgba(17,17,17,0.06)]",
- )}
- >
- <span className="text-[rgba(17,17,17,0.4)]">$ </span>
- {fact.snippet}
- </code>
- </li>
- );
- })}
- </ul>
-
- <div
- className="flex flex-col rounded-[20px] p-6"
- style={grainBg(BAND)}
- >
- <div className="flex items-center gap-1 self-start rounded-full bg-white p-1 shadow-[0_0_0_1px_rgba(17,17,17,0.06)]">
- {TABS.map((item, i) => (
- <button
- key={item.key}
- type="button"
- aria-pressed={i === tab}
- onClick={() => setTab(i)}
- className={classNames(
- "rounded-full px-4 py-1.5 text-[13px] font-medium transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]",
- i === tab
- ? "bg-[#111111] text-white"
- : "text-[rgba(17,17,17,0.6)] hover:text-[#111111]",
- )}
- >
- {item.label}
- </button>
- ))}
- </div>
- <pre
- className={classNames(
- MONO,
- "mt-4 rounded-[14px] p-5 text-[12.5px] leading-[1.75] text-[#F8FAFC]",
- )}
- style={DARK}
- >
- {active.lines.map((line) => (
- <span
- key={line}
- className="block whitespace-pre-wrap break-words"
- >
- {active.key === "cli" ? (
- <span className="text-[rgba(255,255,255,0.4)]">$ </span>
- ) : null}
- {line}
- </span>
- ))}
- </pre>
- <p
- className={`${BODY_TEXT} mb-5 mt-4 text-[14.5px] leading-[1.45] text-[rgba(17,17,17,0.7)]`}
- >
- {active.note}
- </p>
- <Link
- href="/agents"
- className={classNames(BTN_SECONDARY, "self-start")}
- >
- Explore Cap for Agents
- </Link>
- </div>
- </div>
- </div>
- </section>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/DeepDive.tsx b/apps/web/components/pages/HomeTwo/DeepDive.tsx
deleted file mode 100644
index d601483f2..000000000
--- a/apps/web/components/pages/HomeTwo/DeepDive.tsx
+++ /dev/null
@@ -1,198 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { ArrowUpRight } from "lucide-react";
-import Link from "next/link";
-import type { ComponentType } from "react";
-import { useCallback, useId, useRef, useState } from "react";
-import { Eyebrow } from "./Eyebrow";
-import { Fit, SCENES, STAGE } from "./scenes";
-import { LazyMount, useInView, useReducedMotion } from "./scenes/engine";
-import {
- BODY_TEXT,
- H_SECTION,
- MODE_THEME,
- type ModeKey,
- meshStyle,
-} from "./theme";
-
-export type DiveItem = {
- title: string;
- body: string;
-};
-
-export type DiveChip = {
- title: string;
- description: string;
- Icon: ComponentType<{ className?: string }>;
-};
-
-export type DiveConfig = {
- mode: ModeKey;
- eyebrow: string;
- heading: string;
- intro?: string;
- items: DiveItem[];
- chips?: DiveChip[];
- href: string;
- flip?: boolean;
-};
-
-export const DeepDive = ({ config }: { config: DiveConfig }) => {
- const [active, setActive] = useState(0);
- const baseId = useId();
- const theme = MODE_THEME[config.mode];
- const scene = SCENES[config.mode];
- const visualRef = useRef<HTMLDivElement | null>(null);
- const progressRef = useRef<HTMLSpanElement | null>(null);
- const inView = useInView(visualRef);
- const reducedMotion = useReducedMotion();
- const playing = inView && !reducedMotion;
- const count = config.items.length;
-
- const advance = useCallback(() => {
- setActive((current) => (current + 1) % count);
- }, [count]);
-
- return (
- <section className="px-5 py-16 lg:py-24">
- <div className="mx-auto grid max-w-[1200px] items-start gap-12 lg:grid-cols-2 lg:gap-16">
- <div
- className={classNames(
- "order-first",
- config.flip ? "lg:order-first" : "lg:order-last",
- )}
- >
- <div ref={visualRef} className="lg:sticky lg:top-24">
- <div
- className="rounded-[24px] p-3 shadow-[0_30px_60px_-40px_rgba(17,17,17,0.35)]"
- style={meshStyle(theme)}
- >
- <LazyMount w={STAGE.w} h={STAGE.h} className="mx-auto">
- <Fit w={STAGE.w} h={STAGE.h}>
- <scene.Scene
- chapter={active}
- playing={playing}
- onChapterEnd={advance}
- progressRef={progressRef}
- />
- </Fit>
- </LazyMount>
- </div>
- </div>
- </div>
-
- <div className={config.flip ? "lg:order-last" : "lg:order-first"}>
- <Eyebrow accent={theme.accent}>{config.eyebrow}</Eyebrow>
-
- <h2
- className={`${H_SECTION} mt-6 max-w-[480px] text-balance text-[clamp(34px,3.9vw,50px)]`}
- >
- {config.heading}
- </h2>
-
- {config.intro ? (
- <p
- className={`${BODY_TEXT} mt-6 max-w-[460px] text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)]`}
- >
- {config.intro}
- </p>
- ) : null}
-
- <div className="mt-10">
- {config.items.map((item, i) => {
- const open = i === active;
- const panelId = `${baseId}-panel-${i}`;
- const headerId = `${baseId}-header-${i}`;
- return (
- <div
- key={item.title}
- className="relative border-t border-[#E1E7EE] last:border-b"
- >
- <span
- aria-hidden="true"
- className="absolute inset-x-0 top-[-1px] h-[2px] overflow-hidden"
- style={{ opacity: open ? 1 : 0 }}
- >
- <span
- ref={open ? progressRef : undefined}
- className="block h-full w-full origin-left"
- style={{
- background: theme.accent,
- transform: `scaleX(${open && !playing ? 1 : 0})`,
- }}
- />
- </span>
- <h3>
- <button
- type="button"
- id={headerId}
- aria-expanded={open}
- aria-controls={panelId}
- onClick={() => setActive(i)}
- className={classNames(
- "flex w-full items-center justify-between gap-6 py-[24px] text-left text-[19px] font-normal tracking-[-0.02em] transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-4 focus-visible:ring-offset-[#F8FAFC] lg:text-[21px]",
- open
- ? "text-[#111111]"
- : "text-[rgba(17,17,17,0.4)] hover:text-[rgba(17,17,17,0.7)]",
- )}
- >
- {item.title}
- </button>
- </h3>
- <div
- id={panelId}
- aria-hidden={!open}
- className="grid transition-[grid-template-rows] duration-300 ease-out"
- style={{ gridTemplateRows: open ? "1fr" : "0fr" }}
- >
- <div className="overflow-hidden">
- <div className="flex items-start justify-between gap-6 pb-8">
- <p
- className={`${BODY_TEXT} max-w-[420px] text-[16px] leading-[1.5] text-[rgba(17,17,17,0.78)]`}
- >
- {item.body}
- </p>
- <Link
- href={config.href}
- tabIndex={open ? undefined : -1}
- aria-label={`Learn more about ${item.title}`}
- className="grid size-10 shrink-0 place-items-center rounded-[8px] bg-[#E7EDF3] text-[#111111] transition-colors duration-200 hover:bg-[#DCE4EC] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]"
- >
- <ArrowUpRight className="size-4" />
- </Link>
- </div>
- </div>
- </div>
- </div>
- );
- })}
- </div>
-
- {config.chips ? (
- <ul className="mt-10 grid gap-x-8 gap-y-6 sm:grid-cols-2">
- {config.chips.map((chip) => (
- <li key={chip.title} className="flex items-start gap-3">
- <span
- className="grid size-8 shrink-0 place-items-center rounded-[8px]"
- style={{ background: theme.chip, color: theme.glyph }}
- >
- <chip.Icon className="size-4" />
- </span>
- <span className="min-w-0">
- <span className="block text-[15px] font-medium text-[#111111]">
- {chip.title}
- </span>
- <span className="mt-0.5 block text-[13.5px] leading-snug text-[rgba(17,17,17,0.55)]">
- {chip.description}
- </span>
- </span>
- </li>
- ))}
- </ul>
- ) : null}
- </div>
- </div>
- </section>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/DeepDives.tsx b/apps/web/components/pages/HomeTwo/DeepDives.tsx
deleted file mode 100644
index b5fbdbdc5..000000000
--- a/apps/web/components/pages/HomeTwo/DeepDives.tsx
+++ /dev/null
@@ -1,218 +0,0 @@
-"use client";
-
-import {
- BookOpen,
- Captions,
- Copy,
- EyeOff,
- FileText,
- Globe,
- Layers,
- LayoutGrid,
- Link2,
- Maximize2,
- MousePointerClick,
- MoveUpRight,
- Palette,
- Square,
- Type,
- Upload,
-} from "lucide-react";
-import { DeepDive, type DiveConfig } from "./DeepDive";
-import { StudioFeatures } from "./studio/StudioFeatures";
-
-const INSTANT: DiveConfig = {
- mode: "instant",
- eyebrow: "Instant Mode",
- heading: "Share your screen or webcam instantly",
- intro:
- "Hit record, stop, and share. Your video is live with a title, summary, chapters, and transcript, all written for you.",
- href: "/features",
- items: [
- {
- title: "Uploads while you record",
- body: "Instant Mode streams to the cloud as you go, so the video is ready the moment you press stop.",
- },
- {
- title: "The link is on your clipboard",
- body: "Press stop and it is already copied, ready to paste into Slack, a ticket, or an email.",
- },
- {
- title: "Share publicly or privately",
- body: "Password protect the sensitive ones, keep a link to your team, or leave it public. You decide who can watch.",
- },
- ],
- chips: [
- {
- title: "Instant links",
- description: "Shareable URL, immediately",
- Icon: Link2,
- },
- {
- title: "Background upload",
- description: "Uploads while you record",
- Icon: Upload,
- },
- {
- title: "Auto transcription",
- description: "Captions on every recording",
- Icon: Captions,
- },
- {
- title: "AI summaries",
- description: "Titles and descriptions",
- Icon: FileText,
- },
- {
- title: "Smart chapters",
- description: "Auto segmented timeline",
- Icon: BookOpen,
- },
- {
- title: "Browser viewing",
- description: "No downloads required",
- Icon: Globe,
- },
- ],
-};
-
-const STUDIO: DiveConfig = {
- mode: "studio",
- eyebrow: "Studio Mode",
- heading: "Record in full quality, edit before you share",
- intro:
- "Studio records at the highest quality straight to your device, with no compression and no upload. Then blur what is private, switch scenes between screen and camera, add text and captions, and set the look before anyone sees it.",
- href: "/features",
- flip: true,
- items: [
- {
- title: "Records locally in full quality",
- body: "4K at 60fps straight to your device, with no compression and no upload. Screen, camera, and mic each stay on their own track.",
- },
- {
- title: "An editor built in",
- body: "Custom backgrounds, adjustable padding, rounded corners, shadows and borders, all set before anyone sees it.",
- },
- {
- title: "Automatic zoom and cursor effects",
- body: "Cap smooths the cursor, adds click effects and natural motion blur, and zooms in where the action is.",
- },
- ],
- chips: [
- {
- title: "Custom backgrounds",
- description: "Gradients, wallpapers, colours",
- Icon: Palette,
- },
- {
- title: "Adjustable padding",
- description: "Scale from 0% to 40%",
- Icon: Maximize2,
- },
- {
- title: "Blur sensitive areas",
- description: "Mask, pixelate, or highlight",
- Icon: EyeOff,
- },
- {
- title: "Scenes and split screen",
- description: "Camera only, split, or floating",
- Icon: LayoutGrid,
- },
- {
- title: "Text and captions",
- description: "Animated titles, local captions",
- Icon: Type,
- },
- {
- title: "Cursor effects",
- description: "Sizing, smoothing, click effects",
- Icon: MousePointerClick,
- },
- ],
-};
-
-const SCREENSHOT: DiveConfig = {
- mode: "screenshot",
- eyebrow: "Screenshot Mode",
- heading: "Capture, beautify, share",
- intro:
- "One hotkey grabs the window, and the same editing tools that polish your videos turn the still into something worth pasting.",
- href: "/features",
- items: [
- {
- title: "Capture and beautify in one hotkey",
- body: "Grab any window or area and Cap drops it on a background with padding, rounded corners, and a shadow.",
- },
- {
- title: "Annotate, then copy",
- body: "Point out the bug or the button you mean, then send the result straight to your clipboard or save it as a file.",
- },
- ],
- chips: [
- {
- title: "Beautiful backgrounds",
- description: "Gradients, wallpapers, solid colours",
- Icon: Palette,
- },
- {
- title: "Adjustable padding",
- description: "Clean spacing around the capture",
- Icon: Maximize2,
- },
- {
- title: "Rounded corners",
- description: "Squircle or rounded styles",
- Icon: Square,
- },
- {
- title: "Shadow and borders",
- description: "Depth without the fuss",
- Icon: Layers,
- },
- {
- title: "Annotation tools",
- description: "Arrows, shapes, text, masks",
- Icon: MoveUpRight,
- },
- {
- title: "Instant copy and save",
- description: "One click to clipboard or file",
- Icon: Copy,
- },
- ],
-};
-
-const UNDERSTAND: DiveConfig = {
- mode: "share",
- eyebrow: "Cap AI · On every recording",
- heading: "Every recording, understood",
- intro:
- "Titles, summaries, chapters, and a searchable transcript arrive with the recording, so the work after the recording is already done.",
- href: "/features",
- flip: true,
- items: [
- {
- title: "Auto transcription",
- body: "Every word transcribed and timestamped, so viewers can search the recording instead of scrubbing it.",
- },
- {
- title: "Titles, summaries, and chapters",
- body: "Written the moment you finish recording, with clickable chapters viewers can skim.",
- },
- {
- title: "Comments and reactions",
- body: "Feedback lands at the exact timestamp it is about, so the conversation stays with the recording.",
- },
- ],
-};
-
-export const DeepDives = () => (
- <>
- <DeepDive config={INSTANT} />
- <DeepDive config={STUDIO} />
- <StudioFeatures />
- <DeepDive config={SCREENSHOT} />
- <DeepDive config={UNDERSTAND} />
- </>
-);
diff --git a/apps/web/components/pages/HomeTwo/Features.tsx b/apps/web/components/pages/HomeTwo/Features.tsx
deleted file mode 100644
index e9aa410b8..000000000
--- a/apps/web/components/pages/HomeTwo/Features.tsx
+++ /dev/null
@@ -1,136 +0,0 @@
-import { classNames } from "@cap/utils/helpers";
-import {
- ArrowDownToLine,
- Captions,
- Gauge,
- Github,
- HardDrive,
- Lock,
- MessageSquare,
- MonitorSmartphone,
-} from "lucide-react";
-import Link from "next/link";
-import type { ComponentType } from "react";
-import { Eyebrow } from "./Eyebrow";
-import {
- BAND,
- BODY_TEXT,
- BTN_SECONDARY,
- grainBg,
- H_SECTION,
- MODE_THEME,
- type ModeKey,
-} from "./theme";
-
-type Feature = {
- title: string;
- body: string;
- accent: ModeKey;
- Icon: ComponentType<{ className?: string }>;
-};
-
-const FEATURES: Feature[] = [
- {
- title: "Your storage, your rules",
- body: "Connect your own Google Drive or S3 bucket, use Cap Cloud, or keep everything local. You are never locked into our infrastructure.",
- accent: "instant",
- Icon: HardDrive,
- },
- {
- title: "Privacy by default, sharing by choice",
- body: "Share publicly or privately, password protect the sensitive ones, or keep a recording on your machine and never upload it at all.",
- accent: "studio",
- Icon: Lock,
- },
- {
- title: "Async collaboration that works",
- body: "Comments, reactions, and transcripts keep the conversation moving. See who watched and turn a recording into the next step, not another meeting.",
- accent: "screenshot",
- Icon: MessageSquare,
- },
- {
- title: "Cross platform for your whole team",
- body: "Native apps for macOS and Windows that feel at home on each, plus a Chrome extension when recording in the browser is the right call.",
- accent: "share",
- Icon: MonitorSmartphone,
- },
- {
- title: "Quality that makes you look good",
- body: "4K recording, 60fps capture, and compression smart enough to keep the file sizes sane.",
- accent: "studio",
- Icon: Gauge,
- },
- {
- title: "Truly open source",
- body: "See exactly how Cap works, contribute the feature you need, or self host the whole thing. No black boxes.",
- accent: "instant",
- Icon: Github,
- },
- {
- title: "Cap AI does the busywork",
- body: "Titles, summaries, clickable chapters, and transcripts write themselves for every recording, with no usage limits on Pro.",
- accent: "share",
- Icon: Captions,
- },
- {
- title: "Import your Loom videos",
- body: "Switching from Loom? Bring your existing library across with the built in importer and keep everything in one place.",
- accent: "screenshot",
- Icon: ArrowDownToLine,
- },
-];
-
-export const Features = () => (
- <section className="px-5 py-20 lg:py-28">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.studio.accent}>Why Cap</Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
- >
- Built for how you actually work
- </h2>
- <p
- className={`${BODY_TEXT} mt-6 max-w-[560px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
- >
- We obsessed over the details so you do not have to. Every feature here
- exists to save you time and make you look good.
- </p>
- </div>
-
- <ul className="mt-14 grid gap-3 sm:grid-cols-2 lg:grid-cols-4 lg:gap-4">
- {FEATURES.map((feature) => {
- const theme = MODE_THEME[feature.accent];
- return (
- <li
- key={feature.title}
- className="flex flex-col rounded-[14px] p-6"
- style={grainBg(BAND)}
- >
- <span
- className="grid size-9 shrink-0 place-items-center rounded-[9px]"
- style={{ background: theme.chip, color: theme.glyph }}
- >
- <feature.Icon className="size-[18px]" />
- </span>
- <h3 className="mt-5 text-balance text-[19px] font-normal leading-[1.15] tracking-[-0.02em] text-[#111111]">
- {feature.title}
- </h3>
- <p
- className={`${BODY_TEXT} mt-3 text-[15px] leading-[1.5] text-[rgba(17,17,17,0.72)]`}
- >
- {feature.body}
- </p>
- </li>
- );
- })}
- </ul>
-
- <div className="mt-10 flex justify-center">
- <Link href="/features" className={classNames(BTN_SECONDARY)}>
- View all features
- </Link>
- </div>
- </div>
- </section>
-);
diff --git a/apps/web/components/pages/HomeTwo/FinalCta.tsx b/apps/web/components/pages/HomeTwo/FinalCta.tsx
index e4780fc11..ec560be5d 100644
--- a/apps/web/components/pages/HomeTwo/FinalCta.tsx
+++ b/apps/web/components/pages/HomeTwo/FinalCta.tsx
@@ -1,32 +1,14 @@
-"use client";
-
import Link from "next/link";
-import { Eyebrow } from "./Eyebrow";
-import { Fit, SCENES, STAGE } from "./scenes";
-import { LazyMount } from "./scenes/engine";
-import {
- BODY_TEXT,
- BTN_PRIMARY,
- BTN_SECONDARY,
- H_HERO,
- MODE_THEME,
- type ModeKey,
- meshStyle,
-} from "./theme";
-
-const REEL: ModeKey[] = ["instant", "studio", "screenshot"];
+import { BODY_TEXT, BTN_PRIMARY, BTN_SECONDARY, H_HERO } from "./theme";
export const FinalCta = () => (
- <section className="overflow-hidden pb-24 pt-20 lg:pb-28 lg:pt-28">
- <div className="mx-auto flex max-w-[900px] flex-col items-center px-5 text-center">
- <Eyebrow accent={MODE_THEME.share.accent}>Get started</Eyebrow>
- <h2
- className={`${H_HERO} mt-6 text-balance text-[clamp(44px,6.4vw,78px)]`}
- >
+ <section className="px-5 pb-28 pt-24 lg:pb-40 lg:pt-36">
+ <div className="mx-auto flex max-w-[900px] flex-col items-center text-center">
+ <h2 className={`${H_HERO} text-balance text-[clamp(44px,6.4vw,78px)]`}>
Ready to upgrade how you communicate?
</h2>
<p
- className={`${BODY_TEXT} mt-7 max-w-[560px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[18px]`}
+ className={`${BODY_TEXT} mt-7 max-w-[560px] text-balance text-[17px] leading-[1.5] text-[rgba(17,17,17,0.64)] sm:text-[18px]`}
>
All of the work around screen recordings, handled in one place. Capture,
polish, and share without the busywork.
@@ -40,36 +22,5 @@ export const FinalCta = () => (
</Link>
</div>
</div>
-
- <div
- aria-hidden="true"
- className="mt-20 flex items-start justify-center gap-5 lg:gap-6"
- >
- {REEL.map((mode, i) => {
- const scene = SCENES[mode];
- const centre = i === 1;
- return (
- <div
- key={mode}
- className={
- centre
- ? "w-[min(92vw,640px)] shrink-0 rounded-[22px] p-3"
- : "hidden w-[460px] shrink-0 rounded-[22px] p-3 sm:block"
- }
- style={meshStyle(MODE_THEME[mode])}
- >
- <LazyMount w={STAGE.w} h={STAGE.h}>
- <Fit w={STAGE.w} h={STAGE.h} still>
- <scene.Scene
- chapter={0}
- playing={false}
- staticT={scene.poster}
- />
- </Fit>
- </LazyMount>
- </div>
- );
- })}
- </div>
</section>
);
diff --git a/apps/web/components/pages/HomeTwo/Hero.tsx b/apps/web/components/pages/HomeTwo/Hero.tsx
index 2b45c665a..d5b129419 100644
--- a/apps/web/components/pages/HomeTwo/Hero.tsx
+++ b/apps/web/components/pages/HomeTwo/Hero.tsx
@@ -35,18 +35,22 @@ const PhoneStage = () => {
className="rounded-[22px] p-2.5"
style={meshStyle(MODE_THEME.instant)}
>
- <Fit w={PHONE_STAGE.w} h={PHONE_STAGE.h} className="mx-auto">
+ <Fit w={PHONE_STAGE.w} h={PHONE_STAGE.h} className="mx-auto" eager>
<div
className="relative overflow-hidden rounded-[14px] bg-black"
style={{ width: PHONE_STAGE.w, height: PHONE_STAGE.h }}
>
- <Image
- src="/backgrounds/sf.webp"
+ {/* A 960px copy (40 KB): the stage is scaled to phone width, so the
+ 1920px variant next/image picked on dense screens was wasted. */}
+ {/* biome-ignore lint/performance/noImgElement: pre-sized static asset */}
+ <img
+ src="/backgrounds/landing/sf-960.webp"
alt=""
- fill
- sizes="440px"
+ width={960}
+ height={540}
+ decoding="async"
draggable={false}
- className="object-cover"
+ className="absolute inset-0 size-full object-cover"
/>
<MenuBar recording={false} onSwitchOs={noop} />
<div className="absolute z-20" style={{ left: 48, top: 30 }}>
@@ -129,7 +133,7 @@ export const Hero = () => {
release: "v0.6.1",
})
}
- className="ht-rise group mb-7 inline-flex [--d:0.2s] max-w-full items-center gap-2.5 rounded-full bg-[#111111] py-1.5 pl-1.5 pr-3.5 text-[13px] leading-none text-white shadow-[0_1px_2px_rgba(17,17,17,0.12),0_10px_24px_-14px_rgba(17,17,17,0.6)] transition-colors duration-200 hover:bg-[#2A2A2A] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-2 focus-visible:ring-offset-[#EDF1F6] md:mb-9"
+ className="ht-rise group mb-7 inline-flex [--d:0.04s] max-w-full items-center gap-2.5 rounded-full bg-[#111111] py-1.5 pl-1.5 pr-3.5 text-[13px] leading-none text-white shadow-[0_1px_2px_rgba(17,17,17,0.12),0_10px_24px_-14px_rgba(17,17,17,0.6)] transition-colors duration-200 hover:bg-[#2A2A2A] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-2 focus-visible:ring-offset-[#EDF1F6] md:mb-9"
>
<span
className={`${MONO} rounded-full bg-[#8DBCF0] px-2 py-[5px] text-[10.5px] uppercase leading-none tracking-[0.06em] text-[#111111]`}
@@ -145,16 +149,19 @@ export const Hero = () => {
<HeroHeadline />
<p
- className={`ht-rise [--d:0.75s] ${BODY_TEXT} mt-8 max-w-[660px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[19px] md:mt-10`}
+ className={`ht-rise [--d:0.16s] ${BODY_TEXT} mt-8 max-w-[660px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[19px] md:mt-10`}
>
Record your screen, then share it as a link the moment you stop or
polish it in the built-in editor. Trusted by over 80,000 teams and
creators, and free to start.
</p>
- <div className="ht-rise mt-9 flex flex-col items-stretch gap-3 [--d:0.9s] sm:flex-row sm:items-center">
+ <div className="ht-rise mt-9 flex flex-col items-stretch gap-3 [--d:0.2s] sm:flex-row sm:items-center">
<Link
href={downloadHref}
+ // Redirects to the installer on the CDN; prefetching it only
+ // produced a failed cross-origin request on every visit.
+ prefetch={false}
onClick={() =>
trackEvent("download_cta_clicked", {
source_page: "home_header",
@@ -207,7 +214,7 @@ export const Hero = () => {
cta_location: "under_primary",
})
}
- className="ht-rise group mt-5 inline-flex items-center gap-2 rounded-[6px] [--d:1.05s] text-[14px] text-[rgba(17,17,17,0.55)] transition-colors duration-200 hover:text-[#111111] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-4 focus-visible:ring-offset-[#F8FAFC]"
+ className="ht-rise group mt-5 inline-flex items-center gap-2 rounded-[6px] [--d:0.24s] text-[14px] text-[rgba(17,17,17,0.55)] transition-colors duration-200 hover:text-[#111111] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-4 focus-visible:ring-offset-[#F8FAFC]"
>
<LoomMark
size={13}
@@ -222,7 +229,7 @@ export const Hero = () => {
<ArrowRight className="size-3.5 transition-transform duration-200 group-hover:translate-x-0.5" />
</Link>
- <div className="ht-rise mt-3 flex items-center gap-2 text-[14px] text-[rgba(17,17,17,0.5)] [--d:1.15s]">
+ <div className="ht-rise mt-3 flex items-center gap-2 text-[14px] text-[rgba(17,17,17,0.5)] [--d:0.28s]">
<span>Also available on</span>
<span className="flex items-center gap-1">
{isWindows || isLinux ? (
diff --git a/apps/web/components/pages/HomeTwo/HeroHeadline.tsx b/apps/web/components/pages/HomeTwo/HeroHeadline.tsx
index f76fb8b17..7fe3f14c7 100644
--- a/apps/web/components/pages/HomeTwo/HeroHeadline.tsx
+++ b/apps/web/components/pages/HomeTwo/HeroHeadline.tsx
@@ -251,7 +251,7 @@ export const HeroHeadline = () => {
{CSS}
</style>
- <div className="ht-rise relative pb-10 [--d:0.35s] md:pb-14">
+ <div className="ht-rise relative pb-10 [--d:0.08s] md:pb-14">
<div className="mx-auto flex w-fit flex-nowrap items-center justify-center gap-0.5 rounded-full border border-[#DDE4EB] bg-white/70 p-1 shadow-[0_1px_2px_rgba(17,17,17,0.04)]">
{PILLS.map((pill) => {
const active = index === pill.slide;
@@ -302,7 +302,7 @@ export const HeroHeadline = () => {
</div>
<h1
- className={`ht-rise ht-rise-soft [--d:0.5s] ${H_HERO} max-w-[15ch] text-balance text-[clamp(34px,4.4vw,60px)] sm:max-w-none`}
+ className={`ht-rise ht-rise-soft [--d:0.1s] ${H_HERO} max-w-[15ch] text-balance text-[clamp(34px,4.4vw,60px)] sm:max-w-none`}
>
<span className="sr-only">
The open source screen recorder for everyone. Cap has three recording
@@ -330,8 +330,8 @@ export const HeroHeadline = () => {
const CSS = `
/* The hero's entrance, staggered by --d on each piece. */
-.ht-rise { animation: ht-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both; }
-.ht-rise-soft { animation-name: ht-rise-soft; animation-duration: 1.3s; }
+.ht-rise { animation: ht-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both; }
+.ht-rise-soft { animation-name: ht-rise-soft; animation-duration: 0.8s; }
@keyframes ht-rise {
from { opacity: 0; transform: translate3d(0, 14px, 0); }
to { opacity: 1; transform: none; }
diff --git a/apps/web/components/pages/HomeTwo/HeroSky.tsx b/apps/web/components/pages/HomeTwo/HeroSky.tsx
index be1c23bc0..ee1c9f294 100644
--- a/apps/web/components/pages/HomeTwo/HeroSky.tsx
+++ b/apps/web/components/pages/HomeTwo/HeroSky.tsx
@@ -190,18 +190,23 @@ const CSS = `
to { transform: translate3d(100%, 0, 0); }
}
-/* Clouds and light arrive after the wash starts lifting. */
+/* Light arrives after the wash starts lifting. Clouds are already faintly
+ there on the first frame and fill in: a cloud is the page's largest
+ image, and one that starts fully transparent holds LCP back until its
+ fade becomes visible. */
.ht-clouds, .ht-light {
position: absolute;
inset: 0;
animation: ht-fade-in 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}
+.ht-clouds { animation-name: ht-clouds-in; animation-delay: 0s; }
.ht-light { animation-duration: 2.8s; animation-delay: 0.45s; }
.ht-clouds {
-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 94%);
mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 94%);
}
@keyframes ht-fade-in { from { opacity: 0; } to { opacity: 1; } }
+@keyframes ht-clouds-in { from { opacity: 0.25; } to { opacity: 1; } }
.ht-mist {
position: absolute;
@@ -284,36 +289,29 @@ const CSS = `
background: linear-gradient(180deg, ${BAND}00 0%, ${BAND} 100%);
}
-/* Film grain, jumping to a new offset 12 times a second. */
+/* Film grain. Held still: a layer that changes 12 times a second keeps the
+ page from ever looking finished, which pushed LCP and Speed Index out by
+ seconds, and at this opacity the motion is barely visible anyway. */
.ht-grain {
position: absolute;
- inset: -200px;
+ inset: 0;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.12'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
background-size: 260px 260px;
- animation: ht-grain 0.84s steps(1, end) infinite;
-}
-@keyframes ht-grain {
- 0% { transform: translate3d(0, 0, 0); }
- 10% { transform: translate3d(-97px, 61px, 0); }
- 20% { transform: translate3d(43px, -128px, 0); }
- 30% { transform: translate3d(-151px, -22px, 0); }
- 40% { transform: translate3d(118px, 87px, 0); }
- 50% { transform: translate3d(-36px, 143px, 0); }
- 60% { transform: translate3d(71px, -59px, 0); }
- 70% { transform: translate3d(-122px, -114px, 0); }
- 80% { transform: translate3d(160px, 19px, 0); }
- 90% { transform: translate3d(-64px, 102px, 0); }
}
.ht-wash {
position: absolute;
inset: 0;
background: linear-gradient(180deg, #F6F8FB 0%, #F6F8FB 60%, ${BAND} 100%);
- animation: ht-wash 1.9s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
+ animation: ht-wash 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes ht-wash { from { opacity: 1; } to { opacity: 0; } }
.ht-sky-idle *, .ht-sky-idle *::before { animation-play-state: paused; }
+/* Idle pauses the drifting, never the entrance: the sky renders idle until
+ hydration, and a paused fade kept the clouds invisible (and LCP waiting)
+ until then. */
+.ht-sky-idle .ht-clouds, .ht-sky-idle .ht-light, .ht-sky-idle .ht-wash { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
.ht-sky * { animation: none !important; }
.ht-wash { opacity: 0; }
diff --git a/apps/web/components/pages/HomeTwo/LoomBridge.tsx b/apps/web/components/pages/HomeTwo/LoomBridge.tsx
index f07877b1f..03adb97aa 100644
--- a/apps/web/components/pages/HomeTwo/LoomBridge.tsx
+++ b/apps/web/components/pages/HomeTwo/LoomBridge.tsx
@@ -6,24 +6,17 @@ import Link from "next/link";
import { trackEvent } from "@/app/utils/analytics";
import { LoomMark } from "@/components/icons/LoomMark";
import { MigratePromoBadge } from "@/components/MigratePromoBadge";
-import { Eyebrow } from "./Eyebrow";
-import { BAND, BODY_TEXT, BTN_PRIMARY, grainBg, MODE_THEME } from "./theme";
+import { BODY_TEXT, BTN_PRIMARY } from "./theme";
export const LoomBridge = () => (
<section className="px-5 pb-4 pt-2">
- <div
- className="mx-auto flex max-w-[1200px] flex-col items-start justify-between gap-8 rounded-[20px] p-8 lg:flex-row lg:items-center lg:p-12"
- style={grainBg(BAND)}
- >
+ <div className="mx-auto flex max-w-[1120px] flex-col items-start justify-between gap-8 rounded-[24px] bg-white p-8 shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_1px_2px_rgba(17,17,17,0.03)] lg:flex-row lg:items-center lg:p-12">
<div className="max-w-[560px]">
- <Eyebrow accent={MODE_THEME.instant.accent}>
- Switching from Loom
- </Eyebrow>
- <h2 className="mt-5 text-balance text-[clamp(28px,3.2vw,40px)] font-normal leading-[1.05] tracking-[-0.03em] text-[#111111]">
+ <h2 className="text-balance text-[clamp(28px,3.2vw,40px)] font-normal leading-[1.05] tracking-[-0.03em] text-[#111111]">
Bring your whole Loom library with you
</h2>
<p
- className={`${BODY_TEXT} mt-4 max-w-[500px] text-[16px] leading-[1.5] text-[rgba(17,17,17,0.78)]`}
+ className={`${BODY_TEXT} mt-4 max-w-[500px] text-[16px] leading-[1.5] text-[rgba(17,17,17,0.64)]`}
>
Paste a Loom link or upload a CSV of your library and Cap re-hosts
every video with its title, a transcript and chapters. Your recordings
diff --git a/apps/web/components/pages/HomeTwo/ModeWalkthrough.tsx b/apps/web/components/pages/HomeTwo/ModeWalkthrough.tsx
index 91f5274ab..65207181a 100644
--- a/apps/web/components/pages/HomeTwo/ModeWalkthrough.tsx
+++ b/apps/web/components/pages/HomeTwo/ModeWalkthrough.tsx
@@ -115,7 +115,7 @@ const StackedSteps = ({ className }: { className?: string }) => (
</span>
</span>
{step.extraChip ? (
- <span className="rounded-full bg-[#E7EDF3] px-2.5 py-1 text-[12px] font-normal text-[rgba(17,17,17,0.55)]">
+ <span className="rounded-full bg-[#E7EDF3] px-2.5 py-1 text-[12px] font-normal text-[rgba(17,17,17,0.66)]">
{step.extraChip}
</span>
) : null}
diff --git a/apps/web/components/pages/HomeTwo/Ownership.tsx b/apps/web/components/pages/HomeTwo/Ownership.tsx
deleted file mode 100644
index 8e207a02f..000000000
--- a/apps/web/components/pages/HomeTwo/Ownership.tsx
+++ /dev/null
@@ -1,439 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { Server } from "lucide-react";
-import Image from "next/image";
-import { type ReactNode, useEffect, useRef, useState } from "react";
-import { CapLogoMark } from "./demo/capIcons";
-import { Eyebrow } from "./Eyebrow";
-import { Scaled } from "./scenes/engine";
-import {
- BAND,
- BODY_TEXT,
- EYEBROW,
- grainBg,
- H_SECTION,
- MODE_THEME,
- type ModeKey,
-} from "./theme";
-import { useInView, usePageVisible, useReducedMotion } from "./visibility";
-
-const QUOTE = {
- name: "Steven Tey",
- handle: "Founder, Dub.co",
- image: "/testimonials/steven_tey.jpg",
- content:
- "Cap is one of my favorite pieces of software I've used in the recent years. Best part is you get to own your data since they're fully open-source + via their S3 integration.",
-};
-
-type Destination = {
- key: string;
- name: string;
- label: string;
- detail: string;
- mode: ModeKey;
- icon: ReactNode;
-};
-
-const DESTINATIONS: Destination[] = [
- {
- key: "cloud",
- name: "Cap Cloud",
- label: "Cap Cloud",
- detail: "Zero setup. Encrypted, and shareable the second you stop.",
- mode: "instant",
- icon: <CapLogoMark className="size-6" />,
- },
- {
- key: "s3",
- name: "Your own S3 bucket",
- label: "Your S3 bucket",
- detail: "Any S3 compatible bucket, in any region you choose.",
- mode: "studio",
- icon: (
- <span className="grid size-6 place-items-center rounded-[6px] bg-[#111111] text-[10px] font-semibold text-white">
- S3
- </span>
- ),
- },
- {
- key: "drive",
- name: "Google Drive",
- label: "Google Drive",
- detail: "Recordings land in a Drive folder you pick.",
- mode: "screenshot",
- icon: (
- <Image
- src="/logos/google-drive.svg"
- alt=""
- width={24}
- height={24}
- className="size-6"
- />
- ),
- },
- {
- key: "self",
- name: "Self hosted",
- label: "Self hosted",
- detail: "Run the whole platform on your own infrastructure.",
- mode: "share",
- icon: <Server className="size-5 text-[#111111]" />,
- },
-];
-
-const PROOF = [
- {
- label: "Open source",
- body: "Every line is on GitHub. Audit it, fork it, or contribute the feature you need.",
- },
- {
- label: "SOC 2 Type II · ISO 27001",
- body: "Independently audited controls behind Cap Cloud.",
- },
- {
- label: "HIPAA compliant",
- body: "Signed BAAs for organizations handling PHI.",
- },
- {
- label: "No lock in",
- body: "Recordings are plain video files. Take them anywhere, any time.",
- },
-];
-
-const DIAGRAM = { w: 560, h: 340 };
-const SOURCE = { x: 168, y: DIAGRAM.h / 2 };
-const NODE = { x: 372, w: 176, h: 56, gap: 22 };
-const nodeY = (i: number) =>
- (DIAGRAM.h - (NODE.h * 4 + NODE.gap * 3)) / 2 + i * (NODE.h + NODE.gap);
-const routePath = (i: number) => {
- const cy = nodeY(i) + NODE.h / 2;
- const mid = (SOURCE.x + NODE.x) / 2;
- return `M ${SOURCE.x} ${SOURCE.y} C ${mid} ${SOURCE.y}, ${mid} ${cy}, ${NODE.x} ${cy}`;
-};
-
-const ROUTE_CSS = `
- @keyframes ht-route-packet {
- from { offset-distance: 0%; opacity: 0; }
- 8% { opacity: 1; }
- 92% { opacity: 1; }
- to { offset-distance: 100%; opacity: 0; }
- }
- @keyframes ht-route-dash {
- to { stroke-dashoffset: -28; }
- }
- @keyframes ht-route-land {
- 0% { box-shadow: 0 0 0 0 var(--ht-glow); }
- 100% { box-shadow: 0 0 0 14px transparent; }
- }
-`;
-
-const StorageRoute = ({
- active,
- playing,
-}: {
- active: number;
- playing: boolean;
-}) => {
- const theme = MODE_THEME[DESTINATIONS[active]?.mode ?? "instant"];
- const animationPlayState = playing ? "running" : "paused";
- return (
- <Scaled w={DIAGRAM.w} h={DIAGRAM.h} className="mx-auto">
- <style>{ROUTE_CSS}</style>
- <svg
- aria-hidden="true"
- viewBox={`0 0 ${DIAGRAM.w} ${DIAGRAM.h}`}
- className="absolute inset-0 h-full w-full"
- >
- {DESTINATIONS.map((destination, i) => (
- <path
- key={destination.key}
- d={routePath(i)}
- fill="none"
- stroke={i === active ? theme.glyph : "rgba(17,17,17,0.14)"}
- strokeWidth={i === active ? 2 : 1.5}
- strokeDasharray={i === active ? "8 6" : undefined}
- strokeLinecap="round"
- className="transition-[stroke] duration-500"
- style={
- i === active
- ? {
- animationName: "ht-route-dash",
- animationDuration: "1.1s",
- animationTimingFunction: "linear",
- animationIterationCount: "infinite",
- animationPlayState,
- }
- : undefined
- }
- />
- ))}
- </svg>
-
- {[0, 1].map((packet) => (
- <span
- key={packet}
- className="pointer-events-none absolute left-0 top-0 size-3 rounded-full"
- style={{
- background: theme.glyph,
- boxShadow: `0 0 0 4px ${theme.chip}`,
- offsetPath: `path("${routePath(active)}")`,
- offsetRotate: "0deg",
- animationName: "ht-route-packet",
- animationDuration: "2.2s",
- animationTimingFunction: "linear",
- animationDelay: `${packet * 1.1}s`,
- animationIterationCount: "infinite",
- animationPlayState,
- }}
- />
- ))}
-
- <div
- className="absolute flex w-[150px] -translate-x-full -translate-y-1/2 flex-col gap-2 rounded-[14px] bg-white p-2.5"
- style={{
- left: SOURCE.x - 6,
- top: SOURCE.y,
- boxShadow:
- "0 0 0 1px rgba(17,17,17,0.06), 0 20px 40px -24px rgba(17,17,17,0.5)",
- }}
- >
- <div
- className="relative h-[68px] overflow-hidden rounded-[9px]"
- style={{
- background: "linear-gradient(135deg,#71a3f5 0%,#b7d4fa 100%)",
- }}
- >
- <span className="absolute inset-x-4 inset-y-3 rounded-[5px] bg-white/95 shadow-[0_8px_20px_-10px_rgba(16,24,40,0.5)]">
- <span className="absolute left-2 top-2 h-[3px] w-10 rounded-full bg-[rgba(17,17,17,0.35)]" />
- <span className="absolute left-2 top-[15px] h-[3px] w-16 rounded-full bg-[rgba(17,17,17,0.12)]" />
- </span>
- <span className="absolute bottom-2 left-2 size-4 rounded-full bg-[#111111] ring-2 ring-white/70" />
- </div>
- <div className="flex items-center gap-2 px-0.5">
- <CapLogoMark className="size-4 shrink-0" />
- <span className="min-w-0 flex-1 leading-tight">
- <span className="block truncate text-[12px] font-medium text-[#111111]">
- team-update.cap
- </span>
- <span className="block text-[10.5px] text-[rgba(17,17,17,0.5)]">
- 4K · 1.2 GB
- </span>
- </span>
- </div>
- </div>
-
- {DESTINATIONS.map((destination, i) => {
- const on = i === active;
- const tone = MODE_THEME[destination.mode];
- return (
- <div
- key={destination.key}
- className={classNames(
- "absolute flex items-center gap-3 rounded-[12px] px-3 transition-[background-color,box-shadow,transform] duration-500",
- on ? "bg-white" : "bg-white/60",
- )}
- style={
- {
- left: NODE.x,
- top: nodeY(i),
- width: NODE.w,
- height: NODE.h,
- "--ht-glow": tone.pill,
- boxShadow: on
- ? `0 0 0 1.5px ${tone.accent}, 0 18px 36px -22px rgba(17,17,17,0.5)`
- : "0 0 0 1px rgba(17,17,17,0.06)",
- animationName: on ? "ht-route-land" : "none",
- animationDuration: "2.2s",
- animationTimingFunction: "ease-out",
- animationIterationCount: "infinite",
- animationPlayState,
- } as React.CSSProperties
- }
- >
- <span
- className="grid size-9 shrink-0 place-items-center rounded-[9px]"
- style={{ background: on ? tone.chip : "#F1F4F8" }}
- >
- {destination.icon}
- </span>
- <span
- className={classNames(
- "truncate text-[13px] font-medium transition-colors duration-300",
- on ? "text-[#111111]" : "text-[rgba(17,17,17,0.6)]",
- )}
- >
- {destination.label}
- </span>
- </div>
- );
- })}
- </Scaled>
- );
-};
-
-export const Ownership = () => {
- const [active, setActive] = useState(0);
- const [pinned, setPinned] = useState(false);
- const cardRef = useRef<HTMLDivElement | null>(null);
- const inView = useInView(cardRef);
- const pageVisible = usePageVisible();
- const reducedMotion = useReducedMotion();
- const playing = inView && pageVisible && !reducedMotion;
-
- useEffect(() => {
- if (!playing || pinned) return;
- const timer = setInterval(
- () => setActive((current) => (current + 1) % DESTINATIONS.length),
- 3200,
- );
- return () => clearInterval(timer);
- }, [playing, pinned]);
-
- useEffect(() => {
- if (!pinned) return;
- const release = setTimeout(() => setPinned(false), 9000);
- return () => clearTimeout(release);
- }, [pinned]);
-
- const choose = (i: number) => {
- setActive(i);
- setPinned(true);
- };
-
- return (
- <section className="px-5 py-20 lg:py-28">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.studio.accent}>Open source</Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
- >
- Your recordings. Actually yours.
- </h2>
- <p
- className={`${BODY_TEXT} mt-6 max-w-[600px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
- >
- Cap is open source, and every recording goes exactly where you say.
- Use Cap Cloud, point it at your own bucket or Drive, or self host
- the whole thing.
- </p>
- </div>
-
- <div
- ref={cardRef}
- className="mt-14 grid gap-4 rounded-[24px] p-3 lg:grid-cols-[1.3fr_1fr] lg:p-4"
- style={grainBg(BAND)}
- >
- <div className="flex items-center rounded-[16px] bg-[#F8FAFC] px-6 py-8 shadow-[0_0_0_1px_rgba(17,17,17,0.04)] lg:px-10">
- <StorageRoute active={active} playing={playing} />
- </div>
-
- <div className="flex flex-col gap-2">
- {DESTINATIONS.map((destination, i) => {
- const on = i === active;
- const tone = MODE_THEME[destination.mode];
- return (
- <button
- key={destination.key}
- type="button"
- aria-pressed={on}
- onClick={() => choose(i)}
- className={classNames(
- "flex flex-1 items-start gap-3.5 rounded-[14px] px-4 py-4 text-left transition-[background-color,box-shadow] duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]",
- on
- ? "bg-white shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_18px_36px_-26px_rgba(17,17,17,0.45)]"
- : "hover:bg-white/50",
- )}
- >
- <span
- className="mt-[3px] inline-block size-[7px] shrink-0 transition-colors duration-300"
- style={{
- background: on ? tone.accent : "rgba(17,17,17,0.18)",
- }}
- />
- <span className="min-w-0">
- <span
- className={classNames(
- "block text-[16px] font-medium transition-colors duration-300",
- on ? "text-[#111111]" : "text-[rgba(17,17,17,0.55)]",
- )}
- >
- {destination.name}
- </span>
- <span
- className={classNames(
- BODY_TEXT,
- "mt-1 block text-[14.5px] leading-[1.45] transition-colors duration-300",
- on
- ? "text-[rgba(17,17,17,0.72)]"
- : "text-[rgba(17,17,17,0.4)]",
- )}
- >
- {destination.detail}
- </span>
- </span>
- </button>
- );
- })}
- </div>
- </div>
-
- <div className="mt-4 grid gap-4 lg:grid-cols-[1.3fr_1fr]">
- <figure className="flex flex-col justify-center rounded-[20px] bg-white p-8 shadow-[0_0_0_1px_rgba(17,17,17,0.05)] lg:p-10">
- <blockquote
- className={`${BODY_TEXT} text-balance text-[clamp(19px,1.9vw,24px)] leading-[1.4] text-[#111111]`}
- >
- &ldquo;{QUOTE.content}&rdquo;
- </blockquote>
- <figcaption className="mt-7 flex flex-wrap items-center gap-2">
- <span className="inline-flex items-center gap-2 rounded-full bg-[#EDF1F6] py-1.5 pl-1.5 pr-4">
- <Image
- src={QUOTE.image}
- alt=""
- width={28}
- height={28}
- className="size-7 rounded-full object-cover"
- />
- <span className="text-[13.5px] font-medium text-[#111111]">
- {QUOTE.name}
- </span>
- </span>
- <span className="rounded-full bg-[#EDF1F6] px-4 py-2 text-[13.5px] text-[rgba(17,17,17,0.55)]">
- {QUOTE.handle}
- </span>
- </figcaption>
- </figure>
-
- <ul
- className="grid grid-cols-1 gap-px overflow-hidden rounded-[20px] sm:grid-cols-2"
- style={grainBg(BAND)}
- >
- {PROOF.map((item) => (
- <li key={item.label} className="flex flex-col gap-2 p-6">
- <p
- className={classNames(
- EYEBROW,
- "flex items-center gap-2 text-[11px] text-[#111111]",
- )}
- >
- <span
- aria-hidden="true"
- className="inline-block size-[7px]"
- style={{ background: MODE_THEME.studio.accent }}
- />
- {item.label}
- </p>
- <p
- className={`${BODY_TEXT} text-[14.5px] leading-[1.45] text-[rgba(17,17,17,0.72)]`}
- >
- {item.body}
- </p>
- </li>
- ))}
- </ul>
- </div>
- </div>
- </section>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/Platforms.tsx b/apps/web/components/pages/HomeTwo/Platforms.tsx
deleted file mode 100644
index 75c62d533..000000000
--- a/apps/web/components/pages/HomeTwo/Platforms.tsx
+++ /dev/null
@@ -1,239 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { useDetectPlatform } from "hooks/useDetectPlatform";
-import { ArrowUpRight } from "lucide-react";
-import Image from "next/image";
-import Link from "next/link";
-import { getDownloadUrl } from "@/utils/platform";
-import { Eyebrow } from "./Eyebrow";
-import { AppleGlyph } from "./glyphs";
-import {
- BAND,
- BODY_TEXT,
- BTN_PRIMARY,
- grainBg,
- H_CARD,
- H_SECTION,
- MODE_THEME,
- MONO,
- meshStyle,
-} from "./theme";
-
-const WindowsGlyph = ({ className }: { className?: string }) => (
- <svg
- aria-hidden="true"
- className={className}
- viewBox="0 0 24 24"
- fill="currentColor"
- >
- <path d="M0,0H11.377V11.372H0ZM12.623,0H24V11.372H12.623ZM0,12.623H11.377V24H0Zm12.623,0H24V24H12.623" />
- </svg>
-);
-
-const TERMINAL = [
- { prompt: true, text: "cap record start --mode studio --duration 30" },
- { prompt: true, text: "cap export ./recording.cap --quality 4k" },
- { prompt: true, text: "cap upload ./recording.mp4 --json" },
- { prompt: false, text: '{ "url": "https://cap.so/s/x7f2k9" }' },
-];
-
-const Tile = ({
- href,
- title,
- body,
- icon,
-}: {
- href: string;
- title: string;
- body: string;
- icon: React.ReactNode;
-}) => (
- <Link
- href={href}
- className="group flex flex-col justify-between rounded-[20px] p-7 transition-colors duration-200 hover:bg-[#E5EAF1] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]"
- style={grainBg(BAND)}
- >
- <span className="flex items-start justify-between">
- {icon}
- <ArrowUpRight className="size-4 text-[rgba(17,17,17,0.4)] transition-colors duration-200 group-hover:text-[#111111]" />
- </span>
- <span className="mt-10 block">
- <span className="block text-[19px] font-normal leading-[1.1] tracking-[-0.02em] text-[#111111]">
- {title}
- </span>
- <span
- className={`${BODY_TEXT} mt-2 block text-[14.5px] leading-[1.45] text-[rgba(17,17,17,0.7)]`}
- >
- {body}
- </span>
- </span>
- </Link>
-);
-
-export const Platforms = () => {
- const { platform, isIntel } = useDetectPlatform();
- const current = platform ?? "macos";
-
- const desktops = [
- {
- key: "macos",
- name: "macOS",
- note: "Apple silicon and Intel. macOS 13.1 or newer.",
- href: getDownloadUrl("macos", isIntel),
- glyph: <AppleGlyph className="size-7" />,
- mode: "instant" as const,
- },
- {
- key: "windows",
- name: "Windows",
- note: "Windows 10 or newer.",
- href: getDownloadUrl("windows", false),
- glyph: <WindowsGlyph className="size-6" />,
- mode: "studio" as const,
- },
- {
- key: "linux",
- name: "Linux",
- note: "Debian and Ubuntu, as a .deb package.",
- href: getDownloadUrl("linux", false),
- glyph: (
- <Image
- src="/logos/os/linux.svg"
- alt=""
- width={28}
- height={28}
- className="size-7"
- />
- ),
- mode: "screenshot" as const,
- },
- ];
-
- return (
- <section className="px-5 py-20 lg:py-28">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.screenshot.accent}>
- Every platform
- </Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
- >
- Native on Mac, Windows and Linux
- </h2>
- <p
- className={`${BODY_TEXT} mt-6 max-w-[540px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
- >
- A real desktop app on all three, with the same recorder, editor, and
- share link. Plus a Chrome extension for the browser and a CLI for
- everything else.
- </p>
- </div>
-
- <div className="mt-14 grid gap-4 md:grid-cols-3">
- {desktops.map((desktop) => {
- const yours = desktop.key === current;
- return (
- <div
- key={desktop.key}
- className="flex flex-col justify-between rounded-[24px] p-8 md:min-h-[300px]"
- style={meshStyle(MODE_THEME[desktop.mode])}
- >
- <div className="flex items-start justify-between gap-4">
- <span className="grid size-14 place-items-center rounded-[16px] bg-white text-[#111111] shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_14px_30px_-18px_rgba(17,17,17,0.5)]">
- {desktop.glyph}
- </span>
- {yours ? (
- <span
- className={classNames(
- MONO,
- "rounded-full bg-white/70 px-3 py-1.5 text-[11px] uppercase leading-none tracking-[0.05em] text-[rgba(17,17,17,0.7)]",
- )}
- >
- Your device
- </span>
- ) : null}
- </div>
- <div className="mt-10">
- <h3 className={`${H_CARD} text-[clamp(28px,2.6vw,34px)]`}>
- {desktop.name}
- </h3>
- <p
- className={`${BODY_TEXT} mt-2 text-[15.5px] leading-[1.45] text-[rgba(17,17,17,0.7)]`}
- >
- {desktop.note}
- </p>
- <Link
- href={desktop.href}
- className={classNames(
- BTN_PRIMARY,
- "mt-6 h-[46px] px-5 text-[15px]",
- )}
- >
- Download for {desktop.name}
- </Link>
- </div>
- </div>
- );
- })}
- </div>
-
- <div className="mt-4 grid gap-4 md:grid-cols-2">
- <Tile
- href="/download"
- title="Chrome extension"
- body="Record a tab or your whole screen without leaving the browser."
- icon={
- <Image
- src="/logos/browsers/google-chrome.svg"
- alt=""
- width={36}
- height={36}
- className="size-9"
- />
- }
- />
- <Link
- href="/docs"
- className="group flex flex-col rounded-[20px] p-7 transition-colors duration-200 hover:bg-[#E5EAF1] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]"
- style={grainBg(BAND)}
- >
- <span className="flex items-start justify-between">
- <span className="block text-[19px] font-normal leading-[1.1] tracking-[-0.02em] text-[#111111]">
- Built for developers
- </span>
- <ArrowUpRight className="size-4 shrink-0 text-[rgba(17,17,17,0.4)] transition-colors duration-200 group-hover:text-[#111111]" />
- </span>
- <span
- className={`${BODY_TEXT} mt-2 block text-[14.5px] leading-[1.45] text-[rgba(17,17,17,0.7)]`}
- >
- Record, export, and publish from the terminal, the API, or the MCP
- server.
- </span>
- <span
- className={classNames(
- MONO,
- "mt-5 block rounded-[12px] bg-[#111111] p-4 text-[11.5px] leading-[1.7] text-[#F8FAFC]",
- )}
- >
- {TERMINAL.map((line) => (
- <span
- key={line.text}
- className="block whitespace-pre-wrap break-words"
- >
- {line.prompt ? (
- <span className="text-[rgba(255,255,255,0.4)]">$ </span>
- ) : null}
- <span className={line.prompt ? undefined : "text-[#8FDCBB]"}>
- {line.text}
- </span>
- </span>
- ))}
- </span>
- </Link>
- </div>
- </div>
- </section>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/Pricing.tsx b/apps/web/components/pages/HomeTwo/Pricing.tsx
index 71f01200e..05bc58de3 100644
--- a/apps/web/components/pages/HomeTwo/Pricing.tsx
+++ b/apps/web/components/pages/HomeTwo/Pricing.tsx
@@ -6,17 +6,12 @@ import Link from "next/link";
import { useState } from "react";
import { trackEvent } from "@/app/utils/analytics";
import { homepageCopy } from "@/data/homepage-copy";
-import { Eyebrow } from "./Eyebrow";
import {
- BAND,
BODY_TEXT,
BTN_PRIMARY,
BTN_SECONDARY,
- CARD_BG,
- grainBg,
H_SECTION,
MODE_THEME,
- MONO,
type ModeTheme,
} from "./theme";
@@ -60,18 +55,12 @@ const PlanCard = ({
primary?: boolean;
theme: ModeTheme;
}) => (
- <div
- className="flex flex-col rounded-[14px] p-7 lg:p-8"
- style={grainBg(CARD_BG)}
- >
+ <div className="flex flex-col rounded-[20px] bg-white p-7 shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_1px_2px_rgba(17,17,17,0.03)] lg:p-8">
<div className="flex items-center gap-2.5">
<span className="text-[15px] font-medium text-[#111111]">{name}</span>
{badge ? (
<span
- className={classNames(
- MONO,
- "rounded-full px-2.5 py-1 text-[10.5px] uppercase leading-none tracking-[0.05em]",
- )}
+ className="rounded-full px-2.5 py-1 text-[12px] leading-none"
style={{ background: theme.chip, color: theme.glyph }}
>
{badge}
@@ -89,9 +78,9 @@ const PlanCard = ({
<span className="text-[46px] font-normal leading-none tracking-[-0.03em] text-[#111111]">
{price}
</span>
- <span className="text-[14px] text-[rgba(17,17,17,0.5)]">{cadence}</span>
+ <span className="text-[14px] text-[rgba(17,17,17,0.64)]">{cadence}</span>
</div>
- <p className="mt-2 text-[13.5px] text-[rgba(17,17,17,0.5)]">{note}</p>
+ <p className="mt-2 text-[13.5px] text-[rgba(17,17,17,0.64)]">{note}</p>
<Link
href={href}
@@ -127,19 +116,18 @@ export const Pricing = () => {
<section className="px-5 py-20 lg:py-28">
<div className="mx-auto max-w-[1060px]">
<div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.instant.accent}>Pricing</Eyebrow>
<h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
+ className={`${H_SECTION} text-balance text-[clamp(34px,4.6vw,54px)] leading-[1.02]`}
>
Simple, honest pricing
</h2>
<p
- className={`${BODY_TEXT} mt-6 max-w-[560px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
+ className={`${BODY_TEXT} mt-5 max-w-[560px] text-balance text-[17px] leading-[1.5] text-[rgba(17,17,17,0.64)] sm:text-[18px]`}
>
{subtitle}
</p>
- <div className="mt-8 flex items-center gap-1 rounded-full border border-[#DDE4EB] bg-white/70 p-1">
+ <div className="mt-8 flex items-center gap-0.5 rounded-full bg-[#EEF1F5] p-1 shadow-[inset_0_0_0_1px_rgba(17,17,17,0.04)]">
{(["annual", "monthly"] as const).map((option) => {
const active = billing === option;
return (
@@ -151,27 +139,21 @@ export const Pricing = () => {
className={classNames(
"h-8 rounded-full px-4 text-[13px] font-medium transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111] focus-visible:ring-offset-1 focus-visible:ring-offset-white",
active
- ? "text-[#111111]"
- : "text-[rgba(17,17,17,0.5)] hover:bg-[#EDF1F6] hover:text-[#111111]",
+ ? "bg-white text-[#111111] shadow-[0_1px_2px_rgba(17,17,17,0.08),0_0_0_1px_rgba(17,17,17,0.06)]"
+ : "text-[rgba(17,17,17,0.64)] hover:text-[#111111]",
)}
- style={
- active ? { background: MODE_THEME.instant.chip } : undefined
- }
>
{option === "annual" ? "Annual" : "Monthly"}
</button>
);
})}
</div>
- <p className="mt-4 text-[13.5px] text-[rgba(17,17,17,0.5)]">
+ <p className="mt-4 text-[13.5px] text-[rgba(17,17,17,0.64)]">
{lovedBy}
</p>
</div>
- <div
- className="mt-14 grid gap-3 rounded-[20px] p-3 lg:grid-cols-2 lg:gap-4 lg:p-4"
- style={grainBg(BAND)}
- >
+ <div className="mt-14 grid gap-3 lg:grid-cols-2">
<PlanCard
name={commercial.title}
blurb={BLURB.commercial}
diff --git a/apps/web/components/pages/HomeTwo/Testimonials.tsx b/apps/web/components/pages/HomeTwo/Testimonials.tsx
index 1bf400f02..e3408fad0 100644
--- a/apps/web/components/pages/HomeTwo/Testimonials.tsx
+++ b/apps/web/components/pages/HomeTwo/Testimonials.tsx
@@ -67,7 +67,7 @@ export const Testimonials = ({ eyebrow = true }: { eyebrow?: boolean }) => (
<span className="block truncate text-[14px] font-medium text-[#111111]">
{quote.name}
</span>
- <span className="block truncate text-[13px] text-[rgba(17,17,17,0.5)]">
+ <span className="block truncate text-[13px] text-[rgba(17,17,17,0.64)]">
{quote.handle}
</span>
</span>
diff --git a/apps/web/components/pages/HomeTwo/Workflow.tsx b/apps/web/components/pages/HomeTwo/Workflow.tsx
deleted file mode 100644
index 716f92275..000000000
--- a/apps/web/components/pages/HomeTwo/Workflow.tsx
+++ /dev/null
@@ -1,173 +0,0 @@
-import { classNames } from "@cap/utils/helpers";
-import Link from "next/link";
-import type { ComponentType } from "react";
-import {
- InstantIcon,
- ScreenshotIcon,
- StudioIcon,
-} from "@/components/pages/HomePage/modeIcons";
-import { Eyebrow } from "./Eyebrow";
-import {
- BAND,
- BODY_TEXT,
- BTN_PRIMARY,
- CARD_BG,
- grainBg,
- H_SECTION,
- MODE_THEME,
- MONO,
- type ModeKey,
- type ModeTheme,
-} from "./theme";
-
-type Mode = {
- key: ModeKey;
- name: string;
- promise: string;
- steps: string[];
- bestFor: string;
- Icon: ComponentType<{ className?: string }>;
-};
-
-const MODES: Mode[] = [
- {
- key: "instant",
- name: "Instant Mode",
- promise: "From recording to shared in one step",
- steps: [
- "Press record. Cap uploads while you talk, so there is nothing to wait for.",
- "Press stop. The share link is already on your clipboard.",
- "Paste it anywhere. Viewers watch in the browser, no account needed.",
- ],
- bestFor: "Bug reports, quick answers, async standups",
- Icon: InstantIcon,
- },
- {
- key: "studio",
- name: "Studio Mode",
- promise: "Full quality, polished before anyone sees it",
- steps: [
- "Record locally in 4K. Screen, camera, and mic each get their own track.",
- "The editor opens when you stop: backgrounds, auto zoom, cursor effects, captions.",
- "Export in 4K, or share it as a Cap link like everything else.",
- ],
- bestFor: "Product demos, tutorials, launch videos",
- Icon: StudioIcon,
- },
- {
- key: "screenshot",
- name: "Screenshot Mode",
- promise: "Stills that look designed",
- steps: [
- "Hit the hotkey and grab any window or area.",
- "Beautify with one click: background, padding, shadow.",
- "It's on your clipboard, ready to paste or share as a link.",
- ],
- bestFor: "Docs, pull requests, social posts",
- Icon: ScreenshotIcon,
- },
-];
-
-const StepRow = ({
- index,
- text,
- theme,
-}: {
- index: number;
- text: string;
- theme: ModeTheme;
-}) => (
- <li className="flex items-start gap-3">
- <span
- className="mt-px flex size-6 shrink-0 items-center justify-center rounded-full text-[12px] font-medium tabular-nums"
- style={{ background: theme.chip, color: theme.glyph }}
- >
- {index}
- </span>
- <span className="text-[13.5px] leading-snug text-[rgba(17,17,17,0.72)]">
- {text}
- </span>
- </li>
-);
-
-export const Workflow = () => (
- // biome-ignore lint/correctness/useUniqueElementIds: anchor target for the demo's "Learn more"
- <section id="workflow" className="scroll-mt-10 px-5 py-20 lg:py-28">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[760px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.instant.accent}>Cap has 3 modes</Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(38px,5vw,56px)]`}
- >
- One app for every workflow
- </h2>
- <p
- className={`${BODY_TEXT} mt-6 max-w-[600px] text-balance text-[16.5px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17.5px]`}
- >
- Record and share with Instant, edit your videos with Studio, or
- capture and customize images with Screenshot.
- </p>
- <Link href="/download" className={classNames(BTN_PRIMARY, "mt-8")}>
- Download Cap free
- </Link>
- </div>
-
- <div className="mt-16 rounded-[20px] p-3 lg:p-4" style={grainBg(BAND)}>
- <div className="grid gap-3 md:grid-cols-3 lg:gap-4">
- {MODES.map((mode) => {
- const theme = MODE_THEME[mode.key];
- return (
- <div
- key={mode.key}
- className="flex flex-col rounded-[14px] p-6 text-left"
- style={grainBg(CARD_BG)}
- >
- <div className="flex items-center gap-2.5">
- <span
- className="grid size-8 shrink-0 place-items-center rounded-[8px]"
- style={{ background: theme.chip, color: theme.glyph }}
- >
- <mode.Icon className="size-4" />
- </span>
- <span className="text-[15px] font-medium text-[#111111]">
- {mode.name}
- </span>
- </div>
-
- <h3 className="mt-5 max-w-[300px] text-balance text-[22px] font-normal leading-[1.1] tracking-[-0.02em] text-[#111111]">
- {mode.promise}
- </h3>
-
- <div className="flex flex-1 flex-col justify-between">
- <div>
- <ol className="mt-5 space-y-3">
- {mode.steps.map((text, i) => (
- <StepRow
- key={text}
- index={i + 1}
- text={text}
- theme={theme}
- />
- ))}
- </ol>
-
- <div className="mt-6 border-t border-[#E1E7EE] pt-4">
- <p
- className={`${MONO} text-[11px] font-normal uppercase leading-none tracking-[0.05em] text-[rgba(17,17,17,0.45)]`}
- >
- Best for
- </p>
- <p className="mt-2 text-[13.5px] leading-snug text-[rgba(17,17,17,0.72)]">
- {mode.bestFor}
- </p>
- </div>
- </div>
- </div>
- </div>
- );
- })}
- </div>
- </div>
- </div>
- </section>
-);
diff --git a/apps/web/components/pages/HomeTwo/demo/CapEditorWindow.tsx b/apps/web/components/pages/HomeTwo/demo/CapEditorWindow.tsx
index 51f231fd5..d0602dcc2 100644
--- a/apps/web/components/pages/HomeTwo/demo/CapEditorWindow.tsx
+++ b/apps/web/components/pages/HomeTwo/demo/CapEditorWindow.tsx
@@ -34,7 +34,7 @@ import {
LucideZoomOut,
} from "./capIcons";
import { TrafficLights, WindowsCaptionControls } from "./chrome";
-import { useVideoAttrs, VIDEO_POSTERS } from "./media";
+import { PresenterSources, useVideoAttrs, VIDEO_POSTERS } from "./media";
import { useIsWindowsDemo } from "./platform";
const C = {
@@ -64,7 +64,8 @@ const WALLPAPERS = [
].map((city) => ({
id: city,
thumb: `/backgrounds/thumbs/${city}.webp`,
- full: `/backgrounds/${city}.webp`,
+ // 1280px copies: the editor stage never draws them wider than that.
+ full: `/backgrounds/landing/${city}.webp`,
}));
const WALLPAPER_THEMES = [
@@ -419,12 +420,13 @@ export const CapEditorWindow = ({
<video
ref={camVideoRef}
className="h-full w-full object-cover"
- src="/videos/home-two/webcam.mp4"
muted
loop
playsInline
{...cameraVideo}
- />
+ >
+ <PresenterSources />
+ </video>
</div>
{canvasChildren}
</div>
diff --git a/apps/web/components/pages/HomeTwo/demo/CapSurfaces.tsx b/apps/web/components/pages/HomeTwo/demo/CapSurfaces.tsx
index 85576b285..f2580c400 100644
--- a/apps/web/components/pages/HomeTwo/demo/CapSurfaces.tsx
+++ b/apps/web/components/pages/HomeTwo/demo/CapSurfaces.tsx
@@ -21,7 +21,7 @@ import {
CapTrash,
CapX,
} from "./capIcons";
-import { useVideoAttrs, VIDEO_POSTERS } from "./media";
+import { PresenterSources, useVideoAttrs, VIDEO_POSTERS } from "./media";
import { OS_FONT, useIsWindowsDemo } from "./platform";
const ToolButton = ({
@@ -178,12 +178,13 @@ export const CameraWindow = ({
<video
ref={videoRef}
className="h-full w-full object-cover"
- src="/videos/home-two/webcam.mp4"
muted
loop
playsInline
{...videoAttrs}
- />
+ >
+ <PresenterSources />
+ </video>
</div>
</div>
);
diff --git a/apps/web/components/pages/HomeTwo/demo/DesktopDemo.tsx b/apps/web/components/pages/HomeTwo/demo/DesktopDemo.tsx
index afbe89cf5..ad85dae60 100644
--- a/apps/web/components/pages/HomeTwo/demo/DesktopDemo.tsx
+++ b/apps/web/components/pages/HomeTwo/demo/DesktopDemo.tsx
@@ -1361,7 +1361,7 @@ export const DesktopDemo = ({
onClick={(event) => {
event.stopPropagation();
document
- .getElementById("workflow")
+ .getElementById("instant")
?.scrollIntoView({ behavior: "smooth" });
}}
className="pointer-events-auto flex h-[56px] cursor-pointer items-center gap-2 rounded-full border border-white/40 bg-black/30 px-9 text-[20px] font-medium text-white backdrop-blur-md transition-colors duration-200 hover:bg-black/50 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-white/70"
diff --git a/apps/web/components/pages/HomeTwo/demo/media.tsx b/apps/web/components/pages/HomeTwo/demo/media.tsx
index c488eb532..7a0ed6df9 100644
--- a/apps/web/components/pages/HomeTwo/demo/media.tsx
+++ b/apps/web/components/pages/HomeTwo/demo/media.tsx
@@ -8,8 +8,26 @@ export const SceneMediaProvider = SceneMediaContext.Provider;
export const useSceneMedia = () => useContext(SceneMediaContext);
+/**
+ * An 8 second 960x600 talking-head loop cut from a real Cap camera track:
+ * AV1 (~100 KB) where supported, H.264 (~160 KB) otherwise, no audio.
+ */
+export const PRESENTER = {
+ av1: "/videos/landing/presenter.webm",
+ mp4: "/videos/landing/presenter.mp4",
+ poster: "/videos/landing/presenter-poster.webp",
+ avatar: "/videos/landing/presenter-avatar.webp",
+} as const;
+
+export const PresenterSources = () => (
+ <>
+ <source src={PRESENTER.av1} type='video/webm; codecs="av01.0.05M.08"' />
+ <source src={PRESENTER.mp4} type="video/mp4" />
+ </>
+);
+
export const VIDEO_POSTERS = {
- webcam: "/videos/home-two/webcam-poster.jpg",
+ webcam: PRESENTER.poster,
screen: "/illustrations/homepage-animation-poster.jpg",
} as const;
diff --git a/apps/web/components/pages/HomeTwo/fonts.ts b/apps/web/components/pages/HomeTwo/fonts.ts
index da3b85942..17edd02c5 100644
--- a/apps/web/components/pages/HomeTwo/fonts.ts
+++ b/apps/web/components/pages/HomeTwo/fonts.ts
@@ -5,9 +5,9 @@ import {
Source_Serif_4,
} from "next/font/google";
+// Variable: one file covers 400 and 500 instead of two ~50 KB statics.
export const htSans = Instrument_Sans({
subsets: ["latin"],
- weight: ["400", "500"],
display: "swap",
variable: "--font-ht-sans",
});
@@ -20,10 +20,13 @@ export const htSerif = Source_Serif_4({
variable: "--font-ht-serif",
});
+// Geist and DM Mono only appear inside the animated stages below the fold, so
+// they are fetched when first used instead of competing with the hero fonts.
export const htGeist = Geist({
subsets: ["latin"],
weight: ["400", "500", "600"],
display: "swap",
+ preload: false,
variable: "--font-ht-geist",
});
@@ -31,5 +34,6 @@ export const htMono = DM_Mono({
subsets: ["latin"],
weight: ["400"],
display: "swap",
+ preload: false,
variable: "--font-ht-mono",
});
diff --git a/apps/web/components/pages/HomeTwo/index.tsx b/apps/web/components/pages/HomeTwo/index.tsx
index aa5f4a8a4..fce3f8916 100644
--- a/apps/web/components/pages/HomeTwo/index.tsx
+++ b/apps/web/components/pages/HomeTwo/index.tsx
@@ -1,20 +1,24 @@
-import { Agents } from "@/components/pages/HomeTwo/Agents";
-import { DeepDives } from "@/components/pages/HomeTwo/DeepDives";
import { DiscordLinkPreview } from "@/components/pages/HomeTwo/DiscordLinkPreview";
import { Faq } from "@/components/pages/HomeTwo/Faq";
-import { Features } from "@/components/pages/HomeTwo/Features";
import { FinalCta } from "@/components/pages/HomeTwo/FinalCta";
import { htMono, htSans, htSerif } from "@/components/pages/HomeTwo/fonts";
import { Hero } from "@/components/pages/HomeTwo/Hero";
import { LoomBridge } from "@/components/pages/HomeTwo/LoomBridge";
import { ModeWalkthrough } from "@/components/pages/HomeTwo/ModeWalkthrough";
-import { Ownership } from "@/components/pages/HomeTwo/Ownership";
-import { Platforms } from "@/components/pages/HomeTwo/Platforms";
import { Pricing } from "@/components/pages/HomeTwo/Pricing";
import { Testimonials } from "@/components/pages/HomeTwo/Testimonials";
import { BAND, CREAM, grainBg, SHELL } from "@/components/pages/HomeTwo/theme";
-import { Workflow } from "@/components/pages/HomeTwo/Workflow";
import { HomeTwoSchema } from "./Schema";
+import { FADE_CSS, POP_CSS } from "./showcase/layout";
+import { PlatformsSection } from "./showcase/platforms";
+import {
+ AgentsSection,
+ AiSection,
+ InstantSection,
+ OwnershipSection,
+ ScreenshotSection,
+ StudioSection,
+} from "./showcase/sections";
const CARD_RADIUS = "rounded-[24px]";
@@ -28,6 +32,7 @@ export function HomeTwoPage() {
className={`${htSans.className} ${htSans.variable} ${htSerif.variable} ${htMono.variable} text-[#111111]`}
style={grainBg(SHELL)}
>
+ <style>{FADE_CSS + POP_CSS}</style>
<HomeTwoSchema />
<DiscordLinkPreview />
<div className="px-2.5 pb-2.5 pt-[68px] sm:px-5 sm:pb-4 lg:px-8 lg:pt-[76px]">
@@ -42,15 +47,16 @@ export function HomeTwoPage() {
<Hero />
<ModeWalkthrough />
</div>
- <Workflow />
- <DeepDives />
- <Features />
- <Ownership />
- <Platforms />
- <Agents />
- <Testimonials />
+ <InstantSection />
+ <StudioSection />
+ <ScreenshotSection />
+ <AiSection />
+ <OwnershipSection />
+ <PlatformsSection />
+ <AgentsSection />
+ <Testimonials eyebrow={false} />
<Pricing />
- <Faq />
+ <Faq eyebrow={false} />
<LoomBridge />
<FinalCta />
</div>
diff --git a/apps/web/components/pages/HomeTwo/scenes/AgentScene.tsx b/apps/web/components/pages/HomeTwo/scenes/AgentScene.tsx
index 734efb61e..f66930540 100644
--- a/apps/web/components/pages/HomeTwo/scenes/AgentScene.tsx
+++ b/apps/web/components/pages/HomeTwo/scenes/AgentScene.tsx
@@ -396,7 +396,7 @@ export const AgentScene = (props: SceneProps) => {
Checkout bug repro
</span>
<span className="block text-[12px] text-[rgba(17,17,17,0.55)]">
- cap.so/s/x7f2k9 · 0:20 · AI summary ready
+ Cap.so/s/x7f2k9 · 0:20 · AI summary ready
</span>
</span>
</div>
@@ -429,7 +429,7 @@ export const AgentScene = (props: SceneProps) => {
commentVisible={ui.comment}
videoRef={shareVideoRef}
title="Checkout bug repro"
- url="cap.so/s/x7f2k9"
+ url="Cap.so/s/x7f2k9"
duration="0:20"
/>
</div>
diff --git a/apps/web/components/pages/HomeTwo/scenes/engine.tsx b/apps/web/components/pages/HomeTwo/scenes/engine.tsx
index a24681688..d499142a5 100644
--- a/apps/web/components/pages/HomeTwo/scenes/engine.tsx
+++ b/apps/web/components/pages/HomeTwo/scenes/engine.tsx
@@ -360,6 +360,7 @@ export const Scaled = ({
style,
inert: isInert,
grow,
+ eager,
children,
}: {
w: number;
@@ -368,6 +369,11 @@ export const Scaled = ({
style?: React.CSSProperties;
inert?: boolean;
grow?: boolean;
+ /**
+ * Above the fold: size and reveal the content with a tiny inline script
+ * as the HTML parses, instead of waiting for hydration to measure it.
+ */
+ eager?: boolean;
children: ReactNode;
}) => {
const boxRef = useRef<HTMLDivElement | null>(null);
@@ -385,13 +391,17 @@ export const Scaled = ({
}, [w, grow]);
const s = scale ?? 1;
- return (
+ const box = (
<div
ref={boxRef}
aria-hidden="true"
inert={isInert}
+ data-fit-w={eager ? w : undefined}
+ data-fit-grow={eager && grow ? "" : undefined}
+ suppressHydrationWarning={eager}
className={classNames(
- "relative w-full select-none transition-opacity duration-500",
+ "relative w-full select-none",
+ !eager && "transition-opacity duration-500",
scale === null ? "opacity-0" : "opacity-100",
isInert && "pointer-events-none",
className,
@@ -403,6 +413,7 @@ export const Scaled = ({
}}
>
<div
+ suppressHydrationWarning={eager}
className="absolute left-0 top-0"
style={{
width: w,
@@ -415,14 +426,28 @@ export const Scaled = ({
</div>
</div>
);
+ if (!eager) return box;
+ return (
+ <>
+ {box}
+ <script
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: static sizing snippet, no user input
+ dangerouslySetInnerHTML={{ __html: EAGER_FIT_SCRIPT }}
+ />
+ </>
+ );
};
+/** Runs right after its box is parsed: same maths as the layout effect. */
+const EAGER_FIT_SCRIPT = `(function(s){var b=s&&s.previousElementSibling;if(!b)return;var w=+b.getAttribute("data-fit-w");var c=b.clientWidth;var k=b.hasAttribute("data-fit-grow")?c/w:Math.min(1,c/w);var i=b.firstElementChild;if(i)i.style.transform="scale("+k+")";b.style.opacity="1";})(document.currentScript)`;
+
export const Fit = ({
w,
h,
className,
still,
grow,
+ eager,
children,
}: {
w: number;
@@ -430,6 +455,7 @@ export const Fit = ({
className?: string;
still?: boolean;
grow?: boolean;
+ eager?: boolean;
children: ReactNode;
}) => (
<SceneMediaProvider value={{ still: Boolean(still) }}>
@@ -438,6 +464,7 @@ export const Fit = ({
h={h}
inert
grow={grow}
+ eager={eager}
className={classNames(htGeist.variable, className)}
style={{
fontFamily:
diff --git a/apps/web/components/pages/HomeTwo/seo.ts b/apps/web/components/pages/HomeTwo/seo.ts
index 955042454..53ec2d884 100644
--- a/apps/web/components/pages/HomeTwo/seo.ts
+++ b/apps/web/components/pages/HomeTwo/seo.ts
@@ -1,3 +1,4 @@
+import { homepageCopy } from "@/data/homepage-copy";
import { PRICING } from "@/data/pricing";
export const homepageSeo = {
@@ -63,12 +64,25 @@ export const homepageSchema = {
mainEntityOfPage: { "@id": "https://cap.so/#webpage" },
featureList: [
"Screen, webcam, and audio recording",
- "Instant video sharing",
- "Local recording with a built-in video editor",
- "Screenshot capture and annotation",
- "Loom video importer for single videos and CSV libraries",
- "Custom backgrounds and automatic zoom",
+ "Instant share links that upload while you record",
+ "Local 4K recording at 60fps with a built-in video editor",
+ "Automatic zoom on clicks",
+ "Cursor smoothing and click effects",
+ "Camera layouts: webcam bubble, split screen, camera only",
+ "Automatic captions in 19 languages, generated on device",
+ "Blur and pixelate sensitive information",
+ "Custom backgrounds, padding, rounded corners, and shadows",
+ "Animated text, titles, and lower thirds",
+ "3D camera effects and color grading",
+ "Trim, split, and speed controls from 0.25x to 8x",
+ "MP4 and GIF export",
+ "Screenshot capture with annotation tools",
+ "AI titles, summaries, chapters, and transcripts",
+ "Timestamped comments, reactions, and viewer analytics",
+ "Password protected links and custom domains",
"Google Drive and S3 storage integrations",
+ "CLI and MCP server for AI agents",
+ "Loom video importer for single videos and CSV libraries",
"Open source and self-hostable",
],
offers: [
@@ -99,5 +113,15 @@ export const homepageSchema = {
},
],
},
+ {
+ "@type": "FAQPage",
+ "@id": "https://cap.so/#faq",
+ isPartOf: { "@id": "https://cap.so/#webpage" },
+ mainEntity: homepageCopy.faq.items.map((item) => ({
+ "@type": "Question",
+ name: item.question,
+ acceptedAnswer: { "@type": "Answer", text: item.answer },
+ })),
+ },
],
};
diff --git a/apps/web/components/pages/HomeTwo/showcase/agents.tsx b/apps/web/components/pages/HomeTwo/showcase/agents.tsx
new file mode 100644
index 000000000..41250e448
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/agents.tsx
@@ -0,0 +1,181 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import { CapLogoMark } from "../demo/capIcons";
+import { useIsWindowsDemo } from "../demo/platform";
+import { MONO } from "../theme";
+import { Loop, seg, TONES } from "./kit";
+import { CAP_TITLE } from "./share";
+import { AppBar, INVOICE, InvoicePage } from "./subjects";
+
+export const CANVAS = { w: 1040, h: 450 } as const;
+
+const PROMPT =
+ "Record a 20 second repro of the invoice bug and send me the link";
+
+const STEPS = [
+ {
+ at: 2100,
+ done: 4200,
+ command: "cap record start --mode instant --duration 20 --json",
+ result: "Recorded 0:20 of screen 1",
+ },
+ {
+ at: 4400,
+ done: 5400,
+ command: 'cap upload ./recording.cap --name "Invoice bug repro" --json',
+ result: "Uploaded, link ready",
+ },
+ {
+ at: 5600,
+ done: 6400,
+ command: "cap caps context m4k8x2qz --json",
+ result: "Read the transcript and summary",
+ },
+];
+
+const Spinner = () => (
+ <svg aria-hidden="true" viewBox="0 0 16 16" className="size-4 animate-spin">
+ <circle
+ cx="8"
+ cy="8"
+ r="6"
+ fill="none"
+ stroke="rgba(255,255,255,0.18)"
+ strokeWidth="2"
+ />
+ <path
+ d="M8 2a6 6 0 0 1 6 6"
+ fill="none"
+ stroke="#FFFFFF"
+ strokeWidth="2"
+ strokeLinecap="round"
+ />
+ </svg>
+);
+
+const Check = () => (
+ <svg aria-hidden="true" viewBox="0 0 16 16" className="size-4">
+ <circle cx="8" cy="8" r="7" fill="#22C55E" />
+ <path
+ d="M4.8 8.3l2.1 2.1 4.3-4.6"
+ fill="none"
+ stroke="#0E0F11"
+ strokeWidth="1.8"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ />
+ </svg>
+);
+
+const AgentView = ({ t }: { t: number; playing: boolean }) => {
+ const windows = useIsWindowsDemo();
+ const typed = PROMPT.slice(0, Math.floor(seg(t, 200, 1700) * PROMPT.length));
+ const answer = t > 6700;
+ const card = seg(t, 6600, 7100);
+ return (
+ <div className="absolute inset-0 bg-[#0E0F11] text-white">
+ <AppBar
+ dark
+ className="absolute inset-x-0 top-0 h-10 border-b border-white/[0.07] bg-white/[0.03]"
+ >
+ <span
+ className={classNames(
+ MONO,
+ "mx-auto flex items-center gap-2 text-[12.5px] text-white/50",
+ )}
+ >
+ <span className="size-1.5 rounded-full bg-[#22C55E]" />
+ {windows ? "agent · C:\\ledgerly" : "agent · ~/ledgerly"}
+ </span>
+ </AppBar>
+ <div
+ className={classNames(
+ MONO,
+ "absolute left-10 top-[52px] w-[560px] text-[14px] leading-[1.6]",
+ )}
+ >
+ <div className="mt-6 flex gap-3">
+ <span className="text-[rgba(255,255,255,0.4)]">›</span>
+ <span>
+ {typed}
+ {t < 1900 ? (
+ <span className="ml-0.5 inline-block h-4 w-2 translate-y-[3px] animate-pulse bg-white/80" />
+ ) : null}
+ </span>
+ </div>
+ <div className="mt-6 flex flex-col gap-4">
+ {STEPS.filter((step) => t > step.at).map((step) => {
+ const done = t > step.done;
+ return (
+ <div key={step.command} className="ht-fade-in flex gap-3">
+ <span className="mt-[3px]">
+ {done ? <Check /> : <Spinner />}
+ </span>
+ <span className="min-w-0">
+ <span className="block break-words text-[rgba(255,255,255,0.78)]">
+ {step.command}
+ </span>
+ <span className="block text-[12.5px] text-[rgba(255,255,255,0.45)]">
+ {done ? step.result : "Running"}
+ </span>
+ </span>
+ </div>
+ );
+ })}
+ </div>
+ {answer ? (
+ <p className="ht-fade-in mt-6 font-sans text-[15px] leading-[1.55] text-[rgba(255,255,255,0.88)] [font-family:var(--font-ht-geist),system-ui,sans-serif]">
+ Here is the repro. At 0:12 the total stays at $4,200 after the
+ second line item is removed.
+ </p>
+ ) : null}
+ </div>
+
+ <div
+ className="absolute right-10 top-[88px] w-[340px] overflow-hidden rounded-[16px] bg-white text-[#1C1D21] shadow-[0_30px_80px_-30px_rgba(0,0,0,0.8)]"
+ style={{
+ opacity: card,
+ transform: `translateY(${(1 - card) * 16}px)`,
+ }}
+ >
+ <div className="relative h-[190px] overflow-hidden bg-[#DCE6F1]">
+ <div
+ className="absolute left-[22px] top-[16px] overflow-hidden rounded-[6px]"
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: "scale(0.435)",
+ transformOrigin: "top left",
+ }}
+ >
+ <InvoicePage />
+ </div>
+ </div>
+ <div className="p-4">
+ <div className="flex items-center gap-1.5 text-[12px] text-[#8A8F98]">
+ <CapLogoMark className="size-3.5" /> Cap.so/s/m4k8x2qz
+ </div>
+ <div className="mt-1 text-[15px] font-semibold">
+ {CAP_TITLE.replace("Sending an invoice", "Invoice bug repro")}
+ </div>
+ <div className="mt-2 text-[13px] leading-[1.5] text-[#4B5059]">
+ Removing a line item leaves the total unchanged until the page
+ reloads.
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+};
+
+export const AgentsStage = () => (
+ <Loop
+ View={AgentView}
+ duration={10500}
+ pose={9000}
+ canvas={CANVAS}
+ crop={{ x: 16, w: 620 }}
+ tone={TONES.agents}
+ />
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/ai.tsx b/apps/web/components/pages/HomeTwo/showcase/ai.tsx
new file mode 100644
index 000000000..0cc71a1a3
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/ai.tsx
@@ -0,0 +1,364 @@
+"use client";
+
+import { AlignLeft, ListOrdered, ScrollText } from "lucide-react";
+import type { ReactNode } from "react";
+import { CapLogoMark } from "../demo/capIcons";
+import { AI_COPY, copyOf } from "./copy";
+import { CANVAS, type Scene, Showcase, seg, TONES } from "./kit";
+import { Avatar, RecordingFrame } from "./share";
+
+export { CANVAS };
+
+/** Warm surface for this section only, holding the player and the AI panel. */
+const SURFACE = { x: 70, y: 34, w: 900, h: 470 } as const;
+const PLAYER = { x: 32, y: 32, w: 520 } as const;
+const PANEL = { x: 572, y: 32, w: 296, h: 406 } as const;
+const VIDEO_H = Math.round((PLAYER.w - 16) * (9 / 16));
+
+const DURATION = 24;
+
+const fmt = (s: number) =>
+ `${Math.floor(s / 60)}:${String(Math.floor(s % 60)).padStart(2, "0")}`;
+
+const SUMMARY =
+ "Richie walks through sending invoice #1042 to Northwind Labs in the new flow. He picks the client, adds two line items for a total of $4,200, and sends it in under thirty seconds.";
+
+const AI_TITLE = "Sending an invoice in Ledgerly";
+const RAW_TITLE = "Recording 2026-10-25 at 10.41";
+
+const CHAPTERS = [
+ [0, "Opening a new invoice"],
+ [6, "Choosing the client"],
+ [11, "Adding the line items"],
+ [19, "Sending it to Northwind"],
+] as const;
+
+const LINES = [
+ [2, "So this is the new invoice flow."],
+ [6, "First, pick the client, so Northwind Labs."],
+ [11, "Then add your line items, the retainer and the study."],
+ [16, "The total updates as you go, $4,200."],
+ [19, "And hit send. That's the whole thing."],
+] as const;
+
+const Surface = ({ children }: { children: ReactNode }) => (
+ <div
+ className="absolute overflow-hidden rounded-[22px] shadow-[0_0_0_1px_rgba(120,72,16,0.06)]"
+ style={{
+ left: SURFACE.x,
+ top: SURFACE.y,
+ width: SURFACE.w,
+ height: SURFACE.h,
+ background:
+ "radial-gradient(120% 90% at 0% 0%, #FFE7C2 0%, transparent 60%), radial-gradient(110% 100% at 100% 100%, #FFD3C4 0%, transparent 55%), linear-gradient(135deg, #FFF1DC 0%, #FFE6D2 100%)",
+ }}
+ >
+ {children}
+ </div>
+);
+
+/** The share page's player card: title, owner, video and its timeline. */
+const Player = ({
+ seconds,
+ playing,
+ title,
+ ticks = 0,
+ caption,
+ chapter,
+}: {
+ seconds: number;
+ playing: boolean;
+ title: ReactNode;
+ /** How many chapters have landed, drawn as markers on the timeline. */
+ ticks?: number;
+ caption?: string;
+ chapter?: string;
+}) => {
+ const progress = Math.min(1, seconds / DURATION);
+ return (
+ <div
+ className="absolute rounded-[16px] bg-white p-2 shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_30px_60px_-30px_rgba(120,60,20,0.45)]"
+ style={{ left: PLAYER.x, top: PLAYER.y, width: PLAYER.w }}
+ >
+ <div className="flex items-center gap-2.5 px-2 pb-2.5 pt-1.5">
+ <Avatar size={26} />
+ <div className="min-w-0 leading-tight">
+ <div className="truncate text-[15px] text-[#1C1C1C]">{title}</div>
+ <div className="text-[11.5px] text-[#8F8F8F]">Richie · just now</div>
+ </div>
+ </div>
+ <div
+ className="relative overflow-hidden rounded-[10px] bg-black"
+ style={{ height: VIDEO_H }}
+ >
+ <RecordingFrame playing={playing} pageScale={0.52} />
+ {chapter ? (
+ <div
+ key={chapter}
+ className="ht-fade-in absolute left-3 top-3 rounded-full bg-black/70 px-3 py-1 text-[12px] text-white"
+ >
+ {chapter}
+ </div>
+ ) : null}
+ {caption ? (
+ <div className="absolute inset-x-0 bottom-3 flex justify-center">
+ <span
+ key={caption}
+ className="ht-fade-in rounded-[7px] bg-black/90 px-2.5 py-1 text-[14px] font-bold text-white"
+ >
+ {caption}
+ </span>
+ </div>
+ ) : null}
+ </div>
+ <div className="px-2 pb-1.5 pt-3">
+ <div className="relative h-[5px] rounded-full bg-[#EEEEEE]">
+ <div
+ className="absolute inset-y-0 left-0 rounded-full bg-[#3B82F6]"
+ style={{ width: `${progress * 100}%` }}
+ />
+ {CHAPTERS.slice(1, Math.max(1, ticks)).map(([at]) => (
+ <span
+ key={at}
+ className="ht-pop-in absolute top-1/2 h-[11px] w-[3px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-[#1C1C1C]"
+ style={{ left: `${(at / DURATION) * 100}%` }}
+ />
+ ))}
+ <span
+ className="absolute top-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white shadow-[0_0_0_1.5px_#3B82F6,0_1px_3px_rgba(0,0,0,0.2)]"
+ style={{ left: `${progress * 100}%` }}
+ />
+ </div>
+ <div className="mt-2 flex justify-between text-[11px] tabular-nums text-[#8F8F8F]">
+ <span>{fmt(seconds)}</span>
+ <span>{fmt(DURATION)}</span>
+ </div>
+ </div>
+ </div>
+ );
+};
+
+/** The AI side of the share page, in its own card next to the player. */
+const Panel = ({
+ heading,
+ status,
+ children,
+}: {
+ heading: string;
+ status?: ReactNode;
+ children: ReactNode;
+}) => (
+ <div
+ className="absolute flex flex-col overflow-hidden rounded-[16px] bg-white shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_30px_60px_-30px_rgba(120,60,20,0.45)]"
+ style={{
+ left: PANEL.x,
+ top: PANEL.y,
+ width: PANEL.w,
+ height: PANEL.h,
+ }}
+ >
+ <div className="flex items-center justify-between border-b border-[#F0F0F0] px-4 py-3">
+ <span className="flex items-center gap-2 text-[15px] font-medium text-[#1C1C1C]">
+ <CapLogoMark className="size-4" />
+ {heading}
+ </span>
+ {status}
+ </div>
+ <div className="min-h-0 flex-1 overflow-hidden">{children}</div>
+ </div>
+);
+
+const Writing = () => (
+ <span className="inline-flex items-center gap-1.5 text-[11.5px] text-[#8F8F8F]">
+ <span className="relative flex size-1.5">
+ <span className="absolute inline-flex size-full animate-ping rounded-full bg-[#F59E0B] opacity-60" />
+ <span className="relative inline-flex size-1.5 rounded-full bg-[#F59E0B]" />
+ </span>
+ Writing
+ </span>
+);
+
+const Done = ({ label }: { label: string }) => (
+ <span className="ht-fade-in text-[11.5px] text-[#16A34A]">{label}</span>
+);
+
+const Typed = ({ text, k }: { text: string; k: number }) => {
+ const n = Math.round(text.length * Math.min(1, Math.max(0, k)));
+ return (
+ <>
+ {text.slice(0, n)}
+ {n > 0 && n < text.length ? (
+ <span className="ml-px inline-block h-[0.95em] w-[1.5px] translate-y-[2px] bg-current" />
+ ) : null}
+ </>
+ );
+};
+
+// Summary: the raw file name turns into a real title, then the summary
+// writes itself underneath.
+const SummaryView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const titleK = seg(t, 500, 1300);
+ const bodyK = Math.min(1, Math.max(0, (t - 1400) / 3400));
+ const done = bodyK >= 1;
+ return (
+ <Surface>
+ <Player
+ seconds={2 + t / 1000}
+ playing={playing}
+ title={
+ titleK <= 0 ? (
+ <span className="text-[#8F8F8F]">{RAW_TITLE}</span>
+ ) : (
+ <Typed text={AI_TITLE} k={titleK} />
+ )
+ }
+ />
+ <Panel
+ heading="Summary"
+ status={done ? <Done label="Ready" /> : <Writing />}
+ >
+ <div className="px-4 py-3.5">
+ <div className="text-[11.5px] text-[#8F8F8F]">Title</div>
+ <div className="mt-1 min-h-[21px] text-[14px] font-medium text-[#1C1C1C]">
+ <Typed text={AI_TITLE} k={titleK} />
+ </div>
+ <div className="mt-4 text-[11.5px] text-[#8F8F8F]">Summary</div>
+ <p className="mt-1 text-[14px] leading-[1.6] text-[#1C1C1C]">
+ <Typed text={SUMMARY} k={bodyK} />
+ </p>
+ </div>
+ </Panel>
+ </Surface>
+ );
+};
+
+// Chapters: markers land on the timeline, then a click jumps to one.
+const ChaptersView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const shown = Math.min(
+ CHAPTERS.length,
+ Math.floor(Math.max(0, t - 300) / 280) + 1,
+ );
+ const target = 2;
+ const clickAt = 2600;
+ const clicked = t > clickAt;
+ const start = CHAPTERS[target]?.[0] ?? 0;
+ const seconds = clicked ? start + (t - clickAt) / 1000 : 1 + t / 1000;
+ const active = clicked
+ ? target
+ : CHAPTERS.findLastIndex(([at]) => at <= seconds);
+ const tap = (t - clickAt + 150) / 520;
+ return (
+ <Surface>
+ <Player
+ seconds={seconds}
+ playing={playing}
+ title={AI_TITLE}
+ ticks={shown}
+ chapter={CHAPTERS[active]?.[1]}
+ />
+ <Panel
+ heading="Chapters"
+ status={
+ shown < CHAPTERS.length ? (
+ <Writing />
+ ) : (
+ <Done label={`${CHAPTERS.length} chapters`} />
+ )
+ }
+ >
+ <div className="p-2">
+ {CHAPTERS.slice(0, shown).map(([at, title], i) => (
+ <div
+ key={at}
+ className="ht-pop-in relative flex h-[46px] items-center gap-3 overflow-hidden rounded-[10px] px-3 transition-colors duration-300"
+ style={{
+ background: i === active ? "#FFF4E2" : "transparent",
+ }}
+ >
+ <span className="w-9 text-[12px] tabular-nums text-[#B45309]">
+ {fmt(at)}
+ </span>
+ <span className="text-[14px] text-[#1C1C1C]">{title}</span>
+ {i === target && tap > 0 && tap < 1 ? (
+ <span
+ className="pointer-events-none absolute left-1/2 top-1/2 size-10 rounded-full bg-[rgba(245,158,11,0.3)]"
+ style={{
+ transform: `translate(-50%, -50%) scale(${0.5 + tap})`,
+ opacity: 1 - tap,
+ }}
+ />
+ ) : null}
+ </div>
+ ))}
+ </div>
+ </Panel>
+ </Surface>
+ );
+};
+
+// Transcript: the line being spoken lights up and shows as a caption.
+const TranscriptView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const seconds = Math.min(23.5, 1.5 + t / 260);
+ const current = LINES.findLastIndex(([at]) => at <= seconds);
+ return (
+ <Surface>
+ <Player
+ seconds={seconds}
+ playing={playing}
+ title={AI_TITLE}
+ caption={LINES[current]?.[1]}
+ />
+ <Panel heading="Transcript" status={<Done label="Searchable" />}>
+ <div className="px-2 py-2">
+ {LINES.map(([at, text], i) => (
+ <div
+ key={at}
+ className="flex items-baseline gap-2.5 rounded-[10px] px-2.5 py-2 transition-colors duration-300"
+ style={{
+ background: i === current ? "#FFF4E2" : "transparent",
+ }}
+ >
+ <span className="w-8 shrink-0 text-[11px] tabular-nums text-[#B45309]">
+ {fmt(at)}
+ </span>
+ <span
+ className="text-[13.5px] leading-[1.5] transition-colors duration-300"
+ style={{ color: i === current ? "#1C1C1C" : "#8F8F8F" }}
+ >
+ {text}
+ </span>
+ </div>
+ ))}
+ </div>
+ </Panel>
+ </Surface>
+ );
+};
+
+const scene = (
+ key: string,
+ icon: ReactNode,
+ duration: number,
+ pose: number,
+ View: Scene["View"],
+): Scene => {
+ const copy = copyOf(AI_COPY, key);
+ return {
+ key,
+ label: copy.label,
+ icon,
+ lead: copy.lead,
+ body: copy.body,
+ duration,
+ pose,
+ View,
+ };
+};
+
+const SCENES: Scene[] = [
+ scene("summary", <AlignLeft />, 6400, 5600, SummaryView),
+ scene("chapters", <ListOrdered />, 6200, 4000, ChaptersView),
+ scene("transcript", <ScrollText />, 6000, 3000, TranscriptView),
+];
+
+export const AiStage = () => <Showcase scenes={SCENES} tone={TONES.ai} />;
diff --git a/apps/web/components/pages/HomeTwo/showcase/copy.ts b/apps/web/components/pages/HomeTwo/showcase/copy.ts
new file mode 100644
index 000000000..b23f85347
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/copy.ts
@@ -0,0 +1,120 @@
+/**
+ * Copy for the tabs inside each animated stage. Lives in a plain module so
+ * the server-rendered sections can put the same words in the HTML for
+ * crawlers and screen readers, while the client stages show them as tab
+ * labels and captions.
+ */
+export type StageCopy = {
+ key: string;
+ label: string;
+ lead: string;
+ body: string;
+};
+
+export const INSTANT_COPY: StageCopy[] = [
+ {
+ key: "record",
+ label: "Record",
+ lead: "Instant share links.",
+ body: "Your Cap.so link is live the moment you hit record, and the video uploads while you are still talking.",
+ },
+ {
+ key: "share",
+ label: "Stop and paste",
+ lead: "Link copied when you stop.",
+ body: "Press stop and paste the link into Slack, a ticket, or an email. The video is ready when it lands.",
+ },
+ {
+ key: "watch",
+ label: "Watch",
+ lead: "Watch in any browser.",
+ body: "No download and no account needed. Viewers leave timestamped comments and emoji reactions on the share page.",
+ },
+];
+
+export const STUDIO_COPY: StageCopy[] = [
+ {
+ key: "zoom",
+ label: "Zoom",
+ lead: "Automatic zoom.",
+ body: "Cap zooms in on every click and follows your cursor with the same spring physics as the editor, then eases back out.",
+ },
+ {
+ key: "layouts",
+ label: "Camera",
+ lead: "Camera layouts.",
+ body: "Switch any part of the timeline between a webcam bubble, split screen, camera only, or screen only.",
+ },
+ {
+ key: "captions",
+ label: "Captions",
+ lead: "Automatic captions.",
+ body: "Cap transcribes your voice on your own machine in 19 languages and shows each word as you say it.",
+ },
+ {
+ key: "blur",
+ label: "Blur",
+ lead: "Blur and pixelate.",
+ body: "Hide an email, a password, or a face with blur or pixelate, or use highlight to dim everything else.",
+ },
+ {
+ key: "background",
+ label: "Background",
+ lead: "Backgrounds and padding.",
+ body: "Pick a wallpaper, gradient, or color, and Cap adds padding, rounded corners, and a shadow.",
+ },
+];
+
+export const AI_COPY: StageCopy[] = [
+ {
+ key: "summary",
+ label: "Summary",
+ lead: "AI titles and summaries.",
+ body: "Cap renames the recording and writes a summary as soon as you stop, so viewers know what it covers before pressing play.",
+ },
+ {
+ key: "chapters",
+ label: "Chapters",
+ lead: "Automatic chapters.",
+ body: "Recordings split into chapters on the timeline. Click one and the video jumps straight to that part.",
+ },
+ {
+ key: "transcript",
+ label: "Transcript",
+ lead: "Searchable transcripts.",
+ body: "Every word is transcribed and timestamped, follows along as the video plays, and doubles as captions.",
+ },
+];
+
+export const STORAGE_COPY: StageCopy[] = [
+ {
+ key: "cloud",
+ label: "Cap Cloud",
+ lead: "Cap Cloud.",
+ body: "Zero setup. Encrypted, and shareable the second you stop.",
+ },
+ {
+ key: "s3",
+ label: "Your S3 bucket",
+ lead: "Your own S3 bucket.",
+ body: "Any S3 compatible bucket, in any region you choose.",
+ },
+ {
+ key: "drive",
+ label: "Google Drive",
+ lead: "Google Drive.",
+ body: "Recordings land in a Drive folder you pick.",
+ },
+ {
+ key: "self",
+ label: "Self hosted",
+ lead: "Self hosting.",
+ body: "Run the whole Cap platform on your own infrastructure.",
+ },
+];
+
+export const copyOf = (list: StageCopy[], key: string) => {
+ const item = list.find((entry) => entry.key === key);
+ if (!item) throw new Error(`Missing stage copy for ${key}`);
+ return item;
+};
diff --git a/apps/web/components/pages/HomeTwo/showcase/instant.tsx b/apps/web/components/pages/HomeTwo/showcase/instant.tsx
new file mode 100644
index 000000000..c5dba81c9
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/instant.tsx
@@ -0,0 +1,571 @@
+"use client";
+
+import { Link2, MonitorPlay, Radio } from "lucide-react";
+import type { CSSProperties, ReactNode } from "react";
+import {
+ CapLogoMark,
+ CapMicrophone,
+ CapPauseCircle,
+ CapRestart,
+ CapStopCircle,
+ CapTrash,
+} from "../demo/capIcons";
+import { OS_FONT, useIsWindowsDemo } from "../demo/platform";
+import { copyOf, INSTANT_COPY } from "./copy";
+import { CANVAS, lerp, type Scene, Showcase, seg, TONES } from "./kit";
+import {
+ CAP_TITLE,
+ CommentBubble,
+ RecordingFrame,
+ SHARE_URL,
+ SHARE_W,
+ type ShareComment,
+ SharePage,
+} from "./share";
+import {
+ AppBar,
+ BrowserBar,
+ Cursor,
+ INVOICE,
+ InvoicePage,
+ Ripple,
+ WALLPAPERS,
+ Webcam,
+} from "./subjects";
+
+const SCREEN = { w: 800, h: 478 } as const;
+const SCREEN_LEFT = (CANVAS.w - SCREEN.w) / 2;
+const SCREEN_TOP = 26;
+
+/** Height of the Windows taskbar along the bottom of the desktop. */
+const TASKBAR = 40;
+
+/** How far the desktop's usable area stops short of the bottom edge. */
+const useFloor = () => (useIsWindowsDemo() ? TASKBAR : 0);
+
+const Taskbar = () => (
+ <div
+ className="absolute inset-x-0 bottom-0 z-20 flex items-center justify-center gap-1.5 border-t border-white/60 bg-[rgba(243,243,243,0.9)] backdrop-blur-xl"
+ style={{ height: TASKBAR }}
+ >
+ <span className="grid size-8 place-items-center rounded-md">
+ <svg aria-hidden="true" viewBox="0 0 24 24" className="size-[17px]">
+ <path
+ d="M0,0H11.377V11.372H0ZM12.623,0H24V11.372H12.623ZM0,12.623H11.377V24H0Zm12.623,0H24V24H12.623"
+ fill="#0078D4"
+ />
+ </svg>
+ </span>
+ <span className="grid size-8 place-items-center rounded-md">
+ <span className="size-[17px] rounded-full bg-[conic-gradient(#0EA5E9,#22C55E,#0EA5E9)]" />
+ </span>
+ <span className="relative grid size-8 place-items-center rounded-md bg-white/70 shadow-[0_0_0_1px_rgba(0,0,0,0.05)]">
+ <CapLogoMark className="size-[18px]" />
+ <span className="absolute bottom-[3px] h-[3px] w-3 rounded-full bg-[#0078D4]" />
+ </span>
+ </div>
+);
+
+// New York for this section only: the hero has San Francisco and the
+// painted sky, so the two never read as the same scene.
+const Desktop = ({ children }: { children: ReactNode }) => {
+ const windows = useIsWindowsDemo();
+ return (
+ <div
+ className="absolute overflow-hidden rounded-[16px] shadow-[0_0_0_1px_rgba(17,17,17,0.06)]"
+ style={{
+ left: SCREEN_LEFT,
+ top: SCREEN_TOP,
+ width: SCREEN.w,
+ height: SCREEN.h,
+ backgroundImage: `url(${WALLPAPERS.nyc})`,
+ backgroundSize: "cover",
+ backgroundPosition: "center",
+ }}
+ >
+ {children}
+ {windows ? <Taskbar /> : null}
+ </div>
+ );
+};
+
+const PAGE_SCALE = 1.0;
+const PAGE_LEFT = (SCREEN.w - INVOICE.w * PAGE_SCALE) / 2;
+const PAGE_TOP = 24;
+
+const PageWindow = ({ style }: { style?: CSSProperties }) => (
+ <div
+ className="absolute overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_20px_50px_-20px_rgba(17,24,39,0.35)]"
+ style={{
+ left: PAGE_LEFT,
+ top: PAGE_TOP,
+ width: INVOICE.w,
+ height: INVOICE.h,
+ ...style,
+ }}
+ >
+ <InvoicePage />
+ </div>
+);
+
+const formatTime = (ms: number) => {
+ const s = Math.floor(ms / 1000);
+ return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
+};
+
+const Toolbar = ({
+ elapsed,
+ style,
+}: {
+ elapsed: number;
+ style?: CSSProperties;
+}) => (
+ <div
+ className="absolute flex h-11 items-center gap-1 rounded-2xl border border-[#E0E0E0] bg-[#FCFCFC] px-1.5 text-[15px] shadow-[0_8px_24px_-10px_rgba(0,0,0,0.3)]"
+ style={style}
+ >
+ <span className="flex items-center gap-1.5 rounded-lg px-2 py-1 text-[#FF4766]">
+ <CapStopCircle className="size-5" />
+ <span className="tabular-nums">{formatTime(elapsed)}</span>
+ </span>
+ <span className="mx-1 flex items-center gap-1 text-[#646464]">
+ <CapMicrophone className="size-5 text-[#202020]" />
+ <CapPauseCircle className="ml-2 size-5" />
+ <CapRestart className="ml-2 size-5" />
+ <CapTrash className="ml-2 size-5" />
+ </span>
+ </div>
+);
+
+const formatClock = (ms: number) => {
+ const sec = Math.floor(ms / 1000);
+ return `${Math.floor(sec / 60)}:${String(sec % 60).padStart(2, "0")}`;
+};
+
+const CHUNK_MS = 2000;
+const CHUNKS = 10;
+
+/**
+ * The share link, live while you are still talking: its video length keeps
+ * pace with the recorder's timer, two seconds at a time.
+ */
+const LiveLink = ({
+ elapsed,
+ playing,
+}: {
+ elapsed: number;
+ playing: boolean;
+}) => {
+ const landed = Math.floor(elapsed / CHUNK_MS);
+ return (
+ <div className="absolute right-[18px] top-[26px] w-[214px] overflow-hidden rounded-[14px] bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.06),0_20px_44px_-18px_rgba(17,24,39,0.45)]">
+ <div className="flex items-center gap-1.5 px-3 pb-2 pt-2.5 text-[11.5px] text-[#4B5059]">
+ <CapLogoMark className="size-3.5" />
+ <span className="truncate">{SHARE_URL}</span>
+ <span className="ml-auto flex items-center gap-1 rounded-full bg-[#FEE2E2] px-1.5 py-[1px] text-[10px] font-semibold text-[#DC2626]">
+ <span className="size-1.5 animate-pulse rounded-full bg-[#DC2626]" />
+ Live
+ </span>
+ </div>
+ <div className="relative mx-2 h-[112px] overflow-hidden rounded-[9px]">
+ <RecordingFrame playing={playing} pageScale={0.27} />
+ <span className="absolute bottom-1.5 right-1.5 rounded-[5px] bg-black/70 px-1.5 py-0.5 text-[10.5px] tabular-nums text-white">
+ {formatClock(landed * CHUNK_MS)}
+ </span>
+ </div>
+ <div className="flex gap-[3px] px-3 pt-2.5">
+ {Array.from({ length: CHUNKS }, (_, i) => {
+ const done = i < landed;
+ const sending = i === landed;
+ return (
+ <span
+ // biome-ignore lint/suspicious/noArrayIndexKey: fixed row of chunk slots
+ key={i}
+ className="h-1.5 flex-1 rounded-full transition-colors duration-300"
+ style={{
+ background: done ? "#3B82F6" : sending ? "#BFDBFE" : "#EEF1F5",
+ }}
+ />
+ );
+ })}
+ </div>
+ <div className="px-3 pb-2.5 pt-1.5 text-[11px] text-[#6B7079]">
+ <span className="tabular-nums text-[#1C1D21]">
+ {formatClock(landed * CHUNK_MS)}
+ </span>{" "}
+ already on Cap.so
+ </div>
+ </div>
+ );
+};
+
+const RECORD_SCALE = 0.78;
+
+// Record: the recorder counts up and the share link fills in alongside it.
+const RecordView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const elapsed = 8000 + t;
+ const cursor = {
+ x: lerp(lerp(200, 400, seg(t, 300, 1800)), 330, seg(t, 2600, 4200)),
+ y: lerp(lerp(170, 210, seg(t, 300, 1800)), 270, seg(t, 2600, 4200)),
+ };
+ const floor = useFloor();
+ return (
+ <Desktop>
+ <div
+ className="absolute overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_20px_50px_-20px_rgba(17,24,39,0.35)]"
+ style={{
+ left: 22,
+ top: 26,
+ width: INVOICE.w * RECORD_SCALE,
+ height: INVOICE.h * RECORD_SCALE,
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${RECORD_SCALE})`,
+ transformOrigin: "top left",
+ }}
+ >
+ <InvoicePage />
+ </div>
+ </div>
+ <LiveLink elapsed={elapsed} playing={playing} />
+ <Webcam
+ playing={playing}
+ className="absolute shadow-[0_16px_40px_-14px_rgba(0,0,0,0.45)]"
+ style={{
+ left: 28,
+ bottom: 28 + floor,
+ width: 112,
+ height: 112,
+ borderRadius: 56,
+ }}
+ />
+ <Toolbar
+ elapsed={elapsed}
+ style={{ left: SCREEN.w / 2 - 110, bottom: 22 + floor }}
+ />
+ <Cursor x={cursor.x} y={cursor.y} size={24} />
+ </Desktop>
+ );
+};
+
+/** "Link copied", as a macOS banner (top right) or a Windows toast. */
+const Notification = ({ k }: { k: number }) => {
+ const windows = useIsWindowsDemo();
+ if (windows) {
+ return (
+ <div
+ className="absolute z-30 flex w-[330px] flex-col gap-1 rounded-[8px] border border-black/[0.07] bg-[#F3F3F3] p-3.5 shadow-[0_16px_40px_rgba(0,0,0,0.25)]"
+ style={{
+ right: 12,
+ bottom: TASKBAR + 12,
+ fontFamily: OS_FONT.windows,
+ opacity: k,
+ transform: `translateY(${(1 - k) * 24}px)`,
+ }}
+ >
+ <span className="flex items-center gap-2 text-[12px] text-[#5C5C5C]">
+ <CapLogoMark className="size-4" /> Cap
+ <span className="flex-1" />
+ now
+ </span>
+ <span className="text-[14px] font-semibold text-[#1B1B1B]">
+ Link copied
+ </span>
+ <span className="truncate text-[13px] text-[#404040]">
+ {SHARE_URL} is on your clipboard
+ </span>
+ </div>
+ );
+ }
+ return (
+ <MacNotification
+ style={{
+ right: 18,
+ top: 18,
+ opacity: k,
+ transform: `translateX(${(1 - k) * 24}px)`,
+ }}
+ />
+ );
+};
+
+const MacNotification = ({ style }: { style?: CSSProperties }) => (
+ <div
+ className="absolute z-30 flex w-[330px] items-center gap-3 rounded-2xl bg-[rgba(246,246,248,0.96)] p-3 shadow-[0_18px_44px_-14px_rgba(0,0,0,0.35),0_0_0_1px_rgba(0,0,0,0.06)]"
+ style={style}
+ >
+ <span className="grid size-10 shrink-0 place-items-center rounded-[10px] bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.06)]">
+ <CapLogoMark className="size-6" />
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="flex justify-between text-[13px] font-semibold text-[#1C1D21]">
+ Link copied
+ <span className="font-normal text-[#8A8F98]">now</span>
+ </span>
+ <span className="block truncate text-[12.5px] text-[#4B5059]">
+ {SHARE_URL} is on your clipboard
+ </span>
+ </span>
+ </div>
+);
+
+const ChatWindow = ({
+ typed,
+ sent,
+ reply,
+ playing,
+}: {
+ typed: string;
+ sent: boolean;
+ reply: number;
+ playing: boolean;
+}) => {
+ const floor = useFloor();
+ return (
+ <div
+ style={{ bottom: floor }}
+ className="absolute inset-x-[90px] top-[34px] flex flex-col overflow-hidden rounded-t-[12px] bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_20px_50px_-20px_rgba(17,24,39,0.35)]"
+ >
+ <AppBar className="h-10 border-b border-[#ECEDF0] text-[13.5px] text-[#1C1D21]">
+ <span className="font-semibold"># billing</span>
+ <span className="text-[#8A8F98]">4 members</span>
+ </AppBar>
+ <div className="flex flex-1 flex-col justify-end gap-4 px-5 pb-4">
+ <div className="flex gap-3 text-[13.5px]">
+ <span className="grid size-8 shrink-0 place-items-center rounded-lg bg-[#FDE68A] text-[12px]">
+ M
+ </span>
+ <span>
+ <span className="font-semibold">Mia</span>{" "}
+ <span className="text-[11.5px] text-[#8A8F98]">10:41</span>
+ <span className="block text-[#33363D]">
+ How do I send the Northwind invoice from the new flow?
+ </span>
+ </span>
+ </div>
+ {sent ? (
+ <div className="ht-fade-in flex gap-3 text-[13.5px]">
+ <span className="grid size-8 shrink-0 place-items-center rounded-lg bg-[#C7D2FE] text-[12px]">
+ R
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="font-semibold">Richie</span>{" "}
+ <span className="text-[11.5px] text-[#8A8F98]">10:42</span>
+ <span className="block text-[#2563EB]">{SHARE_URL}</span>
+ <span className="mt-2 flex w-[360px] overflow-hidden rounded-[10px] border border-[#ECEDF0]">
+ <span className="block h-[86px] w-[138px] shrink-0">
+ <RecordingFrame playing={playing} pageScale={0.17} />
+ </span>
+ <span className="flex flex-col justify-center gap-1 px-3">
+ <span className="flex items-center gap-1.5 text-[11.5px] text-[#6B7079]">
+ <CapLogoMark className="size-3.5" /> Cap
+ </span>
+ <span className="text-[13px] font-semibold leading-tight text-[#1C1D21]">
+ {CAP_TITLE}
+ </span>
+ <span className="text-[11.5px] text-[#6B7079]">
+ 0:24 · Watch in the browser
+ </span>
+ </span>
+ </span>
+ </span>
+ </div>
+ ) : null}
+ {reply > 0 ? (
+ <div className="ht-fade-in flex gap-3 text-[13.5px]">
+ <span className="grid size-8 shrink-0 place-items-center rounded-lg bg-[#FDE68A] text-[12px]">
+ M
+ </span>
+ <span>
+ <span className="font-semibold">Mia</span>{" "}
+ <span className="text-[11.5px] text-[#8A8F98]">10:42</span>
+ <span className="block text-[#33363D]">
+ Perfect, that's so much easier than a doc.
+ </span>
+ </span>
+ </div>
+ ) : null}
+ </div>
+ <div className="mx-4 mb-4 flex h-11 items-center rounded-[10px] border border-[#DADDE2] px-3.5 text-[13.5px] text-[#1C1D21]">
+ {typed ? (
+ <span className="text-[#2563EB]">{typed}</span>
+ ) : (
+ <span className="text-[#9AA0A8]">Message #billing</span>
+ )}
+ {typed && !sent ? (
+ <span className="ml-px h-4 w-px animate-pulse bg-[#1C1D21]" />
+ ) : null}
+ </div>
+ </div>
+ );
+};
+
+// Stop: click stop, the link lands on the clipboard, paste it into chat.
+const ShareView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const toolbarX = SCREEN.w / 2 - 110;
+ const floor = useFloor();
+ const stop = { x: toolbarX + 26, y: SCREEN.h - 22 - 22 - floor };
+ const toChat = seg(t, 2300, 2800);
+ const cursor =
+ t < 1300
+ ? {
+ x: lerp(420, stop.x, seg(t, 200, 1100)),
+ y: lerp(260, stop.y, seg(t, 200, 1100)),
+ }
+ : { x: lerp(stop.x, 420, toChat), y: lerp(stop.y, 455, toChat) };
+ const stopped = t > 1250;
+ const note = seg(t, 1400, 1800) * (1 - seg(t, 4600, 5000));
+ const pasted = t > 3200 ? SHARE_URL : "";
+ const sent = t > 3900;
+ return (
+ <Desktop>
+ <div style={{ opacity: 1 - toChat }}>
+ <PageWindow />
+ <Toolbar
+ elapsed={24000}
+ style={{
+ left: toolbarX,
+ bottom: 22 + floor,
+ opacity: stopped ? 0 : 1,
+ transform: stopped ? "translateY(8px)" : "none",
+ transition: "opacity 250ms, transform 250ms",
+ }}
+ />
+ </div>
+ {toChat > 0 ? (
+ <div style={{ opacity: toChat }}>
+ <ChatWindow
+ typed={sent ? "" : pasted}
+ sent={sent}
+ reply={t > 5200 ? 1 : 0}
+ playing={playing}
+ />
+ </div>
+ ) : null}
+ <Ripple
+ x={stop.x}
+ y={stop.y}
+ k={(t - 1150) / 450}
+ color="rgba(255,71,102,0.35)"
+ />
+ <Notification k={note} />
+ <Cursor x={cursor.x} y={cursor.y} size={24} />
+ </Desktop>
+ );
+};
+
+const COMMENTS: ShareComment[] = [
+ {
+ at: 1400,
+ who: "Mia",
+ letter: "M",
+ color: "#F59E0B",
+ when: "just now",
+ seconds: 8,
+ text: "Didn't know you could send it from here, nice.",
+ },
+ {
+ at: 3300,
+ who: "Sam",
+ letter: "S",
+ color: "#10B981",
+ when: "just now",
+ seconds: 19,
+ text: "Can we make this the default flow?",
+ },
+];
+
+const REACTIONS = [
+ { emoji: "🙌", at: 4400, x: 150 },
+ { emoji: "😍", at: 4800, x: 60 },
+ { emoji: "👍", at: 5200, x: 200 },
+];
+
+const WINDOW = { left: 40, top: 22, w: 720, h: 456 } as const;
+
+const WatchView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const scale = WINDOW.w / SHARE_W;
+ const pressed = REACTIONS.find((r) => t > r.at && t < r.at + 260)?.emoji;
+ const height = WINDOW.h - useFloor();
+ return (
+ <Desktop>
+ <div
+ className="absolute overflow-hidden rounded-t-[12px] bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_24px_60px_-24px_rgba(17,24,39,0.45)]"
+ style={{
+ left: WINDOW.left,
+ top: WINDOW.top,
+ width: WINDOW.w,
+ height,
+ }}
+ >
+ <BrowserBar url={SHARE_URL} small className="h-8" />
+ <div
+ style={{
+ width: SHARE_W,
+ transform: `scale(${scale})`,
+ transformOrigin: "top left",
+ }}
+ >
+ <SharePage
+ height={(height - 32) / scale}
+ seconds={Math.min(23, 4 + t / 380)}
+ playing={playing}
+ views={Math.min(12, 3 + Math.floor(t / 500))}
+ pressed={pressed}
+ floating={REACTIONS.filter((r) => t > r.at && t < r.at + 1400).map(
+ (r) => ({ ...r, k: (t - r.at) / 1400 }),
+ )}
+ sidebar={
+ <div className="flex flex-col gap-4 p-4">
+ {COMMENTS.filter((c) => t > c.at).map((c) => (
+ <CommentBubble key={c.who} comment={c} />
+ ))}
+ </div>
+ }
+ />
+ </div>
+ </div>
+ </Desktop>
+ );
+};
+
+const SCENES: Scene[] = [
+ {
+ key: "record",
+ label: copyOf(INSTANT_COPY, "record").label,
+ icon: <Radio />,
+ lead: copyOf(INSTANT_COPY, "record").lead,
+ body: copyOf(INSTANT_COPY, "record").body,
+ duration: 5200,
+ pose: 2600,
+ View: RecordView,
+ },
+ {
+ key: "share",
+ label: copyOf(INSTANT_COPY, "share").label,
+ icon: <Link2 />,
+ lead: copyOf(INSTANT_COPY, "share").lead,
+ body: copyOf(INSTANT_COPY, "share").body,
+ duration: 7000,
+ pose: 4800,
+ View: ShareView,
+ },
+ {
+ key: "watch",
+ label: copyOf(INSTANT_COPY, "watch").label,
+ icon: <MonitorPlay />,
+ lead: copyOf(INSTANT_COPY, "watch").lead,
+ body: copyOf(INSTANT_COPY, "watch").body,
+ duration: 7000,
+ pose: 5000,
+ View: WatchView,
+ },
+];
+
+export const InstantStage = () => (
+ <Showcase scenes={SCENES} tone={TONES.instant} />
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/kit.tsx b/apps/web/components/pages/HomeTwo/showcase/kit.tsx
new file mode 100644
index 000000000..521ebbce4
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/kit.tsx
@@ -0,0 +1,507 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import {
+ type ComponentType,
+ type ReactNode,
+ useEffect,
+ useLayoutEffect,
+ useRef,
+ useState,
+} from "react";
+import { Fit, LazyMount } from "../scenes/engine";
+import { useInView, usePageVisible, useReducedMotion } from "../visibility";
+import { Panel, TONES, type Tone } from "./layout";
+
+export const CANVAS = { w: 1040, h: 600 } as const;
+
+export const clamp01 = (x: number) => Math.min(1, Math.max(0, x));
+
+/** 0 before `from`, 1 after `to`, eased in between. */
+export const seg = (t: number, from: number, to: number) =>
+ ease(clamp01((t - from) / (to - from)));
+
+export const ease = (x: number) =>
+ x < 0.5 ? 4 * x * x * x : 1 - (-2 * x + 2) ** 3 / 2;
+
+export const lerp = (a: number, b: number, k: number) => a + (b - a) * k;
+
+export type SceneView = ComponentType<{
+ t: number;
+ playing: boolean;
+ /** Option picked by hand in the scene's picker, if any. */
+ pick: number | null;
+}>;
+
+export type PickerOption = { key: string; label: string; icon: ReactNode };
+
+export type Scene = {
+ key: string;
+ label: string;
+ icon: ReactNode;
+ lead: string;
+ body: string;
+ duration: number;
+ /** Time shown when motion is reduced. */
+ pose: number;
+ View: SceneView;
+ /** Lets visitors drive the scene themselves (layouts, backgrounds). */
+ picker?: {
+ options: PickerOption[];
+ /** Which option the autoplay is showing at time t. */
+ at: (t: number) => number;
+ swatches?: boolean;
+ };
+};
+
+/** One clock for a whole showcase: rAF while on screen, frozen otherwise. */
+const useClock = ({
+ playing,
+ duration,
+ resetKey,
+ onEnd,
+}: {
+ playing: boolean;
+ duration: number;
+ resetKey: string;
+ onEnd: () => void;
+}) => {
+ const [t, setT] = useState(0);
+ const tRef = useRef(0);
+ const endRef = useRef(onEnd);
+ endRef.current = onEnd;
+
+ // biome-ignore lint/correctness/useExhaustiveDependencies: resetKey restarts the clock
+ useEffect(() => {
+ tRef.current = 0;
+ setT(0);
+ }, [resetKey]);
+
+ useEffect(() => {
+ if (!playing) return;
+ let raf = 0;
+ let last = performance.now();
+ const frame = (now: number) => {
+ const dt = Math.min(48, now - last);
+ last = now;
+ const next = tRef.current + dt;
+ if (next >= duration) {
+ tRef.current = duration;
+ setT(duration);
+ endRef.current();
+ return;
+ }
+ tRef.current = next;
+ setT(next);
+ raf = requestAnimationFrame(frame);
+ };
+ raf = requestAnimationFrame(frame);
+ return () => cancelAnimationFrame(raf);
+ }, [playing, duration]);
+
+ return t;
+};
+
+const Tabs = ({
+ scenes,
+ active,
+ progress,
+ tone,
+ onPick,
+ className,
+}: {
+ scenes: Scene[];
+ active: number;
+ progress: number;
+ tone: Tone;
+ onPick: (index: number) => void;
+ className?: string;
+}) => {
+ const refs = useRef<(HTMLButtonElement | null)[]>([]);
+ const [thumb, setThumb] = useState<{ x: number; w: number } | null>(null);
+
+ useLayoutEffect(() => {
+ const measure = () => {
+ const el = refs.current[active];
+ if (el) setThumb({ x: el.offsetLeft, w: el.offsetWidth });
+ };
+ measure();
+ const ro = new ResizeObserver(measure);
+ const parent = refs.current[active]?.parentElement;
+ if (parent) ro.observe(parent);
+ return () => ro.disconnect();
+ }, [active]);
+
+ return (
+ <div
+ role="tablist"
+ className={classNames(
+ "relative inline-flex max-w-full gap-0.5 overflow-x-auto rounded-full bg-white p-1.5 shadow-[0_0_0_1px_rgba(17,17,17,0.07),0_1px_2px_rgba(17,17,17,0.05),0_12px_28px_-14px_rgba(17,24,39,0.3)] [scrollbar-width:none]",
+ className,
+ )}
+ >
+ {thumb ? (
+ <span
+ aria-hidden="true"
+ className="absolute bottom-1.5 top-1.5 overflow-hidden rounded-full transition-[transform,width] duration-500 [transition-timing-function:cubic-bezier(0.34,1.4,0.5,1)]"
+ style={{
+ width: thumb.w,
+ transform: `translateX(${thumb.x - 6}px)`,
+ left: 6,
+ background: `color-mix(in srgb, ${tone.accent} 12%, white)`,
+ boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${tone.accent} 22%, transparent)`,
+ }}
+ >
+ <span
+ className="absolute inset-y-0 left-0"
+ style={{
+ width: `${progress * 100}%`,
+ background: `color-mix(in srgb, ${tone.accent} 12%, transparent)`,
+ }}
+ />
+ </span>
+ ) : null}
+ {scenes.map((scene, i) => {
+ const on = i === active;
+ return (
+ <button
+ key={scene.key}
+ ref={(el) => {
+ refs.current[i] = el;
+ }}
+ type="button"
+ role="tab"
+ aria-selected={on}
+ onClick={() => onPick(i)}
+ className={classNames(
+ "relative z-10 flex h-9 shrink-0 cursor-pointer items-center gap-2 rounded-full px-3.5 text-[14px] tracking-[-0.01em] transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]",
+ on
+ ? "font-medium"
+ : "text-[rgba(17,17,17,0.64)] hover:text-[#111111]",
+ )}
+ style={on ? { color: tone.ink } : undefined}
+ >
+ <span
+ aria-hidden="true"
+ className="grid size-4 place-items-center transition-transform duration-300 [&>svg]:size-4"
+ style={{ transform: on ? "scale(1.12)" : "none" }}
+ >
+ {scene.icon}
+ </span>
+ {scene.label}
+ </button>
+ );
+ })}
+ </div>
+ );
+};
+
+const Picker = ({
+ options,
+ active,
+ tone,
+ swatches,
+ onPick,
+ vertical,
+}: {
+ options: PickerOption[];
+ active: number;
+ tone: Tone;
+ swatches?: boolean;
+ onPick: (index: number) => void;
+ vertical?: boolean;
+}) => (
+ <div
+ className={classNames(
+ "flex gap-1 rounded-[18px] bg-white p-1.5 shadow-[0_0_0_1px_rgba(17,17,17,0.07),0_12px_28px_-14px_rgba(17,24,39,0.3)]",
+ vertical ? "flex-col" : "flex-row",
+ )}
+ >
+ {options.map((option, i) => {
+ const on = i === active;
+ return (
+ <button
+ key={option.key}
+ type="button"
+ aria-pressed={on}
+ aria-label={option.label}
+ title={option.label}
+ onClick={() => onPick(i)}
+ className={classNames(
+ "group relative grid size-10 cursor-pointer place-items-center rounded-[12px] transition-[background-color,box-shadow,color] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]",
+ on
+ ? ""
+ : "text-[rgba(17,17,17,0.45)] hover:bg-[#F3F5F8] hover:text-[#111111]",
+ )}
+ style={
+ on && !swatches
+ ? {
+ background: `color-mix(in srgb, ${tone.accent} 12%, white)`,
+ color: tone.ink,
+ boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${tone.accent} 25%, transparent)`,
+ }
+ : undefined
+ }
+ >
+ {swatches ? (
+ <span
+ className="block size-7 rounded-full transition-shadow duration-200"
+ style={{
+ boxShadow: on
+ ? `0 0 0 2px #FFFFFF, 0 0 0 4px ${tone.accent}`
+ : "inset 0 0 0 1px rgba(17,17,17,0.1)",
+ }}
+ >
+ {option.icon}
+ </span>
+ ) : (
+ option.icon
+ )}
+ {vertical ? (
+ <span className="pointer-events-none absolute right-full mr-2 whitespace-nowrap rounded-md bg-[#111111] px-2 py-1 text-[12px] text-white opacity-0 transition-opacity duration-150 group-hover:opacity-100">
+ {option.label}
+ </span>
+ ) : null}
+ </button>
+ );
+ })}
+ </div>
+);
+
+/**
+ * A big quiet panel that plays one scene at a time, with pill tabs to pick
+ * the scene and a caption underneath that says what it shows in plain words.
+ */
+export const Showcase = ({
+ scenes,
+ tone = TONES.instant,
+ canvas = CANVAS,
+ className,
+ caption = true,
+}: {
+ scenes: Scene[];
+ tone?: Tone;
+ canvas?: { w: number; h: number };
+ className?: string;
+ caption?: boolean;
+}) => {
+ const ref = useRef<HTMLDivElement | null>(null);
+ const inView = useInView(ref, "-15% 0px -15% 0px");
+ const pageVisible = usePageVisible();
+ const reduced = useReducedMotion();
+ const [active, setActive] = useState(0);
+ const [paused, setPaused] = useState(false);
+ const [round, setRound] = useState(0);
+ const [picked, setPicked] = useState<number | null>(null);
+ // Every showcase passes at least one scene.
+ const scene = (scenes[active] ?? scenes[0]) as Scene;
+ const playing = inView && pageVisible && !paused && !reduced;
+
+ const t = useClock({
+ playing,
+ duration: scene.duration,
+ resetKey: `${scene.key}:${round}`,
+ onEnd: () => {
+ setActive((i) => (i + 1) % scenes.length);
+ setRound((r) => r + 1);
+ setPicked(null);
+ },
+ });
+
+ const shown = reduced ? scene.pose : t;
+ const pickTab = (i: number) => {
+ setActive(i);
+ setRound((r) => r + 1);
+ setPicked(null);
+ };
+ // Picking by hand holds the scene where the visitor left it for a while,
+ // then the autoplay picks up again on its own.
+ const pickOption = (i: number) => {
+ setPicked(i);
+ setPaused(true);
+ };
+ // biome-ignore lint/correctness/useExhaustiveDependencies: a new pick restarts the hold
+ useEffect(() => {
+ if (!paused) return;
+ const resume = setTimeout(() => {
+ setPicked(null);
+ setPaused(false);
+ }, 8000);
+ return () => clearTimeout(resume);
+ }, [paused, picked]);
+ const picker = scene.picker;
+ const pickerActive = picker ? (picked ?? picker.at(shown)) : 0;
+ const progress = reduced ? 0 : shown / scene.duration;
+
+ return (
+ <div ref={ref} className={className}>
+ <Panel tone={tone}>
+ <LazyMount w={canvas.w} h={canvas.h} grow>
+ <Fit w={canvas.w} h={canvas.h} grow>
+ <scene.View
+ key={`${scene.key}:${round}`}
+ t={shown}
+ playing={playing}
+ pick={picked}
+ />
+ </Fit>
+ </LazyMount>
+ {picker ? (
+ <div
+ key={scene.key}
+ className="ht-fade-in absolute hidden -translate-x-1/2 -translate-y-1/2 sm:block"
+ style={{ left: "92.9%", top: "44.6%" }}
+ >
+ <Picker
+ options={picker.options}
+ active={pickerActive}
+ tone={tone}
+ swatches={picker.swatches}
+ onPick={pickOption}
+ vertical
+ />
+ </div>
+ ) : null}
+ <div className="pointer-events-none absolute inset-x-0 bottom-4 hidden justify-center sm:flex lg:bottom-6">
+ <Tabs
+ scenes={scenes}
+ active={active}
+ progress={progress}
+ tone={tone}
+ onPick={pickTab}
+ className="pointer-events-auto"
+ />
+ </div>
+ </Panel>
+ {picker ? (
+ <div className="mt-4 flex justify-center sm:hidden">
+ <Picker
+ options={picker.options}
+ active={pickerActive}
+ tone={tone}
+ swatches={picker.swatches}
+ onPick={pickOption}
+ />
+ </div>
+ ) : null}
+ <div className="mt-4 flex justify-center sm:hidden">
+ <Tabs
+ scenes={scenes}
+ active={active}
+ progress={progress}
+ tone={tone}
+ onPick={pickTab}
+ />
+ </div>
+ {caption ? (
+ <p
+ key={scene.key}
+ aria-hidden="true"
+ className="ht-fade-in mx-auto mt-7 max-w-[560px] text-balance text-center text-[15px] leading-[1.55] text-[rgba(17,17,17,0.64)]"
+ >
+ <span className="font-medium text-[#111111]">{scene.lead}</span>{" "}
+ {scene.body}
+ </p>
+ ) : null}
+ </div>
+ );
+};
+
+const useNarrow = () => {
+ const [narrow, setNarrow] = useState(false);
+ useEffect(() => {
+ const query = window.matchMedia("(max-width: 639px)");
+ const sync = () => setNarrow(query.matches);
+ sync();
+ query.addEventListener("change", sync);
+ return () => query.removeEventListener("change", sync);
+ }, []);
+ return narrow;
+};
+
+/** On phones, show only a horizontal slice of the canvas so text stays legible. */
+const Cropped = ({
+ canvas,
+ crop,
+ children,
+}: {
+ canvas: { w: number; h: number };
+ crop?: { x: number; w: number };
+ children: ReactNode;
+}) => {
+ const narrow = useNarrow();
+ if (!narrow || !crop) return <>{children}</>;
+ return (
+ <div style={{ aspectRatio: `${crop.w} / ${canvas.h}`, overflow: "hidden" }}>
+ <div
+ style={{
+ width: `${(canvas.w / crop.w) * 100}%`,
+ marginLeft: `${(-crop.x / crop.w) * 100}%`,
+ }}
+ >
+ {children}
+ </div>
+ </div>
+ );
+};
+
+/** Self-running panel for a single looping scene, no tabs. */
+export const Loop = ({
+ View,
+ duration,
+ pose,
+ canvas,
+ crop,
+ tone,
+ className,
+}: {
+ tone?: Tone;
+ View: SceneView;
+ duration: number;
+ pose: number;
+ canvas: { w: number; h: number };
+ crop?: { x: number; w: number };
+ className?: string;
+}) => {
+ const ref = useRef<HTMLDivElement | null>(null);
+ const inView = useInView(ref, "-15% 0px -15% 0px");
+ const pageVisible = usePageVisible();
+ const reduced = useReducedMotion();
+ const [round, setRound] = useState(0);
+ const playing = inView && pageVisible && !reduced;
+ const t = useClock({
+ playing,
+ duration,
+ resetKey: String(round),
+ onEnd: () => setRound((r) => r + 1),
+ });
+ return (
+ <div ref={ref} className={className}>
+ <Panel tone={tone}>
+ <Cropped canvas={canvas} crop={crop}>
+ <LazyMount w={canvas.w} h={canvas.h} grow>
+ <Fit w={canvas.w} h={canvas.h} grow>
+ <View
+ key={round}
+ t={reduced ? pose : t}
+ playing={playing}
+ pick={null}
+ />
+ </Fit>
+ </LazyMount>
+ </Cropped>
+ </Panel>
+ </div>
+ );
+};
+
+export {
+ Badge,
+ Details,
+ Em,
+ Section,
+ SectionHead,
+ TONES,
+ type Tone,
+ toneVars,
+} from "./layout";
diff --git a/apps/web/components/pages/HomeTwo/showcase/layout.tsx b/apps/web/components/pages/HomeTwo/showcase/layout.tsx
new file mode 100644
index 000000000..76cadae66
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/layout.tsx
@@ -0,0 +1,234 @@
+import { classNames } from "@cap/utils/helpers";
+import type { CSSProperties, ReactNode } from "react";
+import { BODY_TEXT, GRAIN, H_SECTION } from "../theme";
+
+// Server-safe building blocks for the landing sections: headings, badges,
+// detail lists and the stage panel. No client code, so the copy renders as
+// plain HTML and ships no JavaScript.
+
+/** One colour per section, used by its tabs, picker and stage wash. */
+export type Tone = { accent: string; ink: string; wash: string };
+
+export const TONES = {
+ instant: { accent: "#3B82F6", ink: "#1D4ED8", wash: "#EAF2FF" },
+ studio: { accent: "#8B5CF6", ink: "#6D28D9", wash: "#F2EDFF" },
+ screenshot: { accent: "#10B981", ink: "#047857", wash: "#E8F8F1" },
+ ai: { accent: "#F59E0B", ink: "#B45309", wash: "#FFF4E2" },
+ storage: { accent: "#0EA5E9", ink: "#0369A1", wash: "#E6F5FD" },
+ agents: { accent: "#22C55E", ink: "#15803D", wash: "#EAF9EF" },
+ platforms: { accent: "#64748B", ink: "#334155", wash: "#F1F4F8" },
+} satisfies Record<string, Tone>;
+
+/** Key phrase in a lede, in the section's colour (set by Section). */
+export const Em = ({ children }: { children: ReactNode }) => (
+ <span className="font-normal text-[var(--tone-ink,#111111)]">{children}</span>
+);
+
+export const toneVars = (tone?: Tone) =>
+ (tone
+ ? {
+ "--tone-ink": tone.ink,
+ "--tone-accent": tone.accent,
+ "--tone-wash": tone.wash,
+ }
+ : {}) as CSSProperties;
+
+/**
+ * Says which part of Cap a section is about: the mode's own icon in a
+ * coloured disc, then the name in sentence case.
+ */
+export const Badge = ({
+ icon,
+ children,
+}: {
+ icon: ReactNode;
+ children: ReactNode;
+}) => (
+ <span
+ className="inline-flex items-center gap-2 rounded-full bg-white py-1 pl-1 pr-3.5 text-[14px] font-medium tracking-[-0.01em] text-[var(--tone-ink,#111111)]"
+ style={{
+ boxShadow:
+ "0 0 0 1px color-mix(in srgb, var(--tone-accent, #111111) 22%, transparent), 0 8px 20px -12px color-mix(in srgb, var(--tone-accent, #111111) 70%, transparent)",
+ }}
+ >
+ <span
+ aria-hidden="true"
+ className="grid size-6 place-items-center rounded-full text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.35),inset_0_-1px_0_rgba(0,0,0,0.12)] [&>svg]:size-3"
+ style={{
+ background:
+ "linear-gradient(160deg, var(--tone-accent, #111111) 0%, var(--tone-ink, #111111) 100%)",
+ }}
+ >
+ {icon}
+ </span>
+ {children}
+ </span>
+);
+
+export const SectionHead = ({
+ title,
+ badge,
+ children,
+ align = "center",
+ className,
+}: {
+ title: ReactNode;
+ badge?: ReactNode;
+ children?: ReactNode;
+ align?: "center" | "left";
+ className?: string;
+}) => (
+ <div
+ className={classNames(
+ "flex flex-col",
+ align === "center"
+ ? "mx-auto max-w-[760px] items-center text-center"
+ : "max-w-[520px] items-start text-left",
+ className,
+ )}
+ >
+ {badge ? <div className="mb-6">{badge}</div> : null}
+ <h2
+ className={`${H_SECTION} text-balance text-[clamp(34px,4.6vw,54px)] leading-[1.02]`}
+ >
+ {title}
+ </h2>
+ {children ? (
+ <p
+ className={classNames(
+ BODY_TEXT,
+ "mt-5 text-balance text-[17px] leading-[1.5] text-[rgba(17,17,17,0.64)] sm:text-[18px]",
+ align === "center" ? "max-w-[600px]" : "max-w-[480px]",
+ )}
+ >
+ {children}
+ </p>
+ ) : null}
+ </div>
+);
+
+export const Panel = ({
+ tone,
+ className,
+ children,
+}: {
+ tone?: Tone;
+ className?: string;
+ children: ReactNode;
+}) => (
+ <div
+ className={classNames(
+ "relative overflow-hidden rounded-[28px] bg-white shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_1px_2px_rgba(17,17,17,0.03),0_30px_60px_-40px_rgba(17,24,39,0.25)]",
+ className,
+ )}
+ style={
+ tone
+ ? {
+ backgroundColor: "#FFFFFF",
+ backgroundImage: `${GRAIN}, linear-gradient(180deg, ${tone.wash} 0%, #FFFFFF 78%)`,
+ backgroundSize: "200px 200px, auto",
+ }
+ : undefined
+ }
+ >
+ {children}
+ </div>
+);
+
+export type Detail = { lead: string; body: string; icon?: ReactNode };
+
+export const DetailIcon = ({
+ children,
+ className = "mb-3",
+}: {
+ children: ReactNode;
+ className?: string;
+}) => (
+ <span
+ aria-hidden="true"
+ className={`${className} grid size-8 shrink-0 place-items-center rounded-[10px] text-[var(--tone-ink,#111111)] shadow-[inset_0_0_0_1px_rgba(17,17,17,0.05)] [&>svg]:size-4`}
+ style={{
+ background: "color-mix(in srgb, var(--tone-accent, #111111) 12%, white)",
+ }}
+ >
+ {children}
+ </span>
+);
+
+export const Details = ({
+ items,
+ className,
+}: {
+ items: Detail[];
+ className?: string;
+}) => (
+ <ul
+ className={classNames(
+ "grid gap-x-10 gap-y-6 border-t border-[#E3E8EE] pt-8 sm:grid-cols-2 lg:grid-cols-3",
+ className,
+ )}
+ >
+ {items.map((item) => (
+ <li
+ key={item.lead}
+ className="text-[15px] leading-[1.55] text-[rgba(17,17,17,0.64)]"
+ >
+ {item.icon ? <DetailIcon>{item.icon}</DetailIcon> : null}
+ <h3 className="m-0 inline text-[length:inherit] font-medium leading-[inherit] tracking-normal text-[#111111]">
+ {item.lead}
+ </h3>{" "}
+ {item.body}
+ </li>
+ ))}
+ </ul>
+);
+
+export const Section = ({
+ anchor,
+ tone,
+ className,
+ children,
+}: {
+ /** Scroll target id. */
+ anchor?: string;
+ tone?: Tone;
+ className?: string;
+ children: ReactNode;
+}) => (
+ <section
+ id={anchor}
+ className={classNames("scroll-mt-24 px-5 py-20 lg:py-32", className)}
+ style={toneVars(tone)}
+ >
+ <div className="mx-auto max-w-[1120px]">{children}</div>
+ </section>
+);
+
+export const FADE_CSS = `
+ @keyframes ht-fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
+ .ht-fade-in { animation: ht-fade-in 400ms cubic-bezier(0.16,1,0.3,1) both; }
+`;
+
+export const POP_CSS = `
+ @keyframes ht-pop-in { 0% { opacity: 0; transform: translateY(8px) scale(0.96); } 60% { opacity: 1; transform: translateY(-2px) scale(1.01); } 100% { opacity: 1; transform: none; } }
+ .ht-pop-in { animation: ht-pop-in 520ms cubic-bezier(0.16,1,0.3,1) both; }
+`;
+
+/**
+ * What each tab of a stage shows, as real text: crawlers and screen readers
+ * get every feature, while sighted visitors see the same words as the
+ * stage's tabs and caption.
+ */
+export const StageFeatures = ({
+ items,
+}: {
+ items: { key: string; lead: string; body: string }[];
+}) => (
+ <ul className="sr-only">
+ {items.map((item) => (
+ <li key={item.key}>
+ <h3>{item.lead}</h3> {item.body}
+ </li>
+ ))}
+ </ul>
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/ownership.tsx b/apps/web/components/pages/HomeTwo/showcase/ownership.tsx
new file mode 100644
index 000000000..1e85906d9
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/ownership.tsx
@@ -0,0 +1,238 @@
+"use client";
+
+import { Check, Server } from "lucide-react";
+import type { ReactNode } from "react";
+import { CapLogoMark } from "../demo/capIcons";
+import { copyOf, STORAGE_COPY } from "./copy";
+import { type Scene, Showcase, seg, TONES } from "./kit";
+import { RecordingFrame } from "./share";
+
+export const CANVAS = { w: 1040, h: 440 } as const;
+
+type Destination = {
+ key: string;
+ label: string;
+ name: string;
+ path: string;
+ note: string;
+ icon: ReactNode;
+ tab: ReactNode;
+ lead: string;
+ body: string;
+};
+
+const DESTINATIONS: Destination[] = [
+ {
+ key: "cloud",
+ label: copyOf(STORAGE_COPY, "cloud").label,
+ name: "Cap Cloud",
+ path: "Cap.so/s/m4k8x2qz",
+ note: "Encrypted, shareable the second it lands",
+ icon: <CapLogoMark className="size-7" />,
+ tab: <CapLogoMark />,
+ lead: copyOf(STORAGE_COPY, "cloud").lead,
+ body: copyOf(STORAGE_COPY, "cloud").body,
+ },
+ {
+ key: "s3",
+ label: copyOf(STORAGE_COPY, "s3").label,
+ name: "acme-recordings",
+ path: "s3://acme-recordings",
+ note: "eu-west-2 · your keys, your bill",
+ icon: (
+ <span className="grid size-7 place-items-center rounded-[7px] bg-[#111111] text-[11px] font-semibold text-white">
+ S3
+ </span>
+ ),
+ tab: (
+ <span className="grid size-4 place-items-center rounded-[4px] bg-current text-[7px] font-bold">
+ <span className="text-white">S3</span>
+ </span>
+ ),
+ lead: copyOf(STORAGE_COPY, "s3").lead,
+ body: copyOf(STORAGE_COPY, "s3").body,
+ },
+ {
+ key: "drive",
+ label: copyOf(STORAGE_COPY, "drive").label,
+ name: "Google Drive",
+ path: "My Drive / Cap",
+ note: "A folder your team already uses",
+ icon: (
+ // biome-ignore lint/performance/noImgElement: tiny static svg
+ <img src="/logos/google-drive.svg" alt="" className="size-7" />
+ ),
+ tab: (
+ // biome-ignore lint/performance/noImgElement: tiny static svg
+ <img src="/logos/google-drive.svg" alt="" />
+ ),
+ lead: copyOf(STORAGE_COPY, "drive").lead,
+ body: copyOf(STORAGE_COPY, "drive").body,
+ },
+ {
+ key: "self",
+ label: copyOf(STORAGE_COPY, "self").label,
+ name: "Cap on your servers",
+ path: "recordings.acme.internal",
+ note: "The whole platform, on your servers",
+ icon: <Server className="size-6 text-[#111111]" />,
+ tab: <Server />,
+ lead: copyOf(STORAGE_COPY, "self").lead,
+ body: copyOf(STORAGE_COPY, "self").body,
+ },
+];
+
+const FILE = { x: 96, y: 96, w: 312, h: 236 };
+const DEST = { x: 632, y: 132, w: 312, h: 164 };
+const ACCENT = TONES.storage.accent;
+
+/** A soft dot grid, so the stage reads as a canvas rather than empty space. */
+const DOTS = {
+ backgroundImage:
+ "radial-gradient(circle at 1px 1px, rgba(17,17,17,0.09) 1px, transparent 0)",
+ backgroundSize: "18px 18px",
+ maskImage:
+ "radial-gradient(ellipse 70% 75% at 50% 45%, #000 40%, transparent 100%)",
+} as const;
+
+const RouteView =
+ (destination: Destination) =>
+ ({ t, playing }: { t: number; playing: boolean }) => {
+ const travel = seg(t, 500, 2400);
+ const done = t > 2500;
+ const startX = FILE.x + FILE.w;
+ const endX = DEST.x;
+ const y = DEST.y + DEST.h / 2;
+ const pct = Math.round(travel * 100);
+ return (
+ <div className="absolute inset-0">
+ <div className="absolute inset-0" style={DOTS} />
+
+ <div
+ className="absolute overflow-hidden rounded-[18px] bg-white shadow-[0_0_0_1px_rgba(17,17,17,0.07),0_24px_60px_-30px_rgba(17,24,39,0.45)]"
+ style={{ left: FILE.x, top: FILE.y, width: FILE.w, height: FILE.h }}
+ >
+ <div className="relative m-2 h-[160px] overflow-hidden rounded-[11px]">
+ <RecordingFrame playing={playing} pageScale={0.4} />
+ </div>
+ <div className="flex items-center justify-between px-4 pb-3 pt-1">
+ <div>
+ <div className="text-[14px] font-semibold text-[#1C1D21]">
+ invoice-walkthrough.mp4
+ </div>
+ <div className="mt-0.5 text-[12.5px] text-[#8A8F98]">
+ 4K · 0:24 · 96 MB
+ </div>
+ </div>
+ <CapLogoMark className="size-5" />
+ </div>
+ </div>
+
+ <svg
+ aria-hidden="true"
+ className="absolute inset-0"
+ width={CANVAS.w}
+ height={CANVAS.h}
+ >
+ <path
+ d={`M ${startX} ${FILE.y + FILE.h / 2} C ${startX + 110} ${FILE.y + FILE.h / 2}, ${endX - 110} ${y}, ${endX} ${y}`}
+ fill="none"
+ stroke="#D5DBE3"
+ strokeWidth={2}
+ strokeDasharray="3 6"
+ strokeLinecap="round"
+ />
+ <path
+ d={`M ${startX} ${FILE.y + FILE.h / 2} C ${startX + 110} ${FILE.y + FILE.h / 2}, ${endX - 110} ${y}, ${endX} ${y}`}
+ fill="none"
+ stroke={ACCENT}
+ strokeWidth={2.5}
+ strokeLinecap="round"
+ pathLength={1}
+ strokeDasharray={1}
+ strokeDashoffset={1 - travel}
+ />
+ </svg>
+
+ <div
+ className="absolute flex -translate-x-1/2 -translate-y-1/2 items-center gap-2 rounded-full bg-white px-3 py-1.5 text-[12.5px] tabular-nums text-[#1C1D21] shadow-[0_0_0_1px_rgba(17,17,17,0.07),0_10px_24px_-12px_rgba(17,24,39,0.35)] transition-opacity duration-300"
+ style={{
+ left: (startX + endX) / 2,
+ top: (FILE.y + FILE.h / 2 + y) / 2,
+ opacity: travel > 0 ? 1 : 0,
+ }}
+ >
+ {done ? (
+ <>
+ <Check className="size-3.5 text-[#16A34A]" strokeWidth={2.6} />
+ Uploaded
+ </>
+ ) : (
+ <>
+ <span className="relative h-1.5 w-16 overflow-hidden rounded-full bg-[#E8EDF3]">
+ <span
+ className="absolute inset-y-0 left-0 rounded-full"
+ style={{ width: `${pct}%`, background: ACCENT }}
+ />
+ </span>
+ {pct}%
+ </>
+ )}
+ </div>
+
+ <div
+ className="absolute flex flex-col justify-between rounded-[18px] bg-white p-5 transition-shadow duration-500"
+ style={{
+ left: DEST.x,
+ top: DEST.y,
+ width: DEST.w,
+ height: DEST.h,
+ boxShadow: done
+ ? `0 0 0 2px color-mix(in srgb, ${ACCENT} 55%, transparent), 0 0 0 7px color-mix(in srgb, ${ACCENT} 12%, transparent), 0 24px 60px -30px rgba(17,24,39,0.45)`
+ : "0 0 0 1px rgba(17,17,17,0.07), 0 24px 60px -30px rgba(17,24,39,0.45)",
+ }}
+ >
+ <div className="flex items-center gap-3">
+ <span className="grid size-11 shrink-0 place-items-center rounded-[12px] bg-[#F4F6F9]">
+ {destination.icon}
+ </span>
+ <div className="min-w-0">
+ <div className="truncate text-[15px] font-semibold text-[#1C1D21]">
+ {destination.name}
+ </div>
+ <div className="truncate text-[12.5px] text-[#8A8F98]">
+ {destination.note}
+ </div>
+ </div>
+ </div>
+ <div className="flex items-center justify-between gap-3 rounded-[10px] bg-[#F4F6F9] px-3 py-2.5">
+ <span className="truncate font-mono text-[12.5px] text-[#33363D]">
+ {destination.path}
+ </span>
+ <span
+ className="flex shrink-0 items-center gap-1 text-[12.5px] text-[#16A34A] transition-opacity duration-300"
+ style={{ opacity: done ? 1 : 0 }}
+ >
+ <Check className="size-3.5" strokeWidth={2.6} />
+ Saved
+ </span>
+ </div>
+ </div>
+ </div>
+ );
+ };
+
+const SCENES: Scene[] = DESTINATIONS.map((destination) => ({
+ key: destination.key,
+ label: destination.label,
+ icon: destination.tab,
+ lead: destination.lead,
+ body: destination.body,
+ duration: 4200,
+ pose: 3000,
+ View: RouteView(destination),
+}));
+
+export const OwnershipStage = () => (
+ <Showcase scenes={SCENES} tone={TONES.storage} canvas={CANVAS} />
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/physics.ts b/apps/web/components/pages/HomeTwo/showcase/physics.ts
new file mode 100644
index 000000000..a71cd5cbf
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/physics.ts
@@ -0,0 +1,123 @@
+/**
+ * The desktop editor's motion, ported so the landing demos move the way an
+ * exported Cap does. Constants mirror the Rust defaults:
+ *
+ * - ZOOM_SPRING: `ScreenMovementSpring::default()` (crates/project), which
+ * drives both the zoom amount and the zoom centre
+ * (crates/rendering/src/zoom_spring.rs).
+ * - CURSOR_SPRING: the default "Mellow" cursor smoothing preset.
+ * - CLICK: `CLICK_SHRINK_SIZE` / `CURSOR_CLICK_DURATION` in
+ * crates/rendering/src/layers/cursor.rs.
+ * - AUTO_ZOOM: the click padding in `generate_zoom_segments_from_clicks`,
+ * the 1.5x default zoom amount, and `ZoomSegment::default_edge_snap_ratio`.
+ */
+
+export type SpringConfig = { tension: number; mass: number; friction: number };
+
+export const ZOOM_SPRING: SpringConfig = {
+ tension: 200,
+ mass: 2.25,
+ friction: 40,
+};
+
+export const CURSOR_SPRING: SpringConfig = {
+ tension: 470,
+ mass: 3,
+ friction: 70,
+};
+
+export const CLICK = { shrink: 0.8, ms: 130 } as const;
+
+export const AUTO_ZOOM = {
+ amount: 1.5,
+ preMs: 300,
+ postMs: 2500,
+ edgeSnap: 0.25,
+} as const;
+
+/** `SegmentBounds::snap_to_edges`: focus near an edge sticks to it. */
+export const snapToEdges = (scalar: number, ratio = AUTO_ZOOM.edgeSnap) => {
+ if (ratio <= 0) return scalar;
+ const lo = ratio;
+ const hi = 1 - ratio + 0.0001;
+ if (hi <= lo) return 0.5;
+ return Math.min(1, Math.max(0, (scalar - lo) / (hi - lo)));
+};
+
+/**
+ * Runs a spring-mass-damper toward a moving target and samples it on a fixed
+ * grid, like the editor's precomputed zoom timeline. Integration uses 1 ms
+ * semi-implicit Euler steps; the springs here are near critical damping, so
+ * that matches the editor's closed-form solution to well under a pixel.
+ */
+export const simulate = (
+ target: (ms: number) => number[],
+ durationMs: number,
+ spring: SpringConfig,
+ sampleMs = 4,
+): number[][] => {
+ const start = target(0);
+ const position = [...start];
+ const velocity = start.map(() => 0);
+ const samples: number[][] = [[...position]];
+ const dt = 0.001;
+ for (let ms = 1; ms <= durationMs; ms++) {
+ const goal = target(ms);
+ for (let i = 0; i < position.length; i++) {
+ const p = position[i] ?? 0;
+ const v = velocity[i] ?? 0;
+ const force =
+ -spring.tension * (p - (goal[i] ?? 0)) - spring.friction * v;
+ const next = v + (force / spring.mass) * dt;
+ velocity[i] = next;
+ position[i] = p + next * dt;
+ }
+ if (ms % sampleMs === 0) samples.push([...position]);
+ }
+ return samples;
+};
+
+export const sampleAt = (samples: number[][], ms: number, sampleMs = 4) => {
+ const f = Math.max(0, ms / sampleMs);
+ const i = Math.min(samples.length - 1, Math.floor(f));
+ const j = Math.min(samples.length - 1, i + 1);
+ const k = f - i;
+ const a = samples[i] ?? [];
+ const b = samples[j] ?? a;
+ return a.map((v, n) => v + ((b[n] ?? v) - v) * k);
+};
+
+/** Minimum-jerk easing, the shape of a real hand moving a mouse. */
+export const minJerk = (s: number) => {
+ const x = Math.min(1, Math.max(0, s));
+ return x * x * x * (10 - 15 * x + 6 * x * x);
+};
+
+export type Waypoint = { at: number; x: number; y: number; hold?: number };
+
+/** A recorded-looking raw mouse path through timed waypoints. */
+export const rawPath = (points: Waypoint[]) => (ms: number) => {
+ const first = points[0];
+ if (!first) return [0, 0];
+ let prev = first;
+ for (const point of points) {
+ if (ms < point.at) {
+ const from = prev.at + (prev.hold ?? 0);
+ const k = minJerk((ms - from) / Math.max(1, point.at - from));
+ return [prev.x + (point.x - prev.x) * k, prev.y + (point.y - prev.y) * k];
+ }
+ prev = point;
+ }
+ return [prev.x, prev.y];
+};
+
+/** 0..1 through a click press, for the cursor's shrink and release. */
+export const clickShrink = (ms: number, downAt: number) => {
+ const t = ms - downAt;
+ if (t < -CLICK.ms || t > CLICK.ms * 2) return 1;
+ // Shrinks into the press, springs back out on release.
+ const k =
+ t < 0 ? 1 + t / CLICK.ms : t < CLICK.ms ? 0 : (t - CLICK.ms) / CLICK.ms;
+ const eased = Math.min(1, Math.max(0, k));
+ return CLICK.shrink + (1 - CLICK.shrink) * eased;
+};
diff --git a/apps/web/components/pages/HomeTwo/showcase/platforms.tsx b/apps/web/components/pages/HomeTwo/showcase/platforms.tsx
new file mode 100644
index 000000000..1ba12ab38
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/platforms.tsx
@@ -0,0 +1,185 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import { useDetectPlatform } from "hooks/useDetectPlatform";
+import { ArrowUpRight, Download, Monitor } from "lucide-react";
+import Image from "next/image";
+import Link from "next/link";
+import type { ReactNode } from "react";
+import { getDownloadUrl } from "@/utils/platform";
+import { AppleGlyph } from "../glyphs";
+import { MONO } from "../theme";
+import { Badge, Em, Section, SectionHead, TONES } from "./kit";
+
+const WindowsGlyph = ({ className }: { className?: string }) => (
+ <svg
+ aria-hidden="true"
+ className={className}
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ >
+ <path d="M0,0H11.377V11.372H0ZM12.623,0H24V11.372H12.623ZM0,12.623H11.377V24H0Zm12.623,0H24V24H12.623" />
+ </svg>
+);
+
+const TILE =
+ "flex flex-col rounded-[20px] bg-white p-6 shadow-[0_0_0_1px_rgba(17,17,17,0.06),0_1px_2px_rgba(17,17,17,0.03)]";
+
+const Desktop = ({
+ name,
+ note,
+ href,
+ glyph,
+ yours,
+}: {
+ name: string;
+ note: string;
+ href: string;
+ glyph: ReactNode;
+ yours: boolean;
+}) => (
+ <div className={TILE}>
+ <div className="flex items-center justify-between">
+ <span className="grid size-11 place-items-center rounded-[12px] bg-[#F1F3F6] text-[#111111]">
+ {glyph}
+ </span>
+ {yours ? (
+ <span className="text-[13px] text-[rgba(17,17,17,0.64)]">
+ Your device
+ </span>
+ ) : null}
+ </div>
+ <h3 className="mt-8 text-[22px] font-normal tracking-[-0.02em] text-[#111111]">
+ {name}
+ </h3>
+ <div className="mt-1 text-[14.5px] leading-[1.5] text-[rgba(17,17,17,0.64)]">
+ {note}
+ </div>
+ <Link
+ href={href}
+ prefetch={false}
+ className={classNames(
+ "mt-6 inline-flex h-10 items-center justify-center gap-2 rounded-[10px] text-[14.5px] transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111111]",
+ yours
+ ? "bg-[#111111] text-white hover:bg-[#2A2A2A]"
+ : "bg-[#F1F3F6] text-[#111111] hover:bg-[#E6EAEF]",
+ )}
+ >
+ <Download className="size-4" />
+ Download for {name}
+ </Link>
+ </div>
+);
+
+const TERMINAL = [
+ "cap record start --mode studio --duration 30",
+ "cap export ./recording.cap --quality 4k",
+ "cap upload ./recording.mp4 --json",
+];
+
+export const PlatformsSection = () => {
+ const { platform, isIntel } = useDetectPlatform();
+ const current = platform ?? "macos";
+ return (
+ <Section anchor="platforms" tone={TONES.platforms}>
+ <SectionHead
+ title="Native on Mac, Windows and Linux"
+ badge={<Badge icon={<Monitor />}>Every platform</Badge>}
+ >
+ A real desktop app on all three, with{" "}
+ <Em>the same recorder, editor, and share link</Em>. Plus a Chrome
+ extension and a CLI for everything else.
+ </SectionHead>
+ <div className="mt-14 grid gap-3 md:grid-cols-3">
+ <Desktop
+ name="macOS"
+ note="Apple silicon and Intel. macOS 13.1 or newer."
+ href={getDownloadUrl("macos", isIntel)}
+ glyph={<AppleGlyph className="size-5" />}
+ yours={current === "macos"}
+ />
+ <Desktop
+ name="Windows"
+ note="Windows 10 or newer."
+ href={getDownloadUrl("windows", false)}
+ glyph={<WindowsGlyph className="size-[18px]" />}
+ yours={current === "windows"}
+ />
+ <Desktop
+ name="Linux"
+ note="Debian and Ubuntu, as a .deb package."
+ href={getDownloadUrl("linux", false)}
+ glyph={
+ <Image
+ src="/logos/os/linux.svg"
+ alt=""
+ width={22}
+ height={22}
+ className="size-[22px]"
+ />
+ }
+ yours={current === "linux"}
+ />
+ </div>
+ <div className="mt-3 grid gap-3 md:grid-cols-[1fr_1.4fr]">
+ <Link
+ href="/download"
+ className={classNames(
+ TILE,
+ "group justify-between transition-shadow duration-200 hover:shadow-[0_0_0_1px_rgba(17,17,17,0.12)]",
+ )}
+ >
+ <span className="flex items-start justify-between">
+ <Image
+ src="/logos/browsers/google-chrome.svg"
+ alt=""
+ width={36}
+ height={36}
+ className="size-9"
+ />
+ <ArrowUpRight className="size-4 text-[rgba(17,17,17,0.4)] transition-colors group-hover:text-[#111111]" />
+ </span>
+ <span className="mt-8 block">
+ <h3 className="block text-[18px] font-normal tracking-[-0.02em] text-[#111111]">
+ Chrome extension
+ </h3>
+ <span className="mt-1 block text-[14.5px] text-[rgba(17,17,17,0.64)]">
+ Record a tab or your whole screen without leaving the browser.
+ </span>
+ </span>
+ </Link>
+ <Link
+ href="/docs"
+ className={classNames(
+ TILE,
+ "group transition-shadow duration-200 hover:shadow-[0_0_0_1px_rgba(17,17,17,0.12)]",
+ )}
+ >
+ <span className="flex items-start justify-between">
+ <h3 className="block text-[18px] font-normal tracking-[-0.02em] text-[#111111]">
+ Built for developers
+ </h3>
+ <ArrowUpRight className="size-4 text-[rgba(17,17,17,0.4)] transition-colors group-hover:text-[#111111]" />
+ </span>
+ <span className="mt-1 block text-[14.5px] text-[rgba(17,17,17,0.64)]">
+ Record, export, and publish from the terminal, the API, or the MCP
+ server.
+ </span>
+ <span
+ className={classNames(
+ MONO,
+ "mt-5 block rounded-[12px] bg-[#F4F5F7] p-4 text-[12px] leading-[1.8] text-[#33363D]",
+ )}
+ >
+ {TERMINAL.map((line) => (
+ <span key={line} className="block break-words">
+ <span className="text-[rgba(17,17,17,0.35)]">$ </span>
+ {line}
+ </span>
+ ))}
+ </span>
+ </Link>
+ </div>
+ </Section>
+ );
+};
diff --git a/apps/web/components/pages/HomeTwo/showcase/screenshot.tsx b/apps/web/components/pages/HomeTwo/showcase/screenshot.tsx
new file mode 100644
index 000000000..93f910751
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/screenshot.tsx
@@ -0,0 +1,435 @@
+"use client";
+
+import { clamp01, Loop, lerp, seg, TONES } from "./kit";
+import { INVOICE, InvoicePage } from "./subjects";
+
+export const CANVAS = { w: 640, h: 520 } as const;
+
+const INK = "#F43F5E";
+
+/** The window as it sits on screen before the capture. */
+const WIN = { x: 55, y: 96, scale: 0.78 } as const;
+
+/** The part of the invoice that gets captured, in page pixels. */
+const CROP = { x: 364, y: 277, w: 304, h: 133 } as const;
+
+/** Where the capture lands, on its background card. */
+const PAD = 34;
+const IMG = { x: 84, y: 172, w: 472 } as const;
+const SCALE_OUT = IMG.w / CROP.w;
+const IMG_H = CROP.h * SCALE_OUT;
+const CARD = {
+ x: IMG.x - PAD,
+ y: IMG.y - PAD,
+ w: IMG.w + PAD * 2,
+ h: IMG_H + PAD * 2,
+};
+
+/** Page coordinates to stage coordinates, once the capture has landed. */
+const at = (px: number, py: number) => ({
+ x: IMG.x + (px - CROP.x) * SCALE_OUT,
+ y: IMG.y + (py - CROP.y) * SCALE_OUT,
+});
+
+const SEL = {
+ x: WIN.x + CROP.x * WIN.scale,
+ y: WIN.y + CROP.y * WIN.scale,
+ w: CROP.w * WIN.scale,
+ h: CROP.h * WIN.scale,
+};
+
+type Pt = { x: number; y: number };
+
+/**
+ * A marker arrow built from its geometry: a curved shaft that stops at the
+ * base of the head, and a head aimed along the curve's tangent at the tip,
+ * so the two always meet cleanly whatever the angle.
+ */
+const Arrow = ({
+ from,
+ ctrl,
+ to,
+ k,
+ width = 5,
+ head = 17,
+}: {
+ from: Pt;
+ ctrl: Pt;
+ to: Pt;
+ k: number;
+ width?: number;
+ head?: number;
+}) => {
+ const dx = to.x - ctrl.x;
+ const dy = to.y - ctrl.y;
+ const len = Math.hypot(dx, dy) || 1;
+ const ux = dx / len;
+ const uy = dy / len;
+ const base = { x: to.x - ux * head, y: to.y - uy * head };
+ const wing = head * 0.62;
+ const left = { x: base.x - uy * wing, y: base.y + ux * wing };
+ const right = { x: base.x + uy * wing, y: base.y - ux * wing };
+ const shaft = Math.min(1, k / 0.82);
+ const tip = seg(k, 0.8, 1);
+ return (
+ <g>
+ <path
+ d={`M ${from.x} ${from.y} Q ${ctrl.x} ${ctrl.y} ${base.x} ${base.y}`}
+ fill="none"
+ stroke={INK}
+ strokeWidth={width}
+ strokeLinecap="round"
+ pathLength={1}
+ strokeDasharray={1}
+ strokeDashoffset={1 - shaft}
+ />
+ <path
+ d={`M ${to.x} ${to.y} L ${left.x} ${left.y} L ${right.x} ${right.y} Z`}
+ fill={INK}
+ stroke={INK}
+ strokeWidth={2.5}
+ strokeLinejoin="round"
+ style={{
+ opacity: tip > 0 ? 1 : 0,
+ transform: `scale(${0.4 + tip * 0.6})`,
+ transformOrigin: `${to.x}px ${to.y}px`,
+ }}
+ />
+ </g>
+ );
+};
+
+/** A rounded box that draws itself clockwise from the top left. */
+const Box = ({
+ x,
+ y,
+ w,
+ h,
+ k,
+}: {
+ x: number;
+ y: number;
+ w: number;
+ h: number;
+ k: number;
+}) => (
+ <rect
+ x={x}
+ y={y}
+ width={w}
+ height={h}
+ rx={10}
+ fill="none"
+ stroke={INK}
+ strokeWidth={4}
+ strokeLinecap="round"
+ pathLength={1}
+ strokeDasharray={1}
+ strokeDashoffset={1 - k}
+ />
+);
+
+const Handle = ({ x, y }: Pt) => (
+ <span
+ className="absolute size-[9px] -translate-x-1/2 -translate-y-1/2 rounded-full border-[1.5px] border-white bg-[#2563EB] shadow-[0_1px_2px_rgba(0,0,0,0.3)]"
+ style={{ left: x, top: y }}
+ />
+);
+
+const Crosshair = ({ x, y }: Pt) => (
+ <svg
+ aria-hidden="true"
+ className="absolute z-30 -translate-x-1/2 -translate-y-1/2"
+ style={{ left: x, top: y }}
+ width={23}
+ height={23}
+ viewBox="0 0 23 23"
+ >
+ <path d="M11.5 0v23M0 11.5h23" stroke="#FFFFFF" strokeWidth={3.5} />
+ <path d="M11.5 0v23M0 11.5h23" stroke="#111111" strokeWidth={1.5} />
+ </svg>
+);
+
+const TOOLS = [
+ {
+ key: "box",
+ d: "M5 5h14v14H5z",
+ },
+ {
+ key: "arrow",
+ d: "M6 18 18 6M9 6h9v9",
+ },
+ {
+ key: "text",
+ d: "M6 6h12M12 6v13",
+ },
+ {
+ key: "blur",
+ d: "M4 4h16v16H4zM4 12h16M12 4v16M4 4h8v8H4zM12 12h8v8h-8z",
+ },
+] as const;
+
+const Toolbar = ({ active, k }: { active: string | null; k: number }) => (
+ <div
+ className="absolute flex -translate-x-1/2 items-center gap-1 rounded-[14px] bg-white p-1.5 shadow-[0_0_0_1px_rgba(17,17,17,0.07),0_12px_28px_-12px_rgba(17,24,39,0.35)]"
+ style={{
+ left: CANVAS.w / 2,
+ top: CARD.y - 64,
+ opacity: k,
+ transform: `translate(-50%, ${(1 - k) * 8}px)`,
+ }}
+ >
+ {TOOLS.map((tool) => {
+ const on = tool.key === active;
+ return (
+ <span
+ key={tool.key}
+ className="grid size-9 place-items-center rounded-[10px] transition-colors duration-200"
+ style={{
+ background: on ? "#FFE4E8" : "transparent",
+ color: on ? INK : "#5B6069",
+ }}
+ >
+ <svg
+ aria-hidden="true"
+ viewBox="0 0 24 24"
+ className="size-[18px]"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d={tool.d} />
+ </svg>
+ </span>
+ );
+ })}
+ <span className="mx-1 h-5 w-px bg-[#E5E7EB]" />
+ <span className="size-5 rounded-full" style={{ background: INK }} />
+ <span className="ml-1 mr-1.5 text-[13px] text-[#1C1D21]">Copy</span>
+ </div>
+);
+
+const LABEL = "Ready to send";
+
+const ScreenshotView = ({ t }: { t: number; playing: boolean }) => {
+ const drag = seg(t, 450, 1350);
+ const flash = t > 1420 && t < 1760 ? 1 - (t - 1420) / 340 : 0;
+ const lift = seg(t, 1600, 2500);
+ const tools = seg(t, 2400, 2750);
+ const boxK = seg(t, 2900, 3450);
+ const arrowK = clamp01((t - 3600) / 650);
+ const typed = LABEL.slice(0, Math.max(0, Math.floor((t - 4400) / 55)));
+ const toast = seg(t, 5300, 5600) * (1 - seg(t, 7000, 7300));
+ const active =
+ t > 2800 && t < 3500
+ ? "box"
+ : t > 3500 && t < 4350
+ ? "arrow"
+ : t > 4350 && t < 5300
+ ? "text"
+ : null;
+
+ // The capture flies from the selection to its spot on the card.
+ const crop = {
+ x: lerp(SEL.x, IMG.x, lift),
+ y: lerp(SEL.y, IMG.y, lift),
+ w: lerp(SEL.w, IMG.w, lift),
+ h: lerp(SEL.h, IMG_H, lift),
+ };
+ const scale = crop.w / CROP.w;
+ const card = {
+ x: lerp(crop.x, CARD.x, lift),
+ y: lerp(crop.y, CARD.y, lift),
+ w: lerp(crop.w, CARD.w, lift),
+ h: lerp(crop.h, CARD.h, lift),
+ };
+
+ const selW = SEL.w * drag;
+ const selH = SEL.h * drag;
+ const capturing = drag > 0 && t < 1600;
+
+ const total = { a: at(564, 276), b: at(660, 307) };
+ const tail = at(394, 318);
+ const tip = at(515, 378);
+ const ctrl = at(404, 390);
+ const label = at(376, 284);
+
+ return (
+ <div className="absolute inset-0 overflow-hidden">
+ {/* The window on screen, before the capture. */}
+ <div
+ className="absolute overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_18px_44px_-20px_rgba(17,24,39,0.45)]"
+ style={{
+ left: WIN.x,
+ top: WIN.y,
+ width: INVOICE.w * WIN.scale,
+ height: INVOICE.h * WIN.scale,
+ opacity: 1 - lift,
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${WIN.scale})`,
+ transformOrigin: "top left",
+ }}
+ >
+ <InvoicePage />
+ </div>
+ </div>
+
+ {capturing ? (
+ <>
+ <div
+ className="absolute inset-0 bg-[rgba(17,17,17,0.16)]"
+ style={{
+ clipPath: `polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 ${SEL.y}px, ${SEL.x}px ${SEL.y}px, ${SEL.x}px ${SEL.y + selH}px, ${SEL.x + selW}px ${SEL.y + selH}px, ${SEL.x + selW}px ${SEL.y}px, 0 ${SEL.y}px)`,
+ }}
+ />
+ <div
+ className="absolute border border-white shadow-[0_0_0_1px_rgba(37,99,235,0.6)]"
+ style={{ left: SEL.x, top: SEL.y, width: selW, height: selH }}
+ />
+ {drag >= 1 ? (
+ <>
+ <Handle x={SEL.x} y={SEL.y} />
+ <Handle x={SEL.x + SEL.w} y={SEL.y} />
+ <Handle x={SEL.x} y={SEL.y + SEL.h} />
+ <Handle x={SEL.x + SEL.w} y={SEL.y + SEL.h} />
+ </>
+ ) : null}
+ <div
+ className="absolute whitespace-nowrap rounded-[6px] bg-[rgba(17,17,17,0.86)] px-2 py-[3px] text-[11.5px] tabular-nums text-white"
+ style={{
+ left: SEL.x + selW,
+ top: SEL.y + selH + 12,
+ transform: "translateX(-100%)",
+ }}
+ >
+ {Math.round((selW / WIN.scale) * 2)} ×{" "}
+ {Math.round((selH / WIN.scale) * 2)}
+ </div>
+ <Crosshair x={SEL.x + selW} y={SEL.y + selH} />
+ </>
+ ) : null}
+ {t < 450 ? <Crosshair x={SEL.x} y={SEL.y} /> : null}
+
+ {/* The background card the capture lands on. */}
+ <div
+ className="absolute overflow-hidden"
+ style={{
+ left: card.x,
+ top: card.y,
+ width: card.w,
+ height: card.h,
+ borderRadius: 18 * lift,
+ opacity: lift,
+ background:
+ "radial-gradient(120% 140% at 0% 0%, #A7F3D0 0%, transparent 55%), radial-gradient(120% 140% at 100% 100%, #93C5FD 0%, transparent 55%), linear-gradient(135deg, #6EE7B7 0%, #60A5FA 100%)",
+ boxShadow: `0 ${30 * lift}px ${60 * lift}px -30px rgba(17,24,39,0.45)`,
+ }}
+ />
+
+ {/* The capture itself. */}
+ {t >= 1420 ? (
+ <div
+ className="absolute overflow-hidden bg-white"
+ style={{
+ left: crop.x,
+ top: crop.y,
+ width: crop.w,
+ height: crop.h,
+ borderRadius: lerp(2, 12, lift),
+ boxShadow: `0 ${10 * lift}px ${30 * lift}px -12px rgba(17,24,39,${0.4 * lift})`,
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${scale}) translate(${-CROP.x}px, ${-CROP.y}px)`,
+ transformOrigin: "top left",
+ }}
+ >
+ <InvoicePage />
+ </div>
+ </div>
+ ) : null}
+
+ <Toolbar active={active} k={tools} />
+
+ <svg
+ aria-hidden="true"
+ className="pointer-events-none absolute inset-0"
+ width={CANVAS.w}
+ height={CANVAS.h}
+ >
+ {boxK > 0 ? (
+ <Box
+ x={total.a.x}
+ y={total.a.y}
+ w={total.b.x - total.a.x}
+ h={total.b.y - total.a.y}
+ k={boxK}
+ />
+ ) : null}
+ {arrowK > 0 ? (
+ <Arrow from={tail} ctrl={ctrl} to={tip} k={arrowK} />
+ ) : null}
+ </svg>
+
+ {typed ? (
+ <div
+ className="absolute text-[19px] font-bold tracking-[-0.01em]"
+ style={{ left: label.x, top: label.y, color: INK }}
+ >
+ {typed}
+ {typed.length < LABEL.length ? (
+ <span className="ml-0.5 inline-block h-[18px] w-[2px] translate-y-[3px] bg-current" />
+ ) : null}
+ </div>
+ ) : null}
+
+ <div
+ className="absolute inset-0 bg-white"
+ style={{ opacity: flash * 0.85 }}
+ />
+
+ <div
+ className="absolute left-1/2 flex items-center gap-2.5 rounded-full bg-[#111111] py-1.5 pl-1.5 pr-4 text-[14px] text-white shadow-[0_12px_30px_-12px_rgba(0,0,0,0.5)]"
+ style={{
+ top: CARD.y + CARD.h + 26,
+ opacity: toast,
+ transform: `translate(-50%, ${(1 - toast) * 10}px)`,
+ }}
+ >
+ <span className="grid size-6 place-items-center rounded-full bg-[#22C55E]">
+ <svg aria-hidden="true" viewBox="0 0 16 16" className="size-3.5">
+ <path
+ d="M3.5 8.5l3 3 6-7"
+ fill="none"
+ stroke="#FFFFFF"
+ strokeWidth={2.2}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ />
+ </svg>
+ </span>
+ Copied to clipboard
+ </div>
+ </div>
+ );
+};
+
+export const ScreenshotStage = () => (
+ <Loop
+ View={ScreenshotView}
+ duration={7600}
+ pose={6200}
+ canvas={CANVAS}
+ tone={TONES.screenshot}
+ />
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/sections.tsx b/apps/web/components/pages/HomeTwo/showcase/sections.tsx
new file mode 100644
index 000000000..53880a71e
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/sections.tsx
@@ -0,0 +1,377 @@
+import { classNames } from "@cap/utils/helpers";
+import {
+ ArrowUpRight,
+ AudioLines,
+ Bot,
+ Braces,
+ Captions,
+ ChartNoAxesColumn,
+ ClipboardCheck,
+ Code,
+ Crop,
+ Download,
+ Github,
+ Globe,
+ Hand,
+ HardDrive,
+ HeartPulse,
+ Image as ImageIcon,
+ Import,
+ Layers,
+ Lock,
+ LockOpen,
+ MessageSquare,
+ MousePointer2,
+ MoveUpRight,
+ Palette,
+ PencilLine,
+ Plug,
+ Rotate3d,
+ Scissors,
+ ScrollText,
+ ShieldCheck,
+ SquareDashedMousePointer,
+ SquareTerminal,
+ Type,
+ UserRound,
+ Wand,
+ Zap,
+} from "lucide-react";
+import Link from "next/link";
+import {
+ InstantIcon,
+ ScreenshotIcon,
+ StudioIcon,
+} from "@/components/pages/HomePage/modeIcons";
+import { BTN_SECONDARY } from "../theme";
+import { AI_COPY, INSTANT_COPY, STORAGE_COPY, STUDIO_COPY } from "./copy";
+import {
+ Badge,
+ Details,
+ Em,
+ Section,
+ SectionHead,
+ StageFeatures,
+ TONES,
+} from "./layout";
+import { SplitSection } from "./split";
+import { Stage } from "./stage";
+
+// Server rendered: headings, copy and detail lists are plain HTML for
+// crawlers and first paint. Only the animated stages are client code, and
+// those load as the visitor scrolls near them. Canvas sizes mirror the
+// CANVAS constants in each stage module.
+
+const WIDE = { w: 1040, h: 600 };
+
+export const InstantSection = () => (
+ <Section anchor="instant" tone={TONES.instant}>
+ <SectionHead
+ title="Stop recording. The link is already copied."
+ badge={<Badge icon={<InstantIcon />}>Instant Mode</Badge>}
+ >
+ <Em>Instant Mode</Em> uploads while you talk, so there is nothing to wait
+ for. Paste the link anywhere and <Em>people watch in the browser</Em>, no
+ account needed.
+ </SectionHead>
+ <Stage
+ name="instant"
+ canvas={WIDE}
+ tone={TONES.instant}
+ className="mt-14"
+ />
+ <StageFeatures items={INSTANT_COPY} />
+ <Details
+ className="mt-16"
+ items={[
+ {
+ lead: "Screen, window, or area.",
+ icon: <SquareDashedMousePointer />,
+ body: "Record a whole display, a single window, a custom area, or just your camera.",
+ },
+ {
+ lead: "Microphone and system audio.",
+ icon: <AudioLines />,
+ body: "Capture your voice and the sound from your computer together.",
+ },
+ {
+ lead: "Password protected links.",
+ icon: <Lock />,
+ body: "Lock a Cap behind a password, keep it to your organization, or make it public.",
+ },
+ {
+ lead: "Viewer analytics.",
+ icon: <ChartNoAxesColumn />,
+ body: "Views, comments, and reactions on every Cap, broken down by country, city, browser, and device.",
+ },
+ {
+ lead: "Custom domains.",
+ icon: <Globe />,
+ body: "Share from cap.yourcompany.com instead of Cap.so on Cap Pro.",
+ },
+ {
+ lead: "Embed anywhere.",
+ icon: <Code />,
+ body: "Drop a Cap into docs, a help center, or your site with an embed code.",
+ },
+ ]}
+ />
+ </Section>
+);
+
+export const StudioSection = () => (
+ <Section anchor="studio" tone={TONES.studio}>
+ <SectionHead
+ title="Polish it before anyone sees it"
+ badge={<Badge icon={<StudioIcon />}>Studio Mode</Badge>}
+ >
+ <Em>Studio Mode</Em> records in full quality straight to your computer,
+ then opens an editor made for screen recordings.{" "}
+ <Em>Zooms, layouts, captions, and privacy</Em> take a click each.
+ </SectionHead>
+ <Stage name="studio" canvas={WIDE} tone={TONES.studio} className="mt-14" />
+ <StageFeatures items={STUDIO_COPY} />
+ <Details
+ className="mt-16"
+ items={[
+ {
+ lead: "Animated text and titles.",
+ icon: <Type />,
+ body: "Titles, lower thirds, and callouts that fade, slide, pop, or type in word by word.",
+ },
+ {
+ lead: "Cursor smoothing and click effects.",
+ icon: <MousePointer2 />,
+ body: "Smooth out shaky mouse movement, resize the cursor, add click animations and motion blur, and hide it when idle.",
+ },
+ {
+ lead: "3D camera effects.",
+ icon: <Rotate3d />,
+ body: "Tilt, rotate, and pan the frame in 3D, with radial, directional, or tilt shift blur.",
+ },
+ {
+ lead: "Color grading.",
+ icon: <Palette />,
+ body: "Presets like Cinematic, Noir, Vintage, and Golden, plus exposure, contrast, saturation, and vignette for the screen and camera.",
+ },
+ {
+ lead: "Trim, split, and speed up.",
+ icon: <Scissors />,
+ body: "Cut and rearrange clips, change speed from 0.25x to 8x, and add music from the built in library.",
+ },
+ {
+ lead: "4K export at 60fps.",
+ icon: <Download />,
+ body: "Export an MP4 or a GIF, or share it as a Cap.so link like everything else.",
+ },
+ {
+ lead: "Camera background blur.",
+ icon: <UserRound />,
+ body: "Blur the room behind you on your webcam, without a green screen.",
+ },
+ {
+ lead: "Separate screen, camera, and mic tracks.",
+ icon: <Layers />,
+ body: "Each is recorded on its own track, so you can fix one without touching the others.",
+ },
+ {
+ lead: "Crop and aspect ratios.",
+ icon: <Crop />,
+ body: "Crop to the part that matters and export wide, square, or vertical for social.",
+ },
+ ]}
+ />
+ </Section>
+);
+
+export const ScreenshotSection = () => (
+ <SplitSection
+ anchor="screenshot"
+ tone={TONES.screenshot}
+ title="Screenshots that look designed"
+ badge={<Badge icon={<ScreenshotIcon />}>Screenshot Mode</Badge>}
+ lede={
+ <>
+ <Em>Screenshot Mode</Em> grabs any window or area with one hotkey and
+ drops it on a background with padding and a shadow.{" "}
+ <Em>It is on your clipboard</Em> before you let go.
+ </>
+ }
+ details={[
+ {
+ lead: "Screenshot backgrounds.",
+ icon: <ImageIcon />,
+ body: "Wallpapers, gradients, or a solid color, with rounded corners and a soft shadow.",
+ },
+ {
+ lead: "Annotation tools.",
+ icon: <MoveUpRight />,
+ body: "Arrows, rectangles, circles, text, and blur to point out the bug or the button you mean.",
+ },
+ {
+ lead: "Copy to clipboard.",
+ icon: <ClipboardCheck />,
+ body: "Your screenshot is copied the moment you let go, or saved as a PNG or shared as a Cap.so link.",
+ },
+ {
+ lead: "Any window or area.",
+ icon: <SquareDashedMousePointer />,
+ body: "Grab a full display, one window, or a region you draw, from a single hotkey.",
+ },
+ ]}
+ visual={
+ <Stage
+ name="screenshot"
+ canvas={{ w: 640, h: 520 }}
+ tone={TONES.screenshot}
+ caption={false}
+ />
+ }
+ />
+);
+
+export const AiSection = () => (
+ <Section anchor="ai" tone={TONES.ai}>
+ <SectionHead
+ title="Every recording, understood"
+ badge={<Badge icon={<ScrollText />}>Cap AI</Badge>}
+ >
+ Titles, summaries, chapters, and a transcript arrive with every recording,
+ right on the share page, so{" "}
+ <Em>the work after recording is already done</Em>.
+ </SectionHead>
+ <Stage name="ai" canvas={WIDE} tone={TONES.ai} className="mt-14" />
+ <StageFeatures items={AI_COPY} />
+ <Details
+ className="mt-16"
+ items={[
+ {
+ lead: "No prompts needed.",
+ icon: <Zap />,
+ body: "AI runs on every Cap automatically. There is nothing to write and no button to press.",
+ },
+ {
+ lead: "Edit the transcript and summary.",
+ icon: <PencilLine />,
+ body: "Fix a misheard word or rewrite the summary right on the share page.",
+ },
+ {
+ lead: "Captions for viewers.",
+ icon: <Captions />,
+ body: "The transcript doubles as captions viewers can switch on in the player.",
+ },
+ {
+ lead: "Timestamped comments.",
+ icon: <MessageSquare />,
+ body: "Feedback lands on the second it is about, next to the transcript.",
+ },
+ {
+ lead: "Readable by your AI agents.",
+ icon: <Bot />,
+ body: "Transcripts and summaries come back as data from the Cap CLI and MCP server.",
+ },
+ {
+ lead: "Works with imported Loom videos.",
+ icon: <Import />,
+ body: "Videos you bring over from Loom get a title, transcript, and chapters too.",
+ },
+ ]}
+ />
+ </Section>
+);
+
+export const OwnershipSection = () => (
+ <Section anchor="ownership" tone={TONES.storage}>
+ <SectionHead
+ title="Your recordings. Actually yours."
+ badge={<Badge icon={<HardDrive />}>Storage you own</Badge>}
+ >
+ Cap is open source, and every recording goes{" "}
+ <Em>exactly where you say</Em>. Use Cap Cloud, point it at your own bucket
+ or Drive, or self host the whole thing.
+ </SectionHead>
+ <Stage
+ name="ownership"
+ canvas={{ w: 1040, h: 440 }}
+ tone={TONES.storage}
+ className="mt-14"
+ />
+ <StageFeatures items={STORAGE_COPY} />
+ <Details
+ className="mt-16 lg:grid-cols-4"
+ items={[
+ {
+ lead: "Open source.",
+ icon: <Github />,
+ body: "Every line is on GitHub. Audit it, fork it, or contribute the feature you need.",
+ },
+ {
+ lead: "SOC 2 Type II and ISO 27001.",
+ icon: <ShieldCheck />,
+ body: "Independently audited controls behind Cap Cloud.",
+ },
+ {
+ lead: "HIPAA compliant.",
+ icon: <HeartPulse />,
+ body: "Signed BAAs for organizations handling PHI.",
+ },
+ {
+ lead: "No vendor lock in.",
+ icon: <LockOpen />,
+ body: "Recordings are plain video files. Take them anywhere, any time.",
+ },
+ ]}
+ />
+ </Section>
+);
+
+export const AgentsSection = () => (
+ <Section anchor="agents" tone={TONES.agents}>
+ <SectionHead
+ title="Your agent can record, share, and read Caps"
+ badge={<Badge icon={<SquareTerminal />}>Cap for Agents</Badge>}
+ >
+ Cap ships a CLI and a local MCP server, so{" "}
+ <Em>Claude Code, Cursor, Codex, or any shell capable agent</Em> can record
+ your screen, upload it, and read back the transcript.
+ </SectionHead>
+ <Stage
+ name="agents"
+ canvas={{ w: 1040, h: 450 }}
+ tone={TONES.agents}
+ caption={false}
+ className="mt-14"
+ />
+ <Details
+ className="mt-16 lg:grid-cols-4"
+ items={[
+ {
+ lead: "One prompt setup.",
+ icon: <Wand />,
+ body: "Your agent installs the CLI, the Cap skill, and the MCP server for Claude Code, Cursor, or Codex.",
+ },
+ {
+ lead: "JSON output on every command.",
+ icon: <Braces />,
+ body: "Add one flag and the answer comes back as data, with live events while recording.",
+ },
+ {
+ lead: "MCP server with 76 tools.",
+ icon: <Plug />,
+ body: "Read and manage Caps, comments, and sharing. Capture and upload stay in the CLI, so no secret passes through the model.",
+ },
+ {
+ lead: "Permission prompts.",
+ icon: <Hand />,
+ body: "The agent checks with you before anything records, uploads, or costs money.",
+ },
+ ]}
+ />
+ <div className="mt-10 flex justify-center">
+ <Link href="/agents" className={classNames(BTN_SECONDARY, "gap-2")}>
+ Explore Cap for Agents
+ <ArrowUpRight className="size-4" />
+ </Link>
+ </div>
+ </Section>
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/share.tsx b/apps/web/components/pages/HomeTwo/showcase/share.tsx
new file mode 100644
index 000000000..bcde8c722
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/share.tsx
@@ -0,0 +1,318 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import type { ReactNode } from "react";
+import { INVOICE, InvoicePage, PRESENTER, Webcam } from "./subjects";
+
+/**
+ * The Cap share page (apps/web/app/s/[videoId]) rebuilt at a fixed 1200px
+ * width: header with title, owner and the blue Share button, the player in
+ * its white card on the grey page, the Player/Timeline toggle and reaction
+ * bar, and the Comments / Summary / Transcript sidebar.
+ */
+export const SHARE_W = 1200;
+export const SHARE_URL = "Cap.so/s/m4k8x2qz";
+export const CAP_TITLE = "Sending an invoice in Ledgerly";
+export const DURATION_S = 24;
+
+export const Avatar = ({
+ size = 24,
+ letter,
+ color,
+}: {
+ size?: number;
+ letter?: string;
+ color?: string;
+}) =>
+ letter ? (
+ <span
+ className="grid shrink-0 place-items-center rounded-full font-medium text-white"
+ style={{
+ width: size,
+ height: size,
+ background: color,
+ fontSize: size * 0.45,
+ }}
+ >
+ {letter}
+ </span>
+ ) : (
+ <span
+ className="block shrink-0 rounded-full bg-cover bg-center"
+ style={{
+ width: size,
+ height: size,
+ backgroundImage: `url(${PRESENTER.avatar})`,
+ }}
+ />
+ );
+
+export const stamp = (seconds: number) =>
+ `00:00:${String(Math.floor(seconds)).padStart(2, "0")}`;
+
+const clock = (seconds: number) =>
+ `${Math.floor(seconds / 60)}:${String(Math.floor(seconds % 60)).padStart(2, "0")}`;
+
+/** What the recording looks like inside the player. */
+export const RecordingFrame = ({
+ playing,
+ pageScale,
+}: {
+ playing: boolean;
+ pageScale: number;
+}) => (
+ <div className="relative h-full w-full overflow-hidden bg-[#DCE6F1]">
+ <div
+ className="absolute left-1/2 top-1/2 overflow-hidden rounded-[8px] shadow-[0_10px_30px_-12px_rgba(0,0,0,0.35)]"
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `translate(-50%, -50%) scale(${pageScale})`,
+ }}
+ >
+ <InvoicePage />
+ </div>
+ <Webcam
+ playing={playing}
+ className="absolute bottom-[7%] right-[5%] aspect-square w-[14%] rounded-full shadow-[0_10px_24px_-10px_rgba(0,0,0,0.5)]"
+ />
+ </div>
+);
+
+const Icon = ({ d, className }: { d: string; className?: string }) => (
+ <svg
+ aria-hidden="true"
+ viewBox="0 0 24 24"
+ className={classNames("size-[18px]", className)}
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.8}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d={d} />
+ </svg>
+);
+
+const PlayerControls = ({ seconds }: { seconds: number }) => {
+ const progress = seconds / DURATION_S;
+ return (
+ <div className="absolute inset-x-0 bottom-0 bg-gradient-to-t from-[rgba(0,0,0,0.55)] to-transparent px-4 pb-3 pt-10 text-white">
+ <div className="relative h-[3px] rounded-full bg-white/30">
+ <div
+ className="absolute inset-y-0 left-0 rounded-full bg-white"
+ style={{ width: `${progress * 100}%` }}
+ />
+ <div
+ className="absolute top-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white"
+ style={{ left: `${progress * 100}%` }}
+ />
+ </div>
+ <div className="mt-3 flex items-center gap-4 text-[13px]">
+ <svg aria-hidden="true" viewBox="0 0 24 24" className="size-[18px]">
+ <rect x="6" y="5" width="4" height="14" rx="1" fill="currentColor" />
+ <rect x="14" y="5" width="4" height="14" rx="1" fill="currentColor" />
+ </svg>
+ <Icon d="M11 7l-5 5 5 5M18 7l-5 5 5 5" />
+ <Icon d="M6 7l5 5-5 5M13 7l5 5-5 5" />
+ <Icon d="M4 10v4h3l4 4V6L7 10H4zM15 9.5a3.5 3.5 0 0 1 0 5" />
+ <span className="tabular-nums">
+ {clock(seconds)} / {clock(DURATION_S)}
+ </span>
+ <span className="flex-1" />
+ <Icon d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z" />
+ <Icon d="M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" />
+ </div>
+ </div>
+ );
+};
+
+const EMOJIS = ["😂", "😍", "😮", "🙌", "👍", "👎"];
+
+export type ShareComment = {
+ at: number;
+ who: string;
+ letter?: string;
+ color?: string;
+ when: string;
+ seconds?: number;
+ text: string;
+};
+
+export const CommentBubble = ({ comment }: { comment: ShareComment }) => (
+ <div className="ht-pop-in flex items-start gap-2.5">
+ <Avatar size={24} letter={comment.letter} color={comment.color} />
+ <div className="flex-1 rounded-xl border border-[#EEEEEE] bg-[#F9F9F9] p-3">
+ <div className="flex items-center justify-between gap-3">
+ <span className="truncate text-[14px] font-medium text-[#1C1C1C]">
+ {comment.who}
+ </span>
+ <span className="flex items-center gap-2 whitespace-nowrap text-[12px]">
+ <span className="text-[#8F8F8F]">{comment.when}</span>
+ {comment.seconds !== undefined ? (
+ <span className="text-[#3B82F6]">{stamp(comment.seconds)}</span>
+ ) : null}
+ </span>
+ </div>
+ <p className="mt-2 text-[14px] text-[#5D5D5D]">{comment.text}</p>
+ </div>
+ </div>
+);
+
+export type SidebarTab = "comments" | "summary" | "transcript";
+
+export const ShareSidebar = ({
+ tab,
+ children,
+ footer = true,
+ className,
+}: {
+ tab: SidebarTab;
+ children: ReactNode;
+ footer?: boolean;
+ className?: string;
+}) => (
+ <div className={classNames("flex flex-col bg-white", className)}>
+ <div className="flex border-b border-[#E8E8E8]">
+ {(
+ [
+ ["comments", "Comments"],
+ ["summary", "Summary"],
+ ["transcript", "Transcript"],
+ ] as const
+ ).map(([key, label]) => (
+ <div
+ key={key}
+ className={classNames(
+ "relative flex-1 px-5 py-3 text-center text-[14px] font-medium transition-colors duration-300",
+ key === tab ? "bg-[#F0F0F0] text-[#1C1C1C]" : "text-[#8F8F8F]",
+ )}
+ >
+ {label}
+ {key === tab ? (
+ <span className="absolute inset-x-0 bottom-0 h-0.5 bg-[#3B82F6]" />
+ ) : null}
+ </div>
+ ))}
+ </div>
+ <div className="min-h-0 flex-1 overflow-hidden">{children}</div>
+ {footer ? (
+ <div className="m-3 flex items-center gap-2.5 rounded-xl border border-[#E8E8E8] px-3 py-2.5 text-[14px]">
+ <span className="grid size-7 place-items-center rounded-full bg-[#EEEEEE] text-[#8F8F8F]">
+ <svg aria-hidden="true" viewBox="0 0 16 16" className="size-3.5">
+ <circle cx="8" cy="5.5" r="3" fill="currentColor" />
+ <path d="M2.5 14a5.5 5.5 0 0 1 11 0z" fill="currentColor" />
+ </svg>
+ </span>
+ <span className="flex-1 text-[#A3A3A3]">Respond to Richie...</span>
+ </div>
+ ) : null}
+ </div>
+);
+
+export const SharePage = ({
+ height,
+ seconds,
+ playing,
+ views,
+ sidebar,
+ floating = [],
+ pressed,
+}: {
+ height: number;
+ seconds: number;
+ playing: boolean;
+ views: number;
+ sidebar: ReactNode;
+ /** Reactions rising off the bar: emoji and 0..1 progress. */
+ floating?: { emoji: string; k: number; x: number }[];
+ pressed?: string;
+}) => (
+ <div
+ className="relative flex flex-col overflow-hidden bg-white text-[#1C1C1C]"
+ style={{ width: SHARE_W, height, fontWeight: 400 }}
+ >
+ <div className="border-b border-[#E8E8E8] px-6 pb-4 pt-5">
+ <div className="text-[24px] tracking-[-0.01em]">{CAP_TITLE}</div>
+ <div className="mt-3 flex items-center gap-5">
+ <div className="flex items-center gap-2.5">
+ <Avatar size={32} />
+ <div className="leading-tight">
+ <div className="text-[14px]">Richie</div>
+ <div className="text-[12.5px] text-[#8F8F8F]">
+ just now · {views} views
+ </div>
+ </div>
+ </div>
+ <span className="flex h-9 items-center gap-1.5 rounded-full bg-[#3B82F6] px-4 text-[14px] font-medium text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.25)]">
+ <svg aria-hidden="true" viewBox="0 0 16 16" className="size-3.5">
+ <path
+ d="M9.5 2.5 14 7l-4.5 4.5V9C6 9 3.8 10 2 13c.5-4 2.8-6.6 7.5-7z"
+ fill="currentColor"
+ />
+ </svg>
+ Share
+ </span>
+ </div>
+ </div>
+ <div className="flex min-h-0 flex-1">
+ <div className="relative flex-1 bg-[#F7F7F7] px-6 pt-5">
+ <div className="rounded-[18px] border border-[#E8E8E8] bg-white p-2">
+ <div className="relative aspect-video overflow-hidden rounded-[12px] bg-black">
+ <RecordingFrame playing={playing} pageScale={0.95} />
+ <PlayerControls seconds={seconds} />
+ </div>
+ </div>
+ <div className="mt-4 flex items-center gap-6">
+ <div className="flex rounded-full border border-[#E8E8E8] bg-[#F0F0F0] p-1 text-[14px]">
+ <span className="rounded-full bg-white px-3.5 py-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.08)]">
+ Player
+ </span>
+ <span className="px-3.5 py-1.5 text-[#646464]">Timeline</span>
+ </div>
+ <div className="relative mx-auto flex items-center gap-1 rounded-full border border-[#E8E8E8] bg-white p-1.5">
+ {EMOJIS.map((emoji) => (
+ <span
+ key={emoji}
+ className="grid size-10 place-items-center rounded-full text-[24px] transition-[background-color,transform] duration-200"
+ style={{
+ background: pressed === emoji ? "#DBEAFE" : "transparent",
+ transform: pressed === emoji ? "scale(1.15)" : "none",
+ }}
+ >
+ {emoji}
+ </span>
+ ))}
+ <span className="mx-2 h-6 w-px bg-[#E8E8E8]" />
+ <span className="flex h-10 items-center gap-2 rounded-full bg-[#1C1C1C] pl-5 pr-2 text-[15px] text-white">
+ Comment
+ <span className="grid size-6 place-items-center rounded-full bg-white/20 text-[12px]">
+ C
+ </span>
+ </span>
+ {floating.map((item) => (
+ <span
+ key={`${item.emoji}-${item.x}`}
+ className="pointer-events-none absolute text-[28px]"
+ style={{
+ left: item.x,
+ bottom: 40 + item.k * 160,
+ opacity: item.k < 0.8 ? 1 : (1 - item.k) * 5,
+ transform: `scale(${0.8 + item.k * 0.5}) rotate(${(item.k - 0.5) * 20}deg)`,
+ }}
+ >
+ {item.emoji}
+ </span>
+ ))}
+ </div>
+ </div>
+ </div>
+ <ShareSidebar
+ tab="comments"
+ className="w-[360px] shrink-0 border-l border-[#E8E8E8]"
+ >
+ {sidebar}
+ </ShareSidebar>
+ </div>
+ </div>
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/split.tsx b/apps/web/components/pages/HomeTwo/showcase/split.tsx
new file mode 100644
index 000000000..4ae238116
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/split.tsx
@@ -0,0 +1,79 @@
+import { classNames } from "@cap/utils/helpers";
+import type { ReactNode } from "react";
+import { BODY_TEXT, H_SECTION } from "../theme";
+import { type Detail, DetailIcon, type Tone, toneVars } from "./layout";
+
+/** Text on one side, one visual on the other. */
+export const SplitSection = ({
+ anchor,
+ title,
+ lede,
+ details,
+ visual,
+ flip,
+ footer,
+ tone,
+ badge,
+}: {
+ tone?: Tone;
+ badge?: ReactNode;
+ /** Scroll target id. */
+ anchor?: string;
+ title: ReactNode;
+ lede: ReactNode;
+ details: Detail[];
+ visual: ReactNode;
+ flip?: boolean;
+ footer?: ReactNode;
+}) => (
+ <section
+ id={anchor}
+ className="scroll-mt-24 px-5 py-20 lg:py-32"
+ style={toneVars(tone)}
+ >
+ <div
+ className={classNames(
+ "mx-auto grid max-w-[1120px] items-center gap-12 lg:gap-16",
+ flip
+ ? "lg:grid-cols-[minmax(0,1.15fr)_minmax(0,0.85fr)]"
+ : "lg:grid-cols-[minmax(0,0.85fr)_minmax(0,1.15fr)]",
+ )}
+ >
+ <div className={classNames("min-w-0", flip && "lg:order-2")}>
+ {badge ? <div className="mb-6">{badge}</div> : null}
+ <h2
+ className={`${H_SECTION} text-balance text-[clamp(34px,4vw,48px)] leading-[1.02]`}
+ >
+ {title}
+ </h2>
+ <p
+ className={`${BODY_TEXT} mt-5 max-w-[460px] text-[17px] leading-[1.5] text-[rgba(17,17,17,0.64)] sm:text-[18px]`}
+ >
+ {lede}
+ </p>
+ <ul className="mt-9 max-w-[460px] border-t border-[#E3E8EE]">
+ {details.map((item) => (
+ <li
+ key={item.lead}
+ className="flex gap-3.5 border-b border-[#E3E8EE] py-4 text-[15px] leading-[1.55] text-[rgba(17,17,17,0.64)]"
+ >
+ {item.icon ? (
+ <DetailIcon className="-mt-0.5">{item.icon}</DetailIcon>
+ ) : null}
+ <span>
+ <h3 className="m-0 inline text-[length:inherit] font-medium leading-[inherit] tracking-normal text-[#111111]">
+ {item.lead}
+ </h3>{" "}
+ {item.body}
+ </span>
+ </li>
+ ))}
+ </ul>
+ {footer}
+ </div>
+ <div className={classNames("min-w-0", flip && "lg:order-1")}>
+ {visual}
+ </div>
+ </div>
+ </section>
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/stage.tsx b/apps/web/components/pages/HomeTwo/showcase/stage.tsx
new file mode 100644
index 000000000..80989b09b
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/stage.tsx
@@ -0,0 +1,112 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import { useDetectPlatform } from "hooks/useDetectPlatform";
+import {
+ type ComponentType,
+ lazy,
+ Suspense,
+ useEffect,
+ useRef,
+ useState,
+} from "react";
+import { DemoPlatformProvider } from "../demo/platform";
+import { Panel, type Tone } from "./layout";
+
+type StageName =
+ | "instant"
+ | "studio"
+ | "screenshot"
+ | "ai"
+ | "ownership"
+ | "agents";
+
+// Each animated stage is its own chunk, fetched only when the section gets
+// close to the viewport, so none of it is in the initial page load.
+const STAGES: Record<StageName, ComponentType> = {
+ instant: lazy(() =>
+ import("./instant").then((m) => ({ default: m.InstantStage })),
+ ),
+ studio: lazy(() =>
+ import("./studio").then((m) => ({ default: m.StudioStage })),
+ ),
+ screenshot: lazy(() =>
+ import("./screenshot").then((m) => ({ default: m.ScreenshotStage })),
+ ),
+ ai: lazy(() => import("./ai").then((m) => ({ default: m.AiStage }))),
+ ownership: lazy(() =>
+ import("./ownership").then((m) => ({ default: m.OwnershipStage })),
+ ),
+ agents: lazy(() =>
+ import("./agents").then((m) => ({ default: m.AgentsStage })),
+ ),
+};
+
+const Placeholder = ({
+ canvas,
+ tone,
+ caption,
+}: {
+ canvas: { w: number; h: number };
+ tone: Tone;
+ caption: boolean;
+}) => (
+ <div aria-hidden="true">
+ <Panel tone={tone}>
+ <div style={{ aspectRatio: `${canvas.w} / ${canvas.h}` }} />
+ </Panel>
+ {caption ? <div className="h-[76px]" /> : null}
+ </div>
+);
+
+export const Stage = ({
+ name,
+ canvas,
+ tone,
+ caption = true,
+ className,
+}: {
+ name: StageName;
+ canvas: { w: number; h: number };
+ tone: Tone;
+ caption?: boolean;
+ className?: string;
+}) => {
+ const ref = useRef<HTMLDivElement | null>(null);
+ const [near, setNear] = useState(false);
+ // Windows visitors see Windows windows, cursors and notifications;
+ // everyone else gets macOS, the same rule as the hero demo.
+ const { platform } = useDetectPlatform();
+ const look = platform === "windows" ? "windows" : "macos";
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el || near) return;
+ const io = new IntersectionObserver(
+ ([entry]) => {
+ if (entry?.isIntersecting) setNear(true);
+ },
+ { rootMargin: "1200px 0px" },
+ );
+ io.observe(el);
+ return () => io.disconnect();
+ }, [near]);
+
+ const Loaded = STAGES[name];
+ const placeholder = (
+ <Placeholder canvas={canvas} tone={tone} caption={caption} />
+ );
+ return (
+ <div ref={ref} className={classNames("min-w-0", className)}>
+ {near ? (
+ <DemoPlatformProvider value={look}>
+ <Suspense fallback={placeholder}>
+ <Loaded />
+ </Suspense>
+ </DemoPlatformProvider>
+ ) : (
+ placeholder
+ )}
+ </div>
+ );
+};
diff --git a/apps/web/components/pages/HomeTwo/showcase/studio.tsx b/apps/web/components/pages/HomeTwo/showcase/studio.tsx
new file mode 100644
index 000000000..30c46f529
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/studio.tsx
@@ -0,0 +1,730 @@
+"use client";
+
+import {
+ Captions,
+ EyeOff,
+ Image as ImageIcon,
+ Video,
+ ZoomIn,
+} from "lucide-react";
+import { type CSSProperties, type ReactNode, useRef } from "react";
+import { copyOf, STUDIO_COPY } from "./copy";
+import { CANVAS, lerp, type Scene, Showcase, seg, TONES } from "./kit";
+import {
+ AUTO_ZOOM,
+ CLICK,
+ CURSOR_SPRING,
+ clickShrink,
+ rawPath,
+ sampleAt,
+ simulate,
+ snapToEdges,
+ ZOOM_SPRING,
+} from "./physics";
+import {
+ Cursor,
+ FrameChip,
+ INVOICE,
+ INVOICE_SPOTS,
+ InvoicePage,
+ thumbOf,
+ WALLPAPERS,
+ Wallpaper,
+ Webcam,
+} from "./subjects";
+
+/** The exported video, centred on the stage above the tabs. */
+const FRAME = { w: 744, h: 465 } as const;
+const FRAME_LEFT = (CANVAS.w - FRAME.w) / 2;
+const FRAME_TOP = 36;
+
+const Frame = ({
+ children,
+ style,
+}: {
+ children: ReactNode;
+ style?: CSSProperties;
+}) => (
+ <div
+ className="absolute overflow-hidden rounded-[16px] shadow-[0_0_0_1px_rgba(17,17,17,0.08),0_24px_60px_-28px_rgba(17,17,17,0.35)]"
+ style={{
+ left: FRAME_LEFT,
+ top: FRAME_TOP,
+ width: FRAME.w,
+ height: FRAME.h,
+ ...style,
+ }}
+ >
+ {children}
+ </div>
+);
+
+/** Where the recording sits inside the frame for a given padding (px). */
+const fitRecording = (pad: number) => {
+ const scale = Math.min(
+ (FRAME.w - pad * 2) / INVOICE.w,
+ (FRAME.h - pad * 2) / INVOICE.h,
+ );
+ const w = INVOICE.w * scale;
+ const h = INVOICE.h * scale;
+ return {
+ scale,
+ left: (FRAME.w - w) / 2,
+ top: (FRAME.h - h) / 2,
+ w,
+ h,
+ };
+};
+
+const Recording = ({
+ pad,
+ radius = 10,
+ shadow = 1,
+ children,
+ page,
+}: {
+ pad: number;
+ radius?: number;
+ shadow?: number;
+ children?: ReactNode;
+ page?: ReactNode;
+}) => {
+ const box = fitRecording(pad);
+ return (
+ <div
+ className="absolute overflow-hidden"
+ style={{
+ left: box.left,
+ top: box.top,
+ width: box.w,
+ height: box.h,
+ borderRadius: radius,
+ boxShadow: `0 ${18 * shadow}px ${44 * shadow}px -16px rgba(0,0,0,${0.45 * shadow})`,
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${box.scale})`,
+ transformOrigin: "top left",
+ }}
+ >
+ {page ?? <InvoicePage />}
+ </div>
+ {children}
+ </div>
+ );
+};
+
+/** Maps a point on the invoice page to frame coordinates. */
+const toFrame = (pad: number, x: number, y: number) => {
+ const box = fitRecording(pad);
+ return { x: box.left + x * box.scale, y: box.top + y * box.scale };
+};
+
+// Zoom, played the way an exported Cap plays it: the raw mouse path is
+// smoothed by the cursor spring, a click opens an auto zoom segment 300 ms
+// before it and closes it 2.5 s after, and the zoom amount and centre chase
+// their targets on the editor's screen movement spring. Only the recording
+// grows; the background stays put.
+const ZOOM_PAD = 44;
+const CLICK_AT = 1350;
+const ZOOM_MS = 6800;
+const ZOOM_SEGMENT = {
+ start: CLICK_AT - AUTO_ZOOM.preMs,
+ end: CLICK_AT + AUTO_ZOOM.postMs,
+};
+const SEND_CENTER = {
+ x: INVOICE_SPOTS.send.x + INVOICE_SPOTS.send.w / 2 + 8,
+ y: INVOICE_SPOTS.send.y + INVOICE_SPOTS.send.h / 2 + 2,
+};
+const mouse = rawPath([
+ { at: 0, x: 318, y: 214, hold: 250 },
+ { at: 1150, x: SEND_CENTER.x, y: SEND_CENTER.y, hold: 900 },
+ { at: 2900, x: 606, y: 292, hold: 1700 },
+ { at: 5700, x: 318, y: 214 },
+]);
+const CURSOR_SAMPLES = simulate(mouse, ZOOM_MS, CURSOR_SPRING);
+
+const ZOOM_SAMPLES = (() => {
+ let held = [0.5, 0.5];
+ return simulate(
+ (ms) => {
+ const inside = ms >= ZOOM_SEGMENT.start && ms <= ZOOM_SEGMENT.end;
+ if (inside) {
+ const [mx = 0, my = 0] = sampleAt(CURSOR_SAMPLES, ms);
+ held = [snapToEdges(mx / INVOICE.w), snapToEdges(my / INVOICE.h)];
+ return [AUTO_ZOOM.amount, held[0] ?? 0.5, held[1] ?? 0.5];
+ }
+ return [1, held[0] ?? 0.5, held[1] ?? 0.5];
+ },
+ ZOOM_MS,
+ ZOOM_SPRING,
+ );
+})();
+
+const ZoomView = ({ t }: { t: number; playing: boolean }) => {
+ const box = fitRecording(ZOOM_PAD);
+ const [amount = 1, cx = 0.5, cy = 0.5] = sampleAt(ZOOM_SAMPLES, t);
+ const [mx = 0, my = 0] = sampleAt(CURSOR_SAMPLES, t);
+ const a = Math.max(1, amount);
+ // SegmentBounds::from_amount_center: scale the display about its origin,
+ // then slide it so the centre maps across the travel range.
+ const w = box.w * a;
+ const h = box.h * a;
+ const left = box.left + cx * (1 - a) * box.w;
+ const top = box.top + cy * (1 - a) * box.h;
+ const sent = t > CLICK_AT + CLICK.ms ? 1 : 0;
+ const pressed = t > CLICK_AT && t < CLICK_AT + CLICK.ms ? 1 : 0;
+ return (
+ <Frame>
+ <Wallpaper src={WALLPAPERS.rome} />
+ <div
+ className="absolute overflow-hidden"
+ style={{
+ left,
+ top,
+ width: w,
+ height: h,
+ borderRadius: 10,
+ boxShadow: "0 18px 44px -16px rgba(0,0,0,0.45)",
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${box.scale * a})`,
+ transformOrigin: "top left",
+ }}
+ >
+ <InvoicePage sent={sent} press={pressed} />
+ </div>
+ </div>
+ <Cursor
+ x={left + (mx / INVOICE.w) * w}
+ y={top + (my / INVOICE.h) * h}
+ size={22 * a * clickShrink(t, CLICK_AT)}
+ />
+ <FrameChip
+ className="left-4 top-4 tabular-nums transition-opacity duration-300"
+ style={{ opacity: a > 1.03 ? 1 : 0 }}
+ >
+ Auto zoom {a.toFixed(1)}x
+ </FrameChip>
+ </Frame>
+ );
+};
+
+type Rect = { x: number; y: number; w: number; h: number; r: number };
+
+type Layout = {
+ name: string;
+ screen: Rect;
+ screenOpacity: number;
+ camera: Rect;
+ cameraOpacity: number;
+};
+
+const PAD = 40;
+const SCREEN_FULL: Rect = {
+ x: PAD,
+ y: PAD,
+ w: FRAME.w - PAD * 2,
+ h: FRAME.h - PAD * 2,
+ r: 10,
+};
+
+const LAYOUTS: Layout[] = [
+ {
+ name: "Screen and camera",
+ screen: SCREEN_FULL,
+ screenOpacity: 1,
+ camera: { x: FRAME.w - 196, y: FRAME.h - 196, w: 164, h: 164, r: 82 },
+ cameraOpacity: 1,
+ },
+ {
+ name: "Split screen",
+ screen: { x: 28, y: 92, w: 432, h: 281, r: 10 },
+ screenOpacity: 1,
+ camera: { x: 476, y: 92, w: 240, h: 281, r: 14 },
+ cameraOpacity: 1,
+ },
+ {
+ name: "Camera only",
+ screen: { x: 28, y: 92, w: 432, h: 281, r: 10 },
+ screenOpacity: 0,
+ camera: { x: 0, y: 0, w: FRAME.w, h: FRAME.h, r: 0 },
+ cameraOpacity: 1,
+ },
+ {
+ name: "Screen only",
+ screen: SCREEN_FULL,
+ screenOpacity: 1,
+ camera: { x: FRAME.w - 120, y: FRAME.h - 120, w: 80, h: 80, r: 40 },
+ cameraOpacity: 0,
+ },
+];
+
+const STEP = 2300;
+const MORPH = 650;
+
+const layoutAt = (t: number) =>
+ Math.min(LAYOUTS.length - 1, Math.floor(t / STEP));
+
+const MORPH_EASE = `${MORPH}ms cubic-bezier(0.65,0,0.35,1)`;
+const morph = (props: string[]) =>
+ props.map((prop) => `${prop} ${MORPH_EASE}`).join(", ");
+const BOX = ["left", "top", "width", "height", "border-radius", "opacity"];
+
+const ScenesView = ({
+ t,
+ playing,
+ pick,
+}: {
+ t: number;
+ playing: boolean;
+ pick: number | null;
+}) => {
+ const layout = (LAYOUTS[pick ?? layoutAt(t)] ?? LAYOUTS[0]) as Layout;
+ const { screen, camera } = layout;
+ return (
+ <Frame>
+ <Wallpaper src={WALLPAPERS.santorini} />
+ <div
+ className="absolute overflow-hidden shadow-[0_18px_44px_-16px_rgba(0,0,0,0.45)]"
+ style={{
+ left: screen.x,
+ top: screen.y,
+ width: screen.w,
+ height: screen.h,
+ borderRadius: screen.r,
+ opacity: layout.screenOpacity,
+ transition: morph(BOX),
+ }}
+ >
+ <div
+ style={{
+ width: INVOICE.w,
+ height: INVOICE.h,
+ transform: `scale(${screen.w / INVOICE.w})`,
+ transformOrigin: "top left",
+ transition: morph(["transform"]),
+ }}
+ >
+ <InvoicePage />
+ </div>
+ </div>
+ <Webcam
+ playing={playing}
+ className="absolute shadow-[0_18px_44px_-16px_rgba(0,0,0,0.5)]"
+ style={{
+ left: camera.x,
+ top: camera.y,
+ width: camera.w,
+ height: camera.h,
+ borderRadius: camera.r,
+ opacity: layout.cameraOpacity,
+ transition: morph(BOX),
+ }}
+ />
+ <FrameChip key={layout.name} className="ht-fade-in left-4 top-4">
+ {layout.name}
+ </FrameChip>
+ </Frame>
+ );
+};
+
+/** Little diagrams of each layout for the picker. */
+const LayoutGlyph = ({ kind }: { kind: number }) => (
+ <svg aria-hidden="true" viewBox="0 0 24 18" className="h-[15px] w-5">
+ <rect
+ x="1"
+ y="1"
+ width="22"
+ height="16"
+ rx="3"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ />
+ {kind === 0 ? (
+ <>
+ <rect
+ x="4"
+ y="4"
+ width="11"
+ height="8"
+ rx="1"
+ fill="currentColor"
+ opacity="0.35"
+ />
+ <circle cx="17.5" cy="12.5" r="2.6" fill="currentColor" />
+ </>
+ ) : null}
+ {kind === 1 ? (
+ <>
+ <rect
+ x="3.5"
+ y="5"
+ width="9"
+ height="8"
+ rx="1"
+ fill="currentColor"
+ opacity="0.35"
+ />
+ <rect
+ x="14"
+ y="5"
+ width="6.5"
+ height="8"
+ rx="1.2"
+ fill="currentColor"
+ />
+ </>
+ ) : null}
+ {kind === 2 ? <circle cx="12" cy="8" r="4" fill="currentColor" /> : null}
+ {kind === 3 ? (
+ <rect
+ x="4"
+ y="4"
+ width="16"
+ height="10"
+ rx="1"
+ fill="currentColor"
+ opacity="0.35"
+ />
+ ) : null}
+ </svg>
+);
+
+// Short phrases, like the editor splits them, so a caption never wraps.
+const LINES = [
+ "So this is the new invoice flow.",
+ "Pick the client,",
+ "add your line items,",
+ "and hit send.",
+];
+const WORD_MS = 300;
+const LINE_GAP = 350;
+
+const timeline = (() => {
+ let at = 400;
+ return LINES.map((line) => {
+ const words = line.split(" ").map((word) => {
+ const start = at;
+ at += WORD_MS;
+ return { word, start };
+ });
+ at += LINE_GAP;
+ return words;
+ });
+})();
+const CAPTIONS_END = (timeline.at(-1)?.at(-1)?.start ?? 0) + 1600;
+
+// Captions in the editor's default style: bold white on a near-black box,
+// bottom centre, each word bouncing in as it is spoken.
+const CaptionsView = ({ t, playing }: { t: number; playing: boolean }) => {
+ const lineIndex = Math.max(
+ 0,
+ timeline.findLastIndex((line) => (line[0]?.start ?? 0) <= t),
+ );
+ const line = (timeline[lineIndex] ?? []).filter(({ start }) => t >= start);
+ return (
+ <Frame>
+ <Wallpaper src={WALLPAPERS.miami} />
+ <Recording pad={40} />
+ <Webcam
+ playing={playing}
+ className="absolute shadow-[0_18px_44px_-16px_rgba(0,0,0,0.5)]"
+ style={{
+ right: 56,
+ top: 56,
+ width: 112,
+ height: 112,
+ borderRadius: 56,
+ }}
+ />
+ <div className="absolute inset-x-0 bottom-[22px] flex justify-center">
+ <div
+ key={lineIndex}
+ className="ht-fade-in flex rounded-[8px] bg-[rgba(0,0,0,0.9)] px-3 py-1.5 text-[19px] font-bold leading-[1.25] text-white"
+ >
+ {line.map(({ word, start }) => {
+ const k = Math.min(1, Math.max(0, (t - start) / 250));
+ const bounce = k < 1 ? 1 + Math.sin(k * Math.PI) * 0.12 : 1;
+ return (
+ <span
+ key={`${word}-${start}`}
+ className="inline-block px-[2.5px]"
+ style={{
+ opacity: k,
+ transform: `translateY(${(1 - k) * 4}px) scale(${bounce})`,
+ }}
+ >
+ {word}
+ </span>
+ );
+ })}
+ </div>
+ </div>
+ </Frame>
+ );
+};
+
+type MaskMode = "Blur" | "Pixelate" | "Highlight";
+const MASK_MODES: MaskMode[] = ["Blur", "Pixelate", "Highlight"];
+
+const Mosaic = ({ w, h }: { w: number; h: number }) => {
+ const size = 8;
+ const cols = Math.ceil(w / size);
+ const rows = Math.ceil(h / size);
+ const tones = ["#C9CDD4", "#E3E6EA", "#AEB3BC", "#D6D9DE", "#9CA2AC"];
+ return (
+ <div className="absolute inset-0 flex flex-wrap">
+ {Array.from({ length: rows * cols }, (_, n) => (
+ <span
+ // biome-ignore lint/suspicious/noArrayIndexKey: static grid
+ key={n}
+ style={{
+ width: size,
+ height: size,
+ background: tones[(((n * 2654435761) >>> 0) % 97) % tones.length],
+ }}
+ />
+ ))}
+ </div>
+ );
+};
+
+const BlurView = ({ t }: { t: number; playing: boolean }) => {
+ const pad = 28;
+ const box = fitRecording(pad);
+ const email = INVOICE_SPOTS.email;
+ const draw = seg(t, 500, 1400);
+ const modeIndex = t < 3200 ? 0 : t < 5200 ? 1 : 2;
+ const mode = MASK_MODES[modeIndex] ?? "Blur";
+ const blurAmount = seg(t, 1400, 1900) * 7;
+ // Mask rect in frame coordinates.
+ const x = box.left + (email.x - 6) * box.scale;
+ const y = box.top + (email.y - 6) * box.scale;
+ const fullW = (email.w + 12) * box.scale;
+ const h = (email.h + 12) * box.scale;
+ const w = fullW * draw;
+ const pickerX = x + fullW / 2;
+ const cursorStart = toFrame(pad, email.x - 4, email.y - 4);
+ const cursorEnd = toFrame(pad, email.x + email.w + 6, email.y + email.h + 6);
+ const cursorK = seg(t, 400, 1400);
+ const cursorAway = seg(t, 1600, 2400);
+ const privacy: CSSProperties =
+ mode === "Blur" ? { filter: `blur(${blurAmount}px)` } : {};
+ return (
+ <Frame>
+ <Wallpaper src={WALLPAPERS.london} />
+ <Recording pad={pad} page={<InvoicePage emailStyle={privacy} />} />
+ {mode === "Pixelate" ? (
+ <div
+ className="absolute overflow-hidden rounded-[4px]"
+ style={{ left: x, top: y, width: fullW, height: h }}
+ >
+ <Mosaic w={fullW} h={h} />
+ </div>
+ ) : null}
+ {mode === "Highlight" ? (
+ <div
+ className="absolute rounded-[6px]"
+ style={{
+ left: x,
+ top: y,
+ width: fullW,
+ height: h,
+ boxShadow: "0 0 0 2000px rgba(10,12,16,0.55)",
+ }}
+ />
+ ) : null}
+ {draw > 0 ? (
+ <div
+ className="absolute rounded-[6px] border-[1.5px] border-[#FF4766]"
+ style={{ left: x, top: y, width: w, height: h }}
+ />
+ ) : null}
+ <div
+ className="absolute flex -translate-x-1/2 gap-0.5 rounded-full bg-white p-1 text-[13px] shadow-[0_8px_24px_-8px_rgba(0,0,0,0.35),0_0_0_1px_rgba(0,0,0,0.06)] transition-opacity duration-300"
+ style={{
+ left: pickerX,
+ top: y + h + 12,
+ opacity: draw >= 1 ? 1 : 0,
+ }}
+ >
+ {MASK_MODES.map((item) => (
+ <span
+ key={item}
+ className="rounded-full px-3 py-1 transition-colors duration-200"
+ style={{
+ background: item === mode ? "#111111" : "transparent",
+ color: item === mode ? "#FFFFFF" : "#555A63",
+ }}
+ >
+ {item}
+ </span>
+ ))}
+ </div>
+ <Cursor
+ x={lerp(
+ lerp(cursorStart.x, cursorEnd.x, cursorK),
+ cursorEnd.x + 60,
+ cursorAway,
+ )}
+ y={lerp(
+ lerp(cursorStart.y, cursorEnd.y, cursorK),
+ cursorEnd.y + 90,
+ cursorAway,
+ )}
+ size={24}
+ opacity={1 - cursorAway}
+ />
+ </Frame>
+ );
+};
+
+const SWATCHES = [
+ WALLPAPERS.rome,
+ WALLPAPERS.santorini,
+ "linear-gradient(135deg,#C3DCF8 0%,#DACBF9 55%,#F6D9EC 100%)",
+ "#1C1D21",
+ WALLPAPERS.monaco,
+];
+
+const SWATCH_NAMES = [
+ "Rome",
+ "Santorini",
+ "Soft gradient",
+ "Charcoal",
+ "Monaco",
+];
+
+const swatchBg = (value: string): CSSProperties =>
+ value.startsWith("/")
+ ? {
+ backgroundImage: `url(${value})`,
+ backgroundSize: "cover",
+ backgroundPosition: "center",
+ }
+ : { background: value };
+
+const BG_FIRST = 1900;
+const BG_EACH = 1300;
+const backgroundAt = (t: number) =>
+ t < BG_FIRST
+ ? 0
+ : Math.min(SWATCHES.length - 1, Math.floor((t - BG_FIRST) / BG_EACH) + 1);
+
+const BackgroundView = ({
+ t,
+ pick,
+}: {
+ t: number;
+ playing: boolean;
+ pick: number | null;
+}) => {
+ const grow = pick === null ? seg(t, 600, 1700) : 1;
+ const pad = lerp(0, 48, grow);
+ const index = pick ?? backgroundAt(t);
+ // Only fetch a wallpaper once it has been shown, then keep it for the fade.
+ const seen = useRef(new Set<number>());
+ seen.current.add(index);
+ return (
+ <Frame style={{ background: "#F7F7F8" }}>
+ {SWATCHES.map((swatch, n) =>
+ seen.current.has(n) ? (
+ <div
+ key={swatch}
+ className="absolute inset-0 transition-opacity duration-500"
+ style={{ ...swatchBg(swatch), opacity: n === index ? grow : 0 }}
+ />
+ ) : null,
+ )}
+ <Recording pad={pad} radius={lerp(0, 12, grow)} shadow={grow} />
+ </Frame>
+ );
+};
+
+const SCENES: Scene[] = [
+ {
+ key: "zoom",
+ label: copyOf(STUDIO_COPY, "zoom").label,
+ icon: <ZoomIn />,
+ lead: copyOf(STUDIO_COPY, "zoom").lead,
+ body: copyOf(STUDIO_COPY, "zoom").body,
+ duration: ZOOM_MS,
+ pose: 2600,
+ View: ZoomView,
+ },
+ {
+ key: "layouts",
+ label: copyOf(STUDIO_COPY, "layouts").label,
+ icon: <Video />,
+ picker: {
+ options: LAYOUTS.map((layout, i) => ({
+ key: layout.name,
+ label: layout.name,
+ icon: <LayoutGlyph kind={i} />,
+ })),
+ at: layoutAt,
+ },
+ lead: copyOf(STUDIO_COPY, "layouts").lead,
+ body: copyOf(STUDIO_COPY, "layouts").body,
+ duration: STEP * LAYOUTS.length,
+ pose: STEP + MORPH,
+ View: ScenesView,
+ },
+ {
+ key: "captions",
+ label: copyOf(STUDIO_COPY, "captions").label,
+ icon: <Captions />,
+ lead: copyOf(STUDIO_COPY, "captions").lead,
+ body: copyOf(STUDIO_COPY, "captions").body,
+ duration: CAPTIONS_END,
+ pose: 2400,
+ View: CaptionsView,
+ },
+ {
+ key: "blur",
+ label: copyOf(STUDIO_COPY, "blur").label,
+ icon: <EyeOff />,
+ lead: copyOf(STUDIO_COPY, "blur").lead,
+ body: copyOf(STUDIO_COPY, "blur").body,
+ duration: 7200,
+ pose: 2600,
+ View: BlurView,
+ },
+ {
+ key: "background",
+ label: copyOf(STUDIO_COPY, "background").label,
+ icon: <ImageIcon />,
+ picker: {
+ options: SWATCHES.map((swatch, i) => ({
+ key: swatch,
+ label: SWATCH_NAMES[i] ?? "Background",
+ icon: (
+ <span
+ className="block size-full rounded-full"
+ style={swatchBg(swatch.startsWith("/") ? thumbOf(swatch) : swatch)}
+ />
+ ),
+ })),
+ at: backgroundAt,
+ swatches: true,
+ },
+ lead: copyOf(STUDIO_COPY, "background").lead,
+ body: copyOf(STUDIO_COPY, "background").body,
+ duration: BG_FIRST + BG_EACH * 4 + 900,
+ pose: 3400,
+ View: BackgroundView,
+ },
+];
+
+export const StudioStage = () => (
+ <Showcase scenes={SCENES} tone={TONES.studio} />
+);
diff --git a/apps/web/components/pages/HomeTwo/showcase/subjects.tsx b/apps/web/components/pages/HomeTwo/showcase/subjects.tsx
new file mode 100644
index 000000000..2837d15f7
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/showcase/subjects.tsx
@@ -0,0 +1,413 @@
+"use client";
+
+import { classNames } from "@cap/utils/helpers";
+import { type CSSProperties, type ReactNode, useRef } from "react";
+import { MacCursor, WindowsCursor } from "../cursors";
+import { TrafficLights, WindowsCaptionControls } from "../demo/chrome";
+import { PRESENTER, PresenterSources, useVideoAttrs } from "../demo/media";
+import { OS_FONT, useIsWindowsDemo } from "../demo/platform";
+
+export { PRESENTER };
+
+import { useVideo } from "../scenes/engine";
+
+/**
+ * The thing being recorded in every demo: a small, real looking invoicing app.
+ * Fixed 680x425 layout so scenes can aim the cursor, zooms and masks at exact
+ * coordinates (see INVOICE_SPOTS).
+ */
+export const INVOICE = { w: 680, h: 425 } as const;
+
+/** Rects in page pixels (top left corner, size). */
+export const INVOICE_SPOTS = {
+ send: { x: 524, y: 360, w: 128, h: 34 },
+ email: { x: 326, y: 140, w: 160, h: 20 },
+ bank: { x: 172, y: 317, w: 176, h: 24 },
+ total: { x: 540, y: 276, w: 112, h: 28 },
+} as const;
+
+const NAV = ["Overview", "Invoices", "Clients", "Payments", "Settings"];
+
+const Field = ({
+ label,
+ value,
+ style,
+ valueStyle,
+}: {
+ label: string;
+ value: ReactNode;
+ style?: CSSProperties;
+ valueStyle?: CSSProperties;
+}) => (
+ <div className="absolute" style={style}>
+ <div className="text-[10.5px] font-medium text-[#8A8F98]">{label}</div>
+ <div
+ className="mt-1 text-[13.5px] font-medium text-[#1C1D21]"
+ style={valueStyle}
+ >
+ {value}
+ </div>
+ </div>
+);
+
+/**
+ * A browser window's top bar in the visitor's OS: traffic lights and a
+ * centred address on macOS, an address bar and caption buttons on Windows.
+ */
+export const BrowserBar = ({
+ url,
+ className,
+ small,
+}: {
+ url: string;
+ className?: string;
+ small?: boolean;
+}) => {
+ const windows = useIsWindowsDemo();
+ const pill = classNames(
+ "flex items-center rounded-md bg-white text-[#6B7079] shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",
+ small ? "h-[20px] text-[10.5px]" : "h-[22px] text-[11px]",
+ );
+ if (windows) {
+ return (
+ <div
+ className={classNames(
+ "flex items-stretch border-b border-[#E5E5E5] bg-[#F3F3F3]",
+ className,
+ )}
+ style={{ fontFamily: OS_FONT.windows }}
+ >
+ <div className="flex flex-1 items-center gap-2 pl-3">
+ <span
+ className={classNames(
+ pill,
+ "rounded-full px-3",
+ small ? "w-[230px]" : "w-[270px]",
+ )}
+ >
+ {url}
+ </span>
+ </div>
+ <WindowsCaptionControls className="scale-90" />
+ </div>
+ );
+ }
+ return (
+ <div
+ className={classNames(
+ "flex items-center border-b border-[#ECEDF0] bg-[#F7F7F8]",
+ small ? "px-3" : "px-3.5",
+ className,
+ )}
+ >
+ <TrafficLights size={small ? 9 : 10} />
+ <div
+ className={classNames(
+ pill,
+ "mx-auto justify-center",
+ small ? "w-[240px]" : "w-[260px]",
+ )}
+ >
+ {url}
+ </div>
+ <div className={small ? "w-[40px]" : "w-[46px]"} />
+ </div>
+ );
+};
+
+/** An app window's title bar with the visitor's OS window controls. */
+export const AppBar = ({
+ children,
+ className,
+ dark,
+}: {
+ children: ReactNode;
+ className?: string;
+ dark?: boolean;
+}) => {
+ const windows = useIsWindowsDemo();
+ return (
+ <div className={classNames("flex items-stretch", className)}>
+ {windows ? null : (
+ <span className="flex items-center pl-4 pr-1">
+ <TrafficLights size={dark ? 12 : 10} />
+ </span>
+ )}
+ <div
+ className="flex min-w-0 flex-1 items-center gap-3 px-3"
+ style={windows ? { fontFamily: OS_FONT.windows } : undefined}
+ >
+ {children}
+ </div>
+ {windows ? <WindowsCaptionControls light={dark} /> : null}
+ </div>
+ );
+};
+
+export const InvoicePage = ({
+ sent = 0,
+ press = 0,
+ emailStyle,
+ chrome = true,
+}: {
+ /** 0..1 how far the button has flipped to its sent state. */
+ sent?: number;
+ press?: number;
+ emailStyle?: CSSProperties;
+ chrome?: boolean;
+}) => (
+ <div
+ className="relative overflow-hidden bg-white text-[#1C1D21]"
+ style={{ width: INVOICE.w, height: INVOICE.h, fontWeight: 500 }}
+ >
+ {chrome ? (
+ <BrowserBar
+ url="ledgerly.app/invoices/new"
+ className="absolute inset-x-0 top-0 h-9"
+ />
+ ) : null}
+
+ <div
+ className="absolute bottom-0 left-0 w-[150px] border-r border-[#ECEDF0] bg-[#FAFAFB] px-3 pt-4"
+ style={{ top: chrome ? 36 : 0 }}
+ >
+ <div className="flex items-center gap-2 px-2 text-[13px] font-semibold">
+ <span className="grid size-[18px] place-items-center rounded-[5px] bg-[#1C1D21] text-[10px] text-white">
+ L
+ </span>
+ Ledgerly
+ </div>
+ <div className="mt-4 flex flex-col gap-0.5">
+ {NAV.map((item) => (
+ <div
+ key={item}
+ className={classNames(
+ "rounded-md px-2 py-[5px] text-[12px]",
+ item === "Invoices"
+ ? "bg-[#EDEEF1] text-[#1C1D21]"
+ : "text-[#6B7079]",
+ )}
+ >
+ {item}
+ </div>
+ ))}
+ </div>
+ </div>
+
+ <div
+ className="absolute right-0 bottom-0 left-[150px]"
+ style={{ top: chrome ? 36 : 0 }}
+ >
+ <div className="absolute left-7 top-[18px] text-[11px] text-[#8A8F98]">
+ Invoices <span className="px-1 text-[#C2C5CC]">/</span> New invoice
+ </div>
+ <div className="absolute left-7 top-[38px] text-[21px] font-semibold tracking-[-0.02em]">
+ Invoice #1042
+ </div>
+ <div className="absolute right-7 top-[42px] rounded-full bg-[#F1F2F4] px-2.5 py-[3px] text-[11px] text-[#6B7079]">
+ {sent > 0.5 ? "Sent" : "Draft"}
+ </div>
+
+ <Field
+ label="Bill to"
+ value="Northwind Labs"
+ style={{ left: 28, top: 88 }}
+ />
+ <Field
+ label="Email"
+ style={{ left: 180, top: 88 }}
+ valueStyle={emailStyle}
+ />
+ <Field label="Due" value="Nov 14, 2026" style={{ left: 378, top: 88 }} />
+
+ <div className="absolute inset-x-7 top-[146px] flex border-b border-[#ECEDF0] pb-1.5 text-[10.5px] text-[#8A8F98]">
+ <span className="flex-1">Item</span>
+ <span className="w-12 text-right">Qty</span>
+ <span className="w-24 text-right">Amount</span>
+ </div>
+ {[
+ ["Design retainer, October", "1", "$3,600.00"],
+ ["Usability study", "1", "$600.00"],
+ ].map(([item, qty, amount], i) => (
+ <div
+ key={item}
+ className="absolute inset-x-7 flex border-b border-[#F2F3F5] py-2 text-[12.5px]"
+ style={{ top: 172 + i * 33 }}
+ >
+ <span className="flex-1">{item}</span>
+ <span className="w-12 text-right text-[#6B7079]">{qty}</span>
+ <span className="w-24 text-right tabular-nums">{amount}</span>
+ </div>
+ ))}
+ <div className="absolute right-7 top-[244px] flex items-baseline gap-6 text-[12.5px]">
+ <span className="text-[#8A8F98]">Total</span>
+ <span className="text-[17px] font-semibold tabular-nums">
+ $4,200.00
+ </span>
+ </div>
+
+ <Field
+ label="Pay to"
+ value="Ledgerly Bank •••• 4821"
+ style={{ left: 28, top: 268 }}
+ />
+
+ <div
+ className="absolute right-7 top-[324px] flex h-[34px] w-[128px] items-center justify-center rounded-[9px] text-[12.5px] text-white"
+ style={{
+ background: sent > 0.5 ? "#16A34A" : "#2563EB",
+ transform: `scale(${1 - press * 0.05})`,
+ boxShadow: "0 1px 2px rgba(0,0,0,0.12)",
+ transition: "background 250ms",
+ }}
+ >
+ {sent > 0.5 ? "Sent to client" : "Send invoice"}
+ </div>
+ </div>
+ </div>
+);
+
+export const Webcam = ({
+ playing,
+ className,
+ style,
+}: {
+ playing: boolean;
+ className?: string;
+ style?: CSSProperties;
+}) => {
+ const ref = useRef<HTMLVideoElement | null>(null);
+ useVideo(playing, ref);
+ const attrs = useVideoAttrs(PRESENTER.poster);
+ return (
+ <div
+ className={classNames("overflow-hidden bg-[#CFC6B8]", className)}
+ style={style}
+ >
+ <video
+ ref={ref}
+ muted
+ loop
+ playsInline
+ {...attrs}
+ className="size-full object-cover object-[50%_30%]"
+ >
+ <PresenterSources />
+ </video>
+ </div>
+ );
+};
+
+export const Cursor = ({
+ x,
+ y,
+ size = 26,
+ opacity = 1,
+}: {
+ x: number;
+ y: number;
+ size?: number;
+ opacity?: number;
+}) => {
+ const windows = useIsWindowsDemo();
+ // Arrow tips: (4, 3.3) in the 17x24 macOS art, (3.3, 3.75) in the 18x25
+ // Windows art, so the hotspot lands exactly on (x, y) for either.
+ const ratio = windows ? 18 / 25 : 17 / 24;
+ const tip = windows
+ ? { x: 3.3 / 25, y: 3.75 / 25 }
+ : { x: 4 / 24, y: 3.3 / 24 };
+ return (
+ <div
+ className="pointer-events-none absolute left-0 top-0 z-30"
+ style={{
+ width: size * ratio,
+ height: size,
+ transform: `translate(${x - size * tip.x}px, ${y - size * tip.y}px)`,
+ opacity,
+ filter: "drop-shadow(0 1px 1.5px rgba(0,0,0,0.45))",
+ }}
+ >
+ {windows ? (
+ <WindowsCursor className="block size-full" />
+ ) : (
+ <MacCursor className="block size-full" />
+ )}
+ </div>
+ );
+};
+
+export const Ripple = ({
+ x,
+ y,
+ k,
+ color = "rgba(37,99,235,0.35)",
+}: {
+ x: number;
+ y: number;
+ /** 0..1 through the ripple, nothing drawn outside that range. */
+ k: number;
+ color?: string;
+}) =>
+ k <= 0 || k >= 1 ? null : (
+ <div
+ className="pointer-events-none absolute z-20 rounded-full"
+ style={{
+ left: x - 22,
+ top: y - 22,
+ width: 44,
+ height: 44,
+ background: color,
+ transform: `scale(${0.4 + k * 1.1})`,
+ opacity: 1 - k,
+ }}
+ />
+ );
+
+/** 1280px copies of the editor wallpapers (~60 KB each), sized for the stages. */
+export const WALLPAPERS = {
+ sf: "/backgrounds/landing/sf.webp",
+ santorini: "/backgrounds/landing/santorini.webp",
+ london: "/backgrounds/landing/london.webp",
+ miami: "/backgrounds/landing/miami.webp",
+ monaco: "/backgrounds/landing/monaco.webp",
+ nyc: "/backgrounds/landing/nyc.webp",
+ rome: "/backgrounds/landing/rome.webp",
+} as const;
+
+/** 112px thumbnails for swatches, so a picker never pulls the full images. */
+export const thumbOf = (src: string) => src.replace(/\.webp$/, "-thumb.webp");
+
+export const Wallpaper = ({
+ src,
+ opacity = 1,
+}: {
+ src: string;
+ opacity?: number;
+}) => (
+ <div
+ className="absolute inset-0 bg-cover bg-center"
+ style={{ backgroundImage: `url(${src})`, opacity }}
+ />
+);
+
+/** A label chip in the corner of an output frame, like the editor's own. */
+export const FrameChip = ({
+ children,
+ className,
+ style,
+}: {
+ children: ReactNode;
+ className?: string;
+ style?: CSSProperties;
+}) => (
+ <div
+ className={classNames(
+ "absolute z-20 rounded-full bg-[rgba(17,17,17,0.72)] px-3 py-1.5 text-[13px] text-white backdrop-blur-md",
+ className,
+ )}
+ style={style}
+ >
+ {children}
+ </div>
+);
diff --git a/apps/web/components/pages/HomeTwo/studio/StudioFeatures.tsx b/apps/web/components/pages/HomeTwo/studio/StudioFeatures.tsx
deleted file mode 100644
index 4081c94a4..000000000
--- a/apps/web/components/pages/HomeTwo/studio/StudioFeatures.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-"use client";
-
-import { useRef } from "react";
-import { Eyebrow } from "../Eyebrow";
-import { Fit, LazyMount } from "../scenes/engine";
-import { BAND, BODY_TEXT, grainBg, H_SECTION, MODE_THEME } from "../theme";
-import { useInView, useReducedMotion } from "../visibility";
-import { CARDS_A, CARDS_B } from "./catalog";
-import { CANVAS, type StudioCard } from "./shared";
-
-const ORDER = [
- "mask",
- "scenes",
- "zoom",
- "captions",
- "text",
- "three-d",
- "canvas",
- "grades",
- "clips",
-];
-const ALL = [...CARDS_A, ...CARDS_B];
-const CARDS = ORDER.flatMap((key) => {
- const card = ALL.find((item) => item.key === key);
- return card ? [card] : [];
-});
-
-const Card = ({ card }: { card: StudioCard }) => {
- const ref = useRef<HTMLLIElement | null>(null);
- const inView = useInView(ref, "-5% 0px -5% 0px");
- const reduced = useReducedMotion();
- return (
- <li
- ref={ref}
- className="flex flex-col rounded-[18px] p-1.5 shadow-[0_0_0_1px_rgba(17,17,17,0.05)] md:last:col-span-2 lg:last:col-span-1"
- style={grainBg(BAND)}
- >
- <div className="overflow-hidden rounded-[13px] shadow-[0_0_0_1px_rgba(17,17,17,0.06)]">
- <LazyMount w={CANVAS.w} h={CANVAS.h} grow>
- <Fit w={CANVAS.w} h={CANVAS.h} grow>
- <card.Visual playing={inView && !reduced} />
- </Fit>
- </LazyMount>
- </div>
- <div className="px-3.5 pb-3.5 pt-3.5">
- <h3 className="text-[17px] font-medium leading-[1.2] tracking-[-0.02em] text-[#111111]">
- {card.title}
- </h3>
- <p
- className={`${BODY_TEXT} mt-1.5 text-[14px] leading-[1.5] text-[rgba(17,17,17,0.68)]`}
- >
- {card.body}
- </p>
- </div>
- </li>
- );
-};
-
-export const StudioFeatures = () => (
- <section className="px-5 py-16 lg:py-24">
- <div className="mx-auto max-w-[1200px]">
- <div className="mx-auto flex max-w-[720px] flex-col items-center text-center">
- <Eyebrow accent={MODE_THEME.studio.accent}>
- Studio Mode · The editor
- </Eyebrow>
- <h2
- className={`${H_SECTION} mt-6 text-balance text-[clamp(34px,4.4vw,48px)]`}
- >
- Polish it before anyone sees it
- </h2>
- <p
- className={`${BODY_TEXT} mt-5 max-w-[560px] text-balance text-[16px] leading-[1.5] text-[rgba(17,17,17,0.78)] sm:text-[17px]`}
- >
- Studio Mode opens straight into an editor made for screen recordings.
- Blur what is private, switch scenes between screen and camera, add
- text and captions, grade the color, and export in 4K or as a link.
- </p>
- </div>
-
- <ul className="mt-10 grid gap-3 md:grid-cols-2 lg:grid-cols-3">
- {CARDS.map((card) => (
- <Card key={card.key} card={card} />
- ))}
- </ul>
- </div>
- </section>
-);
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/canvas.tsx b/apps/web/components/pages/HomeTwo/studio/cards/canvas.tsx
deleted file mode 100644
index 5c3971fc5..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/canvas.tsx
+++ /dev/null
@@ -1,428 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import Image from "next/image";
-import { useRef } from "react";
-import { useCursor, useSceneState, type Way } from "../../scenes/engine";
-import {
- Chip,
- ED,
- EditorButton,
- Ground,
- Panel,
- RecordedWindow,
- Segmented,
- Slider,
- useLoop,
-} from "../shared";
-
-const SOURCES = [
- "Desktop",
- "Wallpaper",
- "Image",
- "Color",
- "Gradient",
- "Animated",
-] as const;
-const CATEGORIES = ["macOS", "Dark", "Blue", "Cities", "Purple", "Orange"];
-const CITIES = ["liverpool", "santorini", "miami", "monaco", "london", "rome"];
-const GRADIENTS = [
- "linear-gradient(135deg, #FF7E5F 0%, #FEB47B 100%)",
- "linear-gradient(135deg, #667EEA 0%, #764BA2 100%)",
- "linear-gradient(135deg, #43CEA2 0%, #185A9D 100%)",
- "linear-gradient(135deg, #F857A6 0%, #FF5858 100%)",
- "linear-gradient(135deg, #1FA2FF 0%, #12D8FA 55%, #A6FFCB 100%)",
- "linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%)",
-];
-
-const WALL_FROM = 3;
-const WALL_TO = 1;
-const GRADIENT_TO = 1;
-
-const DURATION = 10000;
-const WALL_AT = 1400;
-const GRADIENT_AT = 3600;
-const SWATCH_AT = 4600;
-const BROWSER_AT = 5800;
-const MACBOOK_AT = 7600;
-const UNFRAME_AT = 9400;
-
-const S = 1.15;
-const PANEL = { left: 12, top: 211, w: 500, pad: 12 } as const;
-const ROW = { pill: 12, chips: 52, grid: 84 } as const;
-const THUMB = { w: 34, h: 34, gap: 6 } as const;
-const RESULT = { w: 336, h: 189, left: 114, top: 12 } as const;
-const WIN_SCALE = 0.46;
-const WIN = {
- left: Math.round((RESULT.w - 360 * WIN_SCALE) / 2),
- top: 46,
-} as const;
-
-const toCanvas = (x: number, y: number) => ({
- x: PANEL.left + x * S,
- y: PANEL.top + y * S,
-});
-const thumbCenter = (i: number) =>
- toCanvas(
- PANEL.pad + i * (THUMB.w + THUMB.gap) + THUMB.w / 2,
- ROW.grid + THUMB.h / 2,
- );
-const pillCenter = (i: number) => {
- const inner = PANEL.w - PANEL.pad * 2 - 4;
- const item = (inner - 10) / 6;
- return toCanvas(PANEL.pad + 2 + item * (i + 0.5) + 2 * i, ROW.pill + 15);
-};
-
-const PATH: Way[] = [
- { t: 0, x: 380, y: 130 },
- { t: WALL_AT - 500, ...thumbCenter(WALL_TO) },
- { t: WALL_AT, ...thumbCenter(WALL_TO), click: true },
- { t: GRADIENT_AT - 600, ...pillCenter(4) },
- { t: GRADIENT_AT, ...pillCenter(4), click: true },
- { t: SWATCH_AT - 400, ...thumbCenter(GRADIENT_TO) },
- { t: SWATCH_AT, ...thumbCenter(GRADIENT_TO), click: true },
- { t: SWATCH_AT + 900, x: 470, y: 150 },
- { t: DURATION, x: 470, y: 150 },
-];
-
-type Frame = "none" | "browser" | "macbook";
-
-const uiAt = (t: number) => {
- const source = t >= GRADIENT_AT ? "Gradient" : "Wallpaper";
- const wall = t >= WALL_AT ? WALL_TO : WALL_FROM;
- const gradient = t >= SWATCH_AT ? GRADIENT_TO : 0;
- const frame: Frame =
- t >= UNFRAME_AT
- ? "none"
- : t >= MACBOOK_AT
- ? "macbook"
- : t >= BROWSER_AT
- ? "browser"
- : "none";
- return { source, wall, gradient, frame };
-};
-
-const title = (city: string) => city.charAt(0).toUpperCase() + city.slice(1);
-
-const MiniField = ({
- label,
- value,
- fill,
-}: {
- label: string;
- value: string;
- fill: number;
-}) => (
- <div className="flex h-[26px] items-center gap-2">
- <span
- className="w-[54px] shrink-0 text-[13px] font-normal"
- style={{ color: ED.text1 }}
- >
- {label}
- </span>
- <div className="min-w-0 flex-1">
- <Slider fill={fill} />
- </div>
- <span
- className="min-w-8 text-right text-[11px] tabular-nums"
- style={{ color: ED.text3 }}
- >
- {value}
- </span>
- </div>
-);
-
-const Swatch = ({
- selected,
- children,
-}: {
- selected: boolean;
- children: React.ReactNode;
-}) => (
- <span
- className={classNames(
- "relative block overflow-hidden rounded-md transition-shadow duration-200",
- selected && "ring-2 ring-offset-2",
- )}
- style={{
- width: THUMB.w,
- height: THUMB.h,
- ["--tw-ring-color" as string]: ED.accent,
- ["--tw-ring-offset-color" as string]: ED.card,
- }}
- >
- {children}
- </span>
-);
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState(uiAt(0));
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 2400,
- tick: (t, seek) => {
- setUi(uiAt(t));
- cursor.tick(PATH, t, seek);
- },
- });
-
- const wallpaper = ui.source === "Wallpaper";
- const browser = ui.frame === "browser";
- const macbook = ui.frame === "macbook";
- const label =
- ui.frame === "browser"
- ? "Frame · Browser"
- : ui.frame === "macbook"
- ? "Frame · MacBook"
- : wallpaper
- ? `Wallpaper · ${title(CITIES[ui.wall] ?? "")}`
- : "Gradient";
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="light">
- <div
- className="absolute overflow-hidden rounded-[10px]"
- style={{
- left: RESULT.left,
- top: RESULT.top,
- width: RESULT.w,
- height: RESULT.h,
- boxShadow:
- "0 12px 32px -8px rgba(0,0,0,0.35), 0 0 0 0.5px rgba(0,0,0,0.12)",
- }}
- >
- {[WALL_FROM, WALL_TO].map((index) => (
- <Image
- key={CITIES[index]}
- src={`/backgrounds/${CITIES[index]}.webp`}
- alt=""
- fill
- sizes="336px"
- draggable={false}
- className="object-cover transition-opacity duration-700"
- style={{ opacity: wallpaper && ui.wall === index ? 1 : 0 }}
- />
- ))}
- <div
- className="absolute inset-0 transition-opacity duration-700"
- style={{
- background: GRADIENTS[ui.gradient],
- opacity: wallpaper ? 0 : 1,
- }}
- />
-
- <div
- className="absolute"
- style={{
- left: WIN.left,
- top: WIN.top,
- width: 360 * WIN_SCALE,
- height: 250 * WIN_SCALE,
- }}
- >
- <div
- className="absolute left-0 top-0"
- style={{
- width: 360,
- height: 250,
- transform: `scale(${WIN_SCALE})`,
- transformOrigin: "top left",
- }}
- >
- <div
- className="pointer-events-none absolute transition-[opacity,transform] duration-500"
- style={{
- left: -14,
- top: -14,
- right: -14,
- bottom: -14,
- borderRadius: 22,
- background:
- "linear-gradient(180deg, #2b2d33 0%, #101114 12%)",
- boxShadow:
- "inset 0 0 0 1px rgba(255,255,255,0.08), 0 30px 60px -30px rgba(9,12,20,0.7)",
- opacity: macbook ? 1 : 0,
- transform: macbook ? "scale(1)" : "scale(1.04)",
- }}
- />
- <div
- className="pointer-events-none absolute transition-opacity duration-500"
- style={{
- left: -48,
- right: -48,
- bottom: -26,
- height: 12,
- borderRadius: "0 0 14px 14px",
- background: "linear-gradient(180deg, #d7d9de, #9a9ea6)",
- boxShadow: "0 14px 30px -12px rgba(9,12,20,0.6)",
- opacity: macbook ? 1 : 0,
- }}
- />
- <div
- className="pointer-events-none absolute inset-x-0 flex items-center gap-2 px-3 transition-[opacity,transform] duration-500"
- style={{
- top: -34,
- height: 36,
- borderRadius: "10px 10px 0 0",
- background: "#f6f7f9",
- border: "1px solid rgba(0,0,0,0.08)",
- borderBottom: "none",
- opacity: browser ? 1 : 0,
- transform: browser ? "translateY(0)" : "translateY(10px)",
- }}
- >
- <span className="flex items-center gap-1.5">
- {["#FF5F57", "#FEBC2E", "#28C840"].map((color) => (
- <span
- key={color}
- className="size-[9px] rounded-full"
- style={{ background: color }}
- />
- ))}
- </span>
- <span
- className="ml-1 flex h-6 items-center rounded-t-md px-3 text-[10.5px] font-medium"
- style={{ background: "#ffffff", color: "#202020" }}
- >
- Dashboard
- </span>
- <span
- className="ml-auto flex h-5 w-[46%] items-center justify-center rounded-md text-[10px]"
- style={{
- background: "rgba(17,17,17,0.06)",
- color: "rgba(17,17,17,0.6)",
- }}
- >
- acme.com/dashboard
- </span>
- </div>
- <div
- className="absolute inset-0 overflow-hidden transition-[border-radius] duration-500"
- style={{
- borderRadius: 10,
- boxShadow: "0 24px 50px -20px rgba(9,12,20,0.6)",
- }}
- >
- <div
- className="absolute inset-x-0 transition-[top] duration-500"
- style={{ top: browser ? -40 : 0 }}
- >
- <RecordedWindow left={0} top={0} />
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div
- className="absolute z-20"
- style={{ left: RESULT.left + 10, top: RESULT.top + 6 }}
- >
- <Chip className="h-6">
- <span
- className="size-2 rounded-full"
- style={{ background: ED.accent }}
- />
- {label}
- </Chip>
- </div>
-
- <Panel
- className="z-30 gap-0"
- style={{
- left: PANEL.left,
- top: PANEL.top,
- width: PANEL.w,
- padding: PANEL.pad,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- <Segmented options={SOURCES} value={ui.source} />
-
- <div className="mt-2.5 flex h-6 items-center justify-between">
- {wallpaper ? (
- <div className="flex items-center gap-1">
- {CATEGORIES.map((category) => {
- const on = category === "Cities";
- return (
- <span
- key={category}
- className="flex h-6 items-center rounded-[7px] px-2.5 text-[12px] font-medium"
- style={{
- background: on ? ED.ctlHover : "transparent",
- color: on ? ED.text1 : ED.text2,
- }}
- >
- {category}
- </span>
- );
- })}
- </div>
- ) : (
- <>
- <span
- className="text-[12px] font-medium"
- style={{ color: ED.text2 }}
- >
- Presets
- </span>
- <EditorButton className="h-6 text-[12px]">
- Randomize
- </EditorButton>
- </>
- )}
- </div>
-
- <div className="mt-2 flex items-start gap-4">
- <div
- className="grid shrink-0 grid-cols-6"
- style={{ gap: THUMB.gap }}
- >
- {wallpaper
- ? CITIES.map((city, i) => (
- <Swatch key={city} selected={ui.wall === i}>
- <Image
- src={`/backgrounds/thumbs/${city}.webp`}
- alt=""
- width={THUMB.w}
- height={THUMB.h}
- draggable={false}
- className="h-full w-full object-cover"
- />
- </Swatch>
- ))
- : GRADIENTS.map((gradient, i) => (
- <Swatch key={gradient} selected={ui.gradient === i}>
- <span
- className="block h-full w-full"
- style={{ background: gradient }}
- />
- </Swatch>
- ))}
- </div>
- <div className="flex min-w-0 flex-1 flex-col">
- {wallpaper ? (
- <>
- <MiniField label="Padding" value="10%" fill={0.25} />
- <MiniField label="Corners" value="7.5%" fill={0.075} />
- </>
- ) : (
- <>
- <MiniField label="Angle" value="90°" fill={0.25} />
- <MiniField label="Noise" value="0" fill={0} />
- </>
- )}
- </div>
- </div>
- </Panel>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/captions.tsx b/apps/web/components/pages/HomeTwo/studio/cards/captions.tsx
deleted file mode 100644
index 3c65ac356..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/captions.tsx
+++ /dev/null
@@ -1,207 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { useRef } from "react";
-import { LucideChevronDown } from "../../demo/capIcons";
-import { useCursor, useSceneState, type Way } from "../../scenes/engine";
-import {
- ED,
- EditorButton,
- Field,
- Ground,
- Panel,
- RecordedWindow,
- Toggle,
- useLoop,
-} from "../shared";
-
-const WIN = { left: 10, top: 38, scale: 1.12 };
-const PANEL = { left: 368, top: 12, w: 196, scale: 1.1 };
-const LINES = [
- { start: 500, words: "Here is the new dashboard".split(" ") },
- { start: 4400, words: "Every card pulls live data".split(" ") },
-];
-const WORD_MS = 380;
-const TOGGLE_AT = 7600;
-const DURATION = 9000;
-const TOGGLE = {
- x: PANEL.left + 151 * PANEL.scale,
- y: PANEL.top + 283 * PANEL.scale,
-};
-
-const PATH: Way[] = [
- { t: 0, x: 300, y: 190 },
- { t: 6400, x: 300, y: 190 },
- { t: 7300, ...TOGGLE },
- { t: TOGGLE_AT, ...TOGGLE, click: true },
- { t: 8400, x: TOGGLE.x - 40, y: TOGGLE.y + 60 },
- { t: DURATION, x: TOGGLE.x - 40, y: TOGGLE.y + 60 },
-];
-
-const uiAt = (t: number) => {
- let line = 0;
- for (let i = 0; i < LINES.length; i++) {
- if (t >= (LINES[i]?.start ?? 0)) line = i;
- }
- const current = LINES[line];
- const elapsed = t - (current?.start ?? 0);
- const active = Math.min(
- (current?.words.length ?? 1) - 1,
- Math.floor(Math.max(0, elapsed) / WORD_MS),
- );
- return {
- line,
- active,
- shown: t >= (LINES[0]?.start ?? 0),
- exportOn: t >= TOGGLE_AT,
- };
-};
-
-const SelectBox = ({
- children,
- sub,
- right,
-}: {
- children: React.ReactNode;
- sub?: string;
- right?: string;
-}) => (
- <div
- className="flex items-center justify-between gap-2 rounded-lg px-2.5"
- style={{
- minHeight: sub ? 44 : 32,
- boxShadow: `inset 0 0 0 1px ${ED.lineStrong}`,
- background: ED.card,
- }}
- >
- <span className="flex min-w-0 flex-col leading-tight">
- <span className="text-[13px]" style={{ color: ED.text1 }}>
- {children}
- </span>
- {sub ? (
- <span
- className="whitespace-nowrap text-[10px]"
- style={{ color: ED.text3 }}
- >
- {sub}
- </span>
- ) : null}
- </span>
- <span className="flex shrink-0 items-center gap-1.5">
- {right ? (
- <span className="text-[11px] tabular-nums" style={{ color: ED.text3 }}>
- {right}
- </span>
- ) : null}
- <LucideChevronDown className="size-3.5" style={{ color: ED.text3 }} />
- </span>
- </div>
-);
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState(uiAt(0));
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 2200,
- tick: (t, seek) => {
- setUi(uiAt(t));
- cursor.tick(PATH, t, seek);
- },
- });
-
- const line = LINES[ui.line] ?? LINES[0];
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="light">
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
- <div
- className="pointer-events-none absolute rounded-[10px]"
- style={{
- left: WIN.left,
- top: WIN.top,
- width: 360 * WIN.scale,
- height: 250 * WIN.scale,
- background: "rgba(9,12,20,0.16)",
- }}
- />
-
- <div
- className="absolute z-20 flex items-center gap-x-1.5 whitespace-nowrap rounded-xl px-4 py-2 transition-opacity duration-300"
- style={{
- left: 22,
- top: 299,
- background: "rgba(17,17,17,0.74)",
- opacity: ui.shown ? 1 : 0,
- }}
- >
- {line?.words.map((word, i) => (
- <span
- key={`${ui.line}-${word}-${i}`}
- className={classNames(
- "rounded-md px-1.5 py-1 text-[20px] font-medium leading-none",
- i === ui.active ? "text-white" : "text-white/90",
- )}
- style={{ background: i === ui.active ? ED.accent : undefined }}
- >
- {word}
- </span>
- ))}
- </div>
-
- <div
- className="absolute z-30"
- style={{
- left: PANEL.left,
- top: PANEL.top,
- width: PANEL.w,
- transform: `scale(${PANEL.scale})`,
- transformOrigin: "top left",
- }}
- >
- <Panel className="left-0 top-0 w-full gap-3">
- <div className="flex min-h-[22px] items-center gap-1.5">
- <span
- className="text-[12px] font-medium"
- style={{ color: ED.text2 }}
- >
- Captions
- </span>
- <span
- className="rounded-full px-1.5 py-0.5 text-[10px] font-medium"
- style={{ background: ED.ctl, color: ED.text2 }}
- >
- Beta
- </span>
- </div>
- <Field label="Model">
- <SelectBox sub="parakeet-tdt-0.6b-v3 int8" right="~640MB">
- Recommended
- </SelectBox>
- </Field>
- <Field label="Language">
- <SelectBox>English</SelectBox>
- </Field>
- <EditorButton primary className="w-full justify-center">
- Generate Captions
- </EditorButton>
- <div className="flex items-center justify-between gap-3 pt-1">
- <span
- className="text-[13px] leading-tight"
- style={{ color: ED.text1 }}
- >
- Export with Subtitles
- </span>
- <Toggle on={ui.exportOn} />
- </div>
- </Panel>
- </div>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/clips.tsx b/apps/web/components/pages/HomeTwo/studio/cards/clips.tsx
deleted file mode 100644
index 495319452..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/clips.tsx
+++ /dev/null
@@ -1,322 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { useRef } from "react";
-import { CapAudioOn, CapClapperboard, LucidePlus } from "../../demo/capIcons";
-import {
- easeInOut,
- lerp,
- span,
- useCursor,
- useSceneState,
- type Way,
-} from "../../scenes/engine";
-import {
- CANVAS,
- ED,
- Ground,
- HUE,
- Lane,
- mix,
- Playhead,
- RULER_H,
- Ruler,
- Segment,
- SpeedChip,
- TRACK_GAP,
- TRACK_GUTTER,
- TRACK_H,
- TrackLabel,
- useLoop,
- Waveform,
-} from "../shared";
-
-const S = 1.5;
-const LOGICAL = { w: CANVAS.w / S, h: CANVAS.h / S };
-const INSET = 14;
-const PAD = 12;
-const CARD = {
- x: INSET,
- w: LOGICAL.w - INSET * 2,
- h: 10 + RULER_H + TRACK_GAP + TRACK_H + TRACK_GAP + TRACK_H + PAD,
-};
-const CARD_Y = Math.round((LOGICAL.h - CARD.h) / 2) + 4;
-const LANE_X = CARD.x + PAD + TRACK_GUTTER;
-const LANE_W = CARD.w - PAD * 2 - TRACK_GUTTER;
-const VIDEO_Y = CARD_Y + 10 + RULER_H + TRACK_GAP;
-const AUDIO_Y = VIDEO_Y + TRACK_H + TRACK_GAP;
-
-const DURATION = 10000;
-const CLIP_A = {
- start: Math.round(LANE_W * 0.48),
- trimmed: Math.round(LANE_W * 0.38),
-};
-const CLIP_B = {
- start: Math.round(LANE_W * 0.44),
- fast: Math.round(LANE_W * 0.32),
-};
-const JOIN = 4;
-const TRIM = { start: 2200, end: 3400 };
-const SPEED_AT = 3900;
-const FADE_AT = 5200;
-const AUDIO_AT = 6400;
-
-const g = (x: number, y: number) => ({ x: x * S, y: y * S });
-const mid = VIDEO_Y + TRACK_H / 2;
-
-const PATH: Way[] = [
- { t: 0, ...g(LANE_X + 40, CARD_Y - 6) },
- { t: 1900, ...g(LANE_X + CLIP_A.start + 1, mid) },
- { t: TRIM.start, ...g(LANE_X + CLIP_A.start + 1, mid) },
- { t: TRIM.end, ...g(LANE_X + CLIP_A.trimmed + 1, mid) },
- {
- t: SPEED_AT - 150,
- ...g(LANE_X + CLIP_A.trimmed + JOIN + CLIP_B.start - 22, mid),
- },
- {
- t: SPEED_AT,
- ...g(LANE_X + CLIP_A.trimmed + JOIN + CLIP_B.start - 22, mid),
- click: true,
- },
- { t: FADE_AT - 150, ...g(LANE_X + CLIP_A.trimmed + JOIN / 2, mid) },
- { t: FADE_AT, ...g(LANE_X + CLIP_A.trimmed + JOIN / 2, mid), click: true },
- { t: AUDIO_AT + 400, ...g(LANE_X + LANE_W - 24, AUDIO_Y + TRACK_H + 14) },
- { t: DURATION, ...g(LANE_X + LANE_W - 24, AUDIO_Y + TRACK_H + 14) },
-];
-
-const uiAt = (t: number) => ({
- trimmed: t >= TRIM.start + 400,
- speed: t >= SPEED_AT,
- fade: t >= FADE_AT,
- audio: t >= AUDIO_AT,
-});
-
-const widthsAt = (t: number) => {
- const trim = easeInOut(span(t, TRIM.start, TRIM.end));
- const a = lerp(CLIP_A.start, CLIP_A.trimmed, trim);
- const b = t >= SPEED_AT ? CLIP_B.fast : CLIP_B.start;
- return { a, b };
-};
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const clipARef = useRef<HTMLDivElement | null>(null);
- const clipBRef = useRef<HTMLDivElement | null>(null);
- const seamRef = useRef<HTMLDivElement | null>(null);
- const playheadRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState(uiAt(0));
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 7200,
- tick: (t, seek) => {
- setUi(uiAt(t));
- const { a, b } = widthsAt(t);
- if (clipARef.current) clipARef.current.style.width = `${a}px`;
- if (clipBRef.current) {
- clipBRef.current.style.left = `${a + JOIN}px`;
- clipBRef.current.style.width = `${b}px`;
- }
- if (seamRef.current) seamRef.current.style.left = `${a - 6}px`;
- const frac = (t % 3200) / 3200;
- const split = t >= SPEED_AT ? 0.66 : a / (a + b);
- const head =
- frac < split
- ? lerp(0, a, frac / split)
- : lerp(a + JOIN, a + JOIN + b, (frac - split) / (1 - split));
- if (playheadRef.current) {
- playheadRef.current.style.transform = `translateX(${head}px)`;
- }
- cursor.tick(PATH, t, seek);
- },
- });
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="chrome">
- <div
- className="absolute left-0 top-0"
- style={{
- width: LOGICAL.w,
- height: LOGICAL.h,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- <span
- className="absolute left-1/2 h-1 w-9 -translate-x-1/2 rounded-full"
- style={{ top: CARD_Y - 12, background: ED.lineStrong }}
- />
- <div
- className="absolute rounded-xl"
- style={{
- left: CARD.x,
- top: CARD_Y,
- width: CARD.w,
- height: CARD.h,
- background: ED.card,
- boxShadow: ED.cardShadow,
- }}
- />
-
- <div
- className="absolute flex items-end"
- style={{
- left: CARD.x + PAD,
- top: CARD_Y + 10,
- width: CARD.w - PAD * 2,
- }}
- >
- <div
- className="flex shrink-0 items-end pb-1"
- style={{ width: TRACK_GUTTER }}
- >
- <span
- className="inline-flex h-6 items-center gap-1 rounded-md pl-1.5 pr-2 text-[12px] font-medium"
- style={{ background: ED.ctl, color: ED.text2 }}
- >
- <LucidePlus className="size-3" />
- Add track
- </span>
- </div>
- <Ruler
- labels={["0:00", "0:05", "0:10", "0:15", "0:20", "0:25"]}
- span={5.6}
- />
- </div>
-
- <div
- className="absolute flex"
- style={{
- left: CARD.x + PAD,
- top: VIDEO_Y,
- width: CARD.w - PAD * 2,
- }}
- >
- <TrackLabel
- hue={HUE.clip}
- icon={<CapClapperboard className="size-3.5" />}
- >
- Clip
- </TrackLabel>
- <Lane>
- <Segment
- hue={HUE.clip}
- segmentRef={clipARef}
- label="Clip 1"
- sublabel={ui.trimmed ? undefined : "0:14"}
- trailing={<SpeedChip>1x</SpeedChip>}
- style={{ left: 0, width: CLIP_A.start }}
- >
- <Waveform from={0} to={34} />
- </Segment>
- <Segment
- hue={HUE.clip}
- segmentRef={clipBRef}
- label="Clip 2"
- sublabel={ui.speed ? undefined : "0:10"}
- trailing={
- <SpeedChip active={ui.speed}>
- {ui.speed ? "2x" : "1x"}
- </SpeedChip>
- }
- style={{ left: CLIP_A.start + JOIN, width: CLIP_B.start }}
- >
- <Waveform from={18} to={44} />
- </Segment>
- <div
- ref={seamRef}
- className={classNames(
- "pointer-events-none absolute inset-y-0 w-4 rounded-sm border-x transition-opacity duration-300",
- ui.fade ? "opacity-100" : "opacity-0",
- )}
- style={{
- left: CLIP_A.start - 6,
- borderColor: mix(ED.accent, 60, "transparent"),
- background: `repeating-linear-gradient(135deg, ${mix(ED.accent, 22, "transparent")} 0 3px, transparent 3px 6px)`,
- }}
- >
- <span
- className="absolute -top-[26px] left-1/2 -translate-x-1/2 whitespace-nowrap rounded-md px-1.5 py-0.5 text-[10px] font-medium"
- style={{
- background: ED.card,
- color: ED.text1,
- boxShadow: ED.popShadow,
- }}
- >
- Crossfade · 0.5s
- </span>
- </div>
- </Lane>
- </div>
-
- <div
- className="absolute flex"
- style={{
- left: CARD.x + PAD,
- top: AUDIO_Y,
- width: CARD.w - PAD * 2,
- }}
- >
- <TrackLabel
- hue={HUE.audio}
- icon={<CapAudioOn className="size-3.5" />}
- >
- Audio
- </TrackLabel>
- <Lane
- empty={ui.audio ? undefined : "Add audio, music or other sounds"}
- >
- <Segment
- hue={HUE.audio}
- label="Lofi Beats"
- sublabel="24s"
- className={classNames(
- "transition-[opacity,transform] duration-500",
- ui.audio
- ? "translate-y-0 opacity-100"
- : "translate-y-1 opacity-0",
- )}
- style={{ left: 0, width: LANE_W * 0.92 }}
- >
- <svg
- aria-hidden="true"
- className="pointer-events-none absolute inset-0 h-full w-full"
- viewBox="0 0 100 44"
- preserveAspectRatio="none"
- >
- <path
- d="M0 44 L0 40 L8 8 L92 8 L100 40 L100 44 Z"
- fill={mix(HUE.audio, 10, "transparent")}
- />
- <path
- d="M0 40 L8 8 L92 8 L100 40"
- fill="none"
- stroke={mix(HUE.audio, 55, "transparent")}
- strokeWidth="1"
- vectorEffect="non-scaling-stroke"
- />
- </svg>
- <Waveform color={mix(HUE.audio, 40, "transparent")} />
- </Segment>
- </Lane>
- </div>
-
- <div
- className="pointer-events-none absolute"
- style={{ left: LANE_X, top: VIDEO_Y - 12, width: LANE_W }}
- >
- <Playhead
- playheadRef={playheadRef}
- top={0}
- bottom={-(TRACK_H * 2 + TRACK_GAP + 12)}
- />
- </div>
- </div>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/grades.tsx b/apps/web/components/pages/HomeTwo/studio/cards/grades.tsx
deleted file mode 100644
index 2b8073297..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/grades.tsx
+++ /dev/null
@@ -1,328 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { useRef } from "react";
-import {
- easeOut,
- span,
- useCursor,
- useSceneState,
- type Way,
-} from "../../scenes/engine";
-import {
- CANVAS,
- ED,
- Field,
- Ground,
- Panel,
- RecordedWindow,
- SectionTitle,
- Slider,
- useLoop,
-} from "../shared";
-
-type Grade = { name: string; filter: string; tint: string };
-
-const GRADES: Grade[] = [
- { name: "None", filter: "none", tint: "transparent" },
- {
- name: "Cinematic",
- filter: "contrast(1.15) saturate(0.82) sepia(0.12)",
- tint: "rgba(24,52,92,0.18)",
- },
- {
- name: "Noir",
- filter: "grayscale(1) contrast(1.25) brightness(0.96)",
- tint: "rgba(0,0,0,0.08)",
- },
- {
- name: "Vintage",
- filter: "sepia(0.45) contrast(0.95) brightness(1.04) saturate(0.9)",
- tint: "rgba(255,196,120,0.16)",
- },
- {
- name: "Frost",
- filter: "saturate(0.75) brightness(1.06) hue-rotate(-8deg)",
- tint: "rgba(168,208,255,0.24)",
- },
- {
- name: "Golden",
- filter: "sepia(0.3) saturate(1.2) brightness(1.03)",
- tint: "rgba(255,186,74,0.2)",
- },
- {
- name: "Midnight",
- filter: "brightness(0.82) contrast(1.15) saturate(0.9) hue-rotate(12deg)",
- tint: "rgba(22,30,86,0.3)",
- },
- {
- name: "Vivid",
- filter: "saturate(1.55) contrast(1.08)",
- tint: "transparent",
- },
- {
- name: "Dreamy",
- filter: "brightness(1.08) contrast(0.88) saturate(1.15)",
- tint: "rgba(255,190,230,0.18)",
- },
-];
-
-const GROUND_GRADIENT =
- "linear-gradient(135deg, #C3DCF8 0%, #DACBF9 55%, #F6D9EC 100%)";
-
-const DURATION = 9600;
-const STOPS: { name: string; at: number }[] = [
- { name: "Cinematic", at: 1000 },
- { name: "Noir", at: 2400 },
- { name: "Golden", at: 3800 },
- { name: "Midnight", at: 5200 },
- { name: "Vivid", at: 6600 },
- { name: "Dreamy", at: 8000 },
-];
-const SWEEP = 900;
-const WIPE_MAX = 0.52;
-
-const WIN = { left: 10, top: 46, scale: 0.95 } as const;
-const S = 1.3;
-const PANEL = { w: 190, pad: 12 } as const;
-const PANEL_POS = { left: CANVAS.w - PANEL.w * S - 12, top: 18 } as const;
-const SWATCH = { w: 50, h: 28, gap: 8, label: 14 } as const;
-const GRID_TOP = PANEL.pad + 22 + 10;
-
-const swatchCenter = (index: number) => {
- const row = Math.floor(index / 3);
- const col = index % 3;
- return {
- x:
- PANEL_POS.left +
- (PANEL.pad + col * (SWATCH.w + SWATCH.gap) + SWATCH.w / 2) * S,
- y:
- PANEL_POS.top +
- (GRID_TOP + row * (SWATCH.h + SWATCH.label + SWATCH.gap) + SWATCH.h / 2) *
- S,
- };
-};
-
-const PATH: Way[] = [
- { t: 0, x: 300, y: 330 },
- ...STOPS.flatMap((stop) => {
- const point = swatchCenter(GRADES.findIndex((g) => g.name === stop.name));
- return [
- { t: stop.at - 220, ...point },
- { t: stop.at, ...point, click: true },
- ];
- }),
- { t: DURATION - 700, x: 290, y: 330 },
- { t: DURATION, x: 290, y: 330 },
-];
-
-const gradeAt = (t: number) => {
- let current = "None";
- for (const stop of STOPS) if (t >= stop.at) current = stop.name;
- return current;
-};
-
-const wipeAt = (t: number) => {
- let latest: (typeof STOPS)[number] | undefined;
- for (const stop of STOPS) if (t >= stop.at) latest = stop;
- if (!latest) return 0;
- return easeOut(span(t, latest.at, latest.at + SWEEP)) * WIPE_MAX;
-};
-
-const Scene = ({ grade }: { grade: Grade }) => (
- <span
- className="relative block overflow-hidden rounded-md"
- style={{
- width: SWATCH.w,
- height: SWATCH.h,
- background:
- "linear-gradient(160deg, #f7c27a 0%, #e98a9c 45%, #5a7fd8 100%)",
- filter: grade.filter,
- }}
- >
- <span
- className="absolute rounded-full"
- style={{
- left: 8,
- top: 6,
- width: 9,
- height: 9,
- background: "#fff4d6",
- boxShadow: "0 0 6px rgba(255,244,214,0.9)",
- }}
- />
- <span
- className="absolute inset-x-0 bottom-0"
- style={{ height: 9, background: "rgba(26,32,64,0.55)" }}
- />
- <span
- className="absolute inset-0"
- style={{ background: grade.tint, mixBlendMode: "multiply" }}
- />
- </span>
-);
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const gradedRef = useRef<HTMLDivElement | null>(null);
- const lineRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState({ grade: "None" });
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 4600,
- tick: (t, seek) => {
- setUi({ grade: gradeAt(t) });
- const wipe = wipeAt(t);
- if (gradedRef.current) {
- gradedRef.current.style.clipPath = `inset(0 ${(1 - wipe) * 100}% 0 0)`;
- }
- if (lineRef.current) {
- lineRef.current.style.transform = `translateX(${wipe * CANVAS.w}px)`;
- lineRef.current.style.opacity = wipe > 0.005 ? "1" : "0";
- }
- cursor.tick(PATH, t, seek);
- },
- });
-
- const grade = GRADES.find((item) => item.name === ui.grade) ?? GRADES[0];
- const graded = grade?.name !== "None";
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="gradient">
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
-
- <div
- ref={gradedRef}
- className="pointer-events-none absolute inset-0 transition-[filter] duration-500"
- style={{
- clipPath: "inset(0 100% 0 0)",
- filter: grade?.filter,
- }}
- >
- <div
- className="absolute inset-0"
- style={{ background: GROUND_GRADIENT }}
- />
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
- <div
- className="absolute inset-0 transition-[background-color] duration-500"
- style={{ background: grade?.tint, mixBlendMode: "multiply" }}
- />
- <div
- className="absolute inset-0"
- style={{
- background:
- "radial-gradient(85% 75% at 50% 50%, rgba(9,12,20,0) 55%, rgba(9,12,20,0.45) 100%)",
- }}
- />
- </div>
-
- <div
- ref={lineRef}
- className="pointer-events-none absolute inset-y-0 left-0 z-20 w-px opacity-0 transition-opacity duration-300 will-change-transform"
- style={{
- background: "rgba(255,255,255,0.95)",
- boxShadow: "0 0 0 1px rgba(0,0,0,0.12)",
- }}
- >
- <span
- className="absolute left-1/2 top-1/2 flex size-7 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full"
- style={{
- background: "#ffffff",
- boxShadow: "0 4px 14px rgba(0,0,0,0.25)",
- }}
- >
- <svg
- aria-hidden="true"
- viewBox="0 0 16 16"
- className="size-3"
- fill="none"
- stroke={ED.text1}
- strokeWidth="1.6"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M6 4 2 8l4 4M10 4l4 4-4 4" />
- </svg>
- </span>
- </div>
-
- <div
- className="absolute z-20 flex h-7 items-center gap-1.5 rounded-lg px-2.5 text-[12px] font-medium transition-opacity duration-300"
- style={{
- left: 20,
- top: 10,
- background: ED.card,
- color: ED.text1,
- boxShadow: ED.popShadow,
- opacity: graded ? 1 : 0,
- }}
- >
- <span
- className="size-2 rounded-full"
- style={{ background: ED.accent }}
- />
- {grade?.name}
- </div>
-
- <Panel
- className="z-30 gap-2.5"
- style={{
- left: PANEL_POS.left,
- top: PANEL_POS.top,
- width: PANEL.w,
- padding: PANEL.pad,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- <SectionTitle>Color correction</SectionTitle>
- <div
- className="grid grid-cols-3"
- style={{ gap: SWATCH.gap, rowGap: SWATCH.gap }}
- >
- {GRADES.map((item) => {
- const selected = ui.grade === item.name;
- return (
- <span
- key={item.name}
- className="flex flex-col items-start gap-0.5"
- >
- <span
- className={classNames(
- "rounded-md transition-shadow duration-200",
- selected && "ring-2 ring-offset-2",
- )}
- style={{
- boxShadow: selected
- ? undefined
- : `0 0 0 0.5px ${ED.line}`,
- ["--tw-ring-color" as string]: ED.accent,
- ["--tw-ring-offset-color" as string]: ED.card,
- }}
- >
- <Scene grade={item} />
- </span>
- <span
- className="text-[10px] leading-[14px]"
- style={{ color: selected ? ED.text1 : ED.text2 }}
- >
- {item.name}
- </span>
- </span>
- );
- })}
- </div>
- <Field label="Grain" value="0%">
- <Slider fill={0} />
- </Field>
- </Panel>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/mask.tsx b/apps/web/components/pages/HomeTwo/studio/cards/mask.tsx
deleted file mode 100644
index 50eaf7df3..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/mask.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-"use client";
-
-import { useRef } from "react";
-import {
- easeOut,
- lerp,
- span,
- useCursor,
- useSceneState,
- type Way,
-} from "../../scenes/engine";
-import { ED, Ground, RecordedWindow, Segmented, useLoop } from "../shared";
-
-const WIN = { left: 40, top: 44, scale: 1.45 };
-const MASK = {
- x: WIN.left + Math.round(72 * WIN.scale),
- y: WIN.top + Math.round(112 * WIN.scale),
- w: Math.round(268 * WIN.scale),
- h: Math.round(52 * WIN.scale),
-};
-const DURATION = 8200;
-const DRAG = { start: 600, end: 1700 };
-const BLUR_AT = 1900;
-const PIXELATE_AT = 3600;
-const HIGHLIGHT_AT = 5400;
-const KIND = ["Sensitive", "Highlight"] as const;
-const EFFECT = ["Blur", "Pixelate"] as const;
-const ITEM_W = 78;
-const CARD = { x: MASK.x, y: MASK.y + MASK.h + 12, pad: 8, gap: 12 };
-const kindCenter = (i: number) => ({
- x: CARD.x + CARD.pad + 2 + ITEM_W * (i + 0.5),
- y: CARD.y + CARD.pad + 2 + 13,
-});
-const EFFECT_X = CARD.x + CARD.pad + ITEM_W * 2 + 4 + CARD.gap + 46;
-const effectCenter = (i: number) => ({
- x: EFFECT_X + 2 + ITEM_W * (i + 0.5),
- y: CARD.y + CARD.pad + 2 + 13,
-});
-
-const PATH: Way[] = [
- { t: 0, x: MASK.x - 40, y: MASK.y - 30 },
- { t: DRAG.start, x: MASK.x, y: MASK.y },
- { t: DRAG.end, x: MASK.x + MASK.w, y: MASK.y + MASK.h },
- { t: BLUR_AT, x: MASK.x + MASK.w, y: MASK.y + MASK.h },
- { t: 3400, ...effectCenter(1) },
- { t: PIXELATE_AT, ...effectCenter(1), click: true },
- { t: 5200, ...kindCenter(1) },
- { t: HIGHLIGHT_AT, ...kindCenter(1), click: true },
- { t: 6600, x: MASK.x + MASK.w + 40, y: CARD.y + 70 },
- { t: DURATION, x: MASK.x + MASK.w + 40, y: CARD.y + 70 },
-];
-
-const PIXELS = Array.from({ length: 22 * 4 }, (_, i) => {
- const seed = Math.sin(i * 12.9898 + 4.1414) * 43758.5453;
- const v = seed - Math.floor(seed);
- const l = 62 + Math.floor(v * 30);
- return `hsl(216 22% ${l}%)`;
-});
-
-const HANDLES = [
- [0, 0],
- [0.5, 0],
- [1, 0],
- [0, 0.5],
- [1, 0.5],
- [0, 1],
- [0.5, 1],
- [1, 1],
-] as const;
-
-const uiAt = (t: number) => ({
- drawing: t >= DRAG.start && t < BLUR_AT,
- kind: t >= HIGHLIGHT_AT ? "Highlight" : t >= BLUR_AT ? "Sensitive" : null,
- effect: t >= PIXELATE_AT ? "Pixelate" : "Blur",
-});
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const boxRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState(uiAt(0));
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 4400,
- tick: (t, seek) => {
- setUi(uiAt(t));
- const drag = easeOut(span(t, DRAG.start, DRAG.end));
- if (boxRef.current) {
- boxRef.current.style.width = `${lerp(0, MASK.w, drag)}px`;
- boxRef.current.style.height = `${lerp(0, MASK.h, drag)}px`;
- boxRef.current.style.opacity = t >= DRAG.start ? "1" : "0";
- }
- cursor.tick(PATH, t, seek);
- },
- });
-
- const applied = ui.kind !== null;
- const highlight = ui.kind === "Highlight";
- const blur = applied && !highlight && ui.effect === "Blur";
- const pixelate = applied && !highlight && ui.effect === "Pixelate";
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="light">
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
-
- <div
- ref={boxRef}
- className="pointer-events-none absolute z-20 overflow-hidden rounded-md"
- style={{
- left: MASK.x,
- top: MASK.y,
- width: 0,
- height: 0,
- opacity: 0,
- border: `2px ${applied ? "solid" : "dashed"} #202020`,
- boxShadow: highlight
- ? "0 0 0 9999px rgba(9,12,20,0.5)"
- : "0 0 0 9999px rgba(9,12,20,0)",
- transition: "box-shadow 420ms ease",
- }}
- >
- <div
- className="absolute inset-0 transition-opacity duration-300"
- style={{
- opacity: blur ? 1 : 0,
- backdropFilter: "blur(10px) saturate(1.2)",
- WebkitBackdropFilter: "blur(10px) saturate(1.2)",
- background: "rgba(236,240,246,0.35)",
- }}
- />
- <div
- className="absolute inset-0 grid transition-opacity duration-300"
- style={{
- opacity: pixelate ? 1 : 0,
- gridTemplateColumns: "repeat(22, 1fr)",
- gridTemplateRows: "repeat(4, 1fr)",
- }}
- >
- {PIXELS.map((color, i) => (
- <span key={`${i}-${color}`} style={{ background: color }} />
- ))}
- </div>
- </div>
-
- {HANDLES.map(([fx, fy]) => (
- <span
- key={`${fx}-${fy}`}
- className="pointer-events-none absolute z-30 size-3 rounded-full border border-white transition-opacity duration-300"
- style={{
- left: MASK.x + MASK.w * fx - 6,
- top: MASK.y + MASK.h * fy - 6,
- background: "#202020",
- opacity: applied ? 1 : 0,
- }}
- />
- ))}
-
- <div
- className="absolute z-30 flex items-center rounded-xl transition-[opacity,transform] duration-300"
- style={{
- left: CARD.x,
- top: CARD.y,
- padding: CARD.pad,
- gap: CARD.gap,
- background: ED.card,
- boxShadow: ED.popShadow,
- opacity: applied ? 1 : 0,
- transform: applied ? "translateY(0)" : "translateY(6px)",
- }}
- >
- <Segmented options={KIND} value={ui.kind} itemWidth={ITEM_W} />
- <div className="flex items-center gap-2">
- <span
- className="text-[12px] font-medium"
- style={{ color: ED.text2 }}
- >
- Effect
- </span>
- <Segmented
- options={EFFECT}
- value={ui.effect}
- itemWidth={ITEM_W}
- disabled={highlight}
- />
- </div>
- </div>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/scenes.tsx b/apps/web/components/pages/HomeTwo/studio/cards/scenes.tsx
deleted file mode 100644
index 83fdf1569..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/scenes.tsx
+++ /dev/null
@@ -1,302 +0,0 @@
-"use client";
-
-import { useRef } from "react";
-import { LucideVideo } from "../../demo/capIcons";
-import { useVideoAttrs, VIDEO_POSTERS } from "../../demo/media";
-import {
- useCursor,
- useSceneState,
- useVideo,
- type Way,
-} from "../../scenes/engine";
-import {
- CANVAS,
- ED,
- Field,
- Ground,
- HUE,
- Lane,
- Panel,
- Playhead,
- RecordedWindow,
- Segment,
- Tile,
- TRACK_GUTTER,
- TRACK_H,
- TrackLabel,
- useLoop,
-} from "../shared";
-
-const MODES = [
- "Default",
- "Camera Only",
- "Hide Camera",
- "Split Screen",
- "Floating",
-] as const;
-type Mode = (typeof MODES)[number];
-const SEQUENCE: Mode[] = ["Default", "Camera Only", "Split Screen", "Floating"];
-const SLOT = 3000;
-const DURATION = SLOT * SEQUENCE.length;
-
-const FRAME = { left: 16, top: 48, w: 306, h: 172 };
-const SCREEN = { w: 278, h: 150 };
-const PANEL = { left: 338, top: 44, w: 196, scale: 1.25 };
-
-type Box = {
- left: number;
- top: number;
- w: number;
- h: number;
- r: number;
- opacity: number;
-};
-
-const LAYOUT: Record<Mode, { screen: Box & { scale: number }; camera: Box }> = {
- Default: {
- screen: { left: 14, top: 11, w: 278, h: 150, r: 8, opacity: 1, scale: 1 },
- camera: { left: 12, top: 80, w: 80, h: 80, r: 40, opacity: 1 },
- },
- "Camera Only": {
- screen: { left: 14, top: 11, w: 278, h: 150, r: 8, opacity: 0, scale: 1 },
- camera: { left: 0, top: 0, w: FRAME.w, h: FRAME.h, r: 8, opacity: 1 },
- },
- "Hide Camera": {
- screen: { left: 14, top: 11, w: 278, h: 150, r: 8, opacity: 1, scale: 1 },
- camera: { left: 12, top: 80, w: 80, h: 80, r: 40, opacity: 0 },
- },
- "Split Screen": {
- screen: {
- left: 8,
- top: 22,
- w: 145,
- h: 128,
- r: 8,
- opacity: 1,
- scale: 128 / SCREEN.h,
- },
- camera: { left: 153, top: 22, w: 145, h: 128, r: 8, opacity: 1 },
- },
- Floating: {
- screen: {
- left: 10,
- top: 35,
- w: 190,
- h: 102,
- r: 8,
- opacity: 1,
- scale: 190 / SCREEN.w,
- },
- camera: { left: 206, top: 40, w: 92, h: 92, r: 14, opacity: 1 },
- },
-};
-
-const EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
-const MOVE = `left 480ms ${EASE}, top 480ms ${EASE}, width 480ms ${EASE}, height 480ms ${EASE}, border-radius 480ms ${EASE}, opacity 320ms ease, transform 480ms ${EASE}`;
-
-const tileCenter = (mode: Mode) => {
- const i = MODES.indexOf(mode);
- const col = i % 2;
- const row = Math.floor(i / 2);
- const x = 16 + col * 86 + 39;
- const y = 43.5 + row * 38 + 15;
- return { x: PANEL.left + x * PANEL.scale, y: PANEL.top + y * PANEL.scale };
-};
-
-const PATH: Way[] = [
- { t: 0, ...tileCenter("Default") },
- { t: 150, ...tileCenter("Default"), click: true },
- { t: 1200, ...tileCenter("Default") },
- { t: SLOT - 300, ...tileCenter("Camera Only") },
- { t: SLOT, ...tileCenter("Camera Only"), click: true },
- { t: SLOT + 1200, ...tileCenter("Camera Only") },
- { t: SLOT * 2 - 300, ...tileCenter("Split Screen") },
- { t: SLOT * 2, ...tileCenter("Split Screen"), click: true },
- { t: SLOT * 2 + 1200, ...tileCenter("Split Screen") },
- { t: SLOT * 3 - 300, ...tileCenter("Floating") },
- { t: SLOT * 3, ...tileCenter("Floating"), click: true },
- { t: SLOT * 3 + 1200, ...tileCenter("Floating") },
- { t: DURATION - 300, ...tileCenter("Default") },
- { t: DURATION, ...tileCenter("Default") },
-];
-
-const modeAt = (t: number): Mode =>
- SEQUENCE[Math.min(SEQUENCE.length - 1, Math.floor(t / SLOT))] ?? "Default";
-
-const S = 1.15;
-const LOGICAL = { w: CANVAS.w / S, h: CANVAS.h / S };
-const STRIP = { left: 12, top: 254, pad: 8 };
-const STRIP_W = LOGICAL.w - STRIP.left * 2;
-const LANE_W = STRIP_W - STRIP.pad * 2 - TRACK_GUTTER;
-
-const CameraPane = ({ playing, box }: { playing: boolean; box: Box }) => {
- const ref = useRef<HTMLVideoElement | null>(null);
- const attrs = useVideoAttrs(VIDEO_POSTERS.webcam);
- useVideo(playing, ref);
- return (
- <div
- className="absolute overflow-hidden bg-[#111111]"
- style={{
- left: box.left,
- top: box.top,
- width: box.w,
- height: box.h,
- borderRadius: box.r,
- opacity: box.opacity,
- boxShadow: "0 14px 34px rgba(0,0,0,0.28)",
- transition: MOVE,
- }}
- >
- <video
- ref={ref}
- className="h-full w-full object-cover"
- src="/videos/home-two/webcam.mp4"
- muted
- loop
- playsInline
- {...attrs}
- />
- </div>
- );
-};
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const playheadRef = useRef<HTMLDivElement | null>(null);
- const [mode, setMode] = useSceneState<Mode>("Default");
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 7000,
- tick: (t, seek) => {
- setMode(modeAt(t));
- if (playheadRef.current) {
- playheadRef.current.style.transform = `translateX(${(t / DURATION) * LANE_W}px)`;
- }
- cursor.tick(PATH, t, seek);
- },
- });
-
- const layout = LAYOUT[mode];
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="light">
- <div
- className="absolute overflow-hidden rounded-lg"
- style={{
- left: FRAME.left,
- top: FRAME.top,
- width: FRAME.w,
- height: FRAME.h,
- background:
- "linear-gradient(135deg, #C3DCF8 0%, #DACBF9 55%, #F6D9EC 100%)",
- boxShadow:
- "0 12px 32px -8px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(0,0,0,0.12)",
- }}
- >
- <div
- className="absolute overflow-hidden"
- style={{
- left: layout.screen.left,
- top: layout.screen.top,
- width: layout.screen.w,
- height: layout.screen.h,
- borderRadius: layout.screen.r,
- opacity: layout.screen.opacity,
- transform: layout.screen.opacity ? "scale(1)" : "scale(0.94)",
- boxShadow: "0 18px 40px rgba(0,0,0,0.22)",
- transition: MOVE,
- }}
- >
- <RecordedWindow
- left={0}
- top={0}
- width={SCREEN.w}
- height={SCREEN.h}
- scale={layout.screen.scale}
- style={{ transition: `transform 480ms ${EASE}` }}
- />
- </div>
- <CameraPane playing={playing} box={layout.camera} />
- </div>
-
- <div
- className="absolute"
- style={{
- left: PANEL.left,
- top: PANEL.top,
- width: PANEL.w,
- transform: `scale(${PANEL.scale})`,
- transformOrigin: "top left",
- }}
- >
- <Panel className="left-0 top-0 w-full">
- <Field label="Camera Layout">
- <div className="grid grid-cols-2 gap-2">
- {MODES.map((item) => (
- <Tile
- key={item}
- selected={mode === item}
- className="overflow-hidden px-1"
- >
- {item}
- </Tile>
- ))}
- </div>
- </Field>
- </Panel>
- </div>
-
- <div
- className="absolute left-0 top-0"
- style={{
- width: LOGICAL.w,
- height: LOGICAL.h,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- <div
- className="absolute flex rounded-xl"
- style={{
- left: STRIP.left,
- top: STRIP.top,
- width: STRIP_W,
- padding: STRIP.pad,
- background: ED.card,
- boxShadow: ED.cardShadow,
- }}
- >
- <TrackLabel
- hue={HUE.scene}
- icon={<LucideVideo className="size-3.5" />}
- >
- Scene
- </TrackLabel>
- <Lane>
- {SEQUENCE.map((item, i) => (
- <Segment
- key={item}
- hue={HUE.scene}
- label={item}
- selected={mode === item}
- style={{
- left: `calc(${(i / SEQUENCE.length) * 100}% + ${i ? 3 : 0}px)`,
- width: `calc(${100 / SEQUENCE.length}% - 3px)`,
- }}
- />
- ))}
- <Playhead playheadRef={playheadRef} top={-6} bottom={0} />
- </Lane>
- </div>
- </div>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
-
-export const SCENE_TRACK_H = TRACK_H;
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/text.tsx b/apps/web/components/pages/HomeTwo/studio/cards/text.tsx
deleted file mode 100644
index 0f445b305..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/text.tsx
+++ /dev/null
@@ -1,256 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import { useRef } from "react";
-import { easeOut, lerp, span, typed, useSceneState } from "../../scenes/engine";
-import { Chip, ED, Ground, RecordedWindow, useLoop } from "../shared";
-
-const WIN = { left: 120, top: 12, scale: 1 };
-const DURATION = 10000;
-const LOWER = { enter: 400, exit: 2900 };
-const STAT = { enter: 3700, exit: 6100 };
-const TYPE = { enter: 6600, exit: 9400 };
-const TYPEWRITER_TEXT = "Try the new flow →";
-
-const TEMPLATES = [
- "Title",
- "Lower Third",
- "Kicker",
- "Big Stat",
- "Quote",
- "Typewriter",
-] as const;
-type Template = (typeof TEMPLATES)[number];
-
-const ROW = { left: 16, top: 282, scale: 1.2, card: 73, gap: 8 };
-
-const activeAt = (t: number): { template: Template; anim: string } | null =>
- t >= TYPE.enter - 100 && t < TYPE.exit + 300
- ? { template: "Typewriter", anim: "Typewriter" }
- : t >= STAT.enter - 100 && t < STAT.exit + 300
- ? { template: "Big Stat", anim: "Pop" }
- : t >= LOWER.enter - 100 && t < LOWER.exit + 300
- ? { template: "Lower Third", anim: "Slide up" }
- : null;
-
-const Sample = ({ template }: { template: Template }) => {
- switch (template) {
- case "Title":
- return <span className="text-[16px] font-bold text-white">Title</span>;
- case "Lower Third":
- return (
- <span className="flex items-stretch gap-1.5">
- <span className="w-[2px] rounded-full bg-[#8FC1F7]" />
- <span className="whitespace-nowrap text-[10px] font-semibold leading-none text-white">
- Lower third
- </span>
- </span>
- );
- case "Kicker":
- return (
- <span className="text-[9px] font-bold uppercase tracking-[3px] text-white">
- Kicker
- </span>
- );
- case "Big Stat":
- return <span className="text-[22px] font-extrabold text-white">42%</span>;
- case "Quote":
- return (
- <span className="font-serif text-[13px] font-medium italic text-white">
- “Quote”
- </span>
- );
- case "Typewriter":
- return (
- <span className="font-mono text-[10px] text-white">
- Typewriter<span className="animate-pulse">_</span>
- </span>
- );
- }
-};
-
-const Selection = ({
- children,
- className,
- style,
- boxRef,
-}: {
- children: React.ReactNode;
- className?: string;
- style?: React.CSSProperties;
- boxRef?: React.RefObject<HTMLDivElement | null>;
-}) => (
- <div
- ref={boxRef}
- className={classNames("absolute z-20 rounded-md", className)}
- style={{
- border: `2px solid ${ED.accent}`,
- padding: "8px 12px",
- ...style,
- }}
- >
- <span
- className="absolute left-0 rounded px-1.5 py-0.5 text-[11px] font-medium text-white"
- style={{ top: -24, background: ED.accent }}
- >
- Text
- </span>
- {[
- { left: -7, top: -7 },
- { right: -7, top: -7 },
- { left: -7, bottom: -7 },
- { right: -7, bottom: -7 },
- ].map((dot) => (
- <span
- key={Object.keys(dot).join("-")}
- className="absolute size-3 rounded-full"
- style={{
- ...dot,
- background: ED.accent,
- boxShadow: "0 0 0 2px #ffffff",
- }}
- />
- ))}
- {children}
- </div>
-);
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const lowerRef = useRef<HTMLDivElement | null>(null);
- const statRef = useRef<HTMLDivElement | null>(null);
- const typeRef = useRef<HTMLDivElement | null>(null);
- const typeTextRef = useRef<HTMLSpanElement | null>(null);
- const [ui, setUi] = useSceneState(activeAt(0));
- const lastRef = useRef<{ template: Template; anim: string }>({
- template: "Lower Third",
- anim: "Slide up",
- });
- if (ui) lastRef.current = ui;
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 4800,
- tick: (t) => {
- setUi(activeAt(t));
- if (lowerRef.current) {
- const inF = easeOut(span(t, LOWER.enter, LOWER.enter + 480));
- const outF = easeOut(span(t, LOWER.exit, LOWER.exit + 360));
- lowerRef.current.style.opacity = `${inF * (1 - outF)}`;
- lowerRef.current.style.transform = `translateY(${lerp(28, 0, inF) + outF * 18}px)`;
- }
- if (statRef.current) {
- const inF = span(t, STAT.enter, STAT.enter + 520);
- const overshoot = 1 + Math.sin(inF * Math.PI) * 0.12;
- const outF = easeOut(span(t, STAT.exit, STAT.exit + 320));
- statRef.current.style.opacity = `${easeOut(inF) * (1 - outF)}`;
- statRef.current.style.transform = `translateX(-50%) scale(${lerp(0.6, 1, easeOut(inF)) * overshoot})`;
- }
- if (typeRef.current && typeTextRef.current) {
- const outF = easeOut(span(t, TYPE.exit, TYPE.exit + 300));
- typeRef.current.style.opacity = `${t >= TYPE.enter ? 1 - outF : 0}`;
- typeTextRef.current.textContent =
- t >= TYPE.enter
- ? typed(TYPEWRITER_TEXT, t, TYPE.enter + 200, 22)
- : "";
- }
- },
- });
-
- const shown = ui ?? lastRef.current;
-
- return (
- <Ground tone="gradient">
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
- <div
- className="pointer-events-none absolute rounded-[10px]"
- style={{
- left: WIN.left,
- top: WIN.top,
- width: 360,
- height: 250,
- background: "rgba(9,12,20,0.22)",
- }}
- />
-
- <Selection
- boxRef={lowerRef}
- className="opacity-0"
- style={{ left: 138, top: 186 }}
- >
- <span className="flex items-stretch gap-3">
- <span className="w-[3px] rounded-full bg-[#8FC1F7]" />
- <span className="leading-tight [text-shadow:0_2px_12px_rgba(0,0,0,0.45)]">
- <span className="block text-[22px] font-semibold text-white">
- Sofia Chen
- </span>
- <span className="block text-[13px] font-medium text-white/85">
- Head of Product
- </span>
- </span>
- </span>
- </Selection>
-
- <Selection
- boxRef={statRef}
- className="left-1/2 flex -translate-x-1/2 flex-col items-center opacity-0"
- style={{ top: 78, background: "rgba(17,17,17,0.72)" }}
- >
- <span className="text-[68px] font-extrabold leading-none tracking-[-0.04em] text-white [text-shadow:0_6px_30px_rgba(0,0,0,0.45)]">
- 3.2×
- </span>
- <span className="mt-2 text-[13px] font-medium uppercase tracking-[0.08em] text-white/85">
- faster onboarding
- </span>
- </Selection>
-
- <Selection
- boxRef={typeRef}
- className="opacity-0"
- style={{ left: 286, top: 52, background: "rgba(17,17,17,0.82)" }}
- >
- <span className="font-mono text-[17px] font-medium text-white">
- <span ref={typeTextRef} />
- <span className="ml-0.5 inline-block h-[16px] w-[2px] translate-y-[2px] animate-pulse bg-white/85" />
- </span>
- </Selection>
-
- <div className="absolute left-4 top-3.5 z-30">
- <Chip>In · {shown.anim}</Chip>
- </div>
-
- <div
- className="absolute flex"
- style={{
- left: ROW.left,
- top: ROW.top,
- gap: ROW.gap,
- transform: `scale(${ROW.scale})`,
- transformOrigin: "top left",
- }}
- >
- {TEMPLATES.map((template) => {
- const on = shown.template === template;
- return (
- <div
- key={template}
- className="relative flex h-16 shrink-0 items-center justify-center overflow-hidden rounded-lg pb-3 transition-[box-shadow] duration-300"
- style={{
- width: ROW.card,
- background: "linear-gradient(135deg,#17181c,#2a2c33)",
- boxShadow: on
- ? `0 0 0 1px ${ED.accent}, 0 0 0 3px ${ED.card}, 0 0 0 4px ${ED.accent}`
- : `0 0 0 1px rgba(255,255,255,0.08)`,
- }}
- >
- <Sample template={template} />
- <span className="absolute inset-x-0 bottom-1 text-center text-[10px] text-white/50">
- {template}
- </span>
- </div>
- );
- })}
- </div>
- </Ground>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/three-d.tsx b/apps/web/components/pages/HomeTwo/studio/cards/three-d.tsx
deleted file mode 100644
index e695c863f..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/three-d.tsx
+++ /dev/null
@@ -1,226 +0,0 @@
-"use client";
-
-import { useRef } from "react";
-import { easeInOut, lerp, span, useSceneState } from "../../scenes/engine";
-import { CANVAS, Ground, HUE, mix, RecordedWindow, useLoop } from "../shared";
-
-const DARK = {
- card: "#1b1b1e",
- line: "rgba(255,255,255,0.08)",
- text1: "#f4f4f5",
- text2: "#9a9aa3",
- ctl: "rgba(255,255,255,0.06)",
- accent: "#0a84ff",
-} as const;
-
-const DURATION = 9000;
-const MOVES = [
- {
- name: "Glide across",
- helper: "Move smoothly across the details",
- from: 0,
- to: 3000,
- },
- {
- name: "Unfold",
- helper: "Reveal your screen with a gentle tilt",
- from: 3000,
- to: 6000,
- },
- {
- name: "Pull back",
- helper: "Pull out to show the bigger picture",
- from: 6000,
- to: DURATION,
- },
-] as const;
-
-const WIN_SCALE = 0.85;
-const WIN = {
- w: 360 * WIN_SCALE,
- h: 250 * WIN_SCALE,
- left: (CANVAS.w - 360 * WIN_SCALE) / 2,
- top: 30,
-} as const;
-const S = 1.3;
-const ROW = { left: 24, top: 272, gap: 10 } as const;
-const ROW_W = (CANVAS.w - ROW.left * 2) / S;
-const CARD_W = (ROW_W - ROW.gap * 2) / 3;
-
-type Pose = { ry: number; rx: number; tx: number; s: number };
-
-const poseAt = (t: number): Pose => {
- if (t < 3000) {
- const f = easeInOut(span(t, 0, 3000));
- return { ry: lerp(-16, 16, f), rx: 0, tx: lerp(-26, 26, f), s: 1 };
- }
- if (t < 6000) {
- const f = easeInOut(span(t, 3000, 6000));
- const arc = Math.sin(f * Math.PI);
- return {
- ry: lerp(16, 0, f),
- rx: arc * 24,
- tx: lerp(26, 0, f),
- s: lerp(1, 0.97, arc),
- };
- }
- if (t < 8300) {
- const f = easeInOut(span(t, 6000, 8300));
- return {
- ry: lerp(0, -8, f),
- rx: lerp(0, 9, f),
- tx: lerp(0, -10, f),
- s: lerp(1, 0.8, f),
- };
- }
- const f = easeInOut(span(t, 8300, DURATION));
- return {
- ry: lerp(-8, -16, f),
- rx: lerp(9, 0, f),
- tx: lerp(-10, -26, f),
- s: lerp(0.8, 1, f),
- };
-};
-
-const moveAt = (t: number) =>
- MOVES.find((move) => t >= move.from && t < move.to)?.name ?? MOVES[0].name;
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const groupRef = useRef<HTMLDivElement | null>(null);
- const sideRef = useRef<HTMLDivElement | null>(null);
- const topRef = useRef<HTMLDivElement | null>(null);
- const floorRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState({ move: moveAt(0) });
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 700,
- tick: (t) => {
- setUi({ move: moveAt(t) });
- const pose = poseAt(t);
- const tilt = Math.min(1, Math.abs(pose.ry) / 24);
- const lean = Math.min(1, Math.abs(pose.rx) / 24);
- if (groupRef.current) {
- groupRef.current.style.transform = `translateX(${pose.tx}px) scale(${pose.s}) rotateY(${pose.ry}deg) rotateX(${pose.rx}deg)`;
- }
- if (sideRef.current) {
- sideRef.current.style.opacity = `${tilt * 0.55}`;
- sideRef.current.style.background =
- pose.ry > 0
- ? "linear-gradient(to right, rgba(9,12,20,0) 35%, rgba(9,12,20,0.8))"
- : "linear-gradient(to left, rgba(9,12,20,0) 35%, rgba(9,12,20,0.8))";
- }
- if (topRef.current) {
- topRef.current.style.opacity = `${lean * 0.5}`;
- }
- if (floorRef.current) {
- floorRef.current.style.transform = `translateX(${pose.tx * 1.15}px) scaleX(${0.7 + pose.s * 0.4}) scaleY(${pose.s})`;
- floorRef.current.style.opacity = `${0.5 + tilt * 0.3}`;
- }
- },
- });
-
- return (
- <Ground tone="dark">
- <div
- className="pointer-events-none absolute inset-0"
- style={{
- background:
- "radial-gradient(60% 52% at 50% 42%, rgba(99,102,241,0.16), rgba(99,102,241,0) 70%)",
- }}
- />
- <div
- ref={floorRef}
- className="pointer-events-none absolute rounded-full"
- style={{
- left: WIN.left + 30,
- top: WIN.top + WIN.h + 4,
- width: WIN.w - 60,
- height: 30,
- background: `radial-gradient(50% 50% at 50% 50%, ${mix(HUE.threeD, 45, "transparent")}, rgba(99,102,241,0))`,
- filter: "blur(10px)",
- opacity: 0.5,
- }}
- />
- <div
- className="absolute inset-0"
- style={{ perspective: 900, perspectiveOrigin: "50% 42%" }}
- >
- <div
- ref={groupRef}
- className="absolute inset-0 will-change-transform"
- style={{ transformStyle: "preserve-3d" }}
- >
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN_SCALE} />
- <div
- ref={sideRef}
- className="pointer-events-none absolute rounded-[10px]"
- style={{
- left: WIN.left,
- top: WIN.top,
- width: WIN.w,
- height: WIN.h,
- opacity: 0,
- }}
- />
- <div
- ref={topRef}
- className="pointer-events-none absolute rounded-[10px]"
- style={{
- left: WIN.left,
- top: WIN.top,
- width: WIN.w,
- height: WIN.h,
- opacity: 0,
- background:
- "linear-gradient(to bottom, rgba(9,12,20,0.7), rgba(9,12,20,0) 55%)",
- }}
- />
- </div>
- </div>
-
- <div
- className="absolute flex"
- style={{
- left: ROW.left,
- top: ROW.top,
- width: ROW_W,
- gap: ROW.gap,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- {MOVES.map((move) => {
- const active = ui.move === move.name;
- return (
- <div
- key={move.name}
- className="flex flex-col gap-1 rounded-xl px-3 py-2.5 transition-[box-shadow,background-color] duration-300"
- style={{
- width: CARD_W,
- background: DARK.card,
- boxShadow: active
- ? `inset 0 0 0 1.5px ${DARK.accent}`
- : `inset 0 0 0 1px ${DARK.line}`,
- }}
- >
- <span
- className="whitespace-nowrap text-[12px] font-medium"
- style={{ color: DARK.text1 }}
- >
- {move.name}
- </span>
- <span
- className="text-[10.5px] leading-[1.3]"
- style={{ color: DARK.text2 }}
- >
- {move.helper}
- </span>
- </div>
- );
- })}
- </div>
- </Ground>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/cards/zoom.tsx b/apps/web/components/pages/HomeTwo/studio/cards/zoom.tsx
deleted file mode 100644
index 7490e08ec..000000000
--- a/apps/web/components/pages/HomeTwo/studio/cards/zoom.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-"use client";
-
-import { useRef } from "react";
-import { LucideSearch } from "../../demo/capIcons";
-import {
- easeInOut,
- span,
- useCursor,
- useSceneState,
- type Way,
-} from "../../scenes/engine";
-import {
- CANVAS,
- ED,
- Field,
- Ground,
- HUE,
- Lane,
- Panel,
- Playhead,
- RecordedWindow,
- Segment,
- Segmented,
- Slider,
- TRACK_GUTTER,
- TrackLabel,
- useLoop,
-} from "../shared";
-
-const WIN = { left: 196, top: 18, scale: 1.05 };
-const FOCUS = { x: WIN.left + 300 * WIN.scale, y: WIN.top + 74 * WIN.scale };
-const FRAME_H = 292;
-const CLICK_AT = 1500;
-const ZOOM_IN = { start: 1600, end: 2500 };
-const ZOOM_OUT = { start: 5200, end: 6100 };
-const DURATION = 8000;
-const AMOUNT = 1.5;
-const PANEL = { left: 16, top: 18, w: 150, scale: 1.15 };
-
-const PATH: Way[] = [
- { t: 0, x: 330, y: 226 },
- { t: 1400, ...FOCUS },
- { t: CLICK_AT, ...FOCUS, click: true },
- { t: 3400, ...FOCUS },
- { t: 4600, x: FOCUS.x - 30, y: FOCUS.y + 44 },
- { t: DURATION, x: FOCUS.x - 30, y: FOCUS.y + 44 },
-];
-
-const scaleAt = (t: number) =>
- 1 +
- (AMOUNT - 1) *
- (easeInOut(span(t, ZOOM_IN.start, ZOOM_IN.end)) -
- easeInOut(span(t, ZOOM_OUT.start, ZOOM_OUT.end)));
-
-const S = 1.3;
-const LOGICAL = { w: CANVAS.w / S, h: CANVAS.h / S };
-const STRIP = { left: 12, top: 226, pad: 8 };
-const STRIP_W = LOGICAL.w - STRIP.left * 2;
-const LANE_W = STRIP_W - STRIP.pad * 2 - TRACK_GUTTER;
-const SEGMENT = { left: 0.16, width: 0.56 };
-
-export const Visual = ({ playing }: { playing: boolean }) => {
- const rootRef = useRef<HTMLDivElement | null>(null);
- const zoomRef = useRef<HTMLDivElement | null>(null);
- const playheadRef = useRef<HTMLDivElement | null>(null);
- const [ui, setUi] = useSceneState({ segment: false });
- const cursor = useCursor(rootRef);
-
- useLoop({
- duration: DURATION,
- playing,
- pose: 3600,
- tick: (t, seek) => {
- setUi({ segment: t >= CLICK_AT });
- if (zoomRef.current) {
- zoomRef.current.style.transform = `scale(${scaleAt(t)})`;
- }
- if (playheadRef.current) {
- playheadRef.current.style.transform = `translateX(${(t / DURATION) * LANE_W}px)`;
- }
- cursor.tick(PATH, t, seek);
- },
- });
-
- return (
- <div ref={rootRef} className="relative">
- <Ground tone="light">
- <div
- className="absolute inset-x-0 top-0 overflow-hidden"
- style={{ height: FRAME_H }}
- >
- <div
- ref={zoomRef}
- className="absolute inset-0 will-change-transform"
- style={{ transformOrigin: `${FOCUS.x}px ${FOCUS.y}px` }}
- >
- <RecordedWindow left={WIN.left} top={WIN.top} scale={WIN.scale} />
- </div>
- </div>
-
- <div
- className="absolute transition-[opacity,transform] duration-300"
- style={{
- left: PANEL.left,
- top: PANEL.top,
- width: PANEL.w,
- transform: `scale(${PANEL.scale}) translateY(${ui.segment ? 0 : 6}px)`,
- transformOrigin: "top left",
- opacity: ui.segment ? 1 : 0,
- }}
- >
- <Panel className="left-0 top-0 w-full gap-3">
- <Field label="Zoom 1" value="1.50x">
- <Slider fill={(AMOUNT - 1) / 3.5} />
- </Field>
- <Field label="Zoom Mode">
- <Segmented options={["Auto", "Manual"]} value="Auto" />
- </Field>
- </Panel>
- </div>
-
- <div
- className="absolute left-0 top-0"
- style={{
- width: LOGICAL.w,
- height: LOGICAL.h,
- transform: `scale(${S})`,
- transformOrigin: "top left",
- }}
- >
- <div
- className="absolute flex rounded-xl"
- style={{
- left: STRIP.left,
- top: STRIP.top,
- width: STRIP_W,
- padding: STRIP.pad,
- background: ED.card,
- boxShadow: ED.cardShadow,
- }}
- >
- <TrackLabel
- hue={HUE.zoom}
- icon={<LucideSearch className="size-3.5" />}
- >
- Zoom
- </TrackLabel>
- <Lane
- empty={
- ui.segment ? undefined : (
- <>
- <span>Generate zoom segments automatically</span>
- <span style={{ color: ED.text2 }}>· Generate</span>
- </>
- )
- }
- >
- <Segment
- hue={HUE.zoom}
- label="Automatic Zoom"
- sublabel="1.5x"
- selected
- className="transition-[opacity,transform] duration-300"
- style={{
- left: `${SEGMENT.left * 100}%`,
- width: `${SEGMENT.width * 100}%`,
- opacity: ui.segment ? 1 : 0,
- transform: ui.segment ? "scaleX(1)" : "scaleX(0.6)",
- transformOrigin: "left center",
- }}
- />
- <Playhead playheadRef={playheadRef} top={-6} bottom={0} />
- </Lane>
- </div>
- </div>
- {cursor.Cursor}
- </Ground>
- </div>
- );
-};
diff --git a/apps/web/components/pages/HomeTwo/studio/catalog.ts b/apps/web/components/pages/HomeTwo/studio/catalog.ts
deleted file mode 100644
index b1468cee7..000000000
--- a/apps/web/components/pages/HomeTwo/studio/catalog.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-"use client";
-
-import dynamic from "next/dynamic";
-import type { StudioCard } from "./shared";
-
-const visual = (load: () => Promise<{ Visual: StudioCard["Visual"] }>) =>
- dynamic(() => load().then((module) => module.Visual));
-
-export const CARDS_A: StudioCard[] = [
- {
- key: "mask",
- title: "Blur what is private",
- body: "Drop a mask over a password, an email, or a face and choose blur or pixelate. Or flip it to a highlight that dims everything else.",
- Visual: visual(() => import("./cards/mask")),
- },
- {
- key: "scenes",
- title: "Scenes for screen and camera",
- body: "Switch any stretch of the timeline to camera only, hide camera, split screen, or floating cards, each with its own transition.",
- Visual: visual(() => import("./cards/scenes")),
- },
- {
- key: "text",
- title: "Text that animates",
- body: "Titles, lower thirds, big stats, and typewriter callouts as stackable tracks, with fade, slide, pop, or typewriter in and out.",
- Visual: visual(() => import("./cards/text")),
- },
- {
- key: "zoom",
- title: "Automatic zoom",
- body: "Generate zooms from your recorded clicks, or draw your own from 1x to 4.5x with a fixed focal point.",
- Visual: visual(() => import("./cards/zoom")),
- },
- {
- key: "captions",
- title: "Captions, generated locally",
- body: "Transcribe on your machine in 19 languages, fix the words, style them, and burn them in with the active word highlighted.",
- Visual: visual(() => import("./cards/captions")),
- },
-];
-
-export const CARDS_B: StudioCard[] = [
- {
- key: "three-d",
- title: "3D camera moves",
- body: "Tilt the frame into perspective and glide, sweep, or pull back across it with focus blur.",
- Visual: visual(() => import("./cards/three-d")),
- },
- {
- key: "canvas",
- title: "Any canvas, one recording",
- body: "Wallpapers, gradients, or your own image, then padding, corners, shadows, and a macOS, Windows, browser, or MacBook frame.",
- Visual: visual(() => import("./cards/canvas")),
- },
- {
- key: "grades",
- title: "Color grades",
- body: "Cinematic, Noir, Vintage, Frost, Golden, Midnight, Vivid, or Dreamy, then dial exposure, contrast, and vignette.",
- Visual: visual(() => import("./cards/grades")),
- },
- {
- key: "clips",
- title: "Clips, speed, and music",
- body: "Trim, split, reorder, speed up to 8x, crossfade between clips, and lay a track from the built in library underneath.",
- Visual: visual(() => import("./cards/clips")),
- },
-];
diff --git a/apps/web/components/pages/HomeTwo/studio/shared.tsx b/apps/web/components/pages/HomeTwo/studio/shared.tsx
deleted file mode 100644
index 352079e4c..000000000
--- a/apps/web/components/pages/HomeTwo/studio/shared.tsx
+++ /dev/null
@@ -1,742 +0,0 @@
-"use client";
-
-import { classNames } from "@cap/utils/helpers";
-import {
- type ComponentType,
- type CSSProperties,
- type ReactNode,
- type RefObject,
- useEffect,
- useRef,
-} from "react";
-import { ContentWindow } from "../demo/MacDesktop";
-import { useVideoAttrs, VIDEO_POSTERS } from "../demo/media";
-import { SCENE_CSS, useVideo } from "../scenes/engine";
-import { useReducedMotion } from "../visibility";
-
-export type StudioCard = {
- key: string;
- title: string;
- body: string;
- Visual: ComponentType<{ playing: boolean }>;
-};
-
-export const CANVAS = { w: 600, h: 375 } as const;
-
-// Mirrors the desktop editor's ed-* light tokens (apps/desktop/src/styles/theme.css) and
-// Timeline/styles.css; keep in sync when the editor theme changes.
-export const ED = {
- window: "#f1f1f3",
- card: "#ffffff",
- card2: "#f6f6f7",
- stage: "#e9e9ec",
- line: "rgba(0,0,0,0.075)",
- lineStrong: "rgba(0,0,0,0.12)",
- text1: "#1c1c1e",
- text2: "#6e6e75",
- text3: "#a0a0a8",
- ctl: "rgba(0,0,0,0.045)",
- ctlHover: "rgba(0,0,0,0.075)",
- ctlActive: "rgba(0,0,0,0.11)",
- accent: "#007aff",
- playhead: "#ff3b30",
- cardShadow: "0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.075)",
- popShadow: "0 12px 32px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.075)",
-} as const;
-
-export const HUE = {
- clip: "#3b82f6",
- zoom: "#64748b",
- caption: "#0ea5e9",
- text: "#14b8a6",
- mask: "#ef4444",
- scene: "#8b5cf6",
- audio: "#22c55e",
- threeD: "#6366f1",
-} as const;
-
-export const mix = (hue: string, pct: number, base = "#ffffff") =>
- `color-mix(in srgb, ${hue} ${pct}%, ${base})`;
-
-export const useLoop = ({
- duration,
- playing,
- pose,
- tick,
-}: {
- duration: number;
- playing: boolean;
- pose: number;
- tick: (t: number, seek: boolean) => void;
-}) => {
- const tRef = useRef(0);
- const tickRef = useRef(tick);
- tickRef.current = tick;
- const reduced = useReducedMotion();
-
- useEffect(() => {
- if (reduced) {
- tickRef.current(pose, true);
- return;
- }
- if (!playing) return;
- let raf = 0;
- let last = performance.now();
- let seek = true;
- const frame = (now: number) => {
- const dt = Math.min(48, now - last);
- last = now;
- const next = tRef.current + dt;
- if (next >= duration) seek = true;
- tRef.current = next % duration;
- tickRef.current(tRef.current, seek);
- seek = false;
- raf = requestAnimationFrame(frame);
- };
- raf = requestAnimationFrame(frame);
- return () => cancelAnimationFrame(raf);
- }, [playing, reduced, duration, pose]);
-};
-
-export type Tone = "light" | "chrome" | "dark" | "gradient";
-
-const GROUND_BG: Record<Tone, string> = {
- light: "#F4F6F9",
- chrome: ED.window,
- dark: "#141518",
- gradient: "linear-gradient(135deg, #C3DCF8 0%, #DACBF9 55%, #F6D9EC 100%)",
-};
-
-export const Ground = ({
- tone = "light",
- className,
- style,
- children,
-}: {
- tone?: Tone;
- className?: string;
- style?: CSSProperties;
- children: ReactNode;
-}) => (
- <div
- className={classNames("relative overflow-hidden", className)}
- style={{
- width: CANVAS.w,
- height: CANVAS.h,
- background: GROUND_BG[tone],
- color: tone === "dark" ? "#ffffff" : ED.text1,
- ...style,
- }}
- >
- <style>{SCENE_CSS}</style>
- {children}
- </div>
-);
-
-export const RECORDED = {
- left: 120,
- top: 62,
- width: 360,
- height: 250,
-} as const;
-
-export const RecordedWindow = ({
- left = RECORDED.left,
- top = RECORDED.top,
- width = RECORDED.width,
- height = RECORDED.height,
- scale = 1,
- className,
- style,
-}: {
- left?: number;
- top?: number;
- width?: number;
- height?: number;
- scale?: number;
- className?: string;
- style?: CSSProperties;
-}) => {
- const scrollRef = useRef<HTMLDivElement | null>(null);
- return (
- <div
- className={classNames("absolute", className)}
- style={{
- left,
- top,
- width,
- height,
- transform: scale === 1 ? undefined : `scale(${scale})`,
- transformOrigin: "top left",
- ...style,
- }}
- >
- <ContentWindow width={width} height={height} scrollRef={scrollRef} />
- </div>
- );
-};
-
-export const CameraBubble = ({
- playing,
- size = 96,
- left = 24,
- top = CANVAS.h - 24 - 96,
- className,
- style,
-}: {
- playing: boolean;
- size?: number;
- left?: number;
- top?: number;
- className?: string;
- style?: CSSProperties;
-}) => {
- const ref = useRef<HTMLVideoElement | null>(null);
- const attrs = useVideoAttrs(VIDEO_POSTERS.webcam);
- useVideo(playing, ref);
- return (
- <div
- className={classNames(
- "absolute overflow-hidden rounded-full bg-[#111111]",
- className,
- )}
- style={{
- left,
- top,
- width: size,
- height: size,
- boxShadow: "0 10px 26px rgba(0,0,0,0.35)",
- ...style,
- }}
- >
- <video
- ref={ref}
- className="h-full w-full object-cover"
- src="/videos/home-two/webcam.mp4"
- muted
- loop
- playsInline
- {...attrs}
- />
- </div>
- );
-};
-
-export const Chip = ({
- children,
- className,
- style,
-}: {
- children: ReactNode;
- className?: string;
- style?: CSSProperties;
-}) => (
- <span
- className={classNames(
- "inline-flex h-7 items-center gap-1.5 rounded-lg px-2.5 text-[12px] font-medium",
- className,
- )}
- style={{
- background: ED.card,
- color: ED.text1,
- boxShadow: ED.popShadow,
- ...style,
- }}
- >
- {children}
- </span>
-);
-
-export const Panel = ({
- className,
- style,
- children,
-}: {
- className?: string;
- style?: CSSProperties;
- children: ReactNode;
-}) => (
- <div
- className={classNames(
- "absolute flex flex-col gap-3.5 rounded-xl p-4",
- className,
- )}
- style={{ background: ED.card, boxShadow: ED.popShadow, ...style }}
- >
- {children}
- </div>
-);
-
-export const SectionTitle = ({
- children,
- right,
-}: {
- children: ReactNode;
- right?: ReactNode;
-}) => (
- <div className="flex min-h-[22px] items-center justify-between">
- <span className="text-[12px] font-medium" style={{ color: ED.text2 }}>
- {children}
- </span>
- {right}
- </div>
-);
-
-export const Field = ({
- label,
- value,
- badge,
- disabled,
- children,
-}: {
- label: ReactNode;
- value?: ReactNode;
- badge?: ReactNode;
- disabled?: boolean;
- children?: ReactNode;
-}) => (
- <div className="flex flex-col gap-2">
- <div className="flex items-center gap-1.5">
- <span
- className="text-[13px] font-normal"
- style={{ color: disabled ? ED.text3 : ED.text1 }}
- >
- {label}
- </span>
- {badge ? (
- <span
- className="rounded-full px-1.5 py-0.5 text-[10px] font-medium"
- style={{ background: ED.ctl, color: ED.text2 }}
- >
- {badge}
- </span>
- ) : null}
- {value !== undefined ? (
- <span
- className="ml-auto min-w-9 text-right text-[11px] tabular-nums"
- style={{ color: ED.text3 }}
- >
- {value}
- </span>
- ) : null}
- </div>
- {children}
- </div>
-);
-
-export const InlineField = ({
- label,
- value,
- children,
-}: {
- label: ReactNode;
- value?: ReactNode;
- children?: ReactNode;
-}) => (
- <div className="flex h-[34px] items-center gap-3">
- <span
- className="min-w-24 shrink-0 text-[13px] font-normal"
- style={{ color: ED.text1 }}
- >
- {label}
- </span>
- <div className="flex flex-1 items-center justify-end gap-2">
- {children}
- {value !== undefined ? (
- <span
- className="min-w-9 text-right text-[11px] tabular-nums"
- style={{ color: ED.text3 }}
- >
- {value}
- </span>
- ) : null}
- </div>
- </div>
-);
-
-export const Slider = ({
- fill,
- className,
-}: {
- fill: number;
- className?: string;
-}) => (
- <div className={classNames("relative flex h-8 items-center px-1", className)}>
- <div
- className="h-[3px] w-full overflow-hidden rounded-full"
- style={{ background: ED.ctlActive }}
- >
- <div
- className="h-full rounded-full transition-[width] duration-300 ease-out"
- style={{ width: `${fill * 100}%`, background: ED.accent }}
- />
- </div>
- <span
- className="absolute size-3.5 rounded-full transition-[left] duration-300 ease-out"
- style={{
- left: `calc(4px + (100% - 8px) * ${fill} - 7px)`,
- background: "#ffffff",
- boxShadow: "0 1px 3px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(0,0,0,0.1)",
- }}
- />
- </div>
-);
-
-export const Segmented = ({
- options,
- value,
- itemWidth,
- disabled,
- className,
- style,
-}: {
- options: readonly string[];
- value: string | null;
- itemWidth?: number;
- disabled?: boolean;
- className?: string;
- style?: CSSProperties;
-}) => (
- <div
- className={classNames(
- "flex gap-0.5 rounded-lg p-0.5 transition-opacity duration-200",
- disabled && "opacity-50",
- className,
- )}
- style={{ background: ED.ctl, ...style }}
- >
- {options.map((option) => {
- const on = value === option;
- return (
- <span
- key={option}
- className="flex h-[26px] flex-1 items-center justify-center whitespace-nowrap rounded-md px-3 text-[11.5px] font-medium transition-[background-color,color,box-shadow] duration-200"
- style={{
- width: itemWidth,
- background: on ? ED.card : "transparent",
- color: on ? ED.text1 : ED.text2,
- boxShadow: on
- ? "0 1px 2px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.06)"
- : undefined,
- }}
- >
- {option}
- </span>
- );
- })}
- </div>
-);
-
-export const Toggle = ({ on }: { on: boolean }) => (
- <span
- className="relative inline-flex h-6 w-11 shrink-0 rounded-full p-0.5 transition-colors duration-200"
- style={{ background: on ? ED.accent : ED.ctlActive }}
- >
- <span
- className="absolute top-0.5 size-5 rounded-full bg-white transition-[left] duration-200"
- style={{
- left: on ? 22 : 2,
- boxShadow: "0 1px 3px rgba(0,0,0,0.22)",
- }}
- />
- </span>
-);
-
-export const EditorButton = ({
- children,
- primary,
- className,
- style,
-}: {
- children: ReactNode;
- primary?: boolean;
- className?: string;
- style?: CSSProperties;
-}) => (
- <span
- className={classNames(
- "inline-flex h-7 items-center gap-1.5 whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium",
- className,
- )}
- style={{
- background: primary ? ED.accent : ED.ctl,
- color: primary ? "#ffffff" : ED.text1,
- ...style,
- }}
- >
- {children}
- </span>
-);
-
-export const Tile = ({
- selected,
- children,
- className,
- style,
-}: {
- selected?: boolean;
- children: ReactNode;
- className?: string;
- style?: CSSProperties;
-}) => (
- <span
- className={classNames(
- "flex h-[30px] items-center justify-center gap-1.5 whitespace-nowrap rounded-lg px-2 text-[11.5px] font-medium transition-colors duration-200",
- className,
- )}
- style={{
- background: selected ? ED.ctlHover : ED.ctl,
- color: selected ? ED.text1 : ED.text2,
- ...style,
- }}
- >
- {children}
- </span>
-);
-
-export const TRACK_H = 44;
-export const TRACK_GAP = 6;
-export const TRACK_GUTTER = 96;
-export const RULER_H = 26;
-
-export const TrackLabel = ({
- hue,
- icon,
- children,
- style,
-}: {
- hue: string;
- icon?: ReactNode;
- children: ReactNode;
- style?: CSSProperties;
-}) => (
- <div
- className="flex shrink-0 items-center gap-2"
- style={{ width: TRACK_GUTTER, height: TRACK_H, ...style }}
- >
- <span
- className="grid size-[22px] shrink-0 place-items-center rounded-md"
- style={{
- background: mix(hue, 16, "transparent"),
- color: mix(hue, 62, "#000000"),
- }}
- >
- {icon ? <span className="size-3.5">{icon}</span> : null}
- </span>
- <span
- className="truncate text-[11px] font-medium"
- style={{ color: ED.text2 }}
- >
- {children}
- </span>
- </div>
-);
-
-export const Lane = ({
- empty,
- className,
- style,
- children,
-}: {
- empty?: ReactNode;
- className?: string;
- style?: CSSProperties;
- children?: ReactNode;
-}) => (
- <div
- className={classNames("relative flex-1", className)}
- style={{ height: TRACK_H, ...style }}
- >
- {empty ? (
- <div
- className="absolute inset-0 flex items-center justify-center gap-1.5 rounded-lg border border-dashed text-[12px]"
- style={{ borderColor: ED.lineStrong, color: ED.text3 }}
- >
- {empty}
- </div>
- ) : null}
- {children}
- </div>
-);
-
-export const Segment = ({
- hue,
- label,
- sublabel,
- trailing,
- selected,
- segmentRef,
- className,
- style,
- children,
-}: {
- hue: string;
- label?: ReactNode;
- sublabel?: ReactNode;
- trailing?: ReactNode;
- selected?: boolean;
- segmentRef?: RefObject<HTMLDivElement | null>;
- className?: string;
- style?: CSSProperties;
- children?: ReactNode;
-}) => (
- <div
- ref={segmentRef}
- className={classNames(
- "absolute inset-y-0 overflow-hidden rounded-lg",
- className,
- )}
- style={{
- background: mix(hue, selected ? 23 : 13),
- boxShadow: selected
- ? `inset 0 0 0 1.5px ${ED.accent}`
- : `inset 0 0 0 1px ${mix(hue, 34, "transparent")}`,
- ...style,
- }}
- >
- <span
- className="absolute inset-y-0 left-0 w-[3px]"
- style={{ background: hue }}
- />
- {label !== undefined ? (
- <span className="absolute left-[13px] top-1/2 flex -translate-y-1/2 items-center gap-2 whitespace-nowrap">
- <span
- className="text-[12px] font-medium"
- style={{ color: mix(hue, 58, "#000000") }}
- >
- {label}
- </span>
- {sublabel !== undefined ? (
- <span
- className="text-[11px] tabular-nums"
- style={{ color: mix(hue, 45, ED.text3) }}
- >
- {sublabel}
- </span>
- ) : null}
- {trailing}
- </span>
- ) : null}
- {children}
- </div>
-);
-
-export const Ruler = ({
- labels,
- span: total,
- className,
- style,
-}: {
- labels: string[];
- span: number;
- className?: string;
- style?: CSSProperties;
-}) => (
- <div
- className={classNames(
- "relative flex-1 text-[11px] tabular-nums",
- className,
- )}
- style={{ height: RULER_H, color: ED.text3, ...style }}
- >
- {labels.map((label, i) => (
- <span
- key={label}
- className={classNames(
- "absolute top-1 flex flex-col gap-1",
- i === 0 ? "items-start" : "-translate-x-1/2 items-center",
- )}
- style={{ left: `${(i / total) * 100}%` }}
- >
- <span>{label}</span>
- <span className="h-1 w-px" style={{ background: ED.lineStrong }} />
- </span>
- ))}
- </div>
-);
-
-export const Playhead = ({
- playheadRef,
- top = 0,
- bottom = 0,
- left = 0,
-}: {
- playheadRef: RefObject<HTMLDivElement | null>;
- top?: number;
- bottom?: number;
- left?: number;
-}) => (
- <div
- ref={playheadRef}
- className="pointer-events-none absolute z-20 will-change-transform"
- style={{ top, bottom, left }}
- >
- <span
- className="absolute -left-[6px] top-0 size-3 rounded-full"
- style={{ background: ED.playhead, boxShadow: `0 0 0 2px ${ED.card}` }}
- />
- <span
- className="absolute left-0 top-1.5 h-full w-px"
- style={{ background: ED.playhead }}
- />
- </div>
-);
-
-export const WAVES = Array.from({ length: 64 }, (_, i) => {
- const a = Math.sin(i * 0.7) * 0.5 + 0.5;
- const b = Math.sin(i * 1.9 + 1) * 0.5 + 0.5;
- return { key: `w${i}`, h: 0.25 + 0.7 * (0.5 * a + 0.5 * b) };
-});
-
-export const Waveform = ({
- from = 0,
- to = WAVES.length,
- color,
- className,
-}: {
- from?: number;
- to?: number;
- color?: string;
- className?: string;
-}) => (
- <span
- className={classNames(
- "absolute inset-x-2 bottom-0 flex h-[18px] items-end gap-px",
- className,
- )}
- >
- {WAVES.slice(from, to).map((wave) => (
- <span
- key={wave.key}
- className="flex-1 rounded-[1px]"
- style={{
- height: `${wave.h * 100}%`,
- background: color ?? mix(HUE.clip, 45, "transparent"),
- }}
- />
- ))}
- </span>
-);
-
-export const SpeedChip = ({
- children,
- active,
- className,
-}: {
- children: ReactNode;
- active?: boolean;
- className?: string;
-}) => (
- <span
- className={classNames(
- "inline-flex h-4 items-center rounded-full px-1.5 text-[10px] font-medium leading-none transition-colors duration-300",
- className,
- )}
- style={{
- background: active ? ED.accent : ED.ctlActive,
- color: active ? "#ffffff" : ED.text1,
- }}
- >
- {children}
- </span>
-);
diff --git a/apps/web/public/backgrounds/landing/london-thumb.webp b/apps/web/public/backgrounds/landing/london-thumb.webp
new file mode 100644
index 000000000..ef6253176
Binary files /dev/null and b/apps/web/public/backgrounds/landing/london-thumb.webp differ
diff --git a/apps/web/public/backgrounds/landing/london.webp b/apps/web/public/backgrounds/landing/london.webp
new file mode 100644
index 000000000..b3d50eed2
Binary files /dev/null and b/apps/web/public/backgrounds/landing/london.webp differ
diff --git a/apps/web/public/backgrounds/landing/miami-thumb.webp b/apps/web/public/backgrounds/landing/miami-thumb.webp
new file mode 100644
index 000000000..0e653a0af
Binary files /dev/null and b/apps/web/public/backgrounds/landing/miami-thumb.webp differ
diff --git a/apps/web/public/backgrounds/landing/miami.webp b/apps/web/public/backgrounds/landing/miami.webp
new file mode 100644
index 000000000..d46f4ce2b
Binary files /dev/null and b/apps/web/public/backgrounds/landing/miami.webp differ
diff --git a/apps/web/public/backgrounds/landing/monaco-thumb.webp b/apps/web/public/backgrounds/landing/monaco-thumb.webp
new file mode 100644
index 000000000..83864dc3a
Binary files /dev/null and b/apps/web/public/backgrounds/landing/monaco-thumb.webp differ
diff --git a/apps/web/public/backgrounds/landing/monaco.webp b/apps/web/public/backgrounds/landing/monaco.webp
new file mode 100644
index 000000000..e698ab8ff
Binary files /dev/null and b/apps/web/public/backgrounds/landing/monaco.webp differ
diff --git a/apps/web/public/backgrounds/landing/nyc.webp b/apps/web/public/backgrounds/landing/nyc.webp
new file mode 100644
index 000000000..c7556f635
Binary files /dev/null and b/apps/web/public/backgrounds/landing/nyc.webp differ
diff --git a/apps/web/public/backgrounds/landing/rome.webp b/apps/web/public/backgrounds/landing/rome.webp
new file mode 100644
index 000000000..5c5d324b6
Binary files /dev/null and b/apps/web/public/backgrounds/landing/rome.webp differ
diff --git a/apps/web/public/backgrounds/landing/santorini-thumb.webp b/apps/web/public/backgrounds/landing/santorini-thumb.webp
new file mode 100644
index 000000000..05d1b4cf9
Binary files /dev/null and b/apps/web/public/backgrounds/landing/santorini-thumb.webp differ
diff --git a/apps/web/public/backgrounds/landing/santorini.webp b/apps/web/public/backgrounds/landing/santorini.webp
new file mode 100644
index 000000000..39978fdd5
Binary files /dev/null and b/apps/web/public/backgrounds/landing/santorini.webp differ
diff --git a/apps/web/public/backgrounds/landing/sf-960.webp b/apps/web/public/backgrounds/landing/sf-960.webp
new file mode 100644
index 000000000..9ea3bb5d0
Binary files /dev/null and b/apps/web/public/backgrounds/landing/sf-960.webp differ
diff --git a/apps/web/public/backgrounds/landing/sf-thumb.webp b/apps/web/public/backgrounds/landing/sf-thumb.webp
new file mode 100644
index 000000000..7bd425c97
Binary files /dev/null and b/apps/web/public/backgrounds/landing/sf-thumb.webp differ
diff --git a/apps/web/public/backgrounds/landing/sf.webp b/apps/web/public/backgrounds/landing/sf.webp
new file mode 100644
index 000000000..643fbe93a
Binary files /dev/null and b/apps/web/public/backgrounds/landing/sf.webp differ
diff --git a/apps/web/public/videos/home-two/webcam-poster.jpg b/apps/web/public/videos/home-two/webcam-poster.jpg
deleted file mode 100644
index 4b6aa3b79..000000000
Binary files a/apps/web/public/videos/home-two/webcam-poster.jpg and /dev/null differ
diff --git a/apps/web/public/videos/home-two/webcam.mp4 b/apps/web/public/videos/home-two/webcam.mp4
deleted file mode 100644
index d56d9d384..000000000
Binary files a/apps/web/public/videos/home-two/webcam.mp4 and /dev/null differ
diff --git a/apps/web/public/videos/landing/presenter-avatar.webp b/apps/web/public/videos/landing/presenter-avatar.webp
new file mode 100644
index 000000000..8324aff4a
Binary files /dev/null and b/apps/web/public/videos/landing/presenter-avatar.webp differ
diff --git a/apps/web/public/videos/landing/presenter-poster.webp b/apps/web/public/videos/landing/presenter-poster.webp
new file mode 100644
index 000000000..5b8121130
Binary files /dev/null and b/apps/web/public/videos/landing/presenter-poster.webp differ
diff --git a/apps/web/public/videos/landing/presenter.mp4 b/apps/web/public/videos/landing/presenter.mp4
new file mode 100644
index 000000000..02e220752
Binary files /dev/null and b/apps/web/public/videos/landing/presenter.mp4 differ
diff --git a/apps/web/public/videos/landing/presenter.webm b/apps/web/public/videos/landing/presenter.webm
new file mode 100644
index 000000000..15c2f6bf0
Binary files /dev/null and b/apps/web/public/videos/landing/presenter.webm differ