Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): carousel feature showcase, hero snap, architecture section

Generd657fc78d66b
diff --git a/src/web/src/app/(app)/w/[slug]/agents/[id]/email/page.tsx b/src/web/src/app/(app)/w/[slug]/agents/[id]/email/page.tsx
index ab4a94a0e..0fe5d7a91 100644
--- a/src/web/src/app/(app)/w/[slug]/agents/[id]/email/page.tsx
+++ b/src/web/src/app/(app)/w/[slug]/agents/[id]/email/page.tsx
@@ -158,7 +158,7 @@ export default function AgentEmailPage() {
return (
<div className="flex flex-1 min-h-0">
{/* Column 1: Folder sidebar */}
- <div className="flex w-[180px] shrink-0 flex-col border-r border-border/40">
+ <div className="flex w-45 shrink-0 flex-col border-r border-border/40">
<div className="p-2">
<Button
size="sm"
@@ -202,7 +202,7 @@ export default function AgentEmailPage() {
</div>
{/* Column 2: Email list */}
- <div className={cn("w-[300px] shrink-0 border-r border-border/40", emails.length > 0 && !loading ? "overflow-y-auto" : "overflow-hidden")}>
+ <div className={cn("w-75 shrink-0 border-r border-border/40", emails.length > 0 && !loading ? "overflow-y-auto" : "overflow-hidden")}>
{loading ? (
<>
{Array.from({ length: 3 }).map((_, i) => (
@@ -370,7 +370,7 @@ export default function AgentEmailPage() {
className="flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/50 px-2.5 py-1.5 text-xs"
>
<FileIcon className="size-3 text-muted-foreground shrink-0" />
- <span className="truncate max-w-[180px]">{att.filename}</span>
+ <span className="truncate max-w-45">{att.filename}</span>
<span className="text-muted-foreground shrink-0">
{att.size < 1024 ? `${att.size} B` : att.size < 1024 * 1024 ? `${(att.size / 1024).toFixed(1)} KB` : `${(att.size / (1024 * 1024)).toFixed(1)} MB`}
</span>
diff --git a/src/web/src/components/home/architecture-overview.tsx b/src/web/src/components/home/architecture-overview.tsx
new file mode 100644
index 000000000..42170d3a8
--- /dev/null
+++ b/src/web/src/components/home/architecture-overview.tsx
@@ -0,0 +1,274 @@
+"use client";
+
+import { Fragment, useRef } from "react";
+import gsap from "gsap";
+import { useGSAP } from "@gsap/react";
+import { ScrollTrigger } from "gsap/ScrollTrigger";
+
+gsap.registerPlugin(ScrollTrigger);
+
+interface ArchNode {
+ label: string;
+ lines: string[];
+}
+
+const columns: { title: string; spec: string; nodes: ArchNode[] }[] = [
+ {
+ title: "Runtime Machine",
+ spec: "RUNTIME: BUN / AI: CLAUDE, CODEX",
+ nodes: [
+ {
+ label: "CLI Daemon",
+ lines: ["Heartbeat 15s · Poll 3s", "Task execution pipeline"],
+ },
+ {
+ label: "Agent Runtimes",
+ lines: ["[email protected] — active", "[email protected] — standby"],
+ },
+ ],
+ },
+ {
+ title: "Cloudflare Edge",
+ spec: "WORKERS / D1 / R2 / DURABLE OBJECTS",
+ nodes: [
+ {
+ label: "Email Worker",
+ lines: ["SMTP → parse → R2/D1", "service binding → Web"],
+ },
+ {
+ label: "Web Service",
+ lines: ["Next.js on Workers", "REST API · Auth · D1 r/w"],
+ },
+ {
+ label: "WS-DO",
+ lines: ["Durable Objects", "WebSocket per agent/user"],
+ },
+ ],
+ },
+ {
+ title: "Clients",
+ spec: "SMTP INBOUND / BROWSER DASHBOARD",
+ nodes: [
+ {
+ label: "Inbound Email",
+ },
+ {
+ label: "Dashboard",
+ lines: ["Real-time via WebSocket", "Monitor · Review · Stream"],
+ },
+ ],
+ },
+];
+
+export function ArchitectureOverview() {
+ const sectionRef = useRef<HTMLDivElement>(null);
+
+ useGSAP(
+ () => {
+ gsap.from(".arch-title", {
+ y: 30,
+ opacity: 0,
+ duration: 0.6,
+ scrollTrigger: {
+ trigger: sectionRef.current,
+ start: "top 75%",
+ toggleActions: "play none none none",
+ },
+ });
+
+ gsap.from(".arch-column", {
+ y: 40,
+ opacity: 0,
+ duration: 0.7,
+ stagger: 0.15,
+ scrollTrigger: {
+ trigger: ".arch-grid",
+ start: "top 70%",
+ toggleActions: "play none none none",
+ },
+ });
+
+ gsap.from(".arch-connector", {
+ scaleX: 0,
+ duration: 0.5,
+ stagger: 0.1,
+ ease: "power2.out",
+ scrollTrigger: {
+ trigger: ".arch-grid",
+ start: "top 60%",
+ toggleActions: "play none none none",
+ },
+ });
+ },
+ { scope: sectionRef }
+ );
+
+ return (
+ <section
+ ref={sectionRef}
+ className="relative flex min-h-screen flex-col items-center justify-center px-6 py-32"
+ style={{ backgroundColor: "var(--landing-bg)" }}
+ >
+ {/* Section title */}
+ <div className="arch-title mb-16 text-center">
+ <div
+ className="mb-3 text-xs uppercase tracking-[0.3em]"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text-muted)",
+ }}
+ >
+ How It Works
+ </div>
+ <h2
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text)",
+ fontSize: "clamp(1.75rem, 4vw, 3rem)",
+ }}
+ >
+ The Architecture
+ </h2>
+ <p
+ className="mt-2 max-w-lg mx-auto"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text-muted)",
+ fontSize: "0.85rem",
+ }}
+ >
+ Email in → Edge parses & stores → Daemon polls & executes →
+ Results stream back in real time.
+ </p>
+ </div>
+
+ {/* Architecture grid */}
+ <div className="arch-grid mx-auto grid w-full max-w-6xl grid-cols-1 items-start gap-6 lg:grid-cols-[1fr_auto_1fr_auto_1fr]">
+ {columns.map((col, colIndex) => (
+ <Fragment key={col.title}>
+ <div className="arch-column">
+ {/* Column header */}
+ <div className="mb-4 text-center">
+ <h3
+ className="text-lg"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text)",
+ }}
+ >
+ {col.title}
+ </h3>
+ <div
+ className="mt-1 text-[9px] uppercase tracking-[0.2em]"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text-muted)",
+ }}
+ >
+ {col.spec}
+ </div>
+ </div>
+
+ {/* Nodes */}
+ <div className="space-y-3">
+ {col.nodes.map((node) => (
+ <div
+ key={node.label}
+ className="rounded-lg p-1.5"
+ style={{
+ backgroundColor: "oklch(0.82 0.02 75)",
+ boxShadow:
+ "0 2px 8px oklch(0.15 0.01 55 / 10%), inset 0 1px 0 oklch(0.95 0.01 80 / 40%)",
+ }}
+ >
+ <div
+ className="relative overflow-hidden rounded px-4 py-3"
+ style={{
+ backgroundColor: "var(--landing-crt-bg)",
+ boxShadow: "inset 0 0 20px oklch(0.04 0.003 55)",
+ }}
+ >
+ {/* Scan lines */}
+ <div
+ className="pointer-events-none absolute inset-0 z-10"
+ style={{
+ backgroundImage:
+ "repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, oklch(0 0 0 / 6%) 1px, oklch(0 0 0 / 6%) 2px)",
+ backgroundSize: "100% 2px",
+ }}
+ />
+ <div className="relative z-20">
+ <div
+ className="mb-1.5 text-[10px] uppercase tracking-[0.15em]"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-phosphor)",
+ opacity: 0.5,
+ textShadow:
+ "0 0 6px oklch(0.75 0.18 80 / 30%)",
+ }}
+ >
+ {node.label}
+ </div>
+ {node.lines.map((line, i) => (
+ <div
+ key={i}
+ className="text-xs leading-relaxed"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-phosphor)",
+ textShadow:
+ "0 0 6px oklch(0.75 0.18 80 / 30%)",
+ opacity: 0.75,
+ }}
+ >
+ {line}
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ ))}
+ </div>
+ </div>
+
+ {/* Connector between columns (desktop only) */}
+ {colIndex < columns.length - 1 && (
+ <div
+ className="arch-connector hidden lg:flex items-center justify-center self-center"
+ >
+ <div className="flex flex-col items-center gap-2">
+ <div
+ className="h-px w-12 origin-left"
+ style={{
+ backgroundColor: "var(--landing-text-muted)",
+ opacity: 0.3,
+ }}
+ />
+ <span
+ className="text-[10px]"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text-muted)",
+ opacity: 0.4,
+ }}
+ >
+ {colIndex === 0 ? "HTTP POLL" : "SMTP / WSS"}
+ </span>
+ <div
+ className="h-px w-12 origin-left"
+ style={{
+ backgroundColor: "var(--landing-text-muted)",
+ opacity: 0.3,
+ }}
+ />
+ </div>
+ </div>
+ )}
+ </Fragment>
+ ))}
+ </div>
+ </section>
+ );
+}
diff --git a/src/web/src/components/home/email-demo.tsx b/src/web/src/components/home/email-demo.tsx
deleted file mode 100644
index b00a97e30..000000000
--- a/src/web/src/components/home/email-demo.tsx
+++ /dev/null
@@ -1,408 +0,0 @@
-"use client";
-
-import { useRef, useState, useCallback, useEffect } from "react";
-import gsap from "gsap";
-import { useGSAP } from "@gsap/react";
-import { ScrollTrigger } from "gsap/ScrollTrigger";
-
-gsap.registerPlugin(ScrollTrigger);
-
-interface EmailOption {
- subject: string;
- body: string;
- reply: string;
-}
-
-const emailOptions: EmailOption[] = [
- {
- subject: "Check if my API is still up",
- body: "Hey Jarvis, can you hit all the health endpoints and let me know if anything looks off?",
- reply:
- "All 4 endpoints responding. Average latency 42ms. The /users endpoint is slightly slower than usual (180ms vs 90ms baseline) — might want to look into that.",
- },
- {
- subject: "Summarize today's GitHub notifications",
- body: "What happened on our repos today?",
- reply:
- "3 PRs merged (auth refactor, email worker fix, CLI update). 2 new issues opened — one P1 about WebSocket disconnects. You were tagged in a review on the email worker PR.",
- },
- {
- subject: "Deploy the latest build to staging",
- body: "Ship the current main to staging when you get a chance.",
- reply:
- "Done. Build #847 deployed to staging at 14:32 UTC. All smoke tests passing. No new errors in the first 5 minutes of logs.",
- },
-];
-
-export function EmailDemo() {
- const sectionRef = useRef<HTMLDivElement>(null);
- const [activeEmail, setActiveEmail] = useState<number | null>(null);
- const [phase, setPhase] = useState<
- "idle" | "sending" | "processing" | "replying" | "done"
- >("idle");
- const autoPlayTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
- const hasInteracted = useRef(false);
-
- useGSAP(
- () => {
- gsap.from(".email-section-title", {
- y: 30,
- opacity: 0,
- duration: 0.6,
- scrollTrigger: {
- trigger: sectionRef.current,
- start: "top 75%",
- toggleActions: "play none none none",
- },
- });
-
- gsap.from(".email-panel", {
- y: 40,
- opacity: 0,
- duration: 0.7,
- stagger: 0.15,
- scrollTrigger: {
- trigger: sectionRef.current,
- start: "top 65%",
- toggleActions: "play none none none",
- },
- });
- },
- { scope: sectionRef }
- );
-
- const handleSendEmail = useCallback(
- (index: number) => {
- if (phase !== "idle" && phase !== "done") return;
- hasInteracted.current = true;
- if (autoPlayTimerRef.current) clearTimeout(autoPlayTimerRef.current);
-
- setActiveEmail(index);
- setPhase("sending");
-
- const tl = gsap.timeline();
- tl.to({}, { duration: 0.3 });
- tl.call(() => setPhase("processing"));
- tl.to({}, { duration: 1.8 });
- tl.call(() => setPhase("replying"));
- tl.to({}, { duration: 0.5 });
- tl.call(() => setPhase("done"));
- tl.from(".email-reply-block", {
- y: 8,
- opacity: 0,
- duration: 0.3,
- ease: "power2.out",
- });
- },
- [phase]
- );
-
- const handleSendEmailRef = useRef(handleSendEmail);
- useEffect(() => {
- handleSendEmailRef.current = handleSendEmail;
- }, [handleSendEmail]);
-
- useEffect(() => {
- if (hasInteracted.current) return;
- const observer = new IntersectionObserver(
- ([entry]) => {
- if (entry.isIntersecting && !hasInteracted.current) {
- autoPlayTimerRef.current = setTimeout(() => {
- if (!hasInteracted.current) handleSendEmailRef.current(0);
- }, 3000);
- } else if (autoPlayTimerRef.current) {
- clearTimeout(autoPlayTimerRef.current);
- }
- },
- { threshold: 0.5 }
- );
- const section = sectionRef.current;
- if (section) observer.observe(section);
- return () => {
- if (section) observer.unobserve(section);
- if (autoPlayTimerRef.current) clearTimeout(autoPlayTimerRef.current);
- };
- }, []);
-
- const email = activeEmail !== null ? emailOptions[activeEmail] : null;
-
- return (
- <section
- ref={sectionRef}
- className="relative flex min-h-screen flex-col items-center justify-center px-6 py-32"
- style={{ backgroundColor: "var(--landing-bg)" }}
- >
- {/* Section title */}
- <div className="email-section-title mb-12 text-center">
- <div
- className="mb-3 text-xs uppercase tracking-[0.3em]"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- }}
- >
- Demonstration
- </div>
- <h2
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-text)",
- fontSize: "clamp(1.75rem, 4vw, 3rem)",
- }}
- >
- The Email Interface
- </h2>
- <p
- className="mt-2"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- fontSize: "0.85rem",
- }}
- >
- Select a message. Observe the agent process and respond.
- </p>
- </div>
-
- {/* Two CRT panels side by side */}
- <div className="mx-auto grid w-full max-w-5xl grid-cols-1 items-start gap-6 lg:grid-cols-2">
- {/* Left: Outbox terminal */}
- <div
- className="email-panel rounded-lg p-2"
- style={{
- backgroundColor: "oklch(0.82 0.02 75)",
- boxShadow:
- "0 4px 16px oklch(0.15 0.01 55 / 15%), inset 0 1px 0 oklch(0.95 0.01 80 / 40%)",
- }}
- >
- <div
- className="relative overflow-hidden rounded p-5"
- style={{
- backgroundColor: "var(--landing-crt-bg)",
- boxShadow: "inset 0 0 40px oklch(0.04 0.003 55)",
- minHeight: "320px",
- }}
- >
- {/* Scan lines */}
- <div
- className="pointer-events-none absolute inset-0 z-10"
- style={{
- backgroundImage:
- "repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, oklch(0 0 0 / 6%) 1px, oklch(0 0 0 / 6%) 2px)",
- backgroundSize: "100% 2px",
- }}
- />
-
- <div className="relative z-20">
- <div
- className="mb-4 text-xs uppercase tracking-[0.2em]"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- opacity: 0.5,
- textShadow: "0 0 6px oklch(0.75 0.18 80 / 30%)",
- }}
- >
- OUTBOX &mdash; TO: [email protected]
- </div>
-
- {/* Email options */}
- <div className="space-y-2">
- {emailOptions.map((opt, i) => (
- <button
- key={opt.subject}
- onClick={() => handleSendEmail(i)}
- disabled={phase !== "idle" && phase !== "done"}
- className="block w-full text-left transition-opacity duration-150"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- fontSize: "0.9rem",
- opacity:
- activeEmail === i
- ? 1
- : phase !== "idle" && phase !== "done"
- ? 0.3
- : 0.6,
- textShadow:
- activeEmail === i
- ? "0 0 10px oklch(0.75 0.18 80 / 50%)"
- : "0 0 4px oklch(0.75 0.18 80 / 20%)",
- cursor:
- phase !== "idle" && phase !== "done"
- ? "not-allowed"
- : "pointer",
- }}
- >
- {activeEmail === i ? "▶ " : " "}
- {opt.subject}
- </button>
- ))}
- </div>
-
- {/* Reply display */}
- {phase === "done" && email && (
- <div className="email-reply-block mt-5">
- <div
- className="mb-1 text-xs uppercase tracking-[0.15em]"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- opacity: 0.4,
- textShadow: "0 0 4px oklch(0.75 0.18 80 / 20%)",
- }}
- >
- REPLY FROM [email protected]:
- </div>
- <p
- className="leading-relaxed"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- fontSize: "0.85rem",
- opacity: 0.75,
- textShadow: "0 0 6px oklch(0.75 0.18 80 / 30%)",
- }}
- >
- {email.reply}
- </p>
- </div>
- )}
- </div>
- </div>
- <div className="mt-1 px-2">
- <span
- className="text-[10px] uppercase tracking-[0.2em]"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- }}
- >
- Terminal A — Compose
- </span>
- </div>
- </div>
-
- {/* Right: Agent log terminal */}
- <div
- className="email-panel rounded-lg p-2"
- style={{
- backgroundColor: "oklch(0.82 0.02 75)",
- boxShadow:
- "0 4px 16px oklch(0.15 0.01 55 / 15%), inset 0 1px 0 oklch(0.95 0.01 80 / 40%)",
- }}
- >
- <div
- className="relative overflow-hidden rounded p-5"
- style={{
- backgroundColor: "var(--landing-crt-bg)",
- boxShadow: "inset 0 0 40px oklch(0.04 0.003 55)",
- minHeight: "320px",
- }}
- >
- {/* Scan lines */}
- <div
- className="pointer-events-none absolute inset-0 z-10"
- style={{
- backgroundImage:
- "repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, oklch(0 0 0 / 6%) 1px, oklch(0 0 0 / 6%) 2px)",
- backgroundSize: "100% 2px",
- }}
- />
-
- <div className="relative z-20">
- <div
- className="mb-4 flex items-center gap-2 text-xs uppercase tracking-[0.2em]"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- opacity: 0.5,
- textShadow: "0 0 6px oklch(0.75 0.18 80 / 30%)",
- }}
- >
- <span
- className="inline-block h-2 w-2 rounded-full"
- style={{
- backgroundColor: "var(--landing-phosphor)",
- boxShadow: "0 0 6px oklch(0.75 0.18 80 / 60%)",
- }}
- />
- AGENT: jarvis — STATUS: ONLINE
- </div>
-
- <div
- className="space-y-1.5"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- fontSize: "0.85rem",
- textShadow: "0 0 6px oklch(0.75 0.18 80 / 30%)",
- }}
- >
- {phase === "idle" && (
- <div style={{ opacity: 0.4 }}>
- [idle] Waiting for incoming mail...
- <span
- className="ml-1 inline-block h-3.5 w-1.5 animate-pulse"
- style={{
- backgroundColor: "var(--landing-phosphor)",
- boxShadow: "0 0 6px oklch(0.75 0.18 80 / 40%)",
- }}
- />
- </div>
- )}
-
- {(phase === "sending" || phase === "processing") && email && (
- <>
- <div style={{ opacity: 0.7 }}>
- [inbox] Message received
- </div>
- <div style={{ opacity: 0.5 }}>
- Subject: {email.subject}
- </div>
- {phase === "processing" && (
- <div style={{ opacity: 0.7 }}>
- [exec] Processing request...
- </div>
- )}
- </>
- )}
-
- {phase === "replying" && email && (
- <>
- <div style={{ opacity: 0.7 }}>[inbox] Message received</div>
- <div style={{ opacity: 0.5 }}>Subject: {email.subject}</div>
- <div style={{ opacity: 0.7 }}>[exec] Processing request...</div>
- <div style={{ opacity: 0.7 }}>[smtp] Composing reply...</div>
- </>
- )}
-
- {phase === "done" && email && (
- <>
- <div style={{ opacity: 0.7 }}>[inbox] Message received</div>
- <div style={{ opacity: 0.5 }}>Subject: {email.subject}</div>
- <div style={{ opacity: 0.7 }}>[exec] Complete.</div>
- <div style={{ opacity: 0.9 }}>
- [smtp] ✓ Reply sent to sender
- </div>
- </>
- )}
- </div>
- </div>
- </div>
- <div className="mt-1 px-2">
- <span
- className="text-[10px] uppercase tracking-[0.2em]"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- }}
- >
- Terminal B — Agent Log
- </span>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/src/web/src/components/home/feature-showcase.tsx b/src/web/src/components/home/feature-showcase.tsx
index dec36b1c2..18e33c8f6 100644
--- a/src/web/src/components/home/feature-showcase.tsx
+++ b/src/web/src/components/home/feature-showcase.tsx
@@ -85,12 +85,11 @@ const features: Feature[] = [
export function FeatureShowcase() {
const containerRef = useRef<HTMLDivElement>(null);
- const trackRef = useRef<HTMLDivElement>(null);
const progressRef = useRef<HTMLDivElement>(null);
useGSAP(
() => {
- if (!trackRef.current || !containerRef.current) return;
+ if (!containerRef.current) return;
const isMobile = window.innerWidth < 1024;
const panels = gsap.utils.toArray<HTMLElement>(".feature-panel");
@@ -112,94 +111,86 @@ export function FeatureShowcase() {
return;
}
- gsap.set(trackRef.current, { width: `${features.length * 100}vw` });
- const totalWidth =
- trackRef.current.scrollWidth - containerRef.current.offsetWidth;
+ // Desktop: horizontal slide carousel (like shadcn/Embla)
+ const panelCount = panels.length;
+ const scrollPerPanel = window.innerHeight * 0.6;
+ const totalScroll = scrollPerPanel * panelCount;
- const panelCount = features.length;
- const snapPoints = Array.from(
- { length: panelCount },
- (_, i) => i / (panelCount - 1)
- );
+ // Position all panels off-screen to the right, except the first
+ panels.forEach((panel, i) => {
+ gsap.set(panel, { xPercent: i * 100 });
+ });
const progressBar = progressRef.current?.parentElement;
- const scrollTl = gsap.timeline({
- scrollTrigger: {
- trigger: containerRef.current,
- start: "top top",
- end: () => `+=${totalWidth}`,
- pin: true,
- scrub: 1,
- pinSpacing: true,
- anticipatePin: 1,
- snap: {
- snapTo: snapPoints,
- duration: { min: 0.25, max: 0.8 },
- delay: 0.15,
- ease: "power2.inOut",
- },
- onEnter: () => {
- if (progressBar)
- gsap.to(progressBar, { opacity: 1, duration: 0.3 });
- },
- onLeave: () => {
- if (progressBar)
- gsap.to(progressBar, { opacity: 0, duration: 0.3 });
- },
- onEnterBack: () => {
- if (progressBar)
- gsap.to(progressBar, { opacity: 1, duration: 0.3 });
- },
- onLeaveBack: () => {
- if (progressBar)
- gsap.to(progressBar, { opacity: 0, duration: 0.3 });
- },
- onUpdate: (self) => {
- if (progressRef.current) {
- progressRef.current.style.transform = `scaleX(${self.progress})`;
- }
- },
+ let currentIndex = 0;
+
+ ScrollTrigger.create({
+ trigger: containerRef.current,
+ start: "top top",
+ end: () => `+=${totalScroll}`,
+ pin: true,
+ pinSpacing: true,
+ anticipatePin: 1,
+ snap: {
+ snapTo: 1 / (panelCount - 1),
+ duration: { min: 0.15, max: 0.4 },
+ delay: 0.05,
+ ease: "power2.inOut",
},
- });
+ onEnter: () => {
+ if (progressBar)
+ gsap.to(progressBar, { opacity: 1, duration: 0.3 });
+ },
+ onLeave: () => {
+ if (progressBar)
+ gsap.to(progressBar, { opacity: 0, duration: 0.3 });
+ },
+ onEnterBack: () => {
+ if (progressBar)
+ gsap.to(progressBar, { opacity: 1, duration: 0.3 });
+ },
+ onLeaveBack: () => {
+ if (progressBar)
+ gsap.to(progressBar, { opacity: 0, duration: 0.3 });
+ },
+ onUpdate: (self) => {
+ if (progressRef.current) {
+ progressRef.current.style.transform = `scaleX(${self.progress})`;
+ }
- scrollTl.to(trackRef.current, {
- x: -totalWidth,
- ease: "none",
- });
+ // Determine which panel to show
+ const targetIndex = Math.round(
+ self.progress * (panelCount - 1)
+ );
- // Animate panels
- panels.forEach((panel) => {
- const crt = panel.querySelector(".panel-crt");
- const text = panel.querySelector(".panel-text");
+ if (targetIndex !== currentIndex) {
+ const leaving = panels[currentIndex];
+ const entering = panels[targetIndex];
+ const direction = targetIndex > currentIndex ? 1 : -1;
- if (text) {
- gsap.from(text, {
- x: -30,
- opacity: 0,
- duration: 0.6,
- scrollTrigger: {
- trigger: panel,
- containerAnimation: scrollTl,
- start: "left 75%",
- end: "left 40%",
- scrub: true,
- },
- });
- }
- if (crt) {
- gsap.from(crt, {
- x: 30,
- opacity: 0,
- duration: 0.6,
- scrollTrigger: {
- trigger: panel,
- containerAnimation: scrollTl,
- start: "left 70%",
- end: "left 35%",
- scrub: true,
- },
- });
- }
+ // Slide leaving panel out
+ gsap.to(leaving, {
+ xPercent: -direction * 100,
+ duration: 0.4,
+ ease: "power2.inOut",
+ overwrite: true,
+ });
+
+ // Slide entering panel in from the opposite side
+ gsap.fromTo(
+ entering,
+ { xPercent: direction * 100 },
+ {
+ xPercent: 0,
+ duration: 0.4,
+ ease: "power2.inOut",
+ overwrite: true,
+ }
+ );
+
+ currentIndex = targetIndex;
+ }
+ },
});
},
{ scope: containerRef }
@@ -226,118 +217,128 @@ export function FeatureShowcase() {
/>
</div>
- {/* Track */}
- <div
- ref={trackRef}
- className="feature-track flex flex-col gap-16 px-6 py-16 lg:h-screen lg:flex-row lg:items-stretch lg:gap-0 lg:p-0"
- >
+ {/* Panels */}
+ <div className="relative h-screen overflow-hidden lg:block">
+ {/* Mobile: normal flow */}
+ <div className="flex flex-col gap-16 px-6 py-16 lg:hidden">
+ {features.map((feature) => (
+ <FeaturePanel key={feature.number} feature={feature} />
+ ))}
+ </div>
+
+ {/* Desktop: absolutely positioned panels that slide horizontally */}
{features.map((feature) => (
<div
key={feature.number}
- className="feature-panel flex w-full shrink-0 items-center justify-center lg:h-full lg:w-screen"
+ className="feature-panel hidden lg:flex absolute inset-0 items-center justify-center will-change-transform"
>
- <div className="mx-auto grid w-full max-w-5xl grid-cols-1 items-center gap-8 px-6 lg:grid-cols-2 lg:gap-16 lg:px-12">
- {/* Text side */}
- <div className="panel-text">
- <div className="mb-2 flex items-center gap-3">
- <span
- className="text-3xl"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-text-muted)",
- }}
- >
- {feature.number}.
- </span>
- </div>
- <h2
- className="leading-tight"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-text)",
- fontSize: "clamp(2rem, 4vw, 3rem)",
- }}
- >
- {feature.title}
- </h2>
- <div
- className="mt-2 text-[10px] uppercase tracking-[0.2em]"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- }}
- >
- {feature.spec}
- </div>
- <p
- className="mt-4 max-w-md leading-relaxed"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text-muted)",
- fontSize: "0.875rem",
- }}
- >
- {feature.description}
- </p>
- </div>
+ <FeaturePanel feature={feature} />
+ </div>
+ ))}
+ </div>
+ </section>
+ );
+}
+
+function FeaturePanel({ feature }: { feature: Feature }) {
+ return (
+ <div className="mx-auto grid w-full max-w-5xl grid-cols-1 items-center gap-8 px-6 lg:grid-cols-2 lg:gap-16 lg:px-12">
+ {/* Text side */}
+ <div className="panel-text">
+ <div className="mb-2 flex items-center gap-3">
+ <span
+ className="text-3xl"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text-muted)",
+ }}
+ >
+ {feature.number}.
+ </span>
+ </div>
+ <h2
+ className="leading-tight"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text)",
+ fontSize: "clamp(2rem, 4vw, 3rem)",
+ }}
+ >
+ {feature.title}
+ </h2>
+ <div
+ className="mt-2 text-[10px] uppercase tracking-[0.2em]"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text-muted)",
+ }}
+ >
+ {feature.spec}
+ </div>
+ <p
+ className="mt-4 max-w-md leading-relaxed"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text-muted)",
+ fontSize: "0.875rem",
+ }}
+ >
+ {feature.description}
+ </p>
+ </div>
- {/* CRT terminal */}
+ {/* CRT terminal */}
+ <div
+ className="panel-crt rounded-lg p-2"
+ style={{
+ backgroundColor: "oklch(0.82 0.02 75)",
+ boxShadow:
+ "0 4px 16px oklch(0.15 0.01 55 / 15%), inset 0 1px 0 oklch(0.95 0.01 80 / 40%)",
+ }}
+ >
+ <div
+ className="relative overflow-hidden rounded p-5"
+ style={{
+ backgroundColor: "var(--landing-crt-bg)",
+ boxShadow: "inset 0 0 40px oklch(0.04 0.003 55)",
+ }}
+ >
+ {/* Scan lines */}
+ <div
+ className="pointer-events-none absolute inset-0 z-10"
+ style={{
+ backgroundImage:
+ "repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, oklch(0 0 0 / 6%) 1px, oklch(0 0 0 / 6%) 2px)",
+ backgroundSize: "100% 2px",
+ }}
+ />
+ {/* Vignette */}
+ <div
+ className="pointer-events-none absolute inset-0"
+ style={{
+ background:
+ "radial-gradient(ellipse at center, transparent 60%, oklch(0.04 0.003 55 / 50%) 100%)",
+ }}
+ />
+ {/* Terminal lines */}
+ <div className="relative z-20 space-y-1">
+ {feature.terminal.map((line, i) => (
<div
- className="panel-crt rounded-lg p-2"
+ key={i}
+ className="text-sm leading-relaxed"
style={{
- backgroundColor: "oklch(0.82 0.02 75)",
- boxShadow:
- "0 4px 16px oklch(0.15 0.01 55 / 15%), inset 0 1px 0 oklch(0.95 0.01 80 / 40%)",
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-phosphor)",
+ textShadow: "0 0 8px oklch(0.75 0.18 80 / 40%)",
+ opacity: line.startsWith(" ") ? 0.65 : 0.85,
}}
>
- <div
- className="relative overflow-hidden rounded p-5"
- style={{
- backgroundColor: "var(--landing-crt-bg)",
- boxShadow: "inset 0 0 40px oklch(0.04 0.003 55)",
- }}
- >
- {/* Scan lines */}
- <div
- className="pointer-events-none absolute inset-0 z-10"
- style={{
- backgroundImage:
- "repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, oklch(0 0 0 / 6%) 1px, oklch(0 0 0 / 6%) 2px)",
- backgroundSize: "100% 2px",
- }}
- />
- {/* Vignette */}
- <div
- className="pointer-events-none absolute inset-0"
- style={{
- background:
- "radial-gradient(ellipse at center, transparent 60%, oklch(0.04 0.003 55 / 50%) 100%)",
- }}
- />
- {/* Terminal lines */}
- <div className="relative z-20 space-y-1">
- {feature.terminal.map((line, i) => (
- <div
- key={i}
- className="text-sm leading-relaxed"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-phosphor)",
- textShadow:
- "0 0 8px oklch(0.75 0.18 80 / 40%)",
- opacity: line.startsWith(" ") ? 0.65 : 0.85,
- }}
- >
- {line}
- </div>
- ))}
- </div>
- </div>
+ {line}
</div>
- </div>
+ ))}
</div>
- ))}
+ </div>
</div>
- </section>
+ </div>
);
}
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index e4ae9f695..e449d5bba 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -55,29 +55,42 @@ export function HeroSection() {
"-=0.2"
);
- // Scroll exit
- const exitTl = gsap.timeline({
- scrollTrigger: {
- trigger: sectionRef.current,
- start: "top top",
- end: "+=200%",
- pin: true,
- scrub: 1,
- pinSpacing: true,
- snap: {
- snapTo: [0, 1],
- duration: { min: 0.2, max: 0.6 },
- delay: 0.1,
- ease: "power2.inOut",
- },
+ // Scroll exit — snap transition (not continuous scrub)
+ let heroVisible = true;
+ ScrollTrigger.create({
+ trigger: sectionRef.current,
+ start: "top top",
+ end: "+=50%",
+ pin: true,
+ pinSpacing: true,
+ snap: {
+ snapTo: [0, 1],
+ duration: { min: 0.15, max: 0.4 },
+ delay: 0.05,
+ ease: "power2.inOut",
+ },
+ onUpdate: (self) => {
+ const shouldHide = self.progress > 0.5;
+ if (shouldHide && heroVisible) {
+ heroVisible = false;
+ gsap.to(".hero-content", {
+ y: -80,
+ opacity: 0,
+ duration: 0.4,
+ ease: "power2.inOut",
+ overwrite: true,
+ });
+ } else if (!shouldHide && !heroVisible) {
+ heroVisible = true;
+ gsap.to(".hero-content", {
+ y: 0,
+ opacity: 1,
+ duration: 0.4,
+ ease: "power2.inOut",
+ overwrite: true,
+ });
+ }
},
- });
-
- exitTl.to(".hero-content", {
- y: -80,
- opacity: 0,
- duration: 1,
- ease: "none",
});
},
{ scope: sectionRef }
@@ -158,7 +171,7 @@ export function HeroSection() {
<TypewriterVisual
interactive
entranceDelay={1.2}
- className="!absolute inset-0"
+ className="absolute! inset-0"
/>
</div>
diff --git a/src/web/src/components/home/home-page.tsx b/src/web/src/components/home/home-page.tsx
index 845bc5e64..61aa6c977 100644
--- a/src/web/src/components/home/home-page.tsx
+++ b/src/web/src/components/home/home-page.tsx
@@ -6,7 +6,7 @@ import { useGSAP } from "@gsap/react";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { HeroSection } from "./hero-section";
import { FeatureShowcase } from "./feature-showcase";
-import { EmailDemo } from "./email-demo";
+import { ArchitectureOverview } from "./architecture-overview";
import { MarketingNav } from "./marketing-nav";
import { MarketingFooter } from "./marketing-footer";
@@ -59,7 +59,7 @@ export function HomePage({ isLoggedIn }: { isLoggedIn: boolean }) {
<MarketingNav isLoggedIn={isLoggedIn} />
<HeroSection />
<FeatureShowcase />
- <EmailDemo />
+ <ArchitectureOverview />
<MarketingFooter />
</div>
);