Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Add homepage mode UI and adjust header/navbar

Richie McIlroy82597a1fe421
diff --git a/apps/web/app/(site)/Navbar.tsx b/apps/web/app/(site)/Navbar.tsx
index 300c76326..c1593218d 100644
--- a/apps/web/app/(site)/Navbar.tsx
+++ b/apps/web/app/(site)/Navbar.tsx
@@ -190,8 +190,9 @@ export const Navbar = ({ stars }: NavbarProps) => {
</NavigationMenuContent>
</>
) : (
- <Link href={link.href} legacyBehavior passHref>
- <NavigationMenuLink
+ <NavigationMenuLink asChild>
+ <Link
+ href={link.href}
className={classNames(
navigationMenuTriggerStyle(),
pathname === link.href
@@ -201,8 +202,8 @@ export const Navbar = ({ stars }: NavbarProps) => {
)}
>
{link.label}
- </NavigationMenuLink>
- </Link>
+ </Link>
+ </NavigationMenuLink>
)}
</NavigationMenuItem>
))}
diff --git a/apps/web/components/pages/HomePage/Header.tsx b/apps/web/components/pages/HomePage/Header.tsx
index f27027ae0..d88b0a41f 100644
--- a/apps/web/components/pages/HomePage/Header.tsx
+++ b/apps/web/components/pages/HomePage/Header.tsx
@@ -71,8 +71,8 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
const headerContent = getHeaderContent();
return (
- <div className="mt-[110px] mb-10 sm:mb-[150px] min-h-screen w-full max-w-[1920px] overflow-x-hidden md:overflow-visible mx-auto md:mt-[20vh]">
- <div className="flex flex-col justify-center lg:justify-start xl:flex-row relative z-10 px-5 w-full mb-[200px]">
+ <div className="mt-[90px] mb-[60px] sm:mb-[100px] md:mb-[160px] w-full max-w-[1920px] overflow-x-hidden md:overflow-visible mx-auto md:mt-[140px] xl:min-h-[700px]">
+ <div className="flex flex-col justify-center lg:justify-start xl:flex-row relative z-10 px-5 w-full mb-0">
<div className="w-full max-w-2xl xl:max-w-[530px] 2xl:mt-12 mx-auto xl:ml-[100px] 2xl:ml-[150px]">
<div className="flex flex-col text-left w-full max-w-[650px]">
<motion.h1
diff --git a/apps/web/components/pages/HomePage/InstantModeDetail.tsx b/apps/web/components/pages/HomePage/InstantModeDetail.tsx
new file mode 100644
index 000000000..ebd3887eb
--- /dev/null
+++ b/apps/web/components/pages/HomePage/InstantModeDetail.tsx
@@ -0,0 +1,758 @@
+"use client";
+
+import { Button } from "@cap/ui";
+import { AnimatePresence, motion } from "framer-motion";
+import {
+ BookOpen,
+ Check,
+ Copy,
+ FileText,
+ Globe,
+ Link2,
+ MessageCircle,
+ Pause,
+ Play,
+ Sparkles,
+ Upload,
+ Zap,
+} from "lucide-react";
+import { useCallback, useEffect, useRef, useState } from "react";
+import UpgradeToPro from "../_components/UpgradeToPro";
+
+const instantFeatures = [
+ {
+ icon: <Link2 className="size-5" />,
+ title: "Instant Links",
+ description: "Shareable URL, immediately",
+ },
+ {
+ icon: <Upload className="size-5" />,
+ title: "Background Upload",
+ description: "Uploads while you record",
+ },
+ {
+ icon: <FileText className="size-5" />,
+ title: "Auto Transcription",
+ description: "AI-generated captions",
+ },
+ {
+ icon: <Sparkles className="size-5" />,
+ title: "AI Summaries",
+ description: "Titles & descriptions",
+ },
+ {
+ icon: <BookOpen className="size-5" />,
+ title: "Smart Chapters",
+ description: "Auto-segmented timeline",
+ },
+ {
+ icon: <Globe className="size-5" />,
+ title: "Browser Viewing",
+ description: "No downloads required",
+ },
+];
+
+const EMOJIS = ["๐Ÿ˜‚", "๐Ÿ˜", "๐Ÿ˜ฎ", "๐Ÿ™Œ", "๐Ÿ‘", "๐Ÿ‘Ž"] as const;
+
+interface FloatingEmoji {
+ id: number;
+ emoji: string;
+ x: number;
+}
+
+const TABS = ["activity", "summary", "transcript"] as const;
+type TabKey = (typeof TABS)[number];
+
+const featureContainerVariants = {
+ hidden: {},
+ visible: {
+ transition: {
+ staggerChildren: 0.07,
+ },
+ },
+};
+
+const featureItemVariants = {
+ hidden: { opacity: 0, y: 20, scale: 0.97 },
+ visible: {
+ opacity: 1,
+ y: 0,
+ scale: 1,
+ transition: { duration: 0.4, ease: [0.25, 0.1, 0.25, 1] },
+ },
+};
+
+const formatTime = (seconds: number) => {
+ const safe = Number.isFinite(seconds) ? seconds : 0;
+ const m = Math.floor(safe / 60);
+ const s = Math.floor(safe % 60);
+ return `${m}:${s.toString().padStart(2, "0")}`;
+};
+
+const MockSharePage = () => {
+ const [emojiCounts, setEmojiCounts] = useState<Record<string, number>>({});
+ const [floatingEmojis, setFloatingEmojis] = useState<FloatingEmoji[]>([]);
+ const [linkCopied, setLinkCopied] = useState(false);
+ const [activeTab, setActiveTab] = useState<TabKey>("activity");
+ const [showCommentInput, setShowCommentInput] = useState(false);
+ const [activeChapter, setActiveChapter] = useState<number | null>(null);
+ const [tabInteracted, setTabInteracted] = useState(false);
+ const [isPlaying, setIsPlaying] = useState(false);
+ const [progress, setProgress] = useState(0);
+
+ const videoRef = useRef<HTMLVideoElement>(null);
+ const containerRef = useRef<HTMLDivElement>(null);
+ const videoLoadedRef = useRef(false);
+ const userPausedRef = useRef(false);
+
+ useEffect(() => {
+ const container = containerRef.current;
+ const video = videoRef.current;
+ if (!container || !video) return;
+
+ const observer = new IntersectionObserver(
+ ([entry]) => {
+ if (entry.isIntersecting) {
+ if (!videoLoadedRef.current) {
+ video.src = "/illustrations/homepage-animation.mp4";
+ videoLoadedRef.current = true;
+ }
+ if (!userPausedRef.current) {
+ video.play().catch(() => {});
+ setIsPlaying(true);
+ }
+ } else {
+ video.pause();
+ setIsPlaying(false);
+ }
+ },
+ { rootMargin: "200px" },
+ );
+
+ observer.observe(container);
+ return () => observer.disconnect();
+ }, []);
+
+ useEffect(() => {
+ if (tabInteracted) return;
+ let index = 0;
+ const interval = setInterval(() => {
+ index = (index + 1) % TABS.length;
+ setActiveTab(TABS[index]);
+ }, 3000);
+ return () => clearInterval(interval);
+ }, [tabInteracted]);
+
+ const handleEmojiClick = useCallback((emoji: string, index: number) => {
+ setEmojiCounts((prev) => ({
+ ...prev,
+ [emoji]: (prev[emoji] || 0) + 1,
+ }));
+
+ const id = Date.now() + index;
+ const x = (Math.random() - 0.5) * 40;
+ setFloatingEmojis((prev) => [...prev, { id, emoji, x }]);
+
+ setTimeout(() => {
+ setFloatingEmojis((prev) => prev.filter((e) => e.id !== id));
+ }, 800);
+ }, []);
+
+ const handleCopyLink = useCallback(() => {
+ setLinkCopied(true);
+ setTimeout(() => setLinkCopied(false), 2000);
+ }, []);
+
+ const handleTabClick = useCallback((tab: TabKey) => {
+ setTabInteracted(true);
+ setActiveTab(tab);
+ }, []);
+
+ const handlePlayPause = useCallback(() => {
+ const video = videoRef.current;
+ if (!video) return;
+ if (video.paused) {
+ video.play().catch(() => {});
+ setIsPlaying(true);
+ userPausedRef.current = false;
+ } else {
+ video.pause();
+ setIsPlaying(false);
+ userPausedRef.current = true;
+ }
+ }, []);
+
+ const handleTimeUpdate = useCallback(() => {
+ const v = videoRef.current;
+ if (v?.duration) {
+ setProgress((v.currentTime / v.duration) * 100);
+ }
+ }, []);
+
+ return (
+ <div ref={containerRef} className="select-none bg-gray-2">
+ <motion.div
+ className="px-4 md:px-6 pt-4 md:pt-6"
+ initial={{ opacity: 0, y: 10 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.4, delay: 0.2 }}
+ >
+ <h3 className="text-sm md:text-lg font-medium text-gray-12">
+ How to build a React component
+ </h3>
+ <div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 mt-2">
+ <div className="flex items-center gap-2">
+ <div className="w-6 h-6 md:w-7 md:h-7 rounded-full bg-gradient-to-br from-blue-400 to-blue-600 shrink-0" />
+ <div className="flex flex-col">
+ <span className="text-[11px] md:text-xs text-gray-12 font-medium">
+ John Doe
+ </span>
+ <span className="text-[10px] md:text-[11px] text-gray-10">
+ 2 minutes ago
+ </span>
+ </div>
+ </div>
+ <motion.button
+ type="button"
+ className="flex items-center gap-1.5 px-2.5 py-1 md:px-3 md:py-1.5 rounded-lg border border-gray-5 bg-white text-[10px] md:text-xs text-gray-11 font-medium w-fit cursor-pointer transition-colors hover:bg-gray-2"
+ onClick={handleCopyLink}
+ whileTap={{ scale: 0.95 }}
+ >
+ {linkCopied ? (
+ <>
+ <Check className="size-3 text-green-500" />
+ <span className="text-green-600">Copied!</span>
+ </>
+ ) : (
+ <>
+ cap.link/m4k92x
+ <Copy className="size-3 text-gray-9" />
+ </>
+ )}
+ </motion.button>
+ </div>
+ </motion.div>
+
+ <motion.div
+ className="flex flex-col lg:flex-row gap-3 md:gap-4 px-4 md:px-6 mt-3 md:mt-4"
+ initial={{ opacity: 0, y: 15 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.5, delay: 0.3 }}
+ >
+ <div className="flex-1">
+ <div className="overflow-hidden relative bg-gradient-to-br from-neutral-100 to-neutral-200 rounded-xl md:rounded-2xl border border-gray-5 aspect-video group w-full block">
+ <video
+ ref={videoRef}
+ className="absolute inset-0 w-full h-full object-cover"
+ muted
+ playsInline
+ loop
+ preload="none"
+ tabIndex={-1}
+ onTimeUpdate={handleTimeUpdate}
+ />
+
+ <button
+ type="button"
+ className="absolute inset-0 z-[5] cursor-pointer bg-transparent"
+ onClick={handlePlayPause}
+ />
+
+ <AnimatePresence>
+ {!isPlaying && (
+ <motion.div
+ className="absolute inset-0 flex items-center justify-center bg-black/20 z-10 pointer-events-none"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.15 }}
+ >
+ <motion.div
+ className="w-10 h-10 md:w-14 md:h-14 rounded-full bg-white/90 backdrop-blur-sm flex items-center justify-center shadow-lg"
+ initial={{ scale: 0.8 }}
+ animate={{ scale: 1 }}
+ exit={{ scale: 0.8 }}
+ transition={{
+ type: "spring",
+ stiffness: 300,
+ damping: 25,
+ }}
+ >
+ <Play
+ className="size-4 md:size-6 text-gray-12 ml-0.5"
+ fill="currentColor"
+ />
+ </motion.div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ <div
+ className={`absolute bottom-0 left-0 right-0 z-20 transition-opacity duration-200 ${
+ isPlaying ? "opacity-0 group-hover:opacity-100" : "opacity-100"
+ }`}
+ >
+ <div className="flex items-center gap-1.5 px-2 md:px-3 py-1.5 md:py-2 bg-gradient-to-t from-black/60 to-transparent">
+ <button
+ type="button"
+ className="shrink-0 cursor-pointer"
+ onClick={handlePlayPause}
+ >
+ {isPlaying ? (
+ <Pause
+ className="size-3 md:size-4 text-white"
+ fill="white"
+ />
+ ) : (
+ <Play
+ className="size-3 md:size-4 text-white ml-px"
+ fill="white"
+ />
+ )}
+ </button>
+ <div className="flex-1 h-0.5 md:h-1 rounded-full bg-white/30 relative overflow-hidden">
+ <div
+ className="absolute left-0 top-0 h-full rounded-full bg-white/80"
+ style={{ width: `${progress}%` }}
+ />
+ </div>
+ <span className="text-[7px] md:text-[9px] text-white/70 font-mono shrink-0">
+ {formatTime(videoRef.current?.currentTime || 0)} /{" "}
+ {formatTime(videoRef.current?.duration || 0)}
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div className="hidden lg:flex flex-col w-56 xl:w-64 bg-white rounded-xl md:rounded-2xl border border-gray-5 overflow-hidden">
+ <div className="flex border-b border-gray-4">
+ {(
+ [
+ ["activity", "Activity"],
+ ["summary", "Summary"],
+ ["transcript", "Transcript"],
+ ] as const
+ ).map(([key, label]) => (
+ <button
+ key={key}
+ type="button"
+ className={`flex-1 px-3 py-2 text-[10px] font-medium cursor-pointer transition-colors ${
+ activeTab === key
+ ? "text-gray-12 border-b-2 border-blue-500"
+ : "text-gray-9 hover:text-gray-11"
+ }`}
+ onClick={() => handleTabClick(key)}
+ >
+ {label}
+ </button>
+ ))}
+ </div>
+ <div className="flex-1 p-3 overflow-hidden">
+ <AnimatePresence mode="wait">
+ {activeTab === "activity" && (
+ <motion.div
+ key="activity"
+ className="space-y-3"
+ initial={{ opacity: 0, x: -8 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: 8 }}
+ transition={{ duration: 0.15 }}
+ >
+ <div className="flex items-start gap-2">
+ <div className="w-5 h-5 rounded-full bg-green-100 shrink-0 mt-0.5" />
+ <div>
+ <span className="text-[10px] font-medium text-gray-12">
+ Sarah M.
+ </span>
+ <p className="text-[9px] text-gray-10 mt-0.5">
+ This is really helpful, thanks!
+ </p>
+ </div>
+ </div>
+ <div className="flex items-start gap-2">
+ <div className="w-5 h-5 rounded-full bg-amber-100 shrink-0 mt-0.5" />
+ <div>
+ <span className="text-[10px] font-medium text-gray-12">
+ Mike R.
+ </span>
+ <p className="text-[9px] text-gray-10 mt-0.5">
+ Great walkthrough
+ </p>
+ </div>
+ </div>
+ <div className="flex items-start gap-2">
+ <div className="w-5 h-5 rounded-full bg-purple-100 shrink-0 mt-0.5" />
+ <div>
+ <span className="text-[10px] font-medium text-gray-12">
+ Alex K.
+ </span>
+ <p className="text-[9px] text-gray-10 mt-0.5">
+ Can you share the repo?
+ </p>
+ </div>
+ </div>
+ </motion.div>
+ )}
+ {activeTab === "summary" && (
+ <motion.div
+ key="summary"
+ initial={{ opacity: 0, x: -8 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: 8 }}
+ transition={{ duration: 0.15 }}
+ >
+ <span className="text-[9px] font-medium text-gray-8 flex items-center gap-1">
+ <Sparkles className="size-2.5" /> Generated by Cap AI
+ </span>
+ <p className="text-[9px] text-gray-11 mt-1.5 leading-relaxed">
+ A step-by-step walkthrough of building a reusable React
+ component from scratch, covering props, state management,
+ and testing best practices.
+ </p>
+ </motion.div>
+ )}
+ {activeTab === "transcript" && (
+ <motion.div
+ key="transcript"
+ className="space-y-2"
+ initial={{ opacity: 0, x: -8 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: 8 }}
+ transition={{ duration: 0.15 }}
+ >
+ <div className="flex gap-2">
+ <span className="text-[9px] text-blue-500 shrink-0 w-6">
+ 0:00
+ </span>
+ <span className="text-[9px] text-gray-11">
+ Hey everyone, today we're going to build a React
+ component...
+ </span>
+ </div>
+ <div className="flex gap-2">
+ <span className="text-[9px] text-blue-500 shrink-0 w-6">
+ 0:12
+ </span>
+ <span className="text-[9px] text-gray-11">
+ First, let's set up our project structure and install the
+ dependencies...
+ </span>
+ </div>
+ <div className="flex gap-2">
+ <span className="text-[9px] text-blue-500 shrink-0 w-6">
+ 0:28
+ </span>
+ <span className="text-[9px] text-gray-11">
+ Now let's create our component file and define the
+ props...
+ </span>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ </div>
+ </motion.div>
+
+ <motion.div
+ className="flex justify-center px-4 md:px-6 mt-3 md:mt-4"
+ initial={{ opacity: 0, y: 10 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.4, delay: 0.4 }}
+ >
+ <div className="relative flex items-center gap-1 md:gap-1.5 p-1.5 md:p-2 bg-white rounded-full border border-gray-5 w-fit">
+ {EMOJIS.map((emoji, i) => (
+ <motion.button
+ key={emoji}
+ type="button"
+ className="relative flex items-center justify-center size-6 md:size-8 text-xs md:text-base rounded-full hover:bg-gray-2 cursor-pointer font-emoji"
+ onClick={() => handleEmojiClick(emoji, i)}
+ whileTap={{ scale: 1.4 }}
+ transition={{
+ type: "spring",
+ stiffness: 500,
+ damping: 15,
+ }}
+ >
+ {emoji}
+ <AnimatePresence>
+ {(emojiCounts[emoji] || 0) > 0 && (
+ <motion.span
+ className="absolute -top-1 -right-1 bg-blue-500 text-white text-[7px] font-bold rounded-full min-w-[14px] h-[14px] flex items-center justify-center px-0.5"
+ initial={{ scale: 0 }}
+ animate={{ scale: 1 }}
+ key={emojiCounts[emoji]}
+ >
+ {emojiCounts[emoji]}
+ </motion.span>
+ )}
+ </AnimatePresence>
+ </motion.button>
+ ))}
+
+ <AnimatePresence>
+ {floatingEmojis.map((fe) => (
+ <motion.span
+ key={fe.id}
+ className="absolute text-lg md:text-xl pointer-events-none font-emoji"
+ initial={{ opacity: 1, y: 0, x: fe.x }}
+ animate={{ opacity: 0, y: -50, x: fe.x }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.7, ease: "easeOut" }}
+ style={{ bottom: "100%", left: "50%" }}
+ >
+ {fe.emoji}
+ </motion.span>
+ ))}
+ </AnimatePresence>
+
+ <div className="w-px h-4 bg-gray-5 mx-1 md:mx-2 hidden sm:block" />
+ <motion.button
+ type="button"
+ className="px-2.5 md:px-3 py-1 md:py-1.5 bg-gray-12 text-white text-[9px] md:text-[10px] font-medium rounded-full cursor-pointer flex items-center gap-1"
+ whileTap={{ scale: 0.92 }}
+ onClick={() => setShowCommentInput((prev) => !prev)}
+ >
+ <MessageCircle className="size-2.5" />
+ Comment
+ </motion.button>
+ </div>
+ </motion.div>
+
+ <AnimatePresence>
+ {showCommentInput && (
+ <motion.div
+ className="px-4 md:px-6 mt-2"
+ initial={{ opacity: 0, height: 0 }}
+ animate={{ opacity: 1, height: "auto" }}
+ exit={{ opacity: 0, height: 0 }}
+ transition={{ duration: 0.2 }}
+ >
+ <div className="flex items-center gap-2 p-2 bg-white rounded-xl border border-gray-5">
+ <div className="w-5 h-5 rounded-full bg-gradient-to-br from-blue-400 to-blue-600 shrink-0" />
+ <div className="flex-1 text-[10px] text-gray-8 select-none">
+ Add a comment...
+ </div>
+ <div className="px-2 py-0.5 bg-gray-12 text-white text-[8px] font-medium rounded-full">
+ Send
+ </div>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ <motion.div
+ className="px-4 md:px-6 mt-3 md:mt-4 pb-4 md:pb-6"
+ initial={{ opacity: 0, y: 10 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.4, delay: 0.5 }}
+ >
+ <div className="p-3 md:p-4 bg-white rounded-xl md:rounded-2xl border border-gray-3">
+ <h4 className="text-xs md:text-sm font-medium text-gray-12">
+ Summary
+ </h4>
+ <span className="text-[9px] md:text-[10px] font-medium text-gray-8">
+ Generated by Cap AI
+ </span>
+ <p className="text-[10px] md:text-xs text-gray-11 mt-1.5 md:mt-2 leading-relaxed">
+ A step-by-step walkthrough of building a reusable React component
+ from scratch, covering props, state management, and testing best
+ practices for production apps.
+ </p>
+
+ <h4 className="text-xs md:text-sm font-medium text-gray-12 mt-3 md:mt-4 mb-1.5 md:mb-2">
+ Chapters
+ </h4>
+ <div className="divide-y divide-gray-3">
+ {[
+ { time: "0:00", title: "Introduction" },
+ { time: "0:45", title: "Project setup" },
+ { time: "1:30", title: "Building the component" },
+ ].map((chapter, i) => (
+ <motion.button
+ key={chapter.time}
+ type="button"
+ className={`flex items-center w-full py-1.5 md:py-2 px-1.5 md:px-2 rounded cursor-pointer transition-colors ${
+ activeChapter === i ? "bg-blue-50" : "hover:bg-gray-2"
+ }`}
+ onClick={() => setActiveChapter(activeChapter === i ? null : i)}
+ whileTap={{ scale: 0.98 }}
+ >
+ <span
+ className={`w-10 md:w-14 text-[9px] md:text-xs shrink-0 text-left ${
+ activeChapter === i
+ ? "text-blue-500 font-medium"
+ : "text-gray-9"
+ }`}
+ >
+ {chapter.time}
+ </span>
+ <span
+ className={`text-[10px] md:text-xs ${
+ activeChapter === i
+ ? "text-blue-600 font-medium"
+ : "text-gray-12"
+ }`}
+ >
+ {chapter.title}
+ </span>
+ </motion.button>
+ ))}
+ </div>
+ </div>
+ </motion.div>
+
+ <AnimatePresence>
+ {linkCopied && (
+ <motion.div
+ className="absolute bottom-3 md:bottom-5 left-1/2 -translate-x-1/2 z-20"
+ initial={{ opacity: 0, y: 15, scale: 0.9 }}
+ animate={{ opacity: 1, y: 0, scale: 1 }}
+ exit={{ opacity: 0, y: -5, scale: 0.95 }}
+ transition={{
+ type: "spring",
+ stiffness: 400,
+ damping: 25,
+ }}
+ >
+ <div className="bg-gray-12 text-white text-[10px] md:text-xs font-medium px-3 md:px-4 py-1.5 md:py-2 rounded-full flex items-center gap-1.5 md:gap-2 shadow-lg whitespace-nowrap">
+ <Check className="size-3 md:size-3.5 text-green-400" />
+ Link copied to clipboard
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ );
+};
+
+const InstantModeDetail = () => {
+ return (
+ <div className="w-full max-w-[1000px] mx-auto px-5">
+ <motion.div
+ initial={{ opacity: 0, y: 30 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-80px" }}
+ transition={{ duration: 0.6 }}
+ className="text-center mb-8 md:mb-12"
+ >
+ <motion.div
+ className="flex items-center justify-center gap-2 mb-4"
+ initial={{ opacity: 0, scale: 0.8 }}
+ whileInView={{ opacity: 1, scale: 1 }}
+ viewport={{ once: true }}
+ transition={{
+ duration: 0.5,
+ type: "spring",
+ stiffness: 200,
+ }}
+ >
+ <motion.div
+ animate={{ rotate: [0, -10, 10, -5, 0] }}
+ transition={{
+ duration: 2,
+ repeat: Number.POSITIVE_INFINITY,
+ repeatDelay: 3,
+ ease: "easeInOut",
+ }}
+ >
+ <Zap fill="yellow" className="size-5" strokeWidth={1.5} />
+ </motion.div>
+ <span className="text-sm font-medium text-amber-600 uppercase tracking-wider">
+ Instant Mode
+ </span>
+ </motion.div>
+ <motion.h2
+ className="text-3xl md:text-4xl font-medium text-gray-12 mb-3"
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.5, delay: 0.1 }}
+ >
+ Share your screen or webcam instantly
+ </motion.h2>
+ <motion.p
+ className="text-base md:text-lg text-gray-10 max-w-[600px] mx-auto"
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.5, delay: 0.2 }}
+ >
+ Hit record, stop, and share. Your video is live with an AI-generated
+ title, summary, chapters, and transcript โ€” all created automatically.
+ </motion.p>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 40, scale: 0.97 }}
+ whileInView={{ opacity: 1, y: 0, scale: 1 }}
+ viewport={{ once: true, margin: "-60px" }}
+ transition={{
+ duration: 0.7,
+ delay: 0.15,
+ ease: [0.25, 0.1, 0.25, 1],
+ }}
+ className="relative"
+ >
+ <div className="absolute -inset-4 md:-inset-8 bg-gradient-to-b from-amber-100/40 via-amber-50/20 to-transparent rounded-3xl blur-2xl pointer-events-none" />
+ <div className="relative rounded-2xl border border-gray-5 bg-gray-2 shadow-xl shadow-black/5 overflow-hidden">
+ <MockSharePage />
+ </div>
+ </motion.div>
+
+ <motion.div
+ variants={featureContainerVariants}
+ initial="hidden"
+ whileInView="visible"
+ viewport={{ once: true, margin: "-40px" }}
+ className="grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3 mt-5 md:mt-6"
+ >
+ {instantFeatures.map((feature) => (
+ <motion.div
+ key={feature.title}
+ variants={featureItemVariants}
+ whileHover={{
+ y: -3,
+ transition: {
+ type: "spring",
+ stiffness: 400,
+ damping: 25,
+ },
+ }}
+ className="flex items-start gap-2.5 sm:gap-3 p-3 sm:p-4 rounded-xl border border-gray-5 bg-gray-1 transition-shadow hover:shadow-md hover:border-amber-200"
+ >
+ <div className="text-amber-600 mt-0.5 shrink-0">{feature.icon}</div>
+ <div>
+ <h4 className="text-sm font-medium text-gray-12">
+ {feature.title}
+ </h4>
+ <p className="text-xs text-gray-10 mt-0.5">
+ {feature.description}
+ </p>
+ </div>
+ </motion.div>
+ ))}
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-40px" }}
+ transition={{ duration: 0.5, delay: 0.3 }}
+ className="flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4 mt-5 md:mt-6"
+ >
+ <Button href="/features/instant-mode" variant="white" size="lg">
+ Learn more
+ </Button>
+ <UpgradeToPro />
+ </motion.div>
+ </div>
+ );
+};
+
+export default InstantModeDetail;
diff --git a/apps/web/components/pages/HomePage/RecordingModePicker.tsx b/apps/web/components/pages/HomePage/RecordingModePicker.tsx
new file mode 100644
index 000000000..25c2b4e10
--- /dev/null
+++ b/apps/web/components/pages/HomePage/RecordingModePicker.tsx
@@ -0,0 +1,336 @@
+"use client";
+
+import { AnimatePresence, motion } from "framer-motion";
+import { useCallback, useEffect, useRef, useState } from "react";
+
+const InstantIcon = ({ className }: { className?: string }) => (
+ <svg
+ viewBox="0 0 152 223"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ className={className}
+ aria-hidden="true"
+ >
+ <path
+ d="M150.167 109.163L53.4283 220.65C52.4032 221.826 51.05 222.613 49.573 222.89C48.0959 223.167 46.5752 222.919 45.2403 222.185C43.9054 221.451 42.8287 220.27 42.1727 218.82C41.5167 217.369 41.317 215.729 41.6038 214.146L54.2661 146.019L4.48901 125.914C3.41998 125.484 2.46665 124.776 1.7142 123.853C0.961745 122.93 0.433602 121.82 0.176954 120.624C-0.0796948 119.428 -0.0568536 118.182 0.243435 116.997C0.543723 115.813 1.1121 114.727 1.8978 113.837L98.6363 2.35043C99.6614 1.17365 101.015 0.387451 102.492 0.110461C103.969 -0.166529 105.489 0.080724 106.824 0.814909C108.159 1.54909 109.236 2.73037 109.892 4.18049C110.548 5.63061 110.748 7.27088 110.461 8.85379L97.7639 77.0554L147.541 97.1322C148.602 97.5652 149.548 98.2727 150.294 99.1922C151.041 100.112 151.566 101.215 151.822 102.404C152.078 103.593 152.058 104.832 151.763 106.011C151.468 107.19 150.908 108.273 150.132 109.163H150.167Z"
+ fill="currentColor"
+ />
+ </svg>
+);
+
+const StudioIcon = ({ className }: { className?: string }) => (
+ <svg
+ viewBox="0 0 124 119"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ className={className}
+ aria-hidden="true"
+ >
+ <path
+ d="M119.04 49.5796H48.42L115.32 31.9207C115.954 31.7539 116.548 31.4634 117.068 31.0659C117.588 30.6684 118.025 30.1718 118.352 29.6047C118.68 29.0377 118.891 28.4115 118.975 27.7621C119.06 27.1128 119.014 26.4533 118.842 25.8217L113.783 7.22689C113.087 4.72519 111.433 2.59843 109.179 1.30722C106.926 0.0160012 104.254 -0.335719 101.743 0.328232L7.32875 25.2452C6.07164 25.5715 4.89225 26.1452 3.85965 26.9328C2.82705 27.7203 1.96198 28.706 1.31509 29.8319C0.664581 30.9441 0.244302 32.1756 0.0792245 33.4533C-0.0858532 34.7311 0.00763733 36.0289 0.354142 37.2698L4.96668 54.2654C4.96668 54.3522 4.96668 54.4452 4.96668 54.5382V109.083C4.96668 111.713 6.01176 114.235 7.87202 116.095C9.73228 117.955 12.2553 119 14.8861 119H114.081C116.711 119 119.234 117.955 121.095 116.095C122.955 114.235 124 111.713 124 109.083V54.5382C124 53.2231 123.477 51.9618 122.547 51.0319C121.617 50.102 120.356 49.5796 119.04 49.5796ZM104.26 9.91073L107.98 23.5903L87.1555 29.1253L69.7159 19.0346L104.26 9.91073ZM33.2061 28.6728L50.6395 38.7388L13.6896 48.4887L9.9698 34.8029L33.2061 28.6728Z"
+ fill="currentColor"
+ />
+ </svg>
+);
+
+const ScreenshotIcon = ({ className }: { className?: string }) => (
+ <svg
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ xmlns="http://www.w3.org/2000/svg"
+ className={className}
+ aria-hidden="true"
+ >
+ <path d="M21,2H3A1,1,0,0,0,2,3V21a1,1,0,0,0,1,1H21a1,1,0,0,0,1-1V3A1,1,0,0,0,21,2ZM20,14l-3-3-5,5-2-2L4,20V4H20ZM6,8.5A2.5,2.5,0,1,1,8.5,11,2.5,2.5,0,0,1,6,8.5Z" />
+ </svg>
+);
+
+type ModeId = "instant" | "studio" | "screenshot";
+
+interface ModeOption {
+ id: ModeId;
+ title: string;
+ description: string;
+ icon: (props: { className?: string }) => React.JSX.Element;
+}
+
+const modes: ModeOption[] = [
+ {
+ id: "instant",
+ title: "Instant",
+ description:
+ "Share instantly with a link. Your recording uploads as you record, so you can share it immediately when you're done.",
+ icon: InstantIcon,
+ },
+ {
+ id: "studio",
+ title: "Studio",
+ description:
+ "Record locally in the highest quality for editing later. Perfect for creating polished content with effects and transitions.",
+ icon: StudioIcon,
+ },
+ {
+ id: "screenshot",
+ title: "Screenshot",
+ description:
+ "Capture and annotate screenshots instantly. Great for quick captures, bug reports, and visual communication.",
+ icon: ScreenshotIcon,
+ },
+];
+
+const AUTO_CYCLE_INTERVAL = 3500;
+
+const PILL_GAP = { base: 16, md: 20 };
+const PILL_PADDING = { base: 12, md: 14 };
+const CIRCLE_SIZE = { base: 72, md: 88 };
+
+const RecordingModePicker = () => {
+ const [selected, setSelected] = useState<ModeId>("instant");
+ const [userInteracted, setUserInteracted] = useState(false);
+ const [isInView, setIsInView] = useState(false);
+ const containerRef = useRef<HTMLDivElement>(null);
+
+ const handleSelect = useCallback((id: ModeId) => {
+ setUserInteracted(true);
+ setSelected(id);
+ }, []);
+
+ useEffect(() => {
+ if (userInteracted || !isInView) return;
+
+ const interval = setInterval(() => {
+ setSelected((prev) => {
+ const currentIndex = modes.findIndex((m) => m.id === prev);
+ return modes[(currentIndex + 1) % modes.length].id;
+ });
+ }, AUTO_CYCLE_INTERVAL);
+
+ return () => clearInterval(interval);
+ }, [userInteracted, isInView]);
+
+ useEffect(() => {
+ const el = containerRef.current;
+ if (!el) return;
+
+ const observer = new IntersectionObserver(
+ ([entry]) => {
+ setIsInView(entry.isIntersecting);
+ },
+ { threshold: 0.3 },
+ );
+
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, []);
+
+ const selectedMode = modes.find((m) => m.id === selected);
+
+ return (
+ <div ref={containerRef} className="w-full max-w-[1000px] mx-auto px-5">
+ <motion.div
+ initial={{ opacity: 0, y: 30 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-80px" }}
+ transition={{ duration: 0.6 }}
+ className="text-center mb-8 md:mb-14"
+ >
+ <span className="inline-block text-xs font-semibold text-gray-9 uppercase tracking-[0.2em] mb-3">
+ 3 Modes
+ </span>
+ <h2 className="text-3xl md:text-4xl font-medium text-gray-12 mb-3">
+ One app, every workflow
+ </h2>
+ <p className="text-base md:text-lg text-gray-10 max-w-[600px] mx-auto">
+ Whether you need speed, studio quality, or a quick screenshot โ€” Cap
+ has a mode for it.
+ </p>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-40px" }}
+ transition={{ duration: 0.5, delay: 0.15 }}
+ className="flex flex-col items-center"
+ >
+ <div className="relative">
+ <div
+ className="md:hidden absolute rounded-full border border-gray-5 bg-gray-3 left-0 right-0 top-0"
+ style={{
+ height: `${CIRCLE_SIZE.base + PILL_PADDING.base * 2}px`,
+ }}
+ />
+ <div
+ className="hidden md:block absolute rounded-full border border-gray-5 bg-gray-3 left-0 right-0 top-0"
+ style={{
+ height: `${CIRCLE_SIZE.md + PILL_PADDING.md * 2}px`,
+ }}
+ />
+
+ <div
+ className="relative grid grid-cols-3 md:hidden"
+ style={{
+ gap: `${PILL_GAP.base}px`,
+ padding: `${PILL_PADDING.base}px`,
+ }}
+ >
+ {modes.map((mode) => {
+ const isSelected = selected === mode.id;
+
+ return (
+ <div
+ key={mode.id}
+ className="flex flex-col items-center"
+ style={{ width: `${CIRCLE_SIZE.base}px` }}
+ >
+ <motion.button
+ type="button"
+ onClick={() => handleSelect(mode.id)}
+ className="relative flex items-center justify-center rounded-full cursor-pointer"
+ style={{
+ width: `${CIRCLE_SIZE.base}px`,
+ height: `${CIRCLE_SIZE.base}px`,
+ }}
+ animate={{
+ backgroundColor: isSelected
+ ? "var(--gray-7)"
+ : "var(--gray-3)",
+ }}
+ whileHover={{
+ backgroundColor: "var(--gray-7)",
+ }}
+ transition={{ duration: 0.2 }}
+ >
+ {isSelected && (
+ <motion.div
+ className="absolute inset-0 rounded-full"
+ layoutId="modeRing"
+ style={{
+ boxShadow:
+ "0 0 0 3px var(--gray-1), 0 0 0 5px var(--blue-9)",
+ }}
+ transition={{
+ type: "spring",
+ stiffness: 400,
+ damping: 30,
+ }}
+ />
+ )}
+ <mode.icon
+ className={`size-7 transition-colors duration-200 ${
+ isSelected ? "text-gray-12" : "text-gray-10"
+ }`}
+ />
+ </motion.button>
+
+ <motion.span
+ className="mt-3 text-sm font-medium whitespace-nowrap cursor-pointer"
+ onClick={() => handleSelect(mode.id)}
+ animate={{
+ color: isSelected ? "var(--gray-12)" : "var(--gray-9)",
+ opacity: isSelected ? 1 : 0.6,
+ }}
+ transition={{ duration: 0.2 }}
+ >
+ {mode.title}
+ </motion.span>
+ </div>
+ );
+ })}
+ </div>
+
+ <div
+ className="relative hidden md:grid grid-cols-3"
+ style={{
+ gap: `${PILL_GAP.md}px`,
+ padding: `${PILL_PADDING.md}px`,
+ }}
+ >
+ {modes.map((mode) => {
+ const isSelected = selected === mode.id;
+
+ return (
+ <div
+ key={mode.id}
+ className="flex flex-col items-center"
+ style={{ width: `${CIRCLE_SIZE.md}px` }}
+ >
+ <motion.button
+ type="button"
+ onClick={() => handleSelect(mode.id)}
+ className="relative flex items-center justify-center rounded-full cursor-pointer"
+ style={{
+ width: `${CIRCLE_SIZE.md}px`,
+ height: `${CIRCLE_SIZE.md}px`,
+ }}
+ animate={{
+ backgroundColor: isSelected
+ ? "var(--gray-7)"
+ : "var(--gray-3)",
+ }}
+ whileHover={{
+ backgroundColor: "var(--gray-7)",
+ }}
+ transition={{ duration: 0.2 }}
+ >
+ {isSelected && (
+ <motion.div
+ className="absolute inset-0 rounded-full"
+ layoutId="modeRingMd"
+ style={{
+ boxShadow:
+ "0 0 0 3px var(--gray-1), 0 0 0 5.5px var(--blue-9)",
+ }}
+ transition={{
+ type: "spring",
+ stiffness: 400,
+ damping: 30,
+ }}
+ />
+ )}
+ <mode.icon
+ className={`size-8 transition-colors duration-200 ${
+ isSelected ? "text-gray-12" : "text-gray-10"
+ }`}
+ />
+ </motion.button>
+
+ <motion.span
+ className="mt-4 text-[15px] font-medium whitespace-nowrap cursor-pointer"
+ onClick={() => handleSelect(mode.id)}
+ animate={{
+ color: isSelected ? "var(--gray-12)" : "var(--gray-9)",
+ opacity: isSelected ? 1 : 0.6,
+ }}
+ transition={{ duration: 0.2 }}
+ >
+ {mode.title}
+ </motion.span>
+ </div>
+ );
+ })}
+ </div>
+ </div>
+
+ <AnimatePresence mode="wait">
+ {selectedMode && (
+ <motion.div
+ key={selectedMode.id}
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -8 }}
+ transition={{ duration: 0.25, ease: "easeOut" }}
+ className="mt-6 md:mt-8 max-w-[480px] text-center px-2"
+ >
+ <p className="text-base text-gray-10 leading-relaxed">
+ {selectedMode.description}
+ </p>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </motion.div>
+ </div>
+ );
+};
+
+export default RecordingModePicker;
diff --git a/apps/web/components/pages/HomePage/ScreenshotModeDetail.tsx b/apps/web/components/pages/HomePage/ScreenshotModeDetail.tsx
new file mode 100644
index 000000000..22ffd6e50
--- /dev/null
+++ b/apps/web/components/pages/HomePage/ScreenshotModeDetail.tsx
@@ -0,0 +1,915 @@
+"use client";
+
+import { Button } from "@cap/ui";
+import { AnimatePresence, motion } from "framer-motion";
+import {
+ Aperture,
+ Check,
+ Circle,
+ Copy,
+ Image as ImageIcon,
+ Layers,
+ Maximize2,
+ MousePointer2,
+ MoveUpRight,
+ Palette,
+ Save,
+ Scan,
+ Square,
+ Type,
+} from "lucide-react";
+import { useCallback, useEffect, useId, useRef, useState } from "react";
+import UpgradeToPro from "../_components/UpgradeToPro";
+
+const GRADIENTS = [
+ "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
+ "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
+ "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
+ "linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)",
+ "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
+ "linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)",
+];
+
+const GRADIENT_COLORS: [string, string][] = [
+ ["#667eea", "#764ba2"],
+ ["#f093fb", "#f5576c"],
+ ["#4facfe", "#00f2fe"],
+ ["#43e97b", "#38f9d7"],
+ ["#fa709a", "#fee140"],
+ ["#a18cd1", "#fbc2eb"],
+];
+
+interface AutoConfig {
+ gradientIndex: number;
+ padding: number;
+ rounded: number;
+ shadow: number;
+ showAnnotation: boolean;
+}
+
+const AUTO_CONFIGS: AutoConfig[] = [
+ {
+ gradientIndex: -1,
+ padding: 0,
+ rounded: 0,
+ shadow: 0,
+ showAnnotation: false,
+ },
+ {
+ gradientIndex: 0,
+ padding: 0,
+ rounded: 0,
+ shadow: 0,
+ showAnnotation: false,
+ },
+ {
+ gradientIndex: 0,
+ padding: 14,
+ rounded: 0,
+ shadow: 0,
+ showAnnotation: false,
+ },
+ {
+ gradientIndex: 0,
+ padding: 14,
+ rounded: 18,
+ shadow: 0,
+ showAnnotation: false,
+ },
+ {
+ gradientIndex: 0,
+ padding: 14,
+ rounded: 18,
+ shadow: 80,
+ showAnnotation: false,
+ },
+ {
+ gradientIndex: 4,
+ padding: 12,
+ rounded: 22,
+ shadow: 60,
+ showAnnotation: true,
+ },
+];
+
+const AUTO_STEP_DELAYS = [1000, 1500, 1500, 1500, 1500, 3000];
+
+const screenshotFeatures = [
+ {
+ icon: <Palette className="size-5" />,
+ title: "Beautiful Backgrounds",
+ description: "Gradients, wallpapers & solid colors",
+ },
+ {
+ icon: <Maximize2 className="size-5" />,
+ title: "Adjustable Padding",
+ description: "Clean spacing around your capture",
+ },
+ {
+ icon: <Square className="size-5" />,
+ title: "Rounded Corners",
+ description: "Squircle or rounded styles",
+ },
+ {
+ icon: <Layers className="size-5" />,
+ title: "Shadow & Borders",
+ description: "Professional depth effects",
+ },
+ {
+ icon: <MoveUpRight className="size-5" />,
+ title: "Annotation Tools",
+ description: "Arrows, shapes, text & masks",
+ },
+ {
+ icon: <Copy className="size-5" />,
+ title: "Instant Copy & Save",
+ description: "One click to clipboard or file",
+ },
+];
+
+const featureContainerVariants = {
+ hidden: {},
+ visible: {
+ transition: {
+ staggerChildren: 0.07,
+ },
+ },
+};
+
+const featureItemVariants = {
+ hidden: { opacity: 0, y: 20, scale: 0.97 },
+ visible: {
+ opacity: 1,
+ y: 0,
+ scale: 1,
+ transition: { duration: 0.4, ease: [0.25, 0.1, 0.25, 1] },
+ },
+};
+
+const EASE = [0.4, 0, 0.2, 1] as const;
+
+const InteractiveSlider = ({
+ label,
+ value,
+ min,
+ max,
+ unit,
+ onChange,
+ onInteract,
+}: {
+ label: string;
+ value: number;
+ min: number;
+ max: number;
+ unit: string;
+ onChange: (v: number) => void;
+ onInteract: () => void;
+}) => {
+ const trackRef = useRef<HTMLDivElement>(null);
+ const isDraggingRef = useRef(false);
+ const [dragging, setDragging] = useState(false);
+
+ const updateFromPointer = useCallback(
+ (clientX: number) => {
+ if (!trackRef.current) return;
+ const rect = trackRef.current.getBoundingClientRect();
+ const pct = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
+ onChange(Math.round(min + pct * (max - min)));
+ },
+ [min, max, onChange],
+ );
+
+ const pct = max - min > 0 ? ((value - min) / (max - min)) * 100 : 0;
+
+ return (
+ <div>
+ <div className="flex items-center justify-between mb-1.5">
+ <span className="text-[9px] font-medium text-gray-11">{label}</span>
+ <span className="text-[8px] font-mono text-gray-9">
+ {value}
+ {unit}
+ </span>
+ </div>
+ <div
+ ref={trackRef}
+ className="relative h-5 flex items-center cursor-pointer touch-none"
+ onPointerDown={(e) => {
+ e.preventDefault();
+ onInteract();
+ isDraggingRef.current = true;
+ setDragging(true);
+ trackRef.current?.setPointerCapture(e.pointerId);
+ updateFromPointer(e.clientX);
+ }}
+ onPointerMove={(e) => {
+ if (!isDraggingRef.current) return;
+ updateFromPointer(e.clientX);
+ }}
+ onPointerUp={() => {
+ isDraggingRef.current = false;
+ setDragging(false);
+ }}
+ >
+ <div className="h-1 rounded-full bg-gray-4 w-full relative">
+ <div
+ className="absolute left-0 top-0 h-full rounded-full bg-violet-500"
+ style={{
+ width: `${pct}%`,
+ transition: dragging ? "none" : "width 0.6s ease",
+ }}
+ />
+ <div
+ className="absolute top-1/2 w-3 h-3 rounded-full bg-white border-2 border-violet-500 shadow-sm shadow-violet-200/50"
+ style={{
+ left: `${pct}%`,
+ transform: "translate(-50%, -50%)",
+ transition: dragging ? "none" : "left 0.6s ease",
+ }}
+ />
+ </div>
+ </div>
+ </div>
+ );
+};
+
+const MockCodeEditorContent = () => (
+ <div className="w-full h-full bg-[#1e1e2e] overflow-hidden">
+ <div className="flex items-center gap-1 px-2 py-1.5 bg-[#181825]">
+ <div className="flex gap-1">
+ <div className="w-1.5 h-1.5 rounded-full bg-[#FF5F57]" />
+ <div className="w-1.5 h-1.5 rounded-full bg-[#FFBD2E]" />
+ <div className="w-1.5 h-1.5 rounded-full bg-[#28C840]" />
+ </div>
+ <div className="flex items-center gap-1 mx-auto">
+ <div className="h-2 rounded bg-[#313244] w-[50px]" />
+ </div>
+ </div>
+ <div className="flex h-[calc(100%-22px)]">
+ <div className="w-6 bg-[#181825] flex flex-col items-end pr-1.5 pt-1.5 gap-[3px]">
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((n) => (
+ <div
+ key={`ln-${n}`}
+ className="text-[5px] text-[#585b70] leading-[7px] font-mono"
+ >
+ {n}
+ </div>
+ ))}
+ </div>
+ <div className="flex-1 p-1.5 pt-1.5 space-y-[3px]">
+ <div className="flex gap-1">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-8" />
+ <div className="h-[7px] rounded-sm bg-[#cdd6f4] w-5" />
+ <div className="h-[7px] rounded-sm bg-[#a6e3a1] w-9" />
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-4" />
+ <div className="h-[7px] rounded-sm bg-[#a6e3a1] w-7" />
+ </div>
+ <div className="flex gap-1">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-6" />
+ <div className="h-[7px] rounded-sm bg-[#89b4fa] w-12" />
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-4" />
+ <div className="h-[7px] rounded-sm bg-[#a6e3a1] w-6" />
+ </div>
+ <div className="h-[7px]" />
+ <div className="flex gap-1">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-7" />
+ <div className="h-[7px] rounded-sm bg-[#f9e2af] w-14" />
+ <div className="h-[7px] rounded-sm bg-[#89dceb] w-5" />
+ </div>
+ <div className="flex gap-1 pl-3">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-5" />
+ <div className="h-[7px] rounded-sm bg-[#a6e3a1] w-12" />
+ </div>
+ <div className="flex gap-1 pl-3">
+ <div className="h-[7px] rounded-sm bg-[#89b4fa] w-8" />
+ <div className="h-[7px] rounded-sm bg-[#f38ba8] w-5" />
+ <div className="h-[7px] rounded-sm bg-[#89dceb] w-10" />
+ </div>
+ <div className="flex gap-1 pl-3">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-4" />
+ <div className="h-[7px] rounded-sm bg-[#f9e2af] w-16" />
+ </div>
+ <div className="flex gap-1 pl-3">
+ <div className="h-[7px] rounded-sm bg-[#a6e3a1] w-10" />
+ <div className="h-[7px] rounded-sm bg-[#89b4fa] w-6" />
+ </div>
+ <div className="flex gap-1 pl-3">
+ <div className="h-[7px] rounded-sm bg-[#89dceb] w-6" />
+ <div className="h-[7px] rounded-sm bg-[#f38ba8] w-12" />
+ <div className="h-[7px] rounded-sm bg-[#cdd6f4] w-4" />
+ </div>
+ <div className="flex gap-1">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-3" />
+ </div>
+ <div className="h-[7px]" />
+ <div className="flex gap-1">
+ <div className="h-[7px] rounded-sm bg-[#cba6f7] w-9" />
+ <div className="h-[7px] rounded-sm bg-[#f38ba8] w-6" />
+ </div>
+ </div>
+ </div>
+ </div>
+);
+
+const AnnotationArrow = () => {
+ const markerId = useId();
+ return (
+ <motion.svg
+ className="absolute inset-0 w-full h-full pointer-events-none z-20"
+ initial={{ opacity: 0, pathLength: 0 }}
+ animate={{ opacity: 1, pathLength: 1 }}
+ transition={{ duration: 0.5, ease: "easeOut" }}
+ viewBox="0 0 100 100"
+ preserveAspectRatio="none"
+ aria-hidden="true"
+ >
+ <defs>
+ <marker
+ id={markerId}
+ markerWidth="8"
+ markerHeight="6"
+ refX="8"
+ refY="3"
+ orient="auto"
+ >
+ <path d="M0,0 L8,3 L0,6 Z" fill="#ef4444" />
+ </marker>
+ </defs>
+ <motion.line
+ x1="78"
+ y1="18"
+ x2="52"
+ y2="45"
+ stroke="#ef4444"
+ strokeWidth="0.8"
+ strokeLinecap="round"
+ markerEnd={`url(#${markerId})`}
+ initial={{ pathLength: 0 }}
+ animate={{ pathLength: 1 }}
+ transition={{ duration: 0.6, delay: 0.1 }}
+ />
+ </motion.svg>
+ );
+};
+
+type HotkeyPhase = "idle" | "appearing" | "pressing" | "captured" | "done";
+
+const MockScreenshotEditor = () => {
+ const [editorReady, setEditorReady] = useState(false);
+ const [hotkeyPhase, setHotkeyPhase] = useState<HotkeyPhase>("idle");
+ const [userInteracted, setUserInteracted] = useState(false);
+ const [autoStep, setAutoStep] = useState(0);
+ const [isInView, setIsInView] = useState(false);
+ const containerRef = useRef<HTMLDivElement>(null);
+
+ const [gradientIndex, setGradientIndex] = useState(-1);
+ const [padding, setPadding] = useState(0);
+ const [rounded, setRounded] = useState(0);
+ const [shadow, setShadow] = useState(0);
+ const [showAnnotation, setShowAnnotation] = useState(false);
+ const [copied, setCopied] = useState(false);
+
+ useEffect(() => {
+ const el = containerRef.current;
+ if (!el) return;
+
+ const observer = new IntersectionObserver(
+ ([entry]) => {
+ if (entry.isIntersecting && !isInView) {
+ setIsInView(true);
+ }
+ },
+ { threshold: 0.2 },
+ );
+
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, [isInView]);
+
+ useEffect(() => {
+ if (!isInView) return;
+
+ const timers: ReturnType<typeof setTimeout>[] = [];
+ timers.push(setTimeout(() => setHotkeyPhase("appearing"), 200));
+ timers.push(setTimeout(() => setHotkeyPhase("pressing"), 1100));
+ timers.push(setTimeout(() => setHotkeyPhase("captured"), 1600));
+ timers.push(
+ setTimeout(() => {
+ setHotkeyPhase("done");
+ setEditorReady(true);
+ }, 2300),
+ );
+
+ return () => {
+ for (const t of timers) clearTimeout(t);
+ };
+ }, [isInView]);
+
+ useEffect(() => {
+ if (!editorReady || userInteracted) return;
+ let timeout: ReturnType<typeof setTimeout>;
+ let cancelled = false;
+
+ const advance = (current: number) => {
+ if (cancelled) return;
+ const next = (current + 1) % AUTO_CONFIGS.length;
+ const cfg = AUTO_CONFIGS[next];
+ setGradientIndex(cfg.gradientIndex);
+ setPadding(cfg.padding);
+ setRounded(cfg.rounded);
+ setShadow(cfg.shadow);
+ setShowAnnotation(cfg.showAnnotation);
+ setAutoStep(next);
+ timeout = setTimeout(() => advance(next), AUTO_STEP_DELAYS[next] || 2000);
+ };
+
+ timeout = setTimeout(() => advance(0), AUTO_STEP_DELAYS[0]);
+
+ return () => {
+ cancelled = true;
+ clearTimeout(timeout);
+ };
+ }, [editorReady, userInteracted]);
+
+ const handleInteraction = useCallback(() => {
+ setUserInteracted(true);
+ }, []);
+
+ const handleCopy = useCallback(() => {
+ handleInteraction();
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ }, [handleInteraction]);
+
+ const handleGradientClick = useCallback(
+ (i: number) => {
+ handleInteraction();
+ setGradientIndex(gradientIndex === i ? -1 : i);
+ },
+ [handleInteraction, gradientIndex],
+ );
+
+ const shadowFraction = shadow / 100;
+
+ const hotkeyKeys = [
+ { label: "โŒ˜", width: "min-w-[36px] md:min-w-[44px]" },
+ { label: "โ‡ง", width: "min-w-[36px] md:min-w-[44px]" },
+ { label: "S", width: "min-w-[36px] md:min-w-[44px]" },
+ ];
+
+ const isPressed = hotkeyPhase === "pressing" || hotkeyPhase === "captured";
+
+ return (
+ <div ref={containerRef} className="absolute inset-0">
+ <motion.div
+ className="absolute inset-0 flex flex-col select-none overflow-hidden"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: editorReady ? 1 : 0 }}
+ transition={{ duration: 0.5, delay: 0.1 }}
+ >
+ <div className="flex items-center justify-between px-3 md:px-4 py-2 md:py-2.5 border-b border-gray-4 bg-gray-2 shrink-0">
+ <div className="flex items-center gap-2">
+ <div className="flex gap-1.5">
+ <div className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#FF5F57]" />
+ <div className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#FFBD2E]" />
+ <div className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#28C840]" />
+ </div>
+ <span className="text-[9px] md:text-[10px] text-gray-10 ml-1 md:ml-2">
+ Screenshot.png
+ </span>
+ </div>
+
+ <div className="flex items-center gap-1 md:gap-1.5">
+ <div className="hidden md:flex items-center gap-0.5 mr-2 border-r border-gray-4 pr-2">
+ <div className="p-1 rounded text-gray-8 hover:bg-gray-3">
+ <MousePointer2 className="size-2.5" />
+ </div>
+ <div className="p-1 rounded text-gray-8 hover:bg-gray-3">
+ <MoveUpRight className="size-2.5" />
+ </div>
+ <div className="p-1 rounded text-gray-8 hover:bg-gray-3">
+ <Square className="size-2.5" />
+ </div>
+ <div className="p-1 rounded text-gray-8 hover:bg-gray-3">
+ <Circle className="size-2.5" />
+ </div>
+ <div className="p-1 rounded text-gray-8 hover:bg-gray-3">
+ <Type className="size-2.5" />
+ </div>
+ </div>
+
+ <motion.button
+ type="button"
+ className="px-2 md:px-2.5 py-0.5 md:py-1 rounded-md border border-gray-5 text-[8px] md:text-[9px] text-gray-11 font-medium cursor-pointer flex items-center gap-1 min-w-[36px] justify-center"
+ whileTap={{ scale: 0.93 }}
+ onClick={handleCopy}
+ >
+ {copied ? (
+ <>
+ <Check className="size-2 md:size-2.5 text-green-500" />
+ <span className="text-green-600">Copied!</span>
+ </>
+ ) : (
+ <>
+ <Copy className="size-2 md:size-2.5" />
+ Copy
+ </>
+ )}
+ </motion.button>
+ <motion.button
+ type="button"
+ className="px-2 md:px-2.5 py-0.5 md:py-1 rounded-md bg-violet-500 text-white text-[8px] md:text-[9px] font-medium cursor-pointer flex items-center gap-1 min-w-[36px] justify-center"
+ whileTap={{ scale: 0.93 }}
+ onClick={handleInteraction}
+ >
+ <Save className="size-2 md:size-2.5" />
+ Save
+ </motion.button>
+ </div>
+ </div>
+
+ <div className="flex-1 flex min-h-0">
+ <div className="flex-1 flex items-center justify-center p-3 md:p-6 bg-gray-3 overflow-hidden relative">
+ <div className="relative w-full aspect-[4/3] max-h-full overflow-hidden rounded-md">
+ <motion.div
+ className="absolute inset-0 bg-[#e8e8e8]"
+ initial={false}
+ animate={{ opacity: gradientIndex === -1 ? 1 : 0 }}
+ transition={{ duration: 0.6 }}
+ />
+ {GRADIENTS.map((grad, i) => (
+ <motion.div
+ key={grad}
+ className="absolute inset-0"
+ style={{ background: grad }}
+ initial={false}
+ animate={{ opacity: gradientIndex === i ? 1 : 0 }}
+ transition={{ duration: 0.6 }}
+ />
+ ))}
+
+ <motion.div
+ className="absolute z-10"
+ initial={false}
+ animate={{
+ top: `${padding}%`,
+ left: `${padding}%`,
+ right: `${padding}%`,
+ bottom: `${padding}%`,
+ }}
+ transition={{ duration: 0.8, ease: EASE }}
+ >
+ <motion.div
+ className="w-full h-full overflow-hidden relative"
+ initial={false}
+ animate={{
+ borderRadius: `${rounded}px`,
+ boxShadow:
+ shadowFraction > 0
+ ? `0 25px 50px -12px rgba(0,0,0,${0.35 * shadowFraction}), 0 12px 24px -8px rgba(0,0,0,${0.2 * shadowFraction})`
+ : "0 0 0 0px rgba(0,0,0,0)",
+ }}
+ transition={{ duration: 0.8, ease: EASE }}
+ >
+ <MockCodeEditorContent />
+ </motion.div>
+
+ <AnimatePresence>
+ {showAnnotation && <AnnotationArrow />}
+ </AnimatePresence>
+ </motion.div>
+ </div>
+
+ <div className="md:hidden absolute bottom-2 left-2 z-20">
+ <AnimatePresence mode="wait">
+ {!userInteracted && AUTO_CONFIGS[autoStep] && editorReady && (
+ <motion.div
+ key={autoStep}
+ className="bg-black/75 backdrop-blur-sm rounded-lg px-2.5 py-1 text-white text-[9px] font-medium flex items-center gap-1.5"
+ initial={{ opacity: 0, y: 4 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -4 }}
+ transition={{ duration: 0.2 }}
+ >
+ <div className="w-1 h-1 rounded-full bg-violet-400" />
+ {autoStep === 0 || autoStep === 1
+ ? "Background"
+ : autoStep === 2
+ ? "Padding"
+ : autoStep === 3
+ ? "Corners"
+ : autoStep === 4
+ ? "Shadow"
+ : "Annotation"}
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ </div>
+
+ <div className="hidden md:flex w-40 lg:w-48 xl:w-52 border-l border-gray-4 bg-gray-1 flex-col shrink-0 overflow-hidden">
+ <div className="flex items-center justify-around px-2 py-2 border-b border-gray-4 shrink-0">
+ <div className="p-1 lg:p-1.5 rounded-md bg-violet-50 text-violet-600">
+ <ImageIcon className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <Layers className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <Scan className="size-3" />
+ </div>
+ </div>
+
+ <div className="flex-1 p-2.5 lg:p-3 space-y-3 lg:space-y-3.5 overflow-y-auto">
+ <div>
+ <span className="text-[9px] font-medium block mb-2 text-gray-11">
+ Background
+ </span>
+ <div className="flex gap-1.5 flex-wrap">
+ {GRADIENT_COLORS.map(([from, to], i) => (
+ <motion.button
+ key={from}
+ type="button"
+ className="relative cursor-pointer"
+ onClick={() => handleGradientClick(i)}
+ whileTap={{ scale: 0.85 }}
+ >
+ <motion.div
+ className="w-4 h-4 lg:w-5 lg:h-5 rounded-full shrink-0"
+ style={{
+ background: `linear-gradient(135deg, ${from}, ${to})`,
+ }}
+ initial={false}
+ animate={{
+ scale: gradientIndex === i ? 1.15 : 1,
+ boxShadow:
+ gradientIndex === i
+ ? "0 0 0 1.5px white, 0 0 0 2.5px rgba(139,92,246,0.5)"
+ : "0 0 0 0.5px rgba(0,0,0,0.1)",
+ }}
+ transition={{ duration: 0.3 }}
+ />
+ </motion.button>
+ ))}
+ </div>
+ </div>
+
+ <InteractiveSlider
+ label="Padding"
+ value={padding}
+ min={0}
+ max={40}
+ unit="%"
+ onChange={setPadding}
+ onInteract={handleInteraction}
+ />
+
+ <InteractiveSlider
+ label="Rounded Corners"
+ value={rounded}
+ min={0}
+ max={40}
+ unit="px"
+ onChange={setRounded}
+ onInteract={handleInteraction}
+ />
+
+ <InteractiveSlider
+ label="Shadow"
+ value={shadow}
+ min={0}
+ max={100}
+ unit="%"
+ onChange={setShadow}
+ onInteract={handleInteraction}
+ />
+ </div>
+ </div>
+ </div>
+ </motion.div>
+
+ <AnimatePresence>
+ {!editorReady && (
+ <motion.div
+ className="absolute inset-0 z-50 flex flex-col items-center justify-center bg-white"
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.4 }}
+ >
+ {hotkeyPhase === "captured" && (
+ <motion.div
+ className="absolute inset-0 bg-white pointer-events-none z-10"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: [0, 0.7, 0] }}
+ transition={{ duration: 0.4, times: [0, 0.3, 1] }}
+ />
+ )}
+
+ <div className="flex items-center gap-2 md:gap-3">
+ {hotkeyKeys.map((key, i) => (
+ <div key={key.label} className="contents">
+ {i > 0 && (
+ <motion.span
+ className="text-gray-7 text-base md:text-lg font-light select-none"
+ initial={{ opacity: 0 }}
+ animate={{
+ opacity: hotkeyPhase !== "idle" ? 0.6 : 0,
+ }}
+ transition={{ delay: i * 0.12 + 0.05 }}
+ >
+ +
+ </motion.span>
+ )}
+ <motion.div
+ className={`
+ inline-flex items-center justify-center ${key.width}
+ h-[36px] md:h-[44px] px-3 md:px-4
+ rounded-[10px] text-sm md:text-base font-semibold
+ border-2 select-none
+ ${
+ isPressed
+ ? "bg-gray-4 border-gray-5 text-gray-12"
+ : "bg-white border-gray-4 text-gray-11"
+ }
+ `}
+ style={{
+ boxShadow: isPressed
+ ? "inset 0 2px 4px rgba(0,0,0,0.08)"
+ : "0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",
+ }}
+ initial={{ opacity: 0, y: 12, scale: 0.85 }}
+ animate={{
+ opacity: hotkeyPhase !== "idle" ? 1 : 0,
+ y: isPressed ? 2 : 0,
+ scale: isPressed ? 0.95 : 1,
+ }}
+ transition={{
+ delay: hotkeyPhase === "appearing" ? i * 0.12 : 0,
+ type: "spring",
+ stiffness: 400,
+ damping: 25,
+ }}
+ >
+ {key.label}
+ </motion.div>
+ </div>
+ ))}
+ </div>
+
+ <AnimatePresence>
+ {hotkeyPhase === "captured" && (
+ <motion.div
+ className="mt-5 flex items-center gap-2"
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.25 }}
+ >
+ <div className="w-5 h-5 rounded-full bg-green-100 flex items-center justify-center">
+ <Check className="size-3 text-green-600" />
+ </div>
+ <span className="text-sm text-gray-10 font-medium">
+ Screenshot captured
+ </span>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ );
+};
+
+const ScreenshotModeDetail = () => {
+ return (
+ <div className="w-full max-w-[1000px] mx-auto px-5">
+ <motion.div
+ initial={{ opacity: 0, y: 30 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-80px" }}
+ transition={{ duration: 0.6 }}
+ className="text-center mb-8 md:mb-12"
+ >
+ <motion.div
+ className="flex items-center justify-center gap-2 mb-4"
+ initial={{ opacity: 0, scale: 0.8 }}
+ whileInView={{ opacity: 1, scale: 1 }}
+ viewport={{ once: true }}
+ transition={{
+ duration: 0.5,
+ type: "spring",
+ stiffness: 200,
+ }}
+ >
+ <motion.div
+ animate={{
+ scale: [1, 0.88, 1],
+ opacity: [1, 0.7, 1],
+ }}
+ transition={{
+ duration: 0.4,
+ repeat: Number.POSITIVE_INFINITY,
+ repeatDelay: 4,
+ ease: "easeInOut",
+ }}
+ >
+ <Aperture className="size-5 text-violet-500" strokeWidth={2} />
+ </motion.div>
+ <span className="text-sm font-medium text-violet-600 uppercase tracking-wider">
+ Screenshot Mode
+ </span>
+ </motion.div>
+ <motion.h2
+ className="text-3xl md:text-4xl font-medium text-gray-12 mb-3"
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.5, delay: 0.1 }}
+ >
+ Capture, beautify, share
+ </motion.h2>
+ <motion.p
+ className="text-base md:text-lg text-gray-10 max-w-[600px] mx-auto"
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true }}
+ transition={{ duration: 0.5, delay: 0.2 }}
+ >
+ Take a screenshot with a hotkey, then instantly enhance it with
+ backgrounds, padding, annotations, and more โ€” ready to share in
+ seconds.
+ </motion.p>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 40, scale: 0.97 }}
+ whileInView={{ opacity: 1, y: 0, scale: 1 }}
+ viewport={{ once: true, margin: "-60px" }}
+ transition={{
+ duration: 0.7,
+ delay: 0.15,
+ ease: [0.25, 0.1, 0.25, 1],
+ }}
+ className="relative"
+ >
+ <div className="absolute -inset-4 md:-inset-8 bg-gradient-to-b from-violet-100/40 via-violet-50/20 to-transparent rounded-3xl blur-2xl pointer-events-none" />
+ <div
+ className="relative rounded-xl md:rounded-2xl border border-gray-5 bg-white shadow-xl shadow-black/5 overflow-hidden"
+ style={{ aspectRatio: "16/10", minHeight: "220px" }}
+ >
+ <MockScreenshotEditor />
+ </div>
+ </motion.div>
+
+ <motion.div
+ variants={featureContainerVariants}
+ initial="hidden"
+ whileInView="visible"
+ viewport={{ once: true, margin: "-40px" }}
+ className="grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3 mt-5 md:mt-6"
+ >
+ {screenshotFeatures.map((feature) => (
+ <motion.div
+ key={feature.title}
+ variants={featureItemVariants}
+ whileHover={{
+ y: -3,
+ transition: {
+ type: "spring",
+ stiffness: 400,
+ damping: 25,
+ },
+ }}
+ className="flex items-start gap-2.5 sm:gap-3 p-3 sm:p-4 rounded-xl border border-gray-5 bg-gray-1 transition-shadow hover:shadow-md hover:border-violet-200"
+ >
+ <div className="text-violet-600 mt-0.5 shrink-0">
+ {feature.icon}
+ </div>
+ <div>
+ <h4 className="text-sm font-medium text-gray-12">
+ {feature.title}
+ </h4>
+ <p className="text-xs text-gray-10 mt-0.5">
+ {feature.description}
+ </p>
+ </div>
+ </motion.div>
+ ))}
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-40px" }}
+ transition={{ duration: 0.5, delay: 0.3 }}
+ className="flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4 mt-5 md:mt-6"
+ >
+ <Button href="/features/screenshot-mode" variant="white" size="lg">
+ Learn more
+ </Button>
+ <UpgradeToPro />
+ </motion.div>
+ </div>
+ );
+};
+
+export default ScreenshotModeDetail;
diff --git a/apps/web/components/pages/HomePage/StudioModeDetail.tsx b/apps/web/components/pages/HomePage/StudioModeDetail.tsx
new file mode 100644
index 000000000..34a5642c4
--- /dev/null
+++ b/apps/web/components/pages/HomePage/StudioModeDetail.tsx
@@ -0,0 +1,775 @@
+"use client";
+
+import { Button } from "@cap/ui";
+import { AnimatePresence, motion } from "framer-motion";
+import {
+ Camera,
+ Check,
+ Clapperboard,
+ Image as ImageIcon,
+ Layers,
+ Maximize2,
+ MessageSquare,
+ MousePointer2,
+ MousePointerClick,
+ Palette,
+ Pause,
+ Play,
+ Square,
+ Volume2,
+ Wind,
+} from "lucide-react";
+import { useCallback, useEffect, useRef, useState } from "react";
+import UpgradeToPro from "../_components/UpgradeToPro";
+
+const GRADIENTS = [
+ "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
+ "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
+ "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
+ "linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)",
+ "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
+ "linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)",
+];
+
+const GRADIENT_COLORS: [string, string][] = [
+ ["#667eea", "#764ba2"],
+ ["#f093fb", "#f5576c"],
+ ["#4facfe", "#00f2fe"],
+ ["#43e97b", "#38f9d7"],
+ ["#fa709a", "#fee140"],
+ ["#a18cd1", "#fbc2eb"],
+];
+
+interface AutoConfig {
+ gradientIndex: number;
+ padding: number;
+ rounded: number;
+ shadow: number;
+ cursorSize: number;
+}
+
+const AUTO_CONFIGS: AutoConfig[] = [
+ { gradientIndex: 0, padding: 0, rounded: 0, shadow: 0, cursorSize: 200 },
+ { gradientIndex: 0, padding: 14, rounded: 0, shadow: 0, cursorSize: 200 },
+ { gradientIndex: 0, padding: 14, rounded: 18, shadow: 0, cursorSize: 200 },
+ { gradientIndex: 0, padding: 14, rounded: 18, shadow: 80, cursorSize: 200 },
+ { gradientIndex: 0, padding: 14, rounded: 18, shadow: 80, cursorSize: 80 },
+ { gradientIndex: 3, padding: 10, rounded: 24, shadow: 50, cursorSize: 150 },
+];
+
+const AUTO_STEP_DELAYS = [800, 1200, 2000, 2500, 2500, 3000];
+
+const PREVIEW_CURSOR_DURATION = 8;
+
+const studioFeatures = [
+ {
+ icon: <Palette className="size-5" />,
+ title: "Custom Backgrounds",
+ description: "Gradients, wallpapers & colors",
+ },
+ {
+ icon: <Maximize2 className="size-5" />,
+ title: "Adjustable Padding",
+ description: "Scale from 0% to 40%",
+ },
+ {
+ icon: <Square className="size-5" />,
+ title: "Rounded Corners",
+ description: "Squircle or rounded styles",
+ },
+ {
+ icon: <Wind className="size-5" />,
+ title: "Motion Blur",
+ description: "Natural movement effects",
+ },
+ {
+ icon: <Layers className="size-5" />,
+ title: "Shadow & Borders",
+ description: "Customizable depth effects",
+ },
+ {
+ icon: <MousePointerClick className="size-5" />,
+ title: "Cursor Effects",
+ description: "Sizing, smoothing & click effects",
+ },
+];
+
+const EASE = [0.4, 0, 0.2, 1] as const;
+
+const InteractiveSlider = ({
+ label,
+ value,
+ min,
+ max,
+ unit,
+ onChange,
+ onInteract,
+}: {
+ label: string;
+ value: number;
+ min: number;
+ max: number;
+ unit: string;
+ onChange: (v: number) => void;
+ onInteract: () => void;
+}) => {
+ const trackRef = useRef<HTMLDivElement>(null);
+ const isDraggingRef = useRef(false);
+ const [dragging, setDragging] = useState(false);
+
+ const updateFromPointer = useCallback(
+ (clientX: number) => {
+ if (!trackRef.current) return;
+ const rect = trackRef.current.getBoundingClientRect();
+ const pct = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
+ onChange(Math.round(min + pct * (max - min)));
+ },
+ [min, max, onChange],
+ );
+
+ const pct = max - min > 0 ? ((value - min) / (max - min)) * 100 : 0;
+
+ return (
+ <div>
+ <div className="flex items-center justify-between mb-1.5">
+ <span className="text-[9px] font-medium text-gray-11">{label}</span>
+ <span className="text-[8px] font-mono text-gray-9">
+ {value}
+ {unit}
+ </span>
+ </div>
+ <div
+ ref={trackRef}
+ className="relative h-5 flex items-center cursor-pointer touch-none"
+ onPointerDown={(e) => {
+ e.preventDefault();
+ onInteract();
+ isDraggingRef.current = true;
+ setDragging(true);
+ trackRef.current?.setPointerCapture(e.pointerId);
+ updateFromPointer(e.clientX);
+ }}
+ onPointerMove={(e) => {
+ if (!isDraggingRef.current) return;
+ updateFromPointer(e.clientX);
+ }}
+ onPointerUp={() => {
+ isDraggingRef.current = false;
+ setDragging(false);
+ }}
+ >
+ <div className="h-1 rounded-full bg-gray-4 w-full relative">
+ <div
+ className="absolute left-0 top-0 h-full rounded-full bg-blue-500"
+ style={{
+ width: `${pct}%`,
+ transition: dragging ? "none" : "width 0.6s ease",
+ }}
+ />
+ <div
+ className="absolute top-1/2 w-3 h-3 rounded-full bg-white border-2 border-blue-500 shadow-sm shadow-blue-200/50"
+ style={{
+ left: `${pct}%`,
+ transform: "translate(-50%, -50%)",
+ transition: dragging ? "none" : "left 0.6s ease",
+ }}
+ />
+ </div>
+ </div>
+ </div>
+ );
+};
+
+const MockScreenContent = () => (
+ <div className="w-full h-full bg-white overflow-hidden">
+ <div className="flex items-center gap-1 px-2 py-1.5 border-b border-gray-200/70 bg-gray-50/80">
+ <div className="flex gap-1">
+ <div className="w-1.5 h-1.5 rounded-full bg-[#FF5F57]" />
+ <div className="w-1.5 h-1.5 rounded-full bg-[#FFBD2E]" />
+ <div className="w-1.5 h-1.5 rounded-full bg-[#28C840]" />
+ </div>
+ <div className="h-2 rounded bg-gray-200/60 flex-1 max-w-[60px] mx-auto" />
+ </div>
+ <div className="flex h-[calc(100%-22px)]">
+ <div className="w-5 border-r border-gray-200/70 bg-gray-50/50 flex flex-col gap-1.5 p-1 pt-2">
+ <div className="w-full aspect-square rounded bg-blue-100/80" />
+ <div className="w-full aspect-square rounded bg-gray-200/60" />
+ <div className="w-full aspect-square rounded bg-gray-200/60" />
+ </div>
+ <div className="flex-1 p-2">
+ <div className="h-2 rounded bg-gray-200/70 w-3/4 mb-2" />
+ <div className="h-1.5 rounded bg-gray-200/50 w-full mb-1" />
+ <div className="h-1.5 rounded bg-gray-200/50 w-5/6 mb-3" />
+ <div className="grid grid-cols-2 gap-1.5 mb-2">
+ <div className="rounded-lg bg-blue-50 border border-blue-100/80 p-2">
+ <div className="h-1.5 rounded bg-blue-200/50 w-3/4 mb-1.5" />
+ <div className="h-1 rounded bg-blue-100/70 w-full" />
+ </div>
+ <div className="rounded-lg bg-gray-50 border border-gray-200/60 p-2">
+ <div className="h-1.5 rounded bg-gray-200/50 w-2/3 mb-1.5" />
+ <div className="h-1 rounded bg-gray-100 w-full" />
+ </div>
+ </div>
+ <div className="flex gap-1.5">
+ <div className="h-4 px-3 rounded bg-blue-500 flex items-center">
+ <div className="h-1 w-6 rounded bg-white/40" />
+ </div>
+ <div className="h-4 px-3 rounded bg-gray-100 border border-gray-200/80 flex items-center">
+ <div className="h-1 w-8 rounded bg-gray-300/70" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+);
+
+const CursorSvg = ({ size = 18 }: { size?: number }) => {
+ const height = Math.round((size / 18) * 25);
+ return (
+ <svg
+ width={size}
+ height={height}
+ viewBox="0 0 17 24"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ role="img"
+ aria-label="Cursor"
+ style={{
+ filter:
+ "drop-shadow(0 2px 6px rgba(0,0,0,0.25)) drop-shadow(0 1px 2px rgba(0,0,0,0.15))",
+ }}
+ >
+ <title>Cursor</title>
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M4.501 3.2601L12.884 11.6611C13.937 12.7171 13.19 14.5191 11.699 14.5191L10.475 14.519L11.6908 17.4067C11.9038 17.9127 11.9068 18.4727 11.6998 18.9817C11.4918 19.4917 11.0978 19.8897 10.5898 20.1027C10.3338 20.2097 10.0658 20.2637 9.7918 20.2637C8.9608 20.2637 8.2158 19.7687 7.8938 19.0027L6.616 15.965L5.784 16.7031C4.703 17.6591 3 16.8921 3 15.4481V3.8811C3 3.0971 3.947 2.7051 4.501 3.2601Z"
+ fill="white"
+ />
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M4 4.53033C4 4.39933 4.159 4.33333 4.251 4.42633L12.159 12.3513C12.59 12.7833 12.284 13.5203 11.674 13.5203L8.97 13.5188L10.7696 17.7947C10.9966 18.3347 10.7426 18.9557 10.2036 19.1817C9.6626 19.4087 9.0426 19.1557 8.8166 18.6167L6.999 14.2928L5.139 15.9403C4.723 16.3083 4.0811 16.0518 4.007 15.5285L4 15.4273V4.53033Z"
+ fill="black"
+ />
+ </svg>
+ );
+};
+
+const MockEditor = () => {
+ const [userInteracted, setUserInteracted] = useState(false);
+ const [autoStep, setAutoStep] = useState(0);
+
+ const [gradientIndex, setGradientIndex] = useState(0);
+ const [padding, setPadding] = useState(0);
+ const [rounded, setRounded] = useState(0);
+ const [shadow, setShadow] = useState(0);
+ const [cursorSize, setCursorSize] = useState(200);
+
+ const [isPlaying, setIsPlaying] = useState(true);
+
+ const [exportState, setExportState] = useState<"idle" | "exporting" | "done">(
+ "idle",
+ );
+ const [shareCopied, setShareCopied] = useState(false);
+ const [shaking, setShaking] = useState(false);
+
+ useEffect(() => {
+ if (userInteracted) return;
+ let timeout: ReturnType<typeof setTimeout>;
+ let cancelled = false;
+
+ const advance = (current: number) => {
+ if (cancelled) return;
+ const next = (current + 1) % AUTO_CONFIGS.length;
+ const cfg = AUTO_CONFIGS[next];
+ setGradientIndex(cfg.gradientIndex);
+ setPadding(cfg.padding);
+ setRounded(cfg.rounded);
+ setShadow(cfg.shadow);
+ setCursorSize(cfg.cursorSize);
+ setAutoStep(next);
+ timeout = setTimeout(() => advance(next), AUTO_STEP_DELAYS[next] || 2500);
+ };
+
+ timeout = setTimeout(() => advance(0), AUTO_STEP_DELAYS[0]);
+
+ return () => {
+ cancelled = true;
+ clearTimeout(timeout);
+ };
+ }, [userInteracted]);
+
+ const handleInteraction = useCallback(() => {
+ setUserInteracted(true);
+ }, []);
+
+ const handleExport = useCallback(() => {
+ handleInteraction();
+ if (exportState !== "idle") return;
+ setExportState("exporting");
+ setTimeout(() => {
+ setExportState("done");
+ setTimeout(() => setExportState("idle"), 1500);
+ }, 2000);
+ }, [exportState, handleInteraction]);
+
+ const handleShare = useCallback(() => {
+ handleInteraction();
+ setShareCopied(true);
+ setTimeout(() => setShareCopied(false), 2000);
+ }, [handleInteraction]);
+
+ const handleRedDot = useCallback(() => {
+ setShaking(true);
+ setTimeout(() => setShaking(false), 500);
+ }, []);
+
+ const handleGradientClick = useCallback(
+ (i: number) => {
+ handleInteraction();
+ setGradientIndex(gradientIndex === i ? -1 : i);
+ },
+ [handleInteraction, gradientIndex],
+ );
+
+ const handlePlayPause = useCallback(() => {
+ handleInteraction();
+ setIsPlaying((prev) => !prev);
+ }, [handleInteraction]);
+
+ const shadowFraction = shadow / 100;
+
+ return (
+ <motion.div
+ className="absolute inset-0 flex flex-col select-none overflow-hidden"
+ animate={shaking ? { x: [0, -3, 3, -3, 3, -2, 2, 0] } : { x: 0 }}
+ transition={{ duration: 0.4 }}
+ >
+ <style>{`
+ @keyframes previewCursorMove {
+ 0% { left: 20%; top: 25%; }
+ 15% { left: 55%; top: 42%; }
+ 30% { left: 72%; top: 22%; }
+ 50% { left: 40%; top: 58%; }
+ 65% { left: 28%; top: 68%; }
+ 85% { left: 62%; top: 35%; }
+ 100% { left: 20%; top: 25%; }
+ }
+ @keyframes previewProgress {
+ 0% { width: 0%; }
+ 100% { width: 100%; }
+ }
+ `}</style>
+ <div className="flex items-center justify-between px-3 md:px-4 py-2 md:py-2.5 border-b border-gray-4 bg-gray-2 shrink-0">
+ <div className="flex items-center gap-2">
+ <div className="flex gap-1.5">
+ <motion.div
+ className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#FF5F57] cursor-pointer"
+ whileHover={{ scale: 1.4 }}
+ whileTap={{ scale: 0.7 }}
+ onClick={handleRedDot}
+ />
+ <motion.div
+ className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#FFBD2E] cursor-pointer"
+ whileHover={{ scale: 1.4 }}
+ whileTap={{ scale: 0.7 }}
+ />
+ <motion.div
+ className="w-2 h-2 md:w-2.5 md:h-2.5 rounded-full bg-[#28C840] cursor-pointer"
+ whileHover={{ scale: 1.4 }}
+ whileTap={{ scale: 0.7 }}
+ />
+ </div>
+ <span className="text-[9px] md:text-[10px] text-gray-10 ml-1 md:ml-2">
+ My Recording.cap
+ </span>
+ </div>
+ <div className="flex items-center gap-1.5 md:gap-2">
+ <motion.button
+ type="button"
+ className="px-2 md:px-2.5 py-0.5 md:py-1 rounded-md border border-gray-5 text-[8px] md:text-[9px] text-gray-11 font-medium cursor-pointer flex items-center gap-1 min-w-[40px] justify-center"
+ whileTap={{ scale: 0.93 }}
+ onClick={handleShare}
+ >
+ {shareCopied ? (
+ <>
+ <Check className="size-2 md:size-2.5 text-green-500" />
+ <span className="text-green-600">Copied!</span>
+ </>
+ ) : (
+ "Share"
+ )}
+ </motion.button>
+ <motion.button
+ type="button"
+ className="px-2 md:px-2.5 py-0.5 md:py-1 rounded-md bg-blue-500 text-white text-[8px] md:text-[9px] font-medium cursor-pointer flex items-center gap-1 min-w-[40px] justify-center overflow-hidden"
+ whileTap={{ scale: 0.93 }}
+ onClick={handleExport}
+ >
+ <AnimatePresence mode="wait" initial={false}>
+ {exportState === "idle" && (
+ <motion.span
+ key="idle"
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -8 }}
+ transition={{ duration: 0.15 }}
+ >
+ Export
+ </motion.span>
+ )}
+ {exportState === "exporting" && (
+ <motion.div
+ key="exporting"
+ className="w-8 md:w-10 h-1.5 rounded-full bg-white/20 overflow-hidden"
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -8 }}
+ transition={{ duration: 0.15 }}
+ >
+ <motion.div
+ className="h-full rounded-full bg-white"
+ initial={{ width: "0%" }}
+ animate={{ width: "100%" }}
+ transition={{ duration: 1.8, ease: "easeInOut" }}
+ />
+ </motion.div>
+ )}
+ {exportState === "done" && (
+ <motion.span
+ key="done"
+ className="flex items-center gap-0.5"
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -8 }}
+ transition={{ duration: 0.15 }}
+ >
+ <Check className="size-2.5 text-green-300" />
+ Done!
+ </motion.span>
+ )}
+ </AnimatePresence>
+ </motion.button>
+ </div>
+ </div>
+
+ <div className="flex-1 flex min-h-0">
+ <div className="flex-1 flex items-center justify-center p-3 md:p-6 bg-gray-3 overflow-hidden relative">
+ <div className="relative w-full aspect-video overflow-hidden rounded-md">
+ <motion.div
+ className="absolute inset-0 bg-[#e8e8e8]"
+ initial={false}
+ animate={{ opacity: gradientIndex === -1 ? 1 : 0 }}
+ transition={{ duration: 0.6 }}
+ />
+ {GRADIENTS.map((grad, i) => (
+ <motion.div
+ key={grad}
+ className="absolute inset-0"
+ style={{ background: grad }}
+ initial={false}
+ animate={{ opacity: gradientIndex === i ? 1 : 0 }}
+ transition={{ duration: 0.6 }}
+ />
+ ))}
+
+ <motion.div
+ className="absolute z-10"
+ initial={false}
+ animate={{
+ top: `${padding}%`,
+ left: `${padding}%`,
+ right: `${padding}%`,
+ bottom: `${padding}%`,
+ }}
+ transition={{ duration: 0.8, ease: EASE }}
+ >
+ <motion.div
+ className="w-full h-full overflow-hidden"
+ initial={false}
+ animate={{
+ borderRadius: `${rounded}px`,
+ boxShadow:
+ shadowFraction > 0
+ ? `0 25px 50px -12px rgba(0,0,0,${0.35 * shadowFraction}), 0 12px 24px -8px rgba(0,0,0,${0.2 * shadowFraction})`
+ : "0 0 0 0px rgba(0,0,0,0)",
+ }}
+ transition={{ duration: 0.8, ease: EASE }}
+ >
+ <MockScreenContent />
+ </motion.div>
+ </motion.div>
+
+ <div
+ className="absolute pointer-events-none z-20"
+ style={{
+ left: "20%",
+ top: "25%",
+ animation: `previewCursorMove ${PREVIEW_CURSOR_DURATION}s ease-in-out infinite`,
+ animationPlayState: isPlaying ? "running" : "paused",
+ }}
+ >
+ <motion.div
+ style={{ transformOrigin: "0 0" }}
+ initial={false}
+ animate={{ scale: cursorSize / 100 }}
+ transition={{
+ type: "spring",
+ stiffness: 200,
+ damping: 20,
+ }}
+ >
+ <CursorSvg size={14} />
+ </motion.div>
+ </div>
+
+ <div className="absolute bottom-0 left-0 right-0 z-30 flex items-center gap-1.5 px-2 py-1.5 bg-gradient-to-t from-black/40 to-transparent">
+ <motion.button
+ type="button"
+ className="shrink-0 cursor-pointer"
+ onClick={handlePlayPause}
+ whileTap={{ scale: 0.8 }}
+ >
+ {isPlaying ? (
+ <Pause className="size-3 text-white" fill="white" />
+ ) : (
+ <Play className="size-3 text-white ml-px" fill="white" />
+ )}
+ </motion.button>
+ <div className="flex-1 h-0.5 rounded-full bg-white/30 relative overflow-hidden">
+ <div
+ className="absolute left-0 top-0 h-full rounded-full bg-white/80"
+ style={{
+ width: "0%",
+ animation: `previewProgress ${PREVIEW_CURSOR_DURATION}s linear infinite`,
+ animationPlayState: isPlaying ? "running" : "paused",
+ }}
+ />
+ </div>
+ <span className="text-[8px] text-white/70 font-mono shrink-0">
+ 0:12
+ </span>
+ </div>
+ </div>
+
+ <div className="md:hidden absolute bottom-2 left-2 z-20">
+ <AnimatePresence mode="wait">
+ {!userInteracted && AUTO_CONFIGS[autoStep] && (
+ <motion.div
+ key={autoStep}
+ className="bg-black/75 backdrop-blur-sm rounded-lg px-2.5 py-1 text-white text-[9px] font-medium flex items-center gap-1.5"
+ initial={{ opacity: 0, y: 4 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -4 }}
+ transition={{ duration: 0.2 }}
+ >
+ <div className="w-1 h-1 rounded-full bg-blue-400" />
+ {autoStep === 0 || autoStep === 5
+ ? "Background"
+ : autoStep === 1
+ ? "Padding"
+ : autoStep === 2
+ ? "Corners"
+ : autoStep === 3
+ ? "Shadow"
+ : "Cursor Size"}
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ </div>
+
+ <div className="hidden md:flex w-40 lg:w-48 xl:w-52 border-l border-gray-4 bg-gray-1 flex-col shrink-0 overflow-hidden">
+ <div className="flex items-center justify-around px-2 py-2 border-b border-gray-4 shrink-0">
+ <div className="p-1 lg:p-1.5 rounded-md bg-blue-50 text-blue-600">
+ <ImageIcon className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <Camera className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <Volume2 className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <MousePointer2 className="size-3" />
+ </div>
+ <div className="p-1 lg:p-1.5 rounded-md text-gray-8">
+ <MessageSquare className="size-3" />
+ </div>
+ </div>
+
+ <div className="flex-1 p-2.5 lg:p-3 space-y-3 lg:space-y-3.5 overflow-y-auto">
+ <div>
+ <span className="text-[9px] font-medium block mb-2 text-gray-11">
+ Background
+ </span>
+ <div className="flex gap-1.5 flex-wrap">
+ {GRADIENT_COLORS.map(([from, to], i) => (
+ <motion.button
+ key={from}
+ type="button"
+ className="relative cursor-pointer"
+ onClick={() => handleGradientClick(i)}
+ whileTap={{ scale: 0.85 }}
+ >
+ <motion.div
+ className="w-4 h-4 lg:w-5 lg:h-5 rounded-full shrink-0"
+ style={{
+ background: `linear-gradient(135deg, ${from}, ${to})`,
+ }}
+ initial={false}
+ animate={{
+ scale: gradientIndex === i ? 1.15 : 1,
+ boxShadow:
+ gradientIndex === i
+ ? "0 0 0 1.5px white, 0 0 0 2.5px rgba(59,130,246,0.5)"
+ : "0 0 0 0.5px rgba(0,0,0,0.1)",
+ }}
+ transition={{ duration: 0.3 }}
+ />
+ </motion.button>
+ ))}
+ </div>
+ </div>
+
+ <InteractiveSlider
+ label="Padding"
+ value={padding}
+ min={0}
+ max={40}
+ unit="%"
+ onChange={setPadding}
+ onInteract={handleInteraction}
+ />
+
+ <InteractiveSlider
+ label="Rounded Corners"
+ value={rounded}
+ min={0}
+ max={40}
+ unit="px"
+ onChange={setRounded}
+ onInteract={handleInteraction}
+ />
+
+ <InteractiveSlider
+ label="Shadow"
+ value={shadow}
+ min={0}
+ max={100}
+ unit="%"
+ onChange={setShadow}
+ onInteract={handleInteraction}
+ />
+
+ <div className="pt-2 border-t border-gray-4">
+ <InteractiveSlider
+ label="Cursor Size"
+ value={cursorSize}
+ min={30}
+ max={300}
+ unit="%"
+ onChange={setCursorSize}
+ onInteract={handleInteraction}
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ </motion.div>
+ );
+};
+
+const StudioModeDetail = () => {
+ return (
+ <div className="w-full max-w-[1000px] mx-auto px-5">
+ <motion.div
+ initial={{ opacity: 0, y: 30 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-80px" }}
+ transition={{ duration: 0.6 }}
+ className="text-center mb-8 md:mb-12"
+ >
+ <div className="flex items-center justify-center gap-2 mb-4">
+ <Clapperboard
+ fill="var(--blue-9)"
+ className="size-5"
+ strokeWidth={1.5}
+ />
+ <span className="text-sm font-medium text-blue-11 uppercase tracking-wider">
+ Studio Mode
+ </span>
+ </div>
+ <h2 className="text-3xl md:text-4xl font-medium text-gray-12 mb-3">
+ Record in full quality, edit before you share
+ </h2>
+ <p className="text-base md:text-lg text-gray-10 max-w-[600px] mx-auto">
+ Studio mode records at the highest quality directly to your device โ€”
+ no compression, no upload. Then customize backgrounds, padding,
+ corners, and more before sharing.
+ </p>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 40, scale: 0.97 }}
+ whileInView={{ opacity: 1, y: 0, scale: 1 }}
+ viewport={{ once: true, margin: "-60px" }}
+ transition={{
+ duration: 0.7,
+ delay: 0.15,
+ ease: [0.25, 0.1, 0.25, 1],
+ }}
+ className="relative"
+ >
+ <div className="absolute -inset-4 md:-inset-8 bg-gradient-to-b from-blue-100/40 via-blue-50/20 to-transparent rounded-3xl blur-2xl pointer-events-none" />
+ <div
+ className="relative rounded-xl md:rounded-2xl border border-gray-5 bg-white shadow-xl shadow-black/5 overflow-hidden"
+ style={{ aspectRatio: "16/10", minHeight: "220px" }}
+ >
+ <MockEditor />
+ </div>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-40px" }}
+ transition={{ duration: 0.5, delay: 0.2 }}
+ className="grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3 mt-5 md:mt-8"
+ >
+ {studioFeatures.map((feature) => (
+ <div
+ key={feature.title}
+ className="flex items-start gap-2.5 sm:gap-3 p-3 sm:p-4 rounded-xl border border-gray-5 bg-gray-1"
+ >
+ <div className="text-blue-11 mt-0.5 shrink-0">{feature.icon}</div>
+ <div>
+ <h4 className="text-sm font-medium text-gray-12">
+ {feature.title}
+ </h4>
+ <p className="text-xs text-gray-10 mt-0.5">
+ {feature.description}
+ </p>
+ </div>
+ </div>
+ ))}
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ whileInView={{ opacity: 1, y: 0 }}
+ viewport={{ once: true, margin: "-40px" }}
+ transition={{ duration: 0.5, delay: 0.3 }}
+ className="flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4 mt-6 md:mt-10"
+ >
+ <Button href="/features/studio-mode" variant="white" size="lg">
+ Learn more
+ </Button>
+ <UpgradeToPro />
+ </motion.div>
+ </div>
+ );
+};
+
+export default StudioModeDetail;
diff --git a/apps/web/components/pages/HomePage/index.tsx b/apps/web/components/pages/HomePage/index.tsx
index 4dcbbe77a..b5f8ef72f 100644
--- a/apps/web/components/pages/HomePage/index.tsx
+++ b/apps/web/components/pages/HomePage/index.tsx
@@ -8,8 +8,11 @@ import Faq from "./Faq";
import Features from "./Features";
import Header from "./Header";
import { HomePageSchema } from "./HomePageSchema";
+import InstantModeDetail from "./InstantModeDetail";
import Pricing from "./Pricing";
-import RecordingModes from "./RecordingModes";
+import RecordingModePicker from "./RecordingModePicker";
+import ScreenshotModeDetail from "./ScreenshotModeDetail";
+import StudioModeDetail from "./StudioModeDetail";
import Testimonials from "./Testimonials";
interface HomePageProps {
@@ -23,8 +26,11 @@ export const HomePage: React.FC<HomePageProps> = ({
<>
<HomePageSchema />
<Header serverHomepageCopyVariant={serverHomepageCopyVariant} />
- <div className="space-y-[150px] lg:space-y-[200px]">
- <RecordingModes />
+ <div className="space-y-20 sm:space-y-[120px] lg:space-y-[180px]">
+ <RecordingModePicker />
+ <InstantModeDetail />
+ <StudioModeDetail />
+ <ScreenshotModeDetail />
<Features />
<Testimonials />
<Pricing />
diff --git a/apps/web/public/illustrations/homepage-animation.mp4 b/apps/web/public/illustrations/homepage-animation.mp4
new file mode 100644
index 000000000..ee59000e6
Binary files /dev/null and b/apps/web/public/illustrations/homepage-animation.mp4 differ