Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
feat(marketing): redesign the landing page around the 0.2 app (#351)
Leo5fb5b2adc2d5
diff --git a/.changeset/shaky-walls-burn.md b/.changeset/shaky-walls-burn.mdnew file mode 100644index 000000000..a845151cc--- /dev/null+++ b/.changeset/shaky-walls-burn.md@@ -0,0 +1,2 @@+---+---diff --git a/apps/marketing/package.json b/apps/marketing/package.jsonindex 4684f7fc7..7edd6d03e 100644--- a/apps/marketing/package.json+++ b/apps/marketing/package.json@@ -10,6 +10,7 @@"typecheck": "astro check"},"dependencies": {+ "@hugeicons/core-free-icons": "^4.3.0","@usenotra/geo": "0.3.0","astro": "^7.0.3"},diff --git a/apps/marketing/public/app-screenshot-1440.webp b/apps/marketing/public/app-screenshot-1440.webpnew file mode 100644index 000000000..79426c16dBinary files /dev/null and b/apps/marketing/public/app-screenshot-1440.webp differdiff --git a/apps/marketing/public/app-screenshot.webp b/apps/marketing/public/app-screenshot.webpindex 1249d5557..adee4410e 100644Binary files a/apps/marketing/public/app-screenshot.webp and b/apps/marketing/public/app-screenshot.webp differdiff --git a/apps/marketing/src/components/BlogCover.astro b/apps/marketing/src/components/BlogCover.astronew file mode 100644index 000000000..1555ef5b6--- /dev/null+++ b/apps/marketing/src/components/BlogCover.astro@@ -0,0 +1,177 @@+---+// Generated cover art for a blog article. Each kind draws a small data chart in+// the article bot's color from a seeded PRNG, so every build renders the same art.+import BotAvatar from "./BotAvatar.astro";+import type { Article } from "../lib/articles";++interface Props {+ article: Article;+ size?: "card" | "feature";+}++const { article, size = "card" } = Astro.props;++const { bot, cover } = article;++// SVG ids are document-global, so each cover gets ids of its own.+const idPrefix = `cover${article.href.replace(/[^a-z0-9]+/gi, "-")}-${size}`;++const W = 640;++const H = 360;++let seed = [...article.href].reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) >>> 0, 7);++const random = () => {+ seed = (seed * 1664525 + 1013904223) >>> 0;++ return seed / 2 ** 32;+};++// grid: a contribution calendar that gets busier toward the right.+const gridCells: { x: number; y: number; level: number }[] = [];++if (cover === "grid") {+ const cols = 30;+ const rows = 7;+ const cell = 14;+ const gap = 5;+ const left = (W - cols * (cell + gap) + gap) / 2;+ const top = (H - rows * (cell + gap) + gap) / 2 + 16;++ for (let col = 0; col < cols; col++) {+ for (let row = 0; row < rows; row++) {+ const trend = col / cols;+ const value = random() * 0.75 + trend * 0.55;+ const level = value < 0.45 ? 0 : value < 0.7 ? 1 : value < 0.9 ? 2 : 3;+ gridCells.push({ x: left + col * (cell + gap), y: top + row * (cell + gap), level });+ }+ }+}++const GRID_OPACITY = [0.07, 0.35, 0.65, 1];++// bars: paired bars, the bot's color against a neutral series.+const bars: { x: number; a: number; b: number }[] = [];++if (cover === "bars") {+ const groups = 9;+ const span = 460;+ const left = (W - span) / 2;++ for (let i = 0; i < groups; i++) {+ bars.push({ x: left + (i * span) / (groups - 1) - 14, a: 60 + random() * 150, b: 40 + random() * 110 });+ }+}++// path: a rising stepped line with three numbered milestones.+const points: [number, number][] = [];++if (cover === "path") {+ const steps = 14;++ for (let i = 0; i <= steps; i++) {+ const x = 70 + (i * (W - 140)) / steps;+ const y = 270 - (i / steps) * 150 - random() * 34;+ points.push([x, y]);+ }+}++const linePath = points.map(([x, y], i) => `${i ? "L" : "M"}${x.toFixed(1)} ${y.toFixed(1)}`).join(" ");++const areaPath = points.length ? `${linePath} L${points.at(-1)![0]} 300 L${points[0]![0]} 300 Z` : "";++const milestones = points.length ? [points[2]!, points[7]!, points[12]!] : [];+---++<div class:list={["blog-cover", `blog-cover--${size}`]} style={`--cover-color:${bot.color}`} aria-hidden="true">+ <svg viewBox={`0 0 ${W} ${H}`} preserveAspectRatio="xMidYMid slice">+ <defs>+ <pattern id={`${idPrefix}-dots`} width="16" height="16" patternUnits="userSpaceOnUse">+ <circle cx="1" cy="1" r="1" fill="rgb(255 255 255 / 0.06)"></circle>+ </pattern>+ <radialGradient id={`${idPrefix}-glow`} cx="50%" cy="100%" r="80%">+ <stop offset="0%" stop-color={bot.color} stop-opacity="0.22"></stop>+ <stop offset="100%" stop-color={bot.color} stop-opacity="0"></stop>+ </radialGradient>+ </defs>+ <rect width={W} height={H} fill={`url(#${idPrefix}-dots)`}></rect>+ <rect width={W} height={H} fill={`url(#${idPrefix}-glow)`}></rect>++ {+ gridCells.map((cell) => (+ <rect x={cell.x} y={cell.y} width="14" height="14" rx="3" fill={bot.color} fill-opacity={GRID_OPACITY[cell.level]} />+ ))+ }++ {+ bars.length > 0 && <line x1="70" x2={W - 70} y1="290" y2="290" stroke="rgb(255 255 255 / 0.12)" />+ }+ {+ bars.map((bar) => (+ <g>+ <rect x={bar.x} y={290 - bar.a} width="13" height={bar.a} rx="3" fill={bot.color} />+ <rect x={bar.x + 16} y={290 - bar.b} width="13" height={bar.b} rx="3" fill="rgb(255 255 255 / 0.18)" />+ </g>+ ))+ }++ {areaPath && <path d={areaPath} fill={bot.color} fill-opacity="0.12" />}+ {linePath && <path d={linePath} fill="none" stroke={bot.color} stroke-width="3" stroke-linejoin="round" stroke-linecap="round" />}+ {+ milestones.map(([x, y], index) => (+ <g>+ <circle cx={x} cy={y} r="15" fill="#0a0a0a" stroke={bot.color} stroke-width="3" />+ <text x={x} y={y + 5} text-anchor="middle" font-size="14" font-weight="600" fill="#f2f2f2" font-family="Geist, system-ui, sans-serif">+ {index + 1}+ </text>+ </g>+ ))+ }+ </svg>+ <span class="blog-cover-bot">+ <BotAvatar name={bot.name} shape={bot.shape} color={bot.color} size={size === "feature" ? 44 : 32} />+ <span>{bot.name}</span>+ </span>+</div>++<style>+ .blog-cover {+ position: relative;+ overflow: hidden;+ aspect-ratio: 16 / 9;+ border: 1px solid var(--color-border);+ border-radius: var(--radius-media);+ background: var(--color-card);+ }++ .blog-cover svg {+ display: block;+ width: 100%;+ height: 100%;+ }++ .blog-cover-bot {+ position: absolute;+ top: 14px;+ left: 14px;+ display: flex;+ align-items: center;+ gap: 8px;+ padding: 4px 12px 4px 4px;+ border-radius: 999px;+ background: rgb(10 10 10 / 0.7);+ box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);+ font-size: 13px;+ font-weight: 500;+ line-height: 18px;+ }++ .blog-cover--feature .blog-cover-bot {+ top: 20px;+ left: 20px;+ gap: 10px;+ padding-right: 16px;+ font-size: 15px;+ }+</style>diff --git a/apps/marketing/src/components/BotAvatar.astro b/apps/marketing/src/components/BotAvatar.astronew file mode 100644index 000000000..30fffa15e--- /dev/null+++ b/apps/marketing/src/components/BotAvatar.astro@@ -0,0 +1,64 @@+---+// A blob avatar as static markup at its rest pose. botAvatarRuntime.ts moves it+// on the client. The palette colors are all mid-luminance, so eyes are always+// cut out of the body and the surface shows through.+import { BODY, restEyeTransform, type BotBlobShape } from "../lib/botAvatarShapes";++interface Props {+ name: string;+ shape: BotBlobShape;+ color: string;+ size?: number;+ working?: boolean;+ class?: string;+}++const { name, shape, color, size = 32, working = false, class: className } = Astro.props;++const maskId = `bot-eyes-${name.toLowerCase().replace(/[^a-z0-9]/g, "")}-${Math.random().toString(36).slice(2, 8)}`;+---++<span+ class:list={["bot-avatar", className]}+ aria-hidden="true"+ data-avatar-shape={shape}+ data-name={name}+ data-bot-state={working ? "working" : "idle"}+ style={`--avatar-size:${size}px`}+>+ <span class="bot-body">+ <svg viewBox="0 0 100 100" overflow="visible">+ <mask id={maskId} maskUnits="userSpaceOnUse" x="-10" y="-10" width="120" height="120">+ <rect x="-10" y="-10" width="120" height="120" fill="#fff"></rect>+ <g class="bot-eyes" fill="#000">+ <rect x="-4.2" y="-8.8" width="8.4" height="17.6" rx="4.2" transform={restEyeTransform(shape, 0)}></rect>+ <rect x="-4.2" y="-8.8" width="8.4" height="17.6" rx="4.2" transform={restEyeTransform(shape, 1)}></rect>+ </g>+ </mask>+ <path d={BODY[shape]} fill={color} mask={`url(#${maskId})`}></path>+ </svg>+ </span>+</span>++<style is:global>+ .bot-avatar {+ position: relative;+ display: inline-block;+ flex-shrink: 0;+ width: var(--avatar-size);+ height: var(--avatar-size);+ user-select: none;+ }++ .bot-avatar .bot-body,+ .bot-avatar svg {+ display: block;+ width: 100%;+ height: 100%;+ overflow: visible;+ }++ .bot-avatar .bot-body {+ transform-origin: 50% 50%;+ }+</style>diff --git a/apps/marketing/src/components/Icon.astro b/apps/marketing/src/components/Icon.astronew file mode 100644index 000000000..3dd832853--- /dev/null+++ b/apps/marketing/src/components/Icon.astro@@ -0,0 +1,47 @@+---+// Renders a Hugeicons outline, the icon set the app uses, as an inline SVG.+// Pass an icon from @hugeicons/core-free-icons, e.g. <Icon icon={Download04Icon} />.+type IconData = ReadonlyArray<readonly [string, Readonly<Record<string, string | number>>]>;++interface Props {+ icon: IconData;+ size?: number;+ strokeWidth?: number;+ class?: string;+ [attribute: `data-${string}`]: string | undefined;+}++const { icon, size = 20, strokeWidth = 1.8, class: className, ...attributes } = Astro.props;++const kebab = (name: string) => name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);++const escape = (value: string) => value.replace(/&/g, "&").replace(/"/g, """);++const body = icon+ .map(([tag, attrs]) => {+ const rendered = Object.entries(attrs)+ .filter(([name]) => name !== "key")+ .map(([name, value]) => {+ const attr = kebab(name);+ const text = attr === "stroke-width" ? String(strokeWidth) : String(value);++ return `${attr}="${escape(text)}"`;+ })+ .join(" ");++ return `<${tag} ${rendered}/>`;+ })+ .join("");+---++<svg+ class={className}+ width={size}+ height={size}+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ aria-hidden="true"+ {...attributes}+ set:html={body}+/>diff --git a/apps/marketing/src/components/SearchPage.astro b/apps/marketing/src/components/SearchPage.astroindex 0d2a6f833..5f6af5a7c 100644--- a/apps/marketing/src/components/SearchPage.astro+++ b/apps/marketing/src/components/SearchPage.astro@@ -1,5 +1,9 @@---+import { ArrowLeft01Icon } from "@hugeicons/core-free-icons";+import Icon from "./Icon.astro";+import BlogCover from "./BlogCover.astro";import Layout from "../layouts/Layout.astro";+import { articleFor } from "../lib/articles";interface Props {readonly title: string;@@ -29,6 +33,8 @@ const siteOrigin = Astro.site ?? new URL(Astro.url.origin);const canonicalUrl = new URL(path, siteOrigin).href;+const coverArticle = articleFor(path);+const displayDate = new Intl.DateTimeFormat("en-US", {month: "short",day: "numeric",@@ -103,9 +109,7 @@ const structuredData = [<article class="editorial-article"><header class="article-header"><a class="back-link" href="/blog" aria-label="Back to blog">- <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">- <path d="M13 8H3M7 4 3 8l4 4" fill="none" stroke="currentColor" stroke-linecap="square" />- </svg>+ <Icon icon={ArrowLeft01Icon} size={16} /><span>Blog</span></a><div class="article-meta">@@ -116,6 +120,8 @@ const structuredData = [<h1>{heading}</h1></header>+ {coverArticle && <div class="article-cover"><BlogCover article={coverArticle} size="feature" /></div>}+<div class="article-layout"><div class="article-copy"><p class="article-lede"><em>{lede}</em></p>@@ -159,7 +165,7 @@ const structuredData = [<style>.editorial-article {- --color-editorial-muted-foreground: #b4b4b4;+ --color-editorial-muted-foreground: #b5b5b5;width: min(1152px, calc(100% - 80px));margin: 0 auto;padding: 40px 0 140px;@@ -175,6 +181,15 @@ const structuredData = [text-align: center;}+ .article-cover {+ max-width: 960px;+ margin: 0 auto 64px;+ }++ .article-cover :global(.blog-cover) {+ aspect-ratio: 12 / 5;+ }+.back-link {position: absolute;top: 40px;diff --git a/apps/marketing/src/components/SiteHeader.astro b/apps/marketing/src/components/SiteHeader.astroindex 28521af34..4a9cbd2af 100644--- a/apps/marketing/src/components/SiteHeader.astro+++ b/apps/marketing/src/components/SiteHeader.astro@@ -1,5 +1,15 @@---+import { Menu01Icon } from "@hugeicons/core-free-icons";+import Icon from "./Icon.astro";import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";+import { DOWNLOAD_TARGETS, releaseAssetUrl, resolveBuildVersion } from "../lib/releases";++// The nav CTA opens /download until the client script knows the visitor's platform.+const buildVersion = await resolveBuildVersion();++const downloadUrls = Object.fromEntries(+ DOWNLOAD_TARGETS.map((target) => [`data-url-${target.os}`, releaseAssetUrl(buildVersion, target.assetSuffix)]),+);---<nav class="nav"><div class="nav-side">@@ -19,23 +29,12 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";target="_blank"rel="noopener noreferrer">GitHub</a>- <a class="nav-cta" href="/download">+ <a class="nav-cta" href="/download" data-download-auto="short" {...downloadUrls}>Download- <svg width="14" height="14" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">- <path- d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"- fill="none"- stroke="currentColor"- stroke-width="1.8"- stroke-linecap="square"></path>- <path d="M5 21H19" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="square"></path>- </svg></a><details class="nav-menu"><summary aria-label="Open navigation menu">- <svg width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">- <path d="M4 7H20M4 12H20M4 17H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="square"></path>- </svg>+ <Icon icon={Menu01Icon} size={18} /></summary><div class="nav-menu-panel"><a href="/#bots">Bots</a>@@ -55,8 +54,7 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";display: flex;align-items: center;justify-content: space-between;- padding: 20px 64px;- border-bottom: 1px solid var(--color-border);+ padding: 18px 64px;}.nav-side {@@ -102,7 +100,7 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";align-items: center;gap: 8px;padding: 9px 16px;- border-radius: var(--radius-md);+ border-radius: 999px;background: var(--color-primary);color: var(--color-primary-foreground);font-size: 14px;@@ -112,7 +110,7 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";}.nav-cta:hover {- background: #2a5ad6;+ background: var(--color-primary-hover);}.nav-menu {position: relative;@@ -126,8 +124,8 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";width: 36px;height: 36px;border: 1px solid var(--color-border);- border-radius: var(--radius-md);- cursor: pointer;+ border-radius: 999px;+ background: var(--color-card);list-style: none;}@@ -151,6 +149,7 @@ import { DOCS_URL, GITHUB_REPOSITORY_URL } from "../lib/site";border: 1px solid var(--color-border);border-radius: var(--radius-lg);background: var(--color-popover);+ box-shadow: var(--shadow-panel);}.nav-menu-panel a {diff --git a/apps/marketing/src/components/home/BotFeatures.astro b/apps/marketing/src/components/home/BotFeatures.astroindex 11829ddc7..2f030b50a 100644--- a/apps/marketing/src/components/home/BotFeatures.astro+++ b/apps/marketing/src/components/home/BotFeatures.astro@@ -1,127 +1,409 @@---+import { GithubIcon, GlobeIcon } from "@hugeicons/core-free-icons";+import BotAvatar from "../BotAvatar.astro";+import Icon from "../Icon.astro";+import { HERO_BOTS } from "../../lib/heroBots";+const [scout, relay] = HERO_BOTS;-// Stroke icons are Hugeicons outlines drawn on a 24x24 grid.const bots = [{title: "One tool list per bot",body: "Pick the plugins and MCP servers each bot can reach.",- icon: `<path d="M19.5 4.5L21.5 2.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round" />- <path d="M2.5 21.5L4.5 19.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round" />- <path d="M12.761 17L7 11.24L4.121 14.12L3.761 18.08L5.921 20.24L9.881 19.88L12.761 17Z" fill="none" stroke="currentColor" stroke-width="1.5" />- <path d="M11.24 7L17 12.76L19.88 9.88L20.24 5.92L18.08 3.76L14.12 4.12L11.24 7Z" fill="none" stroke="currentColor" stroke-width="1.5" />- <path d="M8.5 12.5L10.5 10.5M11.5 15.5L13.5 13.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round" />`,},{title: "Memory that outlives the conversation",body: "A bot carries what it learned into the next conversation.",- icon: `<ellipse cx="12" cy="5" rx="8" ry="3" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />- <path d="M20 12C20 13.657 16.418 15 12 15C7.582 15 4 13.657 4 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />- <path d="M20 5V19C20 20.657 16.418 22 12 22C7.582 22 4 20.657 4 19V5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />`,},{title: "Its own instructions",body: "Write a profile for each bot. The bot follows it in every chat.",- icon: `<path d="M15.5 7H8.5M12.499 11H8.499" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" />- <path d="M20 22H6C4.895 22 4 21.105 4 20M4 20C4 18.895 4.895 18 6 18H20V2H6C4.895 2 4 2.895 4 4V20Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" />`,},];++const features = [+ {+ title: "Helpers for big requests",+ body: "A bot can hand parts of a request to temporary helpers, up to three at once, and pull their results back together.",+ },+ {+ title: "Wherever you already talk",+ body: "Reach your bots from Slack, Discord, Telegram, iMessage, or WhatsApp.",+ },+ {+ title: "Voice calls",+ body: "Call a bot from the web or desktop app when typing is too slow.",+ },+ {+ title: "Sandboxes you pick",+ body: "Run work in a local workspace or in E2B, Daytona, Vercel Sandbox, Upstash Box, Tenki, Railway, or Ascii Box.",+ },+ {+ title: "Open it from any device",+ body: "Use a phone, tablet, browser, or second computer. Nothing proxies through a hosted Akeru service.",+ },+ {+ title: "Memory you can read",+ body: "Inspect, edit, or clear the notes a bot keeps about you and your work.",+ },+];++const GMAIL_LOGO = `<svg viewBox="52 42 88 66"><path fill="#4285f4" d="M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6"/><path fill="#34a853" d="M120 108h14c3.32 0 6-2.69 6-6V59l-20 15"/><path fill="#fbbc04" d="M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2"/><path fill="#ea4335" d="M72 74V48l24 18 24-18v26L96 92"/><path fill="#c5221f" d="M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2"/></svg>`;++const tools = [+ { name: "Browser", detail: "Cloud browser", on: true, icon: GlobeIcon },+ { name: "GitHub", detail: "MCP server", on: true, icon: GithubIcon },+ { name: "Gmail", detail: "Composio", on: false, logo: GMAIL_LOGO },+];++const memories = ["Prefers aisle seats", "Sam leads design", "Ships on Thursdays", "Budget is €600"];---- <section id="bots" class="bots">- <h2 class="section-title">Every bot has its own setup</h2>- <div class="triad">- {- bots.map((bot) => (- <div class="triad-cell">- <svg width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={bot.icon} />+<section id="bots" class="bots">+ <h2 class="section-title">Every bot has its own setup</h2>+ <div class="setup-grid">+ {+ bots.map((bot, index) => (+ <article class="setup-card">+ <div class="setup-visual">+ {index === 0 && (+ <ul class="tool-list">+ {tools.map((tool) => (+ <li class="tool-row">+ {tool.icon ? (+ <span class="tool-logo" aria-hidden="true"><Icon icon={tool.icon} size={18} /></span>+ ) : (+ <span class="tool-logo" aria-hidden="true" set:html={tool.logo} />+ )}+ <span class="tool-text">+ <span class="tool-name">{tool.name}</span>+ <span class="tool-detail">{tool.detail}</span>+ </span>+ <button type="button" class="toggle" role="switch" aria-checked={tool.on ? "true" : "false"} aria-label={`${tool.name} for ${scout.name}`} data-toggle>+ <span class="toggle-thumb" />+ </button>+ </li>+ ))}+ </ul>+ )}+ {index === 1 && (+ <div class="memory">+ <div class="memory-head">+ <BotAvatar name={scout.name} shape={scout.shape} color={scout.color} size={22} />+ <span>{scout.name} remembers</span>+ </div>+ <ul class="memory-notes">+ {memories.map((note) => <li>{note}</li>)}+ </ul>+ </div>+ )}+ {index === 2 && (+ <div class="profile">+ <div class="profile-head">+ <BotAvatar name={relay.name} shape={relay.shape} color={relay.color} size={22} />+ <span>{relay.name}'s instructions</span>+ </div>+ <p class="profile-body">+ You maintain the checkout service. Run the tests before you call something fixed,+ and keep pull requests small.+ </p>+ </div>+ )}+ </div>+ <div class="setup-copy"><h3>{bot.title}</h3><p>{bot.body}</p></div>- ))- }- </div>- </section>-<style>+ </article>+ ))+ }+ </div>++ <ul class="features">+ {+ features.map((feature) => (+ <li class="feature">+ <h3>{feature.title}</h3>+ <p>{feature.body}</p>+ </li>+ ))+ }+ </ul>+</section>+<style>+ /* ── Section shells ── */.section-title {- font-size: 46px;+ font-size: 44px;font-weight: 600;letter-spacing: -0.03em;- line-height: 52px;+ line-height: 50px;text-align: center;}+ /* ── Bots ── */+.bots {display: flex;flex-direction: column;- background: var(--color-band);+ align-items: center;+ padding: 104px 64px;+ }++ .setup-grid {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 16px;+ width: 100%;+ margin-top: 52px;+ }++ /* Framed like the step cards: a bordered card with the visual on an inset panel. */+ .setup-card {+ display: flex;+ flex-direction: column;+ padding: 12px;+ border: 1px solid var(--color-border);+ border-radius: var(--radius-panel);+ background: var(--color-card);+ }++ .setup-visual {+ display: flex;+ align-items: center;+ justify-content: center;+ height: 212px;+ padding: 20px;+ border: 1px solid var(--color-border);+ border-radius: 12px;+ background: var(--color-background);+ }++ .setup-copy {+ display: flex;+ flex-direction: column;+ gap: 10px;+ padding: 20px 14px 14px;+ }++ .setup-copy h3 {+ font-size: 18px;+ font-weight: 600;+ letter-spacing: -0.02em;+ line-height: 24px;+ }++ .setup-copy p {+ font-size: 14px;+ line-height: 22px;+ color: var(--color-muted-foreground);+ }++ .tool-list {+ display: flex;+ flex-direction: column;+ width: 100%;+ max-width: 280px;+ list-style: none;+ border-radius: 14px;+ background: var(--color-card);+ box-shadow: var(--shadow-panel);+ }++ .tool-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 12px;+ padding: 11px 14px;+ }++ .tool-row + .tool-row {border-top: 1px solid var(--color-border);- padding: 112px 64px 0;}- .triad {+ .tool-logo {display: flex;- padding-top: 44px;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ width: 32px;+ height: 32px;+ border-radius: 9px;+ background: var(--color-secondary);+ box-shadow: inset 0 0 0 1px var(--color-border);+ color: var(--color-foreground);+ }++ .tool-logo :global(svg) {+ width: 18px;+ height: 18px;}- .triad-cell {- flex: 1 0 0;+ .tool-text {display: flex;+ flex: 1;flex-direction: column;- gap: 14px;- padding: 52px 44px 56px;+ min-width: 0;+ }++ .tool-name {+ font-size: 14px;+ font-weight: 600;+ line-height: 18px;+ }++ .tool-detail {+ font-size: 12px;+ line-height: 16px;+ color: var(--fg-dim);}- .triad-cell:first-child {- padding-left: 0;+ .toggle {+ position: relative;+ flex-shrink: 0;+ width: 36px;+ height: 22px;+ padding: 0;+ border: 0;+ border-radius: 999px;+ background: var(--color-input);+ transition: background-color var(--duration-fast) var(--ease-smooth-out);}- .triad-cell:last-child {- padding-right: 0;+ .toggle[aria-checked="true"] {+ background: var(--color-primary);}- .triad-cell + .triad-cell {- border-left: 1px solid var(--color-border);+ .toggle-thumb {+ position: absolute;+ top: 3px;+ left: 3px;+ width: 16px;+ height: 16px;+ border-radius: 50%;+ background: #fff;+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);+ transition:+ transform var(--duration-fast) var(--ease-bounce),+ background-color var(--duration-fast) var(--ease-smooth-out);}- .triad-cell h3 {- font-size: 19px;+ .toggle[aria-checked="true"] .toggle-thumb {+ background: var(--color-background);+ transform: translateX(14px);+ }++ .toggle:focus-visible {+ outline: 2px solid var(--color-primary);+ outline-offset: 2px;+ }++ .memory,+ .profile {+ display: flex;+ flex-direction: column;+ gap: 12px;+ width: 100%;+ max-width: 280px;+ }++ .memory-head,+ .profile-head {+ display: flex;+ align-items: center;+ gap: 8px;+ font-size: 13px;font-weight: 600;- letter-spacing: -0.02em;- line-height: 24px;+ line-height: 18px;}- .triad-cell p {+ .memory-notes {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+ list-style: none;+ }++ .memory-notes li {+ padding: 6px 11px;+ border-radius: 999px;+ background: var(--color-card);+ box-shadow: var(--shadow-panel);+ font-size: 13px;+ line-height: 17px;+ }++ .profile-body {+ padding: 14px 16px;+ border: 1px solid var(--color-input);+ border-radius: 12px;+ background: var(--color-card);+ font-size: 13px;+ line-height: 20px;+ color: var(--color-muted-foreground);+ }++ .features {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 40px 48px;+ width: 100%;+ margin-top: 72px;+ list-style: none;+ }++ .feature {+ display: flex;+ flex-direction: column;+ gap: 8px;+ }++ .feature h3 {+ font-size: 16px;+ font-weight: 600;+ letter-spacing: -0.01em;+ line-height: 22px;+ }++ .feature p {font-size: 14px;- line-height: 23px;+ line-height: 22px;color: var(--color-muted-foreground);}- @media (max-width: 900px) {+ @media (max-width: 1100px) {+ .setup-grid {+ grid-template-columns: minmax(0, 1fr);+ max-width: 560px;+ }++ .features {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ }+ }+ @media (max-width: 900px) {.section-title {font-size: 32px;line-height: 38px;}.bots {- padding: 64px 24px 0;- }-- .triad {- flex-direction: column;- padding-top: 24px;+ padding: 64px 20px;}- .triad-cell, .triad-cell:first-child, .triad-cell:last-child {- padding: 28px 0;+ .features {+ grid-template-columns: minmax(0, 1fr);+ gap: 24px;+ margin-top: 48px;}+ }- .triad-cell + .triad-cell {- border-left: 0;- border-top: 1px solid var(--color-border);+ @media (prefers-reduced-motion: reduce) {+ .toggle,+ .toggle-thumb {+ transition: none;}}-</style>diff --git a/apps/marketing/src/components/home/DemoGallery.astro b/apps/marketing/src/components/home/DemoGallery.astroindex 86be1e416..e207e63e6 100644--- a/apps/marketing/src/components/home/DemoGallery.astro+++ b/apps/marketing/src/components/home/DemoGallery.astro@@ -1,7 +1,4 @@------const demos = [{title: "Text your bot on iMessage",@@ -26,57 +23,61 @@ const demos = [},];---- <section id="demos" class="demos">- <h2 class="section-title">See it work</h2>- {- demos.map((demo) => (- <div class="demo-row">- <div class="demo-copy">- <h3>{demo.title}</h3>- <p>{demo.body}</p>- </div>- <div class="demo-media">- <video- data-demo-video- data-src={demo.video}- poster={demo.poster}- aria-label={demo.label}- muted- loop- playsinline- preload="metadata"- />- </div>+<section id="demos" class="demos">+ <h2 class="section-title">See it work</h2>+ {+ demos.map((demo) => (+ <div class="demo-row">+ <div class="demo-copy">+ <h3>{demo.title}</h3>+ <p>{demo.body}</p></div>- ))- }- </section>-<style>+ <div class="demo-media">+ <video+ data-demo-video+ data-src={demo.video}+ poster={demo.poster}+ aria-label={demo.label}+ muted+ loop+ playsinline+ preload="metadata"+ />+ </div>+ </div>+ ))+ }+</section>+<style>+ /* ── Section shells ── */.section-title {- font-size: 46px;+ font-size: 44px;font-weight: 600;letter-spacing: -0.03em;- line-height: 52px;+ line-height: 50px;text-align: center;}+ /* ── Demos ── */+.demos {display: flex;flex-direction: column;align-items: center;- border-top: 1px solid var(--color-border);padding: 104px 64px;}.demo-row {display: flex;align-items: center;- gap: 88px;+ gap: 80px;width: 100%;- margin-top: 96px;+ margin-top: 88px;}++ /* The middle row mirrors, so the media side alternates down the page. */.demo-row:nth-of-type(even) {flex-direction: row-reverse;}@@ -85,15 +86,15 @@ const demos = [flex-shrink: 0;display: flex;flex-direction: column;- gap: 18px;- width: 432px;+ gap: 16px;+ width: 400px;}.demo-copy h3 {- font-size: 34px;+ font-size: 32px;font-weight: 600;letter-spacing: -0.03em;- line-height: 40px;+ line-height: 38px;}.demo-copy p {@@ -105,21 +106,24 @@ const demos = [.demo-media {flex: 1 0 0;aspect-ratio: 8 / 5;- border: 1px solid var(--color-border);- border-radius: 16px;+ padding: 8px;+ border-radius: var(--radius-panel);background: var(--color-card);- overflow: hidden;+ box-shadow: var(--shadow-panel);}.demo-media video {display: block;width: 100%;height: 100%;+ border-radius: 12px;object-fit: cover;+ background: var(--color-muted);}@media (max-width: 1100px) {- .demo-row, .demo-row:nth-of-type(even) {+ .demo-row,+ .demo-row:nth-of-type(even) {flex-direction: column;align-items: stretch;gap: 28px;@@ -137,14 +141,13 @@ const demos = [}@media (max-width: 900px) {-.section-title {font-size: 32px;line-height: 38px;}.demos {- padding: 64px 24px;+ padding: 64px 20px;}.demo-copy h3 {@@ -152,5 +155,4 @@ const demos = [line-height: 32px;}}-</style>diff --git a/apps/marketing/src/components/home/DownloadSection.astro b/apps/marketing/src/components/home/DownloadSection.astroindex b2d271f02..943c8b16b 100644--- a/apps/marketing/src/components/home/DownloadSection.astro+++ b/apps/marketing/src/components/home/DownloadSection.astro@@ -1,68 +1,58 @@----import { RELEASES_URL } from "../../lib/releases";-import { APPLE_MARK, WINDOWS_MARK, LINUX_MARK } from "./PlatformMarks";+import BotAvatar from "../BotAvatar.astro";+import { HERO_BOTS } from "../../lib/heroBots";+import { RELEASES_URL, releaseAssetUrl, resolveBuildVersion } from "../../lib/releases";+const version = await resolveBuildVersion();-// `asset` is the release-asset suffix the client script resolves to a real URL.+// `asset` is the release-asset suffix; the href is baked from the build-time version.const platforms = [- { os: "mac", name: "macOS", detail: "Apple silicon · DMG", mark: APPLE_MARK, asset: "arm64.dmg" },- { os: "win", name: "Windows", detail: "x64 · Installer", mark: WINDOWS_MARK, asset: "x64.exe" },- { os: "linux", name: "Linux", detail: "x64 · AppImage", mark: LINUX_MARK, asset: "x64.AppImage", unsigned: true },-];---const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" />- <path d="M5 21H19" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" />`;+ { os: "mac", name: "macOS", detail: "Apple silicon · DMG", asset: "arm64.dmg" },+ { os: "win", name: "Windows", detail: "x64 · Installer", asset: "x64.exe" },+ { os: "linux", name: "Linux", detail: "x64 · AppImage", asset: "x64.AppImage" },+].map((platform) => ({ ...platform, href: releaseAssetUrl(version, platform.asset) }));---- <section class="download">- <div class="download-band">- <div class="download-head">- <h2>Download Akeru Bot</h2>- <p>Free and MIT licensed. Bring your own subscription.</p>- </div>- <div class="platform-cards">- {- platforms.map((platform) => (- <a class="platform-card" data-os={platform.os} data-asset={platform.asset} href={RELEASES_URL}>- <span class="platform-card-top">- <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={platform.mark} />- <svg class="platform-card-glyph" width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={DOWNLOAD_GLYPH} />- </span>- <span class="platform-card-text">- <span class="platform-card-name">{platform.name}</span>- <span class="platform-card-detail">{platform.detail}</span>- </span>- </a>- ))- }- </div>- <a class="btn-outline" href={RELEASES_URL} target="_blank" rel="noopener noreferrer">- All downloads- </a>+<section class="download">+ <div class="download-band">+ <div class="download-roster" aria-hidden="true">+ {+ HERO_BOTS.map((bot) => (+ <span data-bot-hover>+ <BotAvatar name={bot.name} shape={bot.shape} color={bot.color} size={30} />+ </span>+ ))+ }</div>- </section>-<style>--- .btn-outline {- display: flex;- align-items: center;- gap: 9px;- padding: 14px 22px;- border-radius: var(--radius-md);- font-size: 15px;- line-height: 18px;- }-- .btn-outline {- border: 1px solid var(--color-border);- font-weight: 500;- transition: border-color 0.15s ease;- }+ <div class="download-head">+ <h2>Download Akeru Bot</h2>+ <p>Free and MIT licensed. Bring your own subscription.</p>+ </div>+ <div class="platform-cards">+ {+ platforms.map((platform) => (+ <a class="platform-card" data-os={platform.os} data-asset={platform.asset} href={platform.href}>+ <span class="platform-card-text">+ <span class="platform-card-name">{platform.name}</span>+ <span class="platform-card-detail">{platform.detail}</span>+ </span>+ </a>+ ))+ }+ </div>+ <a+ class="download-notes"+ href={`${RELEASES_URL}/tag/v${version}`}+ target="_blank"+ rel="noopener noreferrer"+ data-release-notes+ >+ Version <span data-release-version>{version}</span> release notes+ </a>+ </div>+</section>- .btn-outline:hover {- border-color: var(--color-input);- }+<style>+ /* ── Download band ── */.download {display: flex;@@ -73,25 +63,29 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"display: flex;flex-direction: column;align-items: center;- gap: 36px;+ gap: 32px;width: 100%;padding: 64px 56px;- border: 1px solid var(--color-border);- border-radius: 20px;- background:- linear-gradient(- color-mix(in srgb, var(--color-background) 78%, transparent),- color-mix(in srgb, var(--color-background) 78%, transparent)- ),- url("/download-glow.webp") center / cover no-repeat,- var(--color-background);+ border-radius: 24px;+ background: var(--color-card);+ box-shadow: var(--shadow-panel);+ }++ .download-roster {+ display: flex;+ gap: 8px;+ }++ .download-roster span[data-bot-hover] {+ display: flex;+ padding: 3px;}.download-head {display: flex;flex-direction: column;align-items: center;- gap: 12px;+ gap: 10px;text-align: center;}@@ -105,7 +99,7 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z".download-head p {font-size: 16px;line-height: 26px;- color: color-mix(in srgb, var(--color-foreground) 72%, transparent);+ color: var(--color-muted-foreground);}.platform-cards {@@ -119,33 +113,19 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"display: flex;flex-direction: column;gap: 16px;- width: 264px;+ width: 248px;padding: 20px;- border: 1px solid var(--color-border);- border-radius: var(--radius-lg);- background: color-mix(in srgb, var(--color-card) 80%, transparent);+ border-radius: 16px;+ background: var(--color-background);+ box-shadow: inset 0 0 0 1px var(--color-border);transition:- border-color 0.15s ease,- background-color 0.15s ease;+ background-color var(--duration-quick) ease,+ box-shadow var(--duration-quick) ease;}.platform-card:hover {- border-color: var(--color-input);- background: color-mix(in srgb, var(--color-popover) 92%, transparent);- }-- .platform-card-top {- display: flex;- align-items: center;- justify-content: space-between;- }-- .platform-card-glyph {- color: var(--color-muted-foreground);- }-- .platform-card:hover .platform-card-glyph {- color: var(--color-foreground);+ background: var(--color-selected);+ box-shadow: inset 0 0 0 1px var(--color-input);}.platform-card-text {@@ -167,15 +147,28 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"color: var(--color-muted-foreground);}- @media (max-width: 900px) {+ .download-notes {+ font-size: 14px;+ line-height: 20px;+ color: var(--color-muted-foreground);+ text-decoration: underline;+ text-decoration-color: var(--color-input);+ text-underline-offset: 4px;+ transition: color var(--duration-quick) ease;+ }+ .download-notes:hover {+ color: var(--color-foreground);+ }++ @media (max-width: 900px) {.download {- padding: 0 24px 64px;+ padding: 0 20px 64px;}.download-band {- padding: 40px 24px;- gap: 28px;+ padding: 40px 20px;+ gap: 26px;}.download-head h2 {@@ -187,5 +180,4 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"width: 100%;}}-</style>diff --git a/apps/marketing/src/components/home/Hero.astro b/apps/marketing/src/components/home/Hero.astroindex 04f31c6b2..9372f509f 100644--- a/apps/marketing/src/components/home/Hero.astro+++ b/apps/marketing/src/components/home/Hero.astro@@ -1,53 +1,86 @@---+import BotAvatar from "../BotAvatar.astro";+import { HERO_BOTS } from "../../lib/heroBots";+import { DOWNLOAD_TARGETS, releaseAssetUrl, resolveBuildVersion } from "../../lib/releases";import { docsUrl } from "../../lib/site";-import { RELEASES_URL } from "../../lib/releases";-import { APPLE_MARK, WINDOWS_MARK, LINUX_MARK } from "./PlatformMarks";++// Direct release assets are baked at build time, so they never depend on the GitHub+// API. The shared client script picks the visitor's platform; until then the button+// opens /download.+const version = await resolveBuildVersion();++const downloadUrls = Object.fromEntries(+ DOWNLOAD_TARGETS.map((target) => [`data-url-${target.os}`, releaseAssetUrl(version, target.assetSuffix)]),+);---- <section class="hero">- <div class="hero-copy">- <h1 class="hero-title">An open-source Grok Bot alternative</h1>- <p class="hero-sub">- Akeru Bot gives each bot its own tools, instructions, and memory while keeping the- application and environment under your control. Bring your existing Grok subscription,- or connect Claude, Codex, Kimi, or OpenCode.- </p>- <div class="hero-actions">- <a id="download-btn" class="btn-primary" href={RELEASES_URL}>- <svg class="os-mark" data-os="mac" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={APPLE_MARK} />- <svg class="os-mark" data-os="win" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={WINDOWS_MARK} />- <svg class="os-mark" data-os="linux" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={LINUX_MARK} />- <span id="download-label">All downloads</span>- </a>- <a class="btn-ghost" href={docsUrl("install")} target="_blank" rel="noopener noreferrer">- <svg width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">- <path d="M15.5 7H8.5M12.499 11H8.499" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="square"></path>- <path d="M20 22H6C4.895 22 4 21.105 4 20M4 20C4 18.895 4.895 18 6 18H20V2H6C4.895 2 4 2.895 4 4V20Z" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="square"></path>- </svg>- <span>Read the docs</span>- </a>- </div>- <p class="hero-note">Free and MIT licensed. No Akeru account required.</p>+<section class="hero">+ <div class="hero-copy">+ <div class="hero-roster" aria-hidden="true">+ {+ HERO_BOTS.map((bot) => (+ <span class="hero-roster-bot" data-bot-hover>+ <BotAvatar name={bot.name} shape={bot.shape} color={bot.color} size={34} />+ </span>+ ))+ }</div>- <div class="hero-shot">- <img- src="/app-screenshot.webp"- width="1440"- height="900"- alt="The Akeru Bot desktop app with three bots working in one shared workspace"- loading="eager"- decoding="async"- />+ <h1 class="hero-title">An open-source Grok Bot alternative</h1>+ <p class="hero-sub">+ Akeru Bot gives each bot its own tools, instructions, and memory while keeping the+ application and environment under your control. Bring your existing Grok subscription,+ or connect Claude, Codex, Kimi, or OpenCode.+ </p>+ <div class="hero-actions">+ <a class="btn-primary" href="/download" data-download-auto {...downloadUrls}>+ <span data-download-label>Download</span>+ </a>+ <a class="btn-ghost" href={docsUrl("install")} target="_blank" rel="noopener noreferrer">+ <span>Read the docs</span>+ </a></div>- </section>+ <p class="hero-note">Free and MIT licensed. No Akeru account required.</p>+ </div>++ <figure class="hero-shot">+ <img+ src="/app-screenshot.webp"+ srcset="/app-screenshot-1440.webp 1440w, /app-screenshot.webp 2880w"+ sizes="(max-width: 1320px) calc(100vw - 40px), 1280px"+ width="2880"+ height="1800"+ alt="Akeru Bot with five bots in the sidebar. Scout, a travel bot, answers which Lisbon flight has wifi."+ fetchpriority="high"+ decoding="async"+ />+ </figure>+</section>+<style>+ /* ── Hero ── */+ .hero-shot {+ width: 100%;+ max-width: 1280px;+ margin: 0;+ border: 1px solid var(--color-border);+ border-radius: 16px;+ overflow: hidden;+ background: var(--color-card);+ box-shadow: 0 40px 120px -40px rgb(0 0 0 / 0.8);+ }++ .hero-shot img {+ display: block;+ width: 100%;+ height: auto;+ }.hero {display: flex;flex-direction: column;align-items: center;- gap: 44px;- padding: 116px 64px 104px;+ gap: 64px;+ padding: 72px 64px 112px;overflow: clip;}@@ -55,22 +88,35 @@ import { APPLE_MARK, WINDOWS_MARK, LINUX_MARK } from "./PlatformMarks";display: flex;flex-direction: column;align-items: center;- gap: 26px;+ gap: 24px;width: 100%;}+ .hero-roster {+ display: flex;+ gap: 10px;+ padding-bottom: 6px;+ }++ .hero-roster-bot {+ display: flex;+ padding: 4px;+ }+.hero-title {- font-size: 84px;+ max-width: 880px;+ font-size: 72px;font-weight: 600;- letter-spacing: -0.042em;- line-height: 88px;+ letter-spacing: -0.04em;+ line-height: 76px;text-align: center;+ text-wrap: balance;}.hero-sub {- max-width: 760px;- font-size: 19px;- line-height: 30px;+ max-width: 680px;+ font-size: 18px;+ line-height: 29px;text-align: center;color: var(--color-muted-foreground);}@@ -79,39 +125,26 @@ import { APPLE_MARK, WINDOWS_MARK, LINUX_MARK } from "./PlatformMarks";display: flex;align-items: center;justify-content: center;- gap: 12px;+ gap: 10px;flex-wrap: wrap;- padding-top: 4px;+ padding-top: 6px;}.hero-note {font-size: 14px;line-height: 18px;- color: var(--color-muted-foreground);- }-- .hero-shot {- width: 100%;- aspect-ratio: 8 / 5;- border: 1px solid var(--color-border);- border-radius: 16px;- background: var(--color-card);- overflow: hidden;+ color: var(--fg-dim);}- .hero-shot img {- width: 100%;- height: 100%;- object-fit: cover;- object-position: top center;- }+ /* ── Buttons ── */- .btn-primary, .btn-ghost {+ .btn-primary,+ .btn-ghost {display: flex;align-items: center;gap: 9px;- padding: 14px 22px;- border-radius: var(--radius-md);+ padding: 13px 22px;+ border-radius: 999px;font-size: 15px;line-height: 18px;}@@ -120,50 +153,38 @@ import { APPLE_MARK, WINDOWS_MARK, LINUX_MARK } from "./PlatformMarks";background: var(--color-primary);color: var(--color-primary-foreground);font-weight: 600;- transition: background-color 0.15s ease;+ transition: background-color var(--duration-quick) ease;}.btn-primary:hover {- background: #2a5ad6;+ background: var(--color-primary-hover);}.btn-ghost {background: var(--color-card);border: 1px solid var(--color-border);font-weight: 500;- transition: border-color 0.15s ease;+ transition: border-color var(--duration-quick) ease;}.btn-ghost:hover {border-color: var(--color-input);}- .os-mark {- display: none;- }-- .btn-primary[data-os="mac"] .os-mark[data-os="mac"], .btn-primary[data-os="win"] .os-mark[data-os="win"], .btn-primary[data-os="linux"] .os-mark[data-os="linux"] {- display: block;- }@media (max-width: 900px) {.hero {- padding: 64px 24px 72px;- gap: 32px;+ padding: 40px 20px 72px;+ gap: 40px;}.hero-title {- font-size: 46px;- line-height: 50px;+ font-size: 44px;+ line-height: 48px;}.hero-sub {font-size: 16px;line-height: 26px;}-- .hero-shot {- border-radius: 12px;- }}-</style>diff --git a/apps/marketing/src/components/home/HowItWorks.astro b/apps/marketing/src/components/home/HowItWorks.astroindex 6c2bf4643..bd731fbc9 100644--- a/apps/marketing/src/components/home/HowItWorks.astro+++ b/apps/marketing/src/components/home/HowItWorks.astro@@ -1,5 +1,8 @@---+import BotAvatar from "../BotAvatar.astro";+import { HERO_BOTS } from "../../lib/heroBots";+const [scout, relay, mira] = HERO_BOTS;const steps = [{@@ -18,47 +21,143 @@ const steps = [body: "Chat from the desktop app, any browser on your network, or your phone. Bots keep working while you are away.",},];++// BotActivityStatus from the app: the pixel comet circles this diamond while the+// label steps through the plain-language updates a working bot reports.+const GLYPH_CELLS = [+ [2, 0],+ [3, 1],+ [4, 2],+ [3, 3],+ [2, 4],+ [1, 3],+ [0, 2],+ [1, 1],+] as const;++const ACTIVITY_LABELS = [`${mira.name} is working`, "Reading a source", "Running checks", "Editing files"];++// The onboarding celebration, with the same burst math as OnboardingCelebration.tsx.+// A fixed seed keeps the build deterministic.+const CONFETTI_COLORS = [relay.color, relay.color, scout.color, "#FFA826", mira.color];++let seed = 7;++const random = () => {+ seed = (seed * 16807) % 2147483647;++ return (seed - 1) / 2147483646;+};++const confetti = Array.from({ length: 16 }, (_, i) => {+ const r = random();+ const spread = (i / 15) * 2 - 1 + (random() - 0.5) * 0.2;++ return {+ x: Math.round(spread * 132),+ y: Math.round(-46 - r * 104),+ rotate: i % 2 === 0 ? 110 : -110,+ scale: (0.65 + random() * 0.5).toFixed(2),+ delay: Math.round(r * 0.12 * 0.66 * 1000),+ square: r > 0.45,+ color: CONFETTI_COLORS[i % CONFETTI_COLORS.length],+ };+});++const providers = ["Claude", "Codex", "Grok", "Kimi For Coding", "OpenCode"];---- <section id="how-it-works" class="how">- <h2 class="section-title">Up and running in three steps</h2>- <p class="how-sub">- Your environment owns the chats, bot profiles, and memory. Run the environment on your- machine or connect it to a cloud sandbox that you control.- </p>- <p class="how-sub">- Looking for an <a href="/open-source-grok-bot">open-source Grok Bot alternative</a>?- See how Akeru works with your Grok subscription, or follow the{" "}- <a href="/guides/self-hosted-grok-bot">self-hosted Grok bot setup guide</a>.- </p>- <ol class="steps">- {- steps.map((step) => (- <li class="step">- <span class="step-number" aria-hidden="true">{step.number}</span>- <h3>{step.title}</h3>- <p>{step.body}</p>- </li>- ))- }- </ol>- </section>-<style>+<section id="how-it-works" class="how">+ <h2 class="section-title">Up and running in three steps</h2>+ <p class="how-sub">+ Your environment owns the chats, bot profiles, and memory. Run the environment on your+ machine or connect it to a cloud sandbox that you control.+ </p>+ <p class="how-sub">+ Looking for an <a href="/open-source-grok-bot">open-source Grok Bot alternative</a>?+ See how Akeru works with your Grok subscription, or follow the{" "}+ <a href="/guides/self-hosted-grok-bot">self-hosted Grok bot setup guide</a>.+ </p>+ <ol class="steps" data-steps>+ {+ steps.map((step, index) => (+ <li class="step">+ <div class="step-visual">+ {index === 0 && (+ <ul class="provider-chips" aria-label="Supported providers">+ {providers.map((provider) => <li>{provider}</li>)}+ </ul>+ )}+ {index === 1 && (+ <div class="create" data-create data-name={relay.name}>+ <div class="celebration">+ <span class="confetti" aria-hidden="true">+ {confetti.map((piece) => (+ <span+ class:list={["confetti-piece", { "is-square": piece.square }]}+ style={`--x:${piece.x}px;--y:${piece.y}px;--rotate:${piece.rotate}deg;--scale:${piece.scale};--delay:${piece.delay}ms;background:${piece.color}`}+ />+ ))}+ </span>+ <span class="create-slot" aria-hidden="true" />+ <BotAvatar name={relay.name} shape={relay.shape} color={relay.color} size={56} />+ </div>+ <div class="create-field">+ <span class="create-name" data-create-name>{relay.name}</span>+ <span class="create-caret" aria-hidden="true" />+ </div>+ <span class="create-provider">Claude</span>+ </div>+ )}+ {index === 2 && (+ <div class="chat-demo" data-activity data-labels={ACTIVITY_LABELS.join("|")}>+ <p class="chat-bubble">Can you look at the failing checkout test?</p>+ <div class="activity-row">+ <span class="activity-glyph">+ <svg aria-hidden="true" class="bot-thinking-glyph" viewBox="0 0 14 14">+ {GLYPH_CELLS.map(([x, y], index) => (+ <rect fill="currentColor" height="2" width="2" x={x * 3} y={y * 3} style={`--cell:${index}`} />+ ))}+ </svg>+ </span>+ <span class="bot-shimmer-text" data-activity-label>+ {ACTIVITY_LABELS[0]}...+ <span aria-hidden="true" class="bot-shimmer-sheen">+ <span class="bot-shimmer-sheen-text">{ACTIVITY_LABELS[0]}...</span>+ </span>+ </span>+ </div>+ </div>+ )}+ </div>+ <span class="step-number" aria-hidden="true">{step.number}</span>+ <h3>{step.title}</h3>+ <p>{step.body}</p>+ </li>+ ))+ }+ </ol>+</section>+<style>+ /* ── Section shells ── */.section-title {- font-size: 46px;+ font-size: 44px;font-weight: 600;letter-spacing: -0.03em;- line-height: 52px;+ line-height: 50px;text-align: center;}+ /* ── How it works ── */+.how {display: flex;flex-direction: column;align-items: center;- border-top: 1px solid var(--color-border);padding: 104px 64px 112px;+ background: var(--color-band);+ border-block: 1px solid var(--color-border);}.how-sub {@@ -82,35 +181,49 @@ const steps = [}.steps {- display: flex;- gap: 24px;+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 16px;width: 100%;margin-top: 56px;list-style: none;}.step {- flex: 1 0 0;display: flex;flex-direction: column;- gap: 12px;- padding: 28px;- border: 1px solid var(--color-border);- border-radius: var(--radius-lg);+ gap: 10px;+ padding: 12px 12px 28px;+ border-radius: var(--radius-panel);background: var(--color-card);+ box-shadow: var(--shadow-panel);+ }++ .step > :not(.step-visual) {+ margin-inline: 16px;+ }++ .step-visual {+ display: flex;+ align-items: center;+ justify-content: center;+ height: 168px;+ margin-bottom: 10px;+ border: 1px solid var(--color-border);+ border-radius: 12px;+ background: var(--color-background);}.step-number {display: flex;align-items: center;justify-content: center;- width: 30px;- height: 30px;- margin-bottom: 6px;+ width: 26px;+ height: 26px;border-radius: 50%;- background: var(--color-primary-surface);- color: var(--color-primary-foreground);- font-size: 14px;+ background: var(--color-selected);+ color: var(--color-foreground);+ font-size: 13px;font-weight: 600;}@@ -123,19 +236,332 @@ const steps = [.step p {font-size: 14px;- line-height: 23px;+ line-height: 22px;color: var(--color-muted-foreground);}- @media (max-width: 900px) {+ .provider-chips {+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ gap: 6px;+ max-width: 260px;+ list-style: none;+ }++ .provider-chips li {+ padding: 6px 12px;+ border-radius: 999px;+ background: var(--color-card);+ box-shadow: var(--shadow-panel);+ font-size: 13px;+ font-weight: 500;+ line-height: 17px;+ }++ .create {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 12px;+ }++ .celebration {+ position: relative;+ display: grid;+ place-items: center;+ width: 56px;+ height: 56px;+ }++ .celebration > :global(*) {+ grid-area: 1 / 1;+ }++ /* The empty avatar slot shown before the bot exists. */+ .create-slot {+ width: 56px;+ height: 56px;+ border: 1px dashed var(--color-input);+ border-radius: 50%;+ opacity: 0;+ transition: opacity var(--duration-fast) var(--ease-smooth-out);+ }++ .celebration :global(.bot-avatar) {+ transition:+ opacity var(--duration-fast) var(--ease-smooth-out),+ transform var(--duration-very-slow) var(--ease-bounce),+ filter var(--duration-fast) var(--ease-smooth-out);+ }++ .create-field {+ display: flex;+ align-items: center;+ gap: 2px;+ min-width: 132px;+ height: 32px;+ padding: 0 12px;+ border-radius: 8px;+ background: var(--color-card);+ box-shadow: var(--shadow-panel);+ font-size: 14px;+ font-weight: 600;+ transition: box-shadow var(--duration-fast) var(--ease-smooth-out);+ }+ .create-caret {+ width: 1.5px;+ height: 16px;+ background: var(--color-foreground);+ opacity: 0;+ }++ .create-provider {+ padding: 3px 10px;+ border-radius: 999px;+ background: var(--color-selected);+ color: var(--color-muted-foreground);+ font-size: 12px;+ font-weight: 500;+ line-height: 16px;+ transition:+ opacity var(--duration-fast) var(--ease-smooth-out),+ transform var(--duration-fast) var(--ease-smooth-out);+ }++ .create[data-stage="empty"] .create-slot,+ .create[data-stage="typing"] .create-slot {+ opacity: 1;+ }++ .create[data-stage="empty"] :global(.bot-avatar),+ .create[data-stage="typing"] :global(.bot-avatar) {+ opacity: 0;+ transform: scale(0.6);+ filter: blur(2px);+ }++ .create[data-stage="typing"] .create-field {+ box-shadow: inset 0 0 0 1px var(--color-muted-foreground);+ }++ .create[data-stage="typing"] .create-caret {+ animation: create-caret 900ms step-end infinite;+ }++ .create[data-stage="empty"] .create-provider,+ .create[data-stage="typing"] .create-provider,+ .create[data-stage="created"] .create-provider {+ opacity: 0;+ transform: translateY(6px);+ }++ @keyframes create-caret {+ 0%,+ 100% {+ opacity: 1;+ }+ 50% {+ opacity: 0;+ }+ }++ .confetti {+ position: absolute;+ top: 28px;+ left: 50%;+ pointer-events: none;+ }++ .confetti-piece {+ position: absolute;+ top: -3px;+ left: -3px;+ width: 6px;+ height: 6px;+ border-radius: 50%;+ opacity: 0;+ }++ .confetti-piece.is-square {+ border-radius: 2px;+ }++ .create[data-stage="created"] .confetti-piece,+ .create[data-stage="done"] .confetti-piece {+ animation: confetti-burst 780ms cubic-bezier(0.16, 1, 0.3, 1) var(--delay) both;+ }++ @keyframes confetti-burst {+ 0% {+ opacity: 0;+ transform: translate(0, 0) rotate(0deg) scale(0.4);+ }+ 12% {+ opacity: 1;+ }+ 62% {+ opacity: 1;+ transform: translate(var(--x), var(--y)) rotate(var(--rotate)) scale(var(--scale));+ }+ 100% {+ opacity: 0;+ transform: translate(var(--x), calc(var(--y) + 26px)) rotate(var(--rotate)) scale(var(--scale));+ }+ }++ /* "Hand it work": a user message and the app's BotActivityStatus row under it. */+ .chat-demo {+ display: flex;+ flex-direction: column;+ gap: 14px;+ width: 100%;+ padding: 0 20px;+ }++ .chat-bubble {+ align-self: flex-end;+ max-width: 82%;+ padding: 8px 12px;+ border-radius: 16px;+ background: var(--color-secondary);+ font-size: 13px;+ line-height: 18px;+ }++ .activity-row {+ display: flex;+ align-items: center;+ gap: 12px;+ min-width: 0;+ padding: 4px 0;+ font-size: 14px;+ line-height: 20px;+ }++ .activity-glyph {+ display: flex;+ flex-shrink: 0;+ justify-content: center;+ width: 28px;+ color: var(--color-foreground);+ }++ /* Ported from apps/web/src/index.css. Both loops pause while the row is off screen. */+ .bot-thinking-glyph {+ flex-shrink: 0;+ width: 14px;+ height: 14px;+ }++ .bot-thinking-glyph rect {+ opacity: 0.12;+ animation: bot-thinking-comet 720ms step-end infinite;+ animation-delay: calc(var(--cell) * 90ms - 720ms);+ animation-play-state: paused;+ }++ @keyframes bot-thinking-comet {+ 0% {+ opacity: 1;+ }+ 12.5% {+ opacity: 0.7;+ }+ 25% {+ opacity: 0.45;+ }+ 37.5% {+ opacity: 0.25;+ }+ 50%,+ 100% {+ opacity: 0.12;+ }+ }++ .bot-shimmer-text {+ --bot-shimmer-duration: 1800ms;+ position: relative;+ min-width: 0;+ overflow: hidden;+ color: var(--color-foreground);+ font-weight: 500;+ white-space: nowrap;+ }++ .bot-shimmer-text :global(.bot-shimmer-sheen) {+ position: absolute;+ inset: 0;+ pointer-events: none;+ mask-image: linear-gradient(90deg, transparent 25%, #000 50%, transparent 75%);+ animation: bot-shimmer-sheen var(--bot-shimmer-duration) linear infinite;+ animation-play-state: paused;+ will-change: transform;+ }++ .bot-shimmer-text :global(.bot-shimmer-sheen-text) {+ display: block;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ color: color-mix(in srgb, var(--color-background) 62%, transparent);+ animation: bot-shimmer-sheen-counter var(--bot-shimmer-duration) linear infinite;+ animation-play-state: paused;+ will-change: transform;+ }++ .chat-demo[data-active] .bot-thinking-glyph rect,+ .chat-demo[data-active] :global(.bot-shimmer-sheen),+ .chat-demo[data-active] :global(.bot-shimmer-sheen-text) {+ animation-play-state: running;+ }++ @keyframes bot-shimmer-sheen {+ from {+ transform: translateX(-75%);+ }+ to {+ transform: translateX(75%);+ }+ }++ @keyframes bot-shimmer-sheen-counter {+ from {+ transform: translateX(75%);+ }+ to {+ transform: translateX(-75%);+ }+ }++ @media (prefers-reduced-motion: reduce) {+ .bot-thinking-glyph rect {+ animation: none;+ opacity: calc(1 - var(--cell) * 0.11);+ }++ .bot-shimmer-text :global(.bot-shimmer-sheen) {+ display: none;+ }+ }++ @media (max-width: 1100px) {+ .steps {+ grid-template-columns: minmax(0, 1fr);+ max-width: 560px;+ }+ }++ @media (max-width: 900px) {.section-title {font-size: 32px;line-height: 38px;}.how {- padding: 64px 24px;+ padding: 64px 20px;}.how-sub {@@ -144,10 +570,7 @@ const steps = [}.steps {- flex-direction: column;margin-top: 32px;- gap: 12px;}}-</style>diff --git a/apps/marketing/src/components/home/PlatformMarks.ts b/apps/marketing/src/components/home/PlatformMarks.tsdeleted file mode 100644index 25cb6289d..000000000--- a/apps/marketing/src/components/home/PlatformMarks.ts+++ /dev/null@@ -1,10 +0,0 @@-// Brand marks are filled silhouettes so they hold up at 17px.-export const APPLE_MARK = `<path d="M12 5.75C12 3.75 13.5 1.75 15.5 1.75C15.5 3.75 14 5.75 12 5.75Z" fill="currentColor" />- <path d="M12.5 8.09C11.985 8.09 11.587 7.926 11.141 7.744C10.578 7.512 9.939 7.25 8.893 7.25C7.022 7.25 4 8.749 4 12.749C4 17.402 7.105 22.25 9.105 22.25C9.774 22.25 10.377 21.987 10.954 21.736C11.482 21.506 11.987 21.286 12.5 21.286C13.013 21.286 13.518 21.506 14.046 21.736C14.623 21.987 15.226 22.25 15.895 22.25C17.288 22.25 18.957 19.899 20 16.901C18.379 16.22 17.338 14.618 17.338 12.75C17.338 11.121 18.204 10.04 19.5 9.25C18.5 7.75 17.013 7.25 15.945 7.25C14.899 7.25 14.26 7.512 13.697 7.744C13.251 7.926 13.015 8.09 12.5 8.09Z" fill="currentColor" />`;--export const WINDOWS_MARK = `<path d="M3 3.9L11.1 2.75V11.2H3V3.9Z" fill="currentColor" />- <path d="M12.4 2.56L21 1.35V11.2H12.4V2.56Z" fill="currentColor" />- <path d="M3 12.5H11.1V20.95L3 19.8V12.5Z" fill="currentColor" />- <path d="M12.4 12.5H21V22.35L12.4 21.14V12.5Z" fill="currentColor" />`;--export const LINUX_MARK = `<path fill-rule="evenodd" clip-rule="evenodd" d="M9.8 18.2C8.4 19.4 5.6 20.2 4.8 21.0C4.1 21.7 5.0 22.3 6.5 22.3C8.4 22.3 10.0 21.5 10.6 20.4L9.8 18.2ZM14.2 18.2C15.6 19.4 18.4 20.2 19.2 21.0C19.9 21.7 19.0 22.3 17.5 22.3C15.6 22.3 14.0 21.5 13.4 20.4L14.2 18.2ZM6.2 10.6C4.8 12.0 3.9 14.5 4.2 16.5C4.4 17.9 5.5 18.2 6.0 17.1C6.5 16.0 6.4 13.4 6.9 12.0L6.2 10.6ZM17.8 10.6C19.2 12.0 20.1 14.5 19.8 16.5C19.6 17.9 18.5 18.2 18.0 17.1C17.5 16.0 17.6 13.4 17.1 12.0L17.8 10.6ZM12 5.4C15.5 5.4 18.4 10.1 18.4 15.0C18.4 19.0 15.5 21.3 12 21.3C8.5 21.3 5.6 19.0 5.6 15.0C5.6 10.1 8.5 5.4 12 5.4ZM12 1.5C14.2 1.5 15.9 3.4 15.9 5.9C15.9 8.4 14.2 10.1 12 10.1C9.8 10.1 8.1 8.4 8.1 5.9C8.1 3.4 9.8 1.5 12 1.5ZM10.5 3.9C9.9 3.9 9.5 4.6 9.5 5.4C9.5 6.2 9.9 6.9 10.5 6.9C11.1 6.9 11.5 6.2 11.5 5.4C11.5 4.6 11.1 3.9 10.5 3.9ZM13.5 3.9C12.9 3.9 12.5 4.6 12.5 5.4C12.5 6.2 12.9 6.9 13.5 6.9C14.1 6.9 14.5 6.2 14.5 5.4C14.5 4.6 14.1 3.9 13.5 3.9ZM12 6.6C10.9 6.6 10.0 7.2 10.0 8.0C10.0 8.8 10.9 9.4 12 9.4C13.1 9.4 14.0 8.8 14.0 8.0C14.0 7.2 13.1 6.6 12 6.6Z" fill="currentColor" />`;diff --git a/apps/marketing/src/layouts/Layout.astro b/apps/marketing/src/layouts/Layout.astroindex 1883dd124..0fa4d5c16 100644--- a/apps/marketing/src/layouts/Layout.astro+++ b/apps/marketing/src/layouts/Layout.astro@@ -80,7 +80,7 @@ const structuredData = [<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content={description} />{noindex && <meta name="robots" content="noindex, follow" />}- <meta name="theme-color" content="#0a0a0a" />+ <meta name="theme-color" content="#111111" /><link rel="canonical" href={canonicalUrl.href} /><meta property="og:type" content={socialType} />@@ -122,6 +122,11 @@ const structuredData = [<SiteFooter /></div>+ <script>+ import { initDownloadLinks } from "../lib/downloadLinks";++ initDownloadLinks();+ </script></body></html>diff --git a/apps/marketing/src/lib/articles.ts b/apps/marketing/src/lib/articles.tsnew file mode 100644index 000000000..cd7521bae--- /dev/null+++ b/apps/marketing/src/lib/articles.ts@@ -0,0 +1,70 @@+import { HERO_BOTS } from "./heroBots";++export type ArticleCoverKind = "grid" | "bars" | "path";++/** Blog articles, newest first. The blog index and each article header read this list. */+export interface Article {+ href: string;+ category: string;+ title: string;+ summary: string;+ /** ISO date, the same value the article page passes as `datePublished`. */+ published: string;+ readMinutes: number;+ cover: ArticleCoverKind;+ bot: (typeof HERO_BOTS)[number];+}++const bot = (name: string) => {+ const match = HERO_BOTS.find((candidate) => candidate.name === name);++ if (!match) throw new Error(`Unknown hero bot: ${name}`);++ return match;+};++export const ARTICLES: Article[] = [+ {+ href: "/open-source-grok-bot",+ category: "Open source",+ title: "An open-source alternative to Grok Bot",+ summary:+ "Named Grok bots with their own tools, instructions, and memory, in an MIT-licensed app you can run yourself.",+ published: "2026-09-03",+ readMinutes: 4,+ cover: "grid",+ bot: bot("Scout"),+ },+ {+ href: "/compare/akeru-vs-grok-bot",+ category: "Comparison",+ title: "Akeru Bot and Grok Bot compared",+ summary: "Where each one runs, who holds your data, and which providers you can bring.",+ published: "2026-09-03",+ readMinutes: 2,+ cover: "bars",+ bot: bot("Relay"),+ },+ {+ href: "/guides/self-hosted-grok-bot",+ category: "Guide",+ title: "Run a Grok bot on an environment you control",+ summary: "Install Akeru, connect your Grok subscription, and set up your first bot.",+ published: "2026-09-03",+ readMinutes: 3,+ cover: "path",+ bot: bot("Mira"),+ },+];++const publishedFormat = new Intl.DateTimeFormat("en-US", {+ month: "short",+ day: "numeric",+ year: "numeric",+ timeZone: "UTC",+});++export const formatPublished = (article: Article) =>+ publishedFormat.format(new Date(`${article.published}T00:00:00Z`));++export const articleFor = (path: string) => ARTICLES.find((article) => article.href === path);diff --git a/apps/marketing/src/lib/botAvatarIdleBeat.ts b/apps/marketing/src/lib/botAvatarIdleBeat.tsnew file mode 100644index 000000000..f2b71e686--- /dev/null+++ b/apps/marketing/src/lib/botAvatarIdleBeat.ts@@ -0,0 +1,68 @@+// Copied from apps/web/src/components/roster/botAvatarIdleBeat.ts.++/**+ * Paces the rare idle beat. Resting avatars are static SVGs that cost+ * nothing per frame; every 20–40 seconds one avatar in the viewport wakes for+ * a moment so the roster still feels alive. At most one idle avatar animates+ * at a time, and nothing is scheduled while no avatar is mounted.+ */+const IDLE_BEAT_MIN_MS = 20_000;++const IDLE_BEAT_SPREAD_MS = 20_000;++export const IDLE_BEAT_LENGTH_MS = 1_600;++interface Sleeper {+ element: HTMLElement;+ wake: () => void;+}++const sleepers = new Set<Sleeper>();++let timer: ReturnType<typeof setTimeout> | null = null;++function isInViewport(element: HTMLElement) {+ const rect = element.getBoundingClientRect();++ return (+ rect.width > 0 &&+ rect.bottom > 0 &&+ rect.right > 0 &&+ rect.top < window.innerHeight &&+ rect.left < window.innerWidth+ );+}++function schedule() {+ timer = setTimeout(beat, IDLE_BEAT_MIN_MS + Math.random() * IDLE_BEAT_SPREAD_MS);+}++function beat() {+ timer = null;++ if (sleepers.size === 0) return;++ if (!document.hidden) {+ const visible = [...sleepers].filter((sleeper) => isInViewport(sleeper.element));+ visible[Math.floor(Math.random() * visible.length)]?.wake();+ }++ schedule();+}++/** Registers a resting avatar as a candidate for the next idle beat. */+export function subscribeIdleBeat(element: HTMLElement, wake: () => void) {+ const sleeper = { element, wake };+ sleepers.add(sleeper);++ if (timer === null) schedule();++ return () => {+ sleepers.delete(sleeper);++ if (sleepers.size === 0 && timer !== null) {+ clearTimeout(timer);+ timer = null;+ }+ };+}diff --git a/apps/marketing/src/lib/botAvatarMotion.ts b/apps/marketing/src/lib/botAvatarMotion.tsnew file mode 100644index 000000000..4b4604680--- /dev/null+++ b/apps/marketing/src/lib/botAvatarMotion.ts@@ -0,0 +1,391 @@+// Copied from apps/web/src/components/roster/botAvatarMotion.ts so the site+// moves exactly like the app. Keep the two in sync when the app retunes motion.++/**+ * Spring-driven avatar motion, tuned to feel like Grok Bot's companions.+ *+ * Every animated value is a damped spring chasing a target. Poses set the+ * targets (a slow sway at rest, a rocking bob while working), and one-off+ * events kick them: blinks with an overshoot, saccades, a one-eye squint, and+ * a belt spin that wraps the face around the body. The engine only ticks while+ * something asks for motion and stops itself once every spring has settled,+ * so a resting roster costs nothing per frame.+ *+ * Units are the avatar's 100×100 viewBox. Body offsets are applied as percent+ * of the element, which is the same thing.+ */++interface Spring {+ x: number;+ v: number;+ t: number;+}++const spring = (value: number): Spring => ({ x: value, v: 0, t: value });++function step(s: Spring, freq: number, damping: number, dt: number) {+ s.v += (-2 * damping * freq * s.v - freq * freq * (s.x - s.t)) * dt;+ s.x += s.v * dt;+}++const settled = (s: Spring, eps = 0.002) => Math.abs(s.x - s.t) < eps && Math.abs(s.v) < eps * 10;++const rand = (min: number, max: number) => min + Math.random() * (max - min);++/** Blink keyframes for eye height, [ms, value]. Squeezes shut, then overshoots open. */+const BLINK: ReadonlyArray<readonly [number, number]> = [+ [0, 1],+ [60, 0.08],+ [110, 0.08],+ [190, 1.08],+ [320, 1],+];++const DOUBLE_BLINK: ReadonlyArray<readonly [number, number]> = [+ ...BLINK.slice(0, -1),+ [360, 1],+ [420, 0.08],+ [470, 0.08],+ [560, 1.06],+ [680, 1],+];++function sampleKeyframes(frames: ReadonlyArray<readonly [number, number]>, ms: number) {+ for (let index = 1; index < frames.length; index++) {+ const [endMs, endValue] = frames[index]!;++ if (ms <= endMs) {+ const [startMs, startValue] = frames[index - 1]!;+ const t = (ms - startMs) / (endMs - startMs);+ const eased = t * t * (3 - 2 * t);++ return startValue + (endValue - startValue) * eased;+ }+ }++ return frames[frames.length - 1]![1];+}++const SQUINT_MS = 320;++const SPIN_EVERY_MS: readonly [number, number] = [6000, 9000];++const WORK_BOB_HZ = 1.6;++/** One step of the frame loop. `active` is false once the avatar has settled at rest. */+export interface MotionTick {+ frame: MotionFrame;+ active: boolean;+}++export interface MotionFrame {+ /** Body roll in degrees. */+ roll: number;+ /** Body offset in viewBox units. */+ x: number;+ y: number;+ /** Vertical squash of the body. */+ scaleY: number;+ /** Gaze offset of the whole face, in face units. */+ gazeX: number;+ gazeY: number;+ /** Pull of the face toward the body center, 0 to 1. */+ pull: number;+ /** Eye width and height multipliers. */+ eyeWidth: number;+ eyeHeight: [number, number];+ /** Belt spin angle in radians, or 0 at rest. */+ spin: number;+}++export interface MotionInput {+ working: boolean;+ hovered: boolean;+ /** Pointer position relative to the avatar, each clamped to -1..1, or null. */+ pointer: { x: number; y: number } | null;+ reducedMotion: boolean;+}++/**+ * One avatar's motion state. Call `tick` from requestAnimationFrame; it+ * returns false once the avatar is at rest and nothing is pending.+ */+export class BotMotion {+ private readonly roll = spring(0);+ private readonly offsetX = spring(0);+ private readonly offsetY = spring(0);+ private readonly squash = spring(1);+ private readonly lookX = spring(0);+ private readonly lookY = spring(0);+ private readonly pull = spring(0);+ private readonly eyeWidth = spring(1);+ private readonly eyeHeight = spring(1);+ private spin: Spring | null = null;+ private spinDirection = 1;++ private clock = 0;+ private readonly phase: number;+ private saccadeAt = 0;+ private saccade = { x: 0, y: 0 };+ private blinkAt = 0;+ private blink: { start: number; frames: ReadonlyArray<readonly [number, number]> } | null = null;+ private squint: { start: number; eye: 0 | 1 } | null = null;+ private squintAt = 0;+ private spinAt = 0;+ private followX = 0;+ private followY = 0;+ private beatUntil = -1;+ private working = false;++ constructor(seed: number) {+ this.phase = seed * 40;+ this.scheduleIdle();+ }++ /** True while the belt spin plays; callers render it at the full frame rate. */+ get spinning() {+ return this.spin !== null;+ }++ /** Plays a short lively moment on a resting avatar. */+ beat(lengthMs: number) {+ this.beatUntil = this.clock + lengthMs / 1000;+ const pick = Math.random();++ if (pick < 0.4) this.startBlink();+ else if (pick < 0.7) this.startSquint();+ else this.saccade = { x: rand(-1, 1) * 5, y: rand(-1, 0.4) * 3 };+ this.saccadeAt = this.clock + rand(0.9, 1.3);+ this.blinkAt = Math.max(this.blinkAt, this.beatUntil + 1);+ this.squintAt = Math.max(this.squintAt, this.beatUntil + 1);+ }++ tick(dtSeconds: number, input: MotionInput): MotionTick {+ if (input.reducedMotion) return { frame: this.rest(), active: false };+ const dt = Math.min(dtSeconds, 1 / 20);+ this.clock += dt;+ const now = this.clock;+ const t = now + this.phase;+ const beating = now < this.beatUntil;+ this.working = input.working;+ const lively = input.working || input.hovered || beating;++ // Pose targets.+ if (lively && input.working) {+ const bob = Math.sin(2 * Math.PI * WORK_BOB_HZ * t);+ this.roll.t = 4 + 2.5 * bob;+ this.offsetX.t = 1.2;+ this.offsetY.t = 0.6 + 1.2 * Math.max(0, bob);+ this.squash.t = 1 - 0.02 * Math.max(0, bob);+ } else if (lively) {+ this.roll.t = 1.5 * Math.sin(0.5 * t) + 0.6 * Math.sin(0.17 * t);+ this.offsetX.t = 0.4 * Math.sin(0.27 * t);+ this.offsetY.t = 0.5 * Math.sin(0.85 * t);+ this.squash.t = 1 + 0.007 * Math.sin(0.85 * t);+ } else {+ this.roll.t = 0;+ this.offsetX.t = 0;+ this.offsetY.t = 0;+ this.squash.t = 1;+ }++ // Gaze: saccades, a slow drift, and the pointer while hovered.+ if (lively && now >= this.saccadeAt) {+ if (input.working) {+ this.saccade = {+ x: (Math.random() < 0.5 ? -1 : 1) * rand(0, 0.4) * 6,+ y: rand(0.4, 1) * 3.6,+ };+ this.saccadeAt = now + rand(1.2, 2.4);+ } else {+ this.saccade = { x: 0, y: 0 };+ this.saccadeAt = now + rand(2.5, 5.5);+ }+ }++ if (!lively) this.saccade = { x: 0, y: 0 };+ const following = lively && input.hovered && input.pointer !== null;+ const followTargetX = following ? input.pointer!.x * 9 : 0;+ const followTargetY = following ? input.pointer!.y * 5.6 : 0;+ this.followX += (followTargetX - this.followX) * 0.16;+ this.followY += (followTargetY - this.followY) * 0.16;+ const saccadeWeight = following ? 0.2 : 1;+ const drift = lively ? 1 : 0;+ this.lookX.t =+ this.saccade.x * saccadeWeight ++ this.followX ++ drift * (0.56 * Math.sin(t * 0.42) + 0.2 * Math.sin(t * 1.0 + 2));+ this.lookY.t =+ this.saccade.y * saccadeWeight + this.followY + drift * 0.36 * Math.sin(t * 0.58);++ // Hover emphasis: bigger eyes, face drawn toward the middle.+ const emphasis = lively && input.hovered && !input.working;+ this.pull.t = emphasis ? 1 : 0;+ this.eyeWidth.t = emphasis ? 1.18 : 1;+ this.eyeHeight.t = emphasis ? 1.1 : 1;++ // Blinks and the one-eye squint.+ if (lively && now >= this.blinkAt && !this.blink) this.startBlink();++ if (lively && !input.working && now >= this.squintAt && !this.squint) this.startSquint();+ let blinkHeight = 1;++ if (this.blink) {+ const ms = (now - this.blink.start) * 1000;+ const frames = this.blink.frames;++ if (ms >= frames[frames.length - 1]![0]) this.blink = null;+ else blinkHeight = sampleKeyframes(frames, ms);+ }++ const eyeHeight: [number, number] = [blinkHeight, blinkHeight];++ if (this.squint) {+ const progress = ((now - this.squint.start) * 1000) / SQUINT_MS;++ if (progress >= 1) this.squint = null;+ else {+ const dip = progress < 0.42 ? progress / 0.42 : 1 - (progress - 0.42) / 0.58;+ eyeHeight[this.squint.eye] *= 1 - 0.55 * dip;+ }+ }++ // The working spin, a full turn of the face around the body.+ if (lively && input.working && !this.spin && now >= this.spinAt) {+ this.spin = spring(0);+ this.spin.t = 2 * Math.PI;+ this.spinDirection = Math.random() < 0.5 ? 1 : -1;+ }++ const substeps = Math.max(1, Math.ceil(dt * 120));+ const h = dt / substeps;++ for (let index = 0; index < substeps; index++) {+ step(this.roll, 5, 0.9, h);+ step(this.offsetX, 3.5, 1, h);+ step(this.offsetY, 4, 1, h);+ step(this.squash, 10, 0.8, h);+ step(this.lookX, 13, 1, h);+ step(this.lookY, 13, 1, h);+ step(this.pull, 9, 1, h);+ step(this.eyeWidth, 9, 0.85, h);+ step(this.eyeHeight, 9, 0.85, h);++ if (this.spin) step(this.spin, 6.2, 1, h);+ }++ let spin = 0;++ if (this.spin) {+ spin = this.spin.x * this.spinDirection;++ if (settled(this.spin, 0.004)) {+ this.spin = null;+ spin = 0;+ this.spinAt = now + rand(...SPIN_EVERY_MS) / 1000;+ }+ }++ const frame: MotionFrame = {+ roll: this.roll.x,+ x: this.offsetX.x,+ y: this.offsetY.x,+ scaleY: this.squash.x,+ gazeX: this.lookX.x,+ gazeY: this.lookY.x,+ pull: this.pull.x,+ eyeWidth: this.eyeWidth.x,+ eyeHeight: [eyeHeight[0] * this.eyeHeight.x, eyeHeight[1] * this.eyeHeight.x],+ spin,+ };++ const resting =+ settled(this.roll) &&+ settled(this.offsetX) &&+ settled(this.offsetY) &&+ settled(this.squash) &&+ settled(this.lookX) &&+ settled(this.lookY) &&+ settled(this.pull) &&+ settled(this.eyeWidth) &&+ settled(this.eyeHeight) &&+ Math.abs(this.followX) < 0.01 &&+ Math.abs(this.followY) < 0.01 &&+ !this.spin &&+ !this.blink &&+ !this.squint;++ if (!lively && resting) this.scheduleIdle();++ return { frame, active: lively || !resting };+ }++ /** Drops every pending motion and snaps to the rest frame. */+ private rest(): MotionFrame {+ for (const s of [this.roll, this.offsetX, this.offsetY, this.lookX, this.lookY, this.pull]) {+ s.x = s.t = s.v = 0;+ }++ for (const s of [this.squash, this.eyeWidth, this.eyeHeight]) {+ s.x = s.t = 1;+ s.v = 0;+ }++ this.followX = this.followY = 0;+ this.saccade = { x: 0, y: 0 };+ this.blink = this.squint = this.spin = null;+ this.beatUntil = -1;++ return REST_FRAME;+ }++ private scheduleIdle() {+ const now = this.clock;+ this.saccadeAt = now + rand(0.6, 1.5);+ this.blinkAt = now + rand(1.2, 3);+ this.squintAt = now + rand(4.5, 10);+ this.spinAt = now + rand(1.5, 3.5);+ }++ private startBlink() {+ this.blink = {+ start: this.clock,+ frames: Math.random() < 0.14 ? DOUBLE_BLINK : BLINK,+ };+ // Working bots blink often; hovered ones now and then.+ this.blinkAt = this.clock + (this.working ? rand(1.8, 3.2) : rand(3, 6));+ }++ private startSquint() {+ this.squint = { start: this.clock, eye: Math.random() < 0.5 ? 0 : 1 };+ this.squintAt = this.clock + rand(4.5, 10);+ }+}++export const REST_FRAME: MotionFrame = {+ roll: 0,+ x: 0,+ y: 0,+ scaleY: 1,+ gazeX: 0,+ gazeY: 0,+ pull: 0,+ eyeWidth: 1,+ eyeHeight: [1, 1],+ spin: 0,+};++/**+ * Wraps a point on the face around the body like a belt turning by `angle`.+ * Returns the new x and how wide the point should draw, or null when it has+ * turned behind the body.+ */+export function wrapOnBelt(x: number, center: number, radius: number, angle: number) {+ const u = Math.max(-0.999, Math.min(0.999, (x - center) / radius));+ const a = Math.asin(u);+ const cos = Math.cos(a + angle);++ if (cos < 0.02) return null;++ return { x: center + radius * Math.sin(a + angle), width: cos / Math.cos(a) };+}diff --git a/apps/marketing/src/lib/botAvatarRuntime.ts b/apps/marketing/src/lib/botAvatarRuntime.tsnew file mode 100644index 000000000..bd2f4751f--- /dev/null+++ b/apps/marketing/src/lib/botAvatarRuntime.ts@@ -0,0 +1,166 @@+// The frame loop from apps/web/src/components/roster/BotAvatarView.tsx, without React.+// An avatar animates only while it works, while the pointer is over it or its+// `[data-bot-hover]` row, and for the rare idle beat. The loop stops once the+// springs settle and pauses while the avatar is off screen.++import { IDLE_BEAT_LENGTH_MS, subscribeIdleBeat } from "./botAvatarIdleBeat";+import { BotMotion, type MotionFrame } from "./botAvatarMotion";+import { bodyTransform, botAvatarSeed, eyeTransform, parseBotBlobShape } from "./botAvatarShapes";++/** Minimum frame spacing for the working pose, about 30fps with rAF jitter headroom. */+const WORKING_FRAME_MS = 1000 / 30 - 2;++export interface BotAvatarHandle {+ setWorking(working: boolean): void;+ /** Plays a short burst of motion, as the idle beat does. */+ beat(ms?: number): void;+}++const handles = new WeakMap<HTMLElement, BotAvatarHandle>();++export function mountBotAvatar(wrapper: HTMLElement): BotAvatarHandle | null {+ const existing = handles.get(wrapper);++ if (existing) return existing;+ const body = wrapper.querySelector<HTMLElement>(".bot-body");+ const shape = parseBotBlobShape(wrapper.dataset.avatarShape);++ if (!body || !shape) return null;++ const eyes = Array.from(wrapper.querySelectorAll<SVGRectElement>(".bot-eyes rect"));+ const motion = new BotMotion(botAvatarSeed(wrapper.dataset.name ?? ""));+ const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");+ const hoverTarget = wrapper.closest<HTMLElement>("[data-bot-hover]") ?? wrapper;+ let working = wrapper.dataset.botState === "working";+ let hovered = false;+ let pointer: { x: number; y: number } | null = null;+ let visible = true;+ let frameId: number | null = null;+ let last = 0;+ // Last values written to the DOM, so settled or repeated poses cost no style work.+ let lastBody = "";+ const lastEyes = eyes.map(() => ({ transform: "", visible: true }));+ let unsubscribeIdle: (() => void) | null = null;++ const render = (frame: MotionFrame) => {+ const nextBody = bodyTransform(frame);++ if (nextBody !== lastBody) {+ body.style.transform = nextBody;+ lastBody = nextBody;+ }++ eyes.forEach((eye, i) => {+ const written = lastEyes[i];++ if (!written) return;+ const transform = eyeTransform(shape, frame, i % 2 === 0 ? 0 : 1);+ const isVisible = transform !== null;++ if (isVisible !== written.visible) {+ eye.setAttribute("visibility", isVisible ? "visible" : "hidden");+ written.visible = isVisible;+ }++ if (transform && transform !== written.transform) {+ eye.setAttribute("transform", transform);+ written.transform = transform;+ }+ });+ };++ const tick = (time: number) => {+ // The continuous working bob reads fine at 30fps. Hover tracking and the spin keep+ // the full display rate.+ if (last !== 0 && working && !hovered && !motion.spinning && time - last < WORKING_FRAME_MS) {+ frameId = visible ? requestAnimationFrame(tick) : null;++ if (frameId === null) last = 0;++ return;+ }++ const dt = last === 0 ? 1 / 60 : (time - last) / 1000;+ last = time;++ const { frame, active } = motion.tick(dt, {+ working,+ hovered,+ pointer,+ reducedMotion: reducedMotion.matches,+ });++ render(frame);+ frameId = active && visible ? requestAnimationFrame(tick) : null;++ if (frameId === null) last = 0;+ };++ const wake = () => {+ if (frameId === null && visible) frameId = requestAnimationFrame(tick);+ };++ const onMove = (event: PointerEvent) => {+ const rect = wrapper.getBoundingClientRect();+ const clamp = (value: number) => Math.max(-0.6, Math.min(0.6, value)) / 0.6;+ pointer = {+ x: clamp((event.clientX - (rect.left + rect.width / 2)) / Math.max(rect.width, 1)),+ y: clamp((event.clientY - (rect.top + rect.height / 2)) / Math.max(rect.height, 1)),+ };+ };++ reducedMotion.addEventListener("change", wake);+ hoverTarget.addEventListener("pointerenter", (event) => {+ hovered = true;+ onMove(event);+ wake();+ });+ hoverTarget.addEventListener("pointermove", onMove);+ hoverTarget.addEventListener("pointerleave", () => {+ hovered = false;+ pointer = null;+ wake();+ });++ new IntersectionObserver(([entry]) => {+ visible = entry?.isIntersecting ?? true;++ if (visible) wake();+ }).observe(wrapper);++ const beat = (ms = IDLE_BEAT_LENGTH_MS) => {+ motion.beat(ms);+ wake();+ };++ // Resting avatars join the idle beat; working ones already move.+ const syncIdle = () => {+ if (working && unsubscribeIdle) {+ unsubscribeIdle();+ unsubscribeIdle = null;+ } else if (!working && !unsubscribeIdle) {+ unsubscribeIdle = subscribeIdleBeat(wrapper, () => beat());+ }+ };++ const handle: BotAvatarHandle = {+ setWorking(next) {+ if (next === working) return;+ working = next;+ wrapper.dataset.botState = next ? "working" : "idle";+ syncIdle();+ wake();+ },+ beat,+ };++ handles.set(wrapper, handle);+ syncIdle();+ wake();++ return handle;+}++export function mountBotAvatars(root: ParentNode = document) {+ root.querySelectorAll<HTMLElement>(".bot-avatar[data-avatar-shape]").forEach(mountBotAvatar);+}diff --git a/apps/marketing/src/lib/botAvatarShapes.ts b/apps/marketing/src/lib/botAvatarShapes.tsnew file mode 100644index 000000000..2ce181f9e--- /dev/null+++ b/apps/marketing/src/lib/botAvatarShapes.ts@@ -0,0 +1,98 @@+// Blob avatar geometry, copied from apps/web/src/components/roster/BotAvatarView.tsx+// and roster.logic.ts. Shared by BotAvatar.astro (static markup) and+// botAvatarRuntime.ts (the frame loop), so the first paint matches the rest frame.++import { REST_FRAME, wrapOnBelt, type MotionFrame } from "./botAvatarMotion";++const BOT_BLOB_SHAPES = [+ "circle",+ "squircle",+ "square",+ "pill",+ "triangle",+ "hex",+ "cloud",+ "drop",+] as const;++export type BotBlobShape = (typeof BOT_BLOB_SHAPES)[number];++/** Reads a shape name from markup, such as the `data-avatar-shape` attribute. */+export function parseBotBlobShape(value: string | undefined): BotBlobShape | null {+ return BOT_BLOB_SHAPES.find((shape) => shape === value) ?? null;+}++/** Where the face sits on each body, and how large it draws. */+const FACE_LAYOUT: Record<BotBlobShape, { x: number; y: number; scale: number }> = {+ circle: { x: 66, y: 40, scale: 1.1 },+ squircle: { x: 64, y: 42, scale: 1.1 },+ square: { x: 66, y: 40, scale: 1.1 },+ pill: { x: 64, y: 46, scale: 1 },+ triangle: { x: 50, y: 64, scale: 0.85 },+ hex: { x: 64, y: 42, scale: 1.1 },+ cloud: { x: 62, y: 50, scale: 1 },+ drop: { x: 57, y: 62, scale: 1 },+};++/** Flat body geometry on a 100×100 viewBox. Each shape fills the frame. */+export const BODY: Record<BotBlobShape, string> = {+ circle: "M4 50A46 46 0 1 1 96 50A46 46 0 1 1 4 50Z",+ squircle:+ "M96.8 50C97.5 55.5 97.4 62 95.3 67.3C93.3 72.6 89.2 78.2 84.6 81.9C80 85.5 73.4 87.9 67.6 89.1C61.8 90.4 55.6 89.9 50 89.4C44.4 88.9 39.1 87.7 33.8 86C28.5 84.3 23 82.4 18.3 79.2C13.7 76 8.7 71.7 5.9 66.8C3.1 62 1.3 55.6 1.4 50C1.5 44.4 3.6 38.3 6.3 33.3C9 28.3 13.3 23.8 17.7 20.2C22 16.5 27.3 13.4 32.7 11.4C38.1 9.4 44.2 8.1 50 8.1C55.8 8.2 62 9.5 67.2 11.7C72.4 13.9 77.2 17.5 81.2 21.2C85.2 25 88.6 29.5 91.2 34.3C93.8 39.1 96.1 44.5 96.8 50Z",+ square: "M30 6H70C88 6 94 12 94 30V70C94 88 88 94 70 94H30C12 94 6 88 6 70V30C6 12 12 6 30 6Z",+ pill: "M34 19H66A31 31 0 0 1 66 81H34A31 31 0 0 1 34 19Z",+ triangle: "M35.6 28.3Q50 2 64.4 28.3L89.9 75.1Q98 90 81 90L19 90Q2 90 10.1 75.1Z",+ hex: "M42.2 5.5Q50 1 57.8 5.5L84.6 21Q92.4 25.5 92.4 34.5L92.4 65.5Q92.4 74.5 84.6 79L57.8 94.5Q50 99 42.2 94.5L15.4 79Q7.6 74.5 7.6 65.5L7.6 34.5Q7.6 25.5 15.4 21Z",+ cloud:+ "M31 80.7A20 20 0 1 1 16.7 43.4A22 22 0 0 1 53.4 22.3A19 19 0 0 1 82.3 43A20 20 0 0 1 69 80.7A24 24 0 0 1 31 80.7Z",+ drop: "M42.6 12.4Q50 3 57.4 12.4L78.2 38.7A36 36 0 1 1 21.8 38.7Z",+};++/** Two slanted capsule eyes, relative to the face center. */+const EYES = [+ { x: -13, y: 1, rotate: -16 },+ { x: 13, y: -1, rotate: -20 },+] as const;++/** Radius the face travels on when it spins around the body. */+const BELT_RADIUS = 44;++/** Places one eye for a motion frame, or returns null while it is behind the body. */+export function eyeTransform(shape: BotBlobShape, frame: MotionFrame, index: 0 | 1) {+ const face = FACE_LAYOUT[shape];+ const eye = EYES[index];+ const pull = 0.42 * frame.pull;+ const faceX = face.x + (50 - face.x) * pull;+ const faceY = face.y + (50 - face.y) * pull;+ let x = faceX + (eye.x + frame.gazeX) * face.scale;+ const y = faceY + (eye.y + frame.gazeY) * face.scale;+ let width = frame.eyeWidth * face.scale;++ if (frame.spin !== 0) {+ const wrapped = wrapOnBelt(x, 50, BELT_RADIUS, frame.spin);++ if (!wrapped) return null;+ x = wrapped.x;+ width *= wrapped.width;+ }++ const height = frame.eyeHeight[index] * face.scale;++ return `translate(${x.toFixed(2)} ${y.toFixed(2)}) rotate(${eye.rotate}) scale(${width.toFixed(3)} ${height.toFixed(3)})`;+}++export const restEyeTransform = (shape: BotBlobShape, index: 0 | 1) =>+ eyeTransform(shape, REST_FRAME, index) ?? "";++export function bodyTransform(frame: MotionFrame) {+ return `translate(${frame.x.toFixed(2)}%, ${frame.y.toFixed(2)}%) rotate(${frame.roll.toFixed(2)}deg) scale(1, ${frame.scaleY.toFixed(4)})`;+}++/** Stable 0..1 offset per name, so a row of working bots does not bob in unison. */+export function botAvatarSeed(seed: string): number {+ let hash = 0;++ for (let i = 0; i < seed.length; i++) hash = (hash * 31 + seed.charCodeAt(i)) | 0;++ return (Math.abs(hash) % 1000) / 1000;+}diff --git a/apps/marketing/src/lib/downloadLinks.test.ts b/apps/marketing/src/lib/downloadLinks.test.tsindex 1f751d974..00c49eeb8 100644--- a/apps/marketing/src/lib/downloadLinks.test.ts+++ b/apps/marketing/src/lib/downloadLinks.test.ts@@ -1,43 +1,14 @@import { describe, expect, it, vi } from "vite-plus/test";-import { resolveDownloadLink, UNSIGNED_INSTALL_PROMPT } from "./downloadLinks";-import { RELEASES_URL, type Release } from "./releases";+import { guardUnsignedDownload, UNSIGNED_INSTALL_PROMPT } from "./downloadLinks";-class DownloadLinkStub extends EventTarget {- href = RELEASES_URL;- attributes = new Map<string, string>();-- removeAttribute(name: string) {- this.attributes.delete(name);-- if (name === "href") this.href = "";- }-- setAttribute(name: string, value: string) {- this.attributes.set(name, value);- }-- getAttribute(name: string) {- return this.attributes.get(name) ?? null;- }-}--const release: Release = {- tag_name: "v1.2.3",- html_url: RELEASES_URL,- assets: ["arm64.dmg", "x64.exe", "x64.AppImage"].map((suffix) => ({- name: `Akeru-Bot-1.2.3-${suffix}`,- browser_download_url: `https://downloads.example/${suffix}`,- })),-};--describe("download link guards", () => {+describe("unsigned download guard", () => {for (const suffix of ["arm64.dmg", "x64.exe", "x64.AppImage"]) {- it(`guards unsigned ${suffix} downloads exactly once`, async () => {- const link = new DownloadLinkStub();+ it(`guards unsigned ${suffix} downloads exactly once`, () => {+ const link = new EventTarget();const confirm = vi.fn(() => false);- await resolveDownloadLink(link, suffix, Promise.resolve(release), confirm);- await resolveDownloadLink(link, suffix, Promise.resolve(release), confirm);+ guardUnsignedDownload(link, suffix, confirm);+ guardUnsignedDownload(link, suffix, confirm);const click = new Event("click", { cancelable: true });link.dispatchEvent(click);const unsigned = suffix !== "arm64.dmg";@@ -45,46 +16,14 @@ describe("download link guards", () => {expect(confirm).toHaveBeenCalledTimes(unsigned ? 1 : 0);if (unsigned) expect(confirm).toHaveBeenCalledWith(UNSIGNED_INSTALL_PROMPT);- expect(link.href).toBe(`https://downloads.example/${suffix}`);- });- }-- for (const failure of ["missing", "rejected"]) {- it(`does not guard the release fallback after ${failure} assets`, async () => {- const link = new DownloadLinkStub();- const confirm = vi.fn(() => false);- await resolveDownloadLink(link, "x64.exe", Promise.resolve(release), confirm);-- const result =- failure === "missing"- ? Promise.resolve({ ...release, assets: [] })- : Promise.reject(new Error("offline"));-- expect(await resolveDownloadLink(link, "x64.exe", result, confirm)).toBeNull();- const click = new Event("click", { cancelable: true });- link.dispatchEvent(click);- expect(click.defaultPrevented).toBe(false);- expect(confirm).not.toHaveBeenCalled();- expect(link.href).toBe(RELEASES_URL);});}- it("guards a resolved card without waiting for a slow sibling", async () => {- const slowLink = new DownloadLinkStub();- const readyLink = new DownloadLinkStub();- let finishSlow: (release: Release) => void = () => {};-- const slowRelease = new Promise<Release>((resolve) => {- finishSlow = resolve;- });-- const slowResolution = resolveDownloadLink(slowLink, "x64.exe", slowRelease, () => false);- await resolveDownloadLink(readyLink, "x64.exe", Promise.resolve(release), () => false);- const readyClick = new Event("click", { cancelable: true });- readyLink.dispatchEvent(readyClick);- expect(readyClick.defaultPrevented).toBe(true);- expect(slowLink.getAttribute("aria-disabled")).toBe("true");- finishSlow(release);- await slowResolution;+ it("lets the download through once the visitor confirms", () => {+ const link = new EventTarget();+ guardUnsignedDownload(link, "x64.exe", () => true);+ const click = new Event("click", { cancelable: true });+ link.dispatchEvent(click);+ expect(click.defaultPrevented).toBe(false);});});diff --git a/apps/marketing/src/lib/downloadLinks.ts b/apps/marketing/src/lib/downloadLinks.tsindex 4643f5ba5..ff67cf5ff 100644--- a/apps/marketing/src/lib/downloadLinks.ts+++ b/apps/marketing/src/lib/downloadLinks.ts@@ -1,49 +1,74 @@import {- blockDownloadUntilResolved,+ detectDownloadTarget,fetchLatestRelease,- RELEASES_URL,requiresUnsignedInstall,- selectReleaseAsset,- type Release,+ resolveAssetDownload,+ upgradeReleaseInfo,} from "./releases";export const UNSIGNED_INSTALL_PROMPT ="This build is unsigned. Your system may ask you to confirm the install. Continue?";-type DownloadLink = EventTarget &- Pick<HTMLAnchorElement, "href" | "removeAttribute" | "setAttribute" | "getAttribute">;+const guardedLinks = new WeakSet<EventTarget>();-const guardedLinks = new WeakSet<DownloadLink>();--export async function resolveDownloadLink(- link: DownloadLink,+// Asks before an unsigned build downloads. A link is guarded at most once, so running+// the page script again never stacks prompts.+export function guardUnsignedDownload(+ link: EventTarget,assetSuffix: string,- release: Promise<Release> = fetchLatestRelease(),confirmInstall: (prompt: string) => boolean = (prompt) => window.confirm(prompt),) {- const enableDownload = blockDownloadUntilResolved(link);- link.removeAttribute("data-unsigned");-- const releaseInfo = await release.catch(() => null);- const asset = releaseInfo ? selectReleaseAsset(releaseInfo, assetSuffix) : null;-- if (asset && requiresUnsignedInstall(assetSuffix)) {- link.setAttribute("data-unsigned", "true");-- if (!guardedLinks.has(link)) {- link.addEventListener("click", (event) => {- if (- link.getAttribute("data-unsigned") === "true" &&- !confirmInstall(UNSIGNED_INSTALL_PROMPT)- ) {- event.preventDefault();- }- });- guardedLinks.add(link);- }- }-- enableDownload(asset?.browser_download_url ?? RELEASES_URL);-- return asset;+ if (!requiresUnsignedInstall(assetSuffix) || guardedLinks.has(link)) return;+ guardedLinks.add(link);+ link.addEventListener("click", (event) => {+ if (!confirmInstall(UNSIGNED_INSTALL_PROMPT)) event.preventDefault();+ });+}++// Wires every download link on the page. Links ship with a direct asset URL baked+// in at build time, so they work before this runs.+//+// `data-download-auto` links pick the visitor's platform. They ship pointing at+// /download, so a browser without JS or an unknown platform still gets a choice. Macs always get the arm64+// build: browsers cannot reliably tell Apple Silicon from Intel, and the release+// workflow ships no Intel build. Do NOT add arch detection here.+// `data-asset` links name a fixed asset and are upgraded if GitHub has a newer release.+export function initDownloadLinks() {+ const target = detectDownloadTarget(navigator.userAgent);++ document.querySelectorAll<HTMLAnchorElement>("a[data-download-auto]").forEach((link) => {+ if (!target) return;+ const url = link.dataset[`url${target.os[0]?.toUpperCase()}${target.os.slice(1)}`];++ if (!url) return;+ link.href = url;+ link.dataset.os = target.os;+ link.dataset.asset = target.assetSuffix;+ link.removeAttribute("target");+ const label = link.querySelector("[data-download-label]");++ if (label && link.dataset.downloadAuto !== "short") label.textContent = target.label;+ });++ const links = document.querySelectorAll<HTMLAnchorElement>("a[data-asset]");++ if (links.length === 0) return;+ const release = fetchLatestRelease();+ links.forEach((link) => {+ const suffix = link.dataset.asset;++ if (!suffix) return;+ void resolveAssetDownload(link, suffix, release);+ guardUnsignedDownload(link, suffix);+ });++ void release.then(+ (latest) =>+ upgradeReleaseInfo(+ latest,+ document.querySelectorAll("[data-release-version]"),+ document.querySelectorAll<HTMLAnchorElement>("a[data-release-notes]"),+ ),+ () => undefined,+ );}diff --git a/apps/marketing/src/lib/heroBots.ts b/apps/marketing/src/lib/heroBots.tsnew file mode 100644index 000000000..534a4883f--- /dev/null+++ b/apps/marketing/src/lib/heroBots.ts@@ -0,0 +1,16 @@+import type { BotBlobShape } from "./botAvatarShapes";++/** The demo bots shown across the home page and blog covers. They match the bots in the hero screenshot. */+export interface HeroBot {+ name: string;+ shape: BotBlobShape;+ color: string;+}++export const HERO_BOTS = [+ { name: "Scout", shape: "squircle", color: "#2E8EFF" },+ { name: "Relay", shape: "hex", color: "#16C47A" },+ { name: "Mira", shape: "drop", color: "#FF4FA8" },+ { name: "Atlas", shape: "cloud", color: "#FFA826" },+ { name: "Ember", shape: "triangle", color: "#FF7A1F" },+] as const satisfies readonly HeroBot[];diff --git a/apps/marketing/src/lib/homeDownloads.ts b/apps/marketing/src/lib/homeDownloads.tsdeleted file mode 100644index f0294beb6..000000000--- a/apps/marketing/src/lib/homeDownloads.ts+++ /dev/null@@ -1,43 +0,0 @@-import { resolveDownloadLink } from "./downloadLinks";-import { detectDownloadTarget, fetchLatestRelease } from "./releases";--export async function initHomeDownloads() {- const button = document.querySelector<HTMLAnchorElement>("#download-btn");- const label = document.getElementById("download-label");- const cards = document.querySelectorAll<HTMLAnchorElement>("a[data-asset]");-- // Macs always get the arm64 build. Browsers cannot reliably tell Apple Silicon- // from Intel (the UA lies, GPU strings lie), and the release workflow ships no- // Intel build. Do NOT add arch detection here.- // The markup ships with href={RELEASES_URL}, so the button works before this- // script runs and when no platform is detected.- const platform = detectDownloadTarget(navigator.userAgent);-- if (platform) {- if (label) label.textContent = platform.label;-- if (button) {- button.dataset.os = platform.os;- button.dataset.asset = platform.assetSuffix;- }- } else if (label) {- label.textContent = "All downloads";- }-- const release = fetchLatestRelease();-- const cardDownloads = Array.from(cards, async (card) => {- const suffix = card.dataset.asset;-- if (!suffix || card === button) return;- await resolveDownloadLink(card, suffix, release);- });-- if (button && platform) {- const asset = await resolveDownloadLink(button, platform.assetSuffix, release);-- if (!asset && label) label.textContent = "All downloads";- }-- await Promise.all(cardDownloads);-}diff --git a/apps/marketing/src/lib/homeMotion.ts b/apps/marketing/src/lib/homeMotion.tsnew file mode 100644index 000000000..b7c7e098e--- /dev/null+++ b/apps/marketing/src/lib/homeMotion.ts@@ -0,0 +1,159 @@+import { mountBotAvatar } from "./botAvatarRuntime";++// Runs `enter` once each time an element becomes 60% visible and `leave` when it drops+// below that, so nothing animates off screen. The observer also fires on the way down+// while the element is still partly visible, so `isIntersecting` alone is not enough.+function whileInView(+ selector: string,+ enter: (element: HTMLElement) => void,+ leave: (element: HTMLElement) => void,+) {+ const inView = new WeakSet<HTMLElement>();++ const observer = new IntersectionObserver(+ (entries) => {+ entries.forEach((entry) => {+ const element = entry.target;++ if (!(element instanceof HTMLElement)) return;+ const visible = entry.intersectionRatio >= 0.6;++ if (visible === inView.has(element)) return;++ if (visible) {+ inView.add(element);+ enter(element);+ } else {+ inView.delete(element);+ leave(element);+ }+ });+ },+ { threshold: 0.6 },+ );++ document.querySelectorAll<HTMLElement>(selector).forEach((element) => observer.observe(element));+}++export function initToolToggles() {+ document.querySelectorAll<HTMLButtonElement>("button[data-toggle]").forEach((toggle) => {+ toggle.addEventListener("click", () => {+ toggle.setAttribute("aria-checked", String(toggle.getAttribute("aria-checked") !== "true"));+ });+ });+}++// "Create a bot": the name types in, the avatar pops into its slot with the onboarding+// confetti, then the provider chip lands. It resets off screen and replays on return.+const createTimers = new WeakMap<HTMLElement, number[]>();++function resetCreate(element: HTMLElement) {+ createTimers.get(element)?.forEach((timer) => window.clearTimeout(timer));+ createTimers.set(element, []);+ element.dataset.stage = "empty";+ const name = element.querySelector<HTMLElement>("[data-create-name]");++ if (name) name.textContent = "";+}++function playCreate(element: HTMLElement) {+ resetCreate(element);+ const timers = createTimers.get(element) ?? [];+ const name = element.querySelector<HTMLElement>("[data-create-name]");+ const full = element.dataset.name ?? "";+ const at = (ms: number, step: () => void) => timers.push(window.setTimeout(step, ms));++ at(320, () => (element.dataset.stage = "typing"));++ [...full].forEach((_, i) => {+ at(420 + i * 95, () => {+ if (name) name.textContent = full.slice(0, i + 1);+ });+ });++ const typed = 420 + full.length * 95 + 260;++ at(typed, () => {+ element.dataset.stage = "created";+ const avatar = element.querySelector<HTMLElement>(".bot-avatar");++ if (avatar) mountBotAvatar(avatar)?.beat(900);+ });++ at(typed + 420, () => (element.dataset.stage = "done"));+}++// "Hand it work": BotActivityStatus steps through the updates a working bot reports.+// The app remounts the label on each change, which restarts the sheen; this does too.+const activityTimers = new WeakMap<HTMLElement, number>();++function activityLabels(element: HTMLElement): string[] {+ return element.dataset.labels?.split("|") ?? [];+}++function setActivityLabel(element: HTMLElement, text: string) {+ const label = element.querySelector<HTMLElement>("[data-activity-label]");++ if (!label) return;+ label.replaceChildren(document.createTextNode(`${text}...`));+ const sheen = document.createElement("span");+ sheen.className = "bot-shimmer-sheen";+ sheen.setAttribute("aria-hidden", "true");+ const sheenText = document.createElement("span");+ sheenText.className = "bot-shimmer-sheen-text";+ sheenText.textContent = `${text}...`;+ sheen.append(sheenText);+ label.append(sheen);+}++function startActivity(element: HTMLElement) {+ window.clearInterval(activityTimers.get(element));+ element.dataset.active = "true";+ const labels = activityLabels(element);+ let index = 0;++ activityTimers.set(+ element,+ window.setInterval(() => {+ index = (index + 1) % labels.length;+ setActivityLabel(element, labels[index] ?? "");+ }, 2600),+ );+}++function stopActivity(element: HTMLElement) {+ delete element.dataset.active;+ window.clearInterval(activityTimers.get(element));+ setActivityLabel(element, activityLabels(element)[0] ?? "");+}++// Without a stage the create demo shows the finished bot, which is its static frame.+function settleCreate(element: HTMLElement) {+ resetCreate(element);+ delete element.dataset.stage;+ const name = element.querySelector<HTMLElement>("[data-create-name]");++ if (name) name.textContent = element.dataset.name ?? "";+}++// Both demos hold a static frame under reduced motion, including when the visitor+// turns it on while the page is open. They resume the next time they scroll into view.+export function initStepDemos() {+ const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");+ const creates = document.querySelectorAll<HTMLElement>("[data-create]");+ const activities = document.querySelectorAll<HTMLElement>("[data-activity]");++ const unlessReduced = (play: (element: HTMLElement) => void) => (element: HTMLElement) => {+ if (!reducedMotion.matches) play(element);+ };++ reducedMotion.addEventListener("change", () => {+ if (!reducedMotion.matches) return;+ creates.forEach(settleCreate);+ activities.forEach(stopActivity);+ });++ if (!reducedMotion.matches) creates.forEach(resetCreate);+ whileInView("[data-create]", unlessReduced(playCreate), unlessReduced(resetCreate));+ whileInView("[data-activity]", unlessReduced(startActivity), stopActivity);+}diff --git a/apps/marketing/src/lib/releases.test.ts b/apps/marketing/src/lib/releases.test.tsindex 51a4a2e56..4acedc6be 100644--- a/apps/marketing/src/lib/releases.test.ts+++ b/apps/marketing/src/lib/releases.test.ts@@ -2,12 +2,13 @@ import * as NodeAssert from "node:assert/strict";import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test";import {- blockDownloadUntilResolved,detectDownloadTarget,- RELEASES_URL,+ FALLBACK_VERSION,+ releaseAssetUrl,requiresUnsignedInstall,resolveAssetDownload,selectReleaseAsset,+ upgradeReleaseInfo,type Release,} from "./releases";@@ -30,19 +31,11 @@ const release = {],} satisfies Release;-class DownloadLinkStub extends EventTarget {- href = RELEASES_URL;- attributes = new Map<string, string>();+// The direct asset URL a page bakes in at build time.+const BAKED_URL = releaseAssetUrl("1.2.2", "x64.exe");- removeAttribute(name: string) {- this.attributes.delete(name);-- if (name === "href") this.href = "";- }-- setAttribute(name: string, value: string) {- this.attributes.set(name, value);- }+class DownloadLinkStub {+ href = BAKED_URL;}describe("release downloads", () => {@@ -67,25 +60,22 @@ describe("release downloads", () => {it("does not advertise macOS Intel or unknown systems", () => {NodeAssert.equal(detectDownloadTarget("Macintosh; Intel Mac OS X")?.assetSuffix, "arm64.dmg");NodeAssert.equal(detectDownloadTarget("Mozilla/5.0 (Android 16)"), null);+ NodeAssert.equal(detectDownloadTarget("Mozilla/5.0 (Linux; Android 16; Pixel 9)"), null);+ NodeAssert.equal(+ detectDownloadTarget("Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X)"),+ null,+ );});- it("blocks a fast click until the primary download resolves", () => {- const link = new DownloadLinkStub();- link.href = "https://wrong.example";- const resolve = blockDownloadUntilResolved(link);- const pendingClick = new Event("click", { cancelable: true });- link.dispatchEvent(pendingClick);- NodeAssert.equal(pendingClick.defaultPrevented, true);- NodeAssert.equal(link.attributes.get("aria-disabled"), "true");-- resolve("https://downloads.example/mac");- const readyClick = new Event("click", { cancelable: true });- link.dispatchEvent(readyClick);- NodeAssert.equal(readyClick.defaultPrevented, false);- NodeAssert.equal(link.href, "https://downloads.example/mac");+ it("bakes direct asset URLs for the build-time version", () => {+ NodeAssert.equal(+ releaseAssetUrl("0.2.1", "arm64.dmg"),+ "https://github.com/opencoredev/akeru-bot/releases/download/v0.2.1/Akeru-Bot-0.2.1-arm64.dmg",+ );+ NodeAssert.match(FALLBACK_VERSION, /^\d+\.\d+\.\d+$/);});- it("uses one resolver for direct assets and fallback links", async () => {+ it("upgrades a baked link only when the latest release has the asset", async () => {let finishRelease!: (value: Release) => void;const pendingRelease = new Promise<Release>((resolve) => {@@ -94,22 +84,28 @@ describe("release downloads", () => {const link = new DownloadLinkStub();const resolving = resolveAssetDownload(link, "x64.exe", pendingRelease);- const pendingClick = new Event("click", { cancelable: true });- link.dispatchEvent(pendingClick);- NodeAssert.equal(pendingClick.defaultPrevented, true);- NodeAssert.equal(link.attributes.get("aria-disabled"), "true");+ NodeAssert.equal(link.href, BAKED_URL);finishRelease(release);NodeAssert.equal(await resolving, release.assets[1]);NodeAssert.equal(link.href, "https://downloads.example/windows");- const fallback = new DownloadLinkStub();+ const offline = new DownloadLinkStub();NodeAssert.equal(- await resolveAssetDownload(fallback, "x64.exe", Promise.reject(new Error("offline"))),+ await resolveAssetDownload(offline, "x64.exe", Promise.reject(new Error("offline"))),null,);- NodeAssert.equal(fallback.href, RELEASES_URL);- NodeAssert.equal(fallback.attributes.has("aria-disabled"), false);+ NodeAssert.equal(offline.href, BAKED_URL);+ });++ it("never moves a baked link back to an older release", async () => {+ const link = new DownloadLinkStub();+ link.href = releaseAssetUrl("1.3.0", "x64.exe");+ NodeAssert.equal(+ await resolveAssetDownload(link, "x64.exe", Promise.resolve(release)),+ release.assets[1],+ );+ NodeAssert.equal(link.href, releaseAssetUrl("1.3.0", "x64.exe"));});it("accepts only the exact asset for the stable tag", () => {@@ -207,7 +203,7 @@ describe("bounded shared release requests", () => {});it.each(["headers", "body"])(- "aborts stalled %s and restores every fallback at the shared deadline",+ "aborts stalled %s and keeps every baked link at the shared deadline",async (stage) => {const stalled = deferred<Response>();const body = deferred<Release>();@@ -226,20 +222,12 @@ describe("bounded shared release requests", () => {const signal = fetchMock.mock.calls[0]?.[1]?.signal;expect(signal?.aborted).toBe(false);await vi.advanceTimersByTimeAsync(RELEASE_REQUEST_TIMEOUT_MS - 1);- expect(cards.every((card) => card.attributes.get("aria-disabled") === "true")).toBe(true);+ expect(cards.every((card) => card.href === BAKED_URL)).toBe(true);await vi.advanceTimersByTimeAsync(1);expect(await request).toEqual(new Error("GitHub release request timed out"));expect(await Promise.all(downloads)).toEqual([null, null, null]);expect(signal?.aborted).toBe(true);-- for (const card of cards) {- expect(card.href).toBe(RELEASES_URL);- expect(card.attributes.has("aria-disabled")).toBe(false);- const click = new Event("click", { cancelable: true });- card.dispatchEvent(click);- expect(click.defaultPrevented).toBe(false);- }-+ expect(cards.every((card) => card.href === BAKED_URL)).toBe(true);expect(fetchMock).toHaveBeenCalledTimes(1);expect(storage.setItem).not.toHaveBeenCalled();expect(vi.getTimerCount()).toBe(0);@@ -259,7 +247,7 @@ describe("bounded shared release requests", () => {"akeru-latest-release",JSON.stringify(nextRelease),);- expect(cards.every((card) => card.href === RELEASES_URL)).toBe(true);+ expect(cards.every((card) => card.href === BAKED_URL)).toBe(true);expect(fetchMock).toHaveBeenCalledTimes(2);expect(vi.getTimerCount()).toBe(0);},@@ -285,8 +273,7 @@ describe("bounded shared release requests", () => {const { fetchLatestRelease, resolveAssetDownload } = await import("./releases");const link = new DownloadLinkStub();expect(await resolveAssetDownload(link, "arm64.dmg")).toBeNull();- expect(link.href).toBe(RELEASES_URL);- expect(link.attributes.has("aria-disabled")).toBe(false);+ expect(link.href).toBe(BAKED_URL);expect(storage.setItem).not.toHaveBeenCalled();expect(vi.getTimerCount()).toBe(0);@@ -335,13 +322,78 @@ describe("bounded shared release requests", () => {expect(vi.getTimerCount()).toBe(0);});- it("uses the releases fallback when a valid release has no matching asset", async () => {+ it("keeps the baked link when a valid release has no matching asset", async () => {fetchMock.mockResolvedValueOnce(releaseResponse({ ...release, assets: [] }));const { resolveAssetDownload } = await import("./releases");const link = new DownloadLinkStub();expect(await resolveAssetDownload(link, "arm64.dmg")).toBeNull();- expect(link.href).toBe(RELEASES_URL);- expect(link.attributes.has("aria-disabled")).toBe(false);+ expect(link.href).toBe(BAKED_URL);expect(vi.getTimerCount()).toBe(0);});});++describe("release info labels", () => {+ it("moves version text and notes links forward with the downloads", () => {+ const label = { textContent: "1.2.2" };+ const notes = { href: "https://github.com/opencoredev/akeru-bot/releases/tag/v1.2.2" };+ upgradeReleaseInfo(release, [label], [notes]);+ expect(label.textContent).toBe("1.2.3");+ expect(notes.href).toBe(release.html_url);+ });++ it("never moves release info back to an older version", () => {+ const label = { textContent: "1.3.0" };+ const notes = { href: "https://github.com/opencoredev/akeru-bot/releases/tag/v1.3.0" };+ upgradeReleaseInfo(release, [label], [notes]);+ expect(label.textContent).toBe("1.3.0");+ expect(notes.href).toBe("https://github.com/opencoredev/akeru-bot/releases/tag/v1.3.0");+ });+});++describe("build-time release version", () => {+ const fetchMock = vi.fn<typeof fetch>();++ const redirectTo = (location: string | null) =>+ new Response(null, { status: 302, headers: location ? { location } : {} });++ beforeEach(() => {+ vi.resetModules();+ fetchMock.mockReset();+ vi.stubGlobal("fetch", fetchMock);+ });++ afterEach(() => {+ vi.unstubAllGlobals();+ });++ it("reads the version from the latest-release redirect once per build", async () => {+ fetchMock.mockResolvedValue(+ redirectTo("https://github.com/opencoredev/akeru-bot/releases/tag/v1.4.0"),+ );+ const { resolveBuildVersion } = await import("./releases");++ expect(await resolveBuildVersion()).toBe("1.4.0");+ expect(await resolveBuildVersion()).toBe("1.4.0");+ expect(fetchMock).toHaveBeenCalledTimes(1);+ expect(fetchMock.mock.calls[0]?.[1]?.redirect).toBe("manual");+ });++ for (const [name, response] of [+ ["a missing location", () => Promise.resolve(redirectTo(null))],+ [+ "a pre-release tag",+ () =>+ Promise.resolve(+ redirectTo("https://github.com/opencoredev/akeru-bot/releases/tag/v1.4.0-rc.1"),+ ),+ ],+ ["a failed request", () => Promise.reject(new Error("offline"))],+ ] as const) {+ it(`falls back to the pinned version after ${name}`, async () => {+ fetchMock.mockImplementation(response);+ const { resolveBuildVersion } = await import("./releases");++ expect(await resolveBuildVersion()).toBe(FALLBACK_VERSION);+ });+ }+});diff --git a/apps/marketing/src/lib/releases.ts b/apps/marketing/src/lib/releases.tsindex 4f6dc6967..b15221b61 100644--- a/apps/marketing/src/lib/releases.ts+++ b/apps/marketing/src/lib/releases.ts@@ -4,6 +4,9 @@ const REPO = "opencoredev/akeru-bot";export const RELEASES_URL = `https://github.com/${REPO}/releases`;+// Used only when the build cannot reach GitHub. The client script still upgrades links.+export const FALLBACK_VERSION = "0.2.1";+const API_URL = `https://api.github.com/repos/${REPO}/releases/latest`;const CACHE_KEY = "akeru-latest-release";@@ -53,7 +56,44 @@ const TARGETS = {},} as const satisfies Record<string, DownloadTarget>;+export const DOWNLOAD_TARGETS = Object.values(TARGETS);++export function releaseAssetUrl(version: string, assetSuffix: string): string {+ return `https://github.com/${REPO}/releases/download/v${version}/Akeru-Bot-${version}-${assetSuffix}`;+}++// Build-time lookup. The /releases/latest page redirects to the newest stable tag+// and, unlike the REST API, is not rate limited for anonymous build machines.+let buildVersion: Promise<string> | undefined;++export function resolveBuildVersion(): Promise<string> {+ buildVersion ??= lookupBuildVersion();++ return buildVersion;+}++async function lookupBuildVersion(): Promise<string> {+ try {+ const response = await fetch(`${RELEASES_URL}/latest`, {+ redirect: "manual",+ signal: AbortSignal.timeout(RELEASE_REQUEST_TIMEOUT_MS),+ });++ const version = /\/releases\/tag\/v(\d+\.\d+\.\d+)$/.exec(+ response.headers.get("location") ?? "",+ )?.[1];++ return version ?? FALLBACK_VERSION;+ } catch {+ return FALLBACK_VERSION;+ }+}+export function detectDownloadTarget(userAgent: string): DownloadTarget | null {+ // Phones and tablets have no desktop build. Their user agents also claim Linux or+ // Mac OS X, so check them first.+ if (/Android|iPhone|iPad|iPod/i.test(userAgent)) return null;+if (/Windows/i.test(userAgent)) return TARGETS.win;if (/Macintosh|Mac OS X/i.test(userAgent)) return TARGETS.mac;@@ -79,44 +119,70 @@ export function requiresUnsignedInstall(assetSuffix: string): boolean {);}-type DownloadLink = EventTarget & {- href: string;- removeAttribute(name: string): void;- setAttribute(name: string, value: string): void;-};--export function blockDownloadUntilResolved(link: DownloadLink): (url: string) => void {- const blockClick = (event: Event) => event.preventDefault();- link.removeAttribute("href");- link.setAttribute("aria-disabled", "true");- link.addEventListener("click", blockClick);-- return (url) => {- link.href = url;- link.removeAttribute("aria-disabled");- link.removeEventListener("click", blockClick);- };-}+type DownloadLink = { href: string };+// Pages bake a direct asset URL in at build time, so a link always downloads. This+// only upgrades the link when GitHub reports a newer release than the build saw.export async function resolveAssetDownload(link: DownloadLink,assetSuffix: string,release: Promise<Release> = fetchLatestRelease(),): Promise<ReleaseAsset | null> {- const resolve = blockDownloadUntilResolved(link);-try {- const asset = selectReleaseAsset(await release, assetSuffix);- resolve(asset?.browser_download_url ?? RELEASES_URL);+ const latest = await release;+ const asset = selectReleaseAsset(latest, assetSuffix);++ if (asset && isNewerVersion(latest.tag_name, versionInUrl(link.href))) {+ link.href = asset.browser_download_url;+ }return asset;} catch {- resolve(RELEASES_URL);-return null;}}+type ReleaseVersionLabel = { textContent: string | null };++type ReleaseNotesLink = { href: string };++// Version text and release-notes links are baked at build time too. When the links+// above move to a newer release, these follow so the page names what it downloads.+export function upgradeReleaseInfo(+ latest: Release,+ labels: Iterable<ReleaseVersionLabel>,+ notesLinks: Iterable<ReleaseNotesLink>,+) {+ for (const label of labels) {+ if (isNewerVersion(latest.tag_name, label.textContent ?? undefined)) {+ label.textContent = latest.tag_name.slice(1);+ }+ }++ for (const link of notesLinks) {+ if (isNewerVersion(latest.tag_name, /\/tag\/(v[\d.]+)$/.exec(link.href)?.[1])) {+ link.href = latest.html_url;+ }+ }+}++function versionInUrl(url: string): string | undefined {+ return /\/download\/(v\d+\.\d+\.\d+)\//.exec(url)?.[1];+}++// A stale cache or a lagging API must never move a link back to an older build.+function isNewerVersion(candidate: string, current: string | undefined): boolean {+ if (!current) return true;+ const parse = (tag: string) => tag.replace(/^v/, "").split(".").map(Number);+ const [a, b] = [parse(candidate), parse(current)];++ for (let i = 0; i < 3; i++) {+ if (a[i] !== b[i]) return (a[i] ?? 0) > (b[i] ?? 0);+ }++ return false;+}+export function fetchLatestRelease(): Promise<Release> {if (latestRelease) return Promise.resolve(latestRelease);diff --git a/apps/marketing/src/pages/blog/index.astro b/apps/marketing/src/pages/blog/index.astroindex 9bf088edf..ecfc89c3c 100644--- a/apps/marketing/src/pages/blog/index.astro+++ b/apps/marketing/src/pages/blog/index.astro@@ -1,26 +1,9 @@---+import BlogCover from "../../components/BlogCover.astro";import Layout from "../../layouts/Layout.astro";+import { ARTICLES as articles, formatPublished } from "../../lib/articles";-const articles = [- {- href: "/open-source-grok-bot",- category: "Open source",- date: "Sep 3, 2026",- title: "An open-source alternative to Grok Bot",- },- {- href: "/compare/akeru-vs-grok-bot",- category: "Comparison",- date: "Sep 3, 2026",- title: "Akeru Bot and Grok Bot compared",- },- {- href: "/guides/self-hosted-grok-bot",- category: "Guide",- date: "Sep 3, 2026",- title: "Run a Grok bot on an environment you control",- },-] as const;+const [featured, ...rest] = articles;const siteOrigin = Astro.site ?? new URL(Astro.url.origin);@@ -67,13 +50,31 @@ const structuredData = [<section class="article-grid" id="articles" aria-label="All articles">{- articles.map((article) => (+ featured && (+ <a class="article-card article-card--featured" href={featured.href}>+ <BlogCover article={featured} size="feature" />+ <div class="article-body">+ <span class="article-category">{featured.category}</span>+ <h2>{featured.title}</h2>+ <p>{featured.summary}</p>+ <span class="article-meta">+ <time datetime={featured.published}>{formatPublished(featured)}</time> · {featured.readMinutes} min read+ </span>+ </div>+ </a>+ )+ }+ {+ rest.map((article) => (<a class="article-card" href={article.href}>- <h2>{article.title}</h2>- <div class="article-meta">- <time datetime="2026-09-03">{article.date}</time>- <span aria-hidden="true">•</span>- <span>{article.category}</span>+ <BlogCover article={article} />+ <div class="article-body">+ <span class="article-category">{article.category}</span>+ <h2>{article.title}</h2>+ <p>{article.summary}</p>+ <span class="article-meta">+ <time datetime={article.published}>{formatPublished(article)}</time> · {article.readMinutes} min read+ </span></div></a>))@@ -84,7 +85,7 @@ const structuredData = [<style>.blog-index {- --color-editorial-muted-foreground: #b4b4b4;+ --color-editorial-muted-foreground: #b5b5b5;width: min(960px, calc(100% - 80px));margin: 0 auto;padding: 120px 0 140px;@@ -147,38 +148,83 @@ const structuredData = [.article-grid {display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));- gap: 48px 32px;- margin-top: 40px;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: 56px 32px;+ margin-top: 48px;scroll-margin-top: 24px;}.article-card {display: grid;grid-template-columns: minmax(0, 1fr);- gap: 6px;+ align-content: start;+ gap: 20px;+ min-width: 0;+ }++ .article-card--featured {+ grid-column: 1 / -1;+ grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);+ align-items: center;+ gap: 40px;+ }++ .article-card :global(.blog-cover) {+ transition: border-color 0.2s ease;+ }++ .article-card:hover :global(.blog-cover) {+ border-color: var(--color-input);+ }++ .article-body {+ display: grid;+ gap: 10px;min-width: 0;- padding-top: 20px;- border-top: 1px solid var(--color-border);+ }++ .article-category {+ color: var(--color-muted-foreground);+ font-size: 13px;+ font-weight: 500;+ line-height: 18px;}.article-card h2 {- font-size: 14px;+ font-size: 20px;font-weight: 500;- line-height: 19px;+ line-height: 26px;+ letter-spacing: -0.3px;}- .article-meta {- display: flex;- gap: 6px;+ .article-card--featured h2 {+ font-size: 32px;+ line-height: 38px;+ letter-spacing: -0.8px;+ }++ .article-card p {color: var(--color-editorial-muted-foreground);- font-size: 14px;- line-height: 19px;+ font-size: 15px;+ line-height: 23px;+ }++ .article-card--featured p {+ font-size: 17px;+ line-height: 26px;+ }++ .article-meta {+ color: var(--color-dim-foreground);+ font-size: 13px;+ line-height: 18px;}@media (max-width: 860px) {.blog-index { width: calc(100% - 40px); padding: 96px 0 104px; }- .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }+ .article-grid { gap: 48px 24px; }+ .article-card--featured { grid-template-columns: minmax(0, 1fr); gap: 20px; }+ .article-card--featured h2 { font-size: 26px; line-height: 32px; }}@media (max-width: 580px) {@@ -186,10 +232,10 @@ const structuredData = [.blog-header p { font-size: 18px; line-height: 25px; }.topic-nav { justify-content: flex-start; gap: 28px; margin-top: 48px; }.article-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 32px; }- .article-card { gap: 6px; }}@media (prefers-reduced-motion: reduce) {- .topic-link { transition: none; }+ .topic-link,+ .article-card :global(.blog-cover) { transition: none; }}</style>diff --git a/apps/marketing/src/pages/download.astro b/apps/marketing/src/pages/download.astroindex 059010094..43c204216 100644--- a/apps/marketing/src/pages/download.astro+++ b/apps/marketing/src/pages/download.astro@@ -1,6 +1,16 @@---import Layout from "../layouts/Layout.astro";-import { RELEASES_URL } from "../lib/releases";+import { RELEASES_URL, releaseAssetUrl, resolveBuildVersion } from "../lib/releases";++// Hrefs are direct release assets baked at build time; the shared client script+// upgrades them if GitHub has published something newer since.+const version = await resolveBuildVersion();++const platforms = [+ { os: "mac", name: "macOS", asset: "arm64.dmg", arch: "Apple Silicon (arm64)", format: ".dmg" },+ { os: "win", name: "Windows", asset: "x64.exe", arch: "Windows 10, 11", format: ".exe" },+ { os: "linux", name: "Linux", asset: "x64.AppImage", arch: "x86_64", format: "AppImage" },+].map((platform) => ({ ...platform, href: releaseAssetUrl(version, platform.asset) }));---<Layout@@ -10,108 +20,43 @@ import { RELEASES_URL } from "../lib/releases";<div class="download-page"><h1 class="heading">Download Akeru Bot</h1><p class="subheading">- <span id="version-label">Loading latest release…</span>- <a id="changelog-link" class="changelog-link" href="#" target="_blank" rel="noopener noreferrer" style="display:none">View changelog<span aria-hidden="true"> ↗</span></a>+ <span>Latest (v<span data-release-version>{version}</span>)</span>+ <a+ class="changelog-link"+ href={`${RELEASES_URL}/tag/v${version}`}+ target="_blank"+ rel="noopener noreferrer"+ data-release-notes+ >View changelog<span aria-hidden="true"> ↗</span></a></p><div class="platforms" id="platforms">- <!-- macOS -->- <section class="platform-section">- <div class="platform-header">- <svg class="platform-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 814 1000" aria-hidden="true"><path fill="currentColor" d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"/></svg>- <h2 class="platform-name">macOS</h2>- </div>- <div class="download-cards">- <a class="download-card" data-os="mac" data-asset="arm64.dmg" href={RELEASES_URL}>- <span class="card-arch">Apple Silicon (arm64)</span>- <span class="card-format">.dmg</span>- </a>- </div>- </section>-- <!-- Windows -->- <section class="platform-section">- <div class="platform-header">- <svg class="platform-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88 88" aria-hidden="true"><path fill="currentColor" d="m0 12.402 35.687-4.86.016 34.423-35.67.203zm35.67 33.529.028 34.453L.028 75.48.026 45.7zm4.326-39.025L87.314 0v41.527l-47.318.376zm47.329 39.349-.011 41.34-47.318-6.678-.066-34.739z"/></svg>- <h2 class="platform-name">Windows</h2>- </div>- <div class="download-cards">- <a class="download-card" data-os="win" data-asset="x64.exe" href={RELEASES_URL}>- <span class="card-arch">Windows 10, 11</span>- <span class="card-format">.exe</span>- </a>- </div>- </section>-- <!-- Linux -->- <section class="platform-section">- <div class="platform-header">- <svg class="platform-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z"/></svg>- <h2 class="platform-name">Linux</h2>- </div>- <div class="download-cards">- <a class="download-card" data-os="linux" data-asset="x64.AppImage" href={RELEASES_URL}>- <span class="card-arch">x86_64</span>- <span class="card-format">AppImage</span>- </a>- </div>- </section>-+ {+ platforms.map((platform) => (+ <section class="platform-section">+ <div class="platform-header">+ <h2 class="platform-name">{platform.name}</h2>+ </div>+ <div class="download-cards">+ <a class="download-card" data-os={platform.os} data-asset={platform.asset} href={platform.href}>+ <span class="card-arch">{platform.arch}</span>+ <span class="card-format">{platform.format}</span>+ </a>+ </div>+ </section>+ ))+ }</div><p class="releases-link">- Looking for another version?{" "}+ Looking for an older version?{" "}<a href={RELEASES_URL} target="_blank" rel="noopener noreferrer">- All downloads<span aria-hidden="true"> ↗</span>+ Past releases<span aria-hidden="true"> ↗</span></a></p></div></Layout>-<script>- import { resolveDownloadLink } from "../lib/downloadLinks";- import { fetchLatestRelease } from "../lib/releases";-- async function init() {- const versionLabel = document.getElementById("version-label");- // Only release-asset links; mobile store cards have no data-asset and keep their href.- const cards = document.querySelectorAll<HTMLAnchorElement>("a[data-asset]");- const releasePromise = fetchLatestRelease();-- const cardDownloads = Array.from(cards, async (card) => {- const suffix = card.dataset.asset;-- if (!suffix) return;- await resolveDownloadLink(card, suffix, releasePromise);- });-- try {- const release = await releasePromise;-- if (versionLabel && release.tag_name) {- versionLabel.textContent = `Latest (${release.tag_name})`;- }-- const changelogLink = document.querySelector<HTMLAnchorElement>("#changelog-link");-- if (changelogLink && release.html_url) {- changelogLink.href = release.html_url;- changelogLink.style.display = "";- }-- } catch {- if (versionLabel) {- versionLabel.textContent = "Could not load release info.";- }- }-- await Promise.all(cardDownloads);-- }-- init();-</script>-<style>/* One-shot reveal used by the heading, platform list, and footer link. */@keyframes fade-in {@@ -159,7 +104,7 @@ import { RELEASES_URL } from "../lib/releases";color: var(--fg-muted);font-size: 0.8rem;text-decoration: underline;- text-decoration-color: rgba(161, 161, 170, 0.4);+ text-decoration-color: color-mix(in srgb, var(--color-muted-foreground) 40%, transparent);text-underline-offset: 3px;transition: color 0.3s ease, text-decoration-color 0.3s ease;}@@ -195,13 +140,6 @@ import { RELEASES_URL } from "../lib/releases";border-bottom: 1px solid var(--border);}- .platform-icon {- width: 1.15em;- height: 1.15em;- color: var(--fg-muted);- flex-shrink: 0;- }-.platform-name {font-weight: 500;font-size: 1.1rem;@@ -223,13 +161,13 @@ import { RELEASES_URL } from "../lib/releases";padding: 0.85rem 1rem;border-radius: 10px;border: 1px solid var(--border);- background: rgba(255, 255, 255, 0.02);+ background: var(--color-card);transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;}.download-card:hover {- background: rgba(255, 255, 255, 0.06);- border-color: rgba(255, 255, 255, 0.15);+ background: var(--color-selected);+ border-color: var(--color-input);transform: translateY(-1px);}@@ -261,7 +199,7 @@ import { RELEASES_URL } from "../lib/releases";.releases-link a {color: var(--fg-muted);text-decoration: underline;- text-decoration-color: rgba(161, 161, 170, 0.4);+ text-decoration-color: color-mix(in srgb, var(--color-muted-foreground) 40%, transparent);text-underline-offset: 3px;transition: color 0.3s ease, text-decoration-color 0.3s ease;}diff --git a/apps/marketing/src/pages/index.astro b/apps/marketing/src/pages/index.astroindex 185ad80f1..9267f63e0 100644--- a/apps/marketing/src/pages/index.astro+++ b/apps/marketing/src/pages/index.astro@@ -29,10 +29,15 @@ import DownloadSection from "../components/home/DownloadSection.astro";</Layout><script>- import { initHomeDownloads } from "../lib/homeDownloads";+ import { mountBotAvatars } from "../lib/botAvatarRuntime";import { initDemoVideos } from "../lib/homeDemoVideos";+ import { initStepDemos, initToolToggles } from "../lib/homeMotion";- initHomeDownloads();+ mountBotAvatars();++ initToolToggles();++ initStepDemos();initDemoVideos();</script>diff --git a/apps/marketing/src/pages/legal.astro b/apps/marketing/src/pages/legal.astroindex 2d3973153..6216ca64a 100644--- a/apps/marketing/src/pages/legal.astro+++ b/apps/marketing/src/pages/legal.astro@@ -128,7 +128,7 @@ const documents = [.document-card:hover {padding-left: 16px;padding-right: 16px;- background: rgba(255, 255, 255, 0.025);+ background: var(--color-card);}.document-card:hover .document-arrow {diff --git a/apps/marketing/src/seo.test.ts b/apps/marketing/src/seo.test.tsindex f4e97e594..39a83a149 100644--- a/apps/marketing/src/seo.test.ts+++ b/apps/marketing/src/seo.test.ts@@ -58,8 +58,12 @@ describe("marketing search metadata", () => {const home = homeSource();const download = sourceFile("pages/download.astro");- expect(home).toContain('<span id="download-label">All downloads</span>');- expect(home).not.toContain('class="btn-primary" data-os="mac"');+ // The hero opens /download until the client script picks a direct release asset,+ // and never falls back to the GitHub releases list.+ expect(home).toContain(+ '<a class="btn-primary" href="/download" data-download-auto {...downloadUrls}>',+ );+ expect(home).not.toContain("All downloads");expect(home).toContain("Your environment owns the chats, bot profiles, and memory.");expect(home).not.toContain("Everything stays on your machine");expect(home).not.toContain("no hosted service");@@ -123,17 +127,18 @@ describe("marketing search metadata", () => {it("publishes an editorial blog index that links every Grok article", () => {const blog = sourceFile("pages/blog/index.astro");+ const articles = sourceFile("lib/articles.ts");const layout = layoutSource();expect(blog).toContain('title="Akeru Blog | Open-source AI bot guides"');expect(blog).toContain("<h1>Blog</h1>");- expect(blog).toContain('href: "/open-source-grok-bot"');- expect(blog).toContain('href: "/compare/akeru-vs-grok-bot"');- expect(blog).toContain('href: "/guides/self-hosted-grok-bot"');+ expect(articles).toContain('href: "/open-source-grok-bot"');+ expect(articles).toContain('href: "/compare/akeru-vs-grok-bot"');+ expect(articles).toContain('href: "/guides/self-hosted-grok-bot"');expect(blog).toContain('aria-label="Article topics"');expect(blog).toContain('<a class="topic-link" href={article.href}>{article.category}</a>');expect(blog).toContain('class="article-grid" id="articles"');- expect(blog).not.toMatch(/Example|article-art/);+ expect(blog).toContain("<BlogCover article={article} />");expect(blog).toMatch(/\.blog-header \{[\s\S]*?text-align: center;/);expect(blog).not.toMatch(/gradient/);expect(layout).toContain('<a class="nav-link" href="/blog">Blog</a>');@@ -147,11 +152,11 @@ describe("marketing search metadata", () => {expect(layout).toContain('src: url("/fonts/eb-garamond-500-latin.woff2") format("woff2");');expect(layout).not.toContain("fonts.googleapis.com");expect(layout).toContain('--font-serif: "EB Garamond", Georgia, serif;');- expect(layout).toContain("--color-muted-foreground: #8a8a8a;");+ expect(layout).toContain("--color-muted-foreground: #a1a1a1;");expect(home).not.toContain("--color-editorial-muted-foreground");expect(home).toContain("data-demo-video");- expect(home).toMatch(/\.hero-title \{[\s\S]*?font-size: 84px;/);- expect(home).toMatch(/background:[\s\S]*?url\("\/download-glow\.webp"\)/);+ expect(home).toMatch(/\.hero-title \{[\s\S]*?font-size: 72px;/);+ expect(home).not.toContain("download-glow");});it("adds page and breadcrumb structured data to search pages", () => {@@ -178,7 +183,8 @@ describe("marketing search metadata", () => {".article-copy :global(h2) { margin-top: 32px; font-size: 30px; line-height: 41px; }",);expect(searchPage).not.toMatch(/Akeru maintainers|readingTime|Share on|data-copy-url/);- expect(searchPage).not.toMatch(/Example|article-cover|related-art/);+ expect(searchPage).not.toMatch(/Example|related-art/);+ expect(searchPage).toContain('<BlogCover article={coverArticle} size="feature" />');expect(layout).toContain('Astro.url.pathname.replace(/\\/+$/, "")');});diff --git a/apps/marketing/src/styles/site.css b/apps/marketing/src/styles/site.cssindex 4122b6c65..93bbe5ac2 100644--- a/apps/marketing/src/styles/site.css+++ b/apps/marketing/src/styles/site.css@@ -47,25 +47,37 @@}:root {- /* Akeru design tokens (Paper file "Akeru Bot") */- --color-background: #0a0a0a;+ /* Dark tokens matched to the 0.2.0 app (apps/web/src/index.css), converted from oklch. */+ /* Sampled from the app screenshot in the hero (public/app-screenshot.webp). */+ --color-background: #111111;--color-foreground: #f5f5f5;- --color-card: #111111;- --color-popover: #191919;- --color-primary: #346bf1;- --color-primary-foreground: #ffffff;- --color-primary-surface: #121f3d;- --color-secondary: #141414;- --color-muted: #141414;- --color-muted-foreground: #8a8a8a;- --color-dim-foreground: #7b7b7b;- --color-border: #232323;- --color-input: #2c2c2c;- --color-destructive: #f26d6d;- --color-success: #34d399;-- /* Panel background used by the section bands. */- --color-band: #0c0c0c;+ --color-card: #181818;+ --color-popover: #181818;+ --color-selected: #282828;+ --color-primary: #f5f5f5;+ --color-primary-hover: #ffffff;+ --color-primary-foreground: #111111;+ --color-secondary: #292929;+ --color-muted: #1d1d1d;+ --color-muted-foreground: #a1a1a1;+ --color-dim-foreground: #868686;+ --color-border: #2c2c2c;+ --color-input: #3a3a3a;+ --color-destructive: #f06464;+ --color-success: #3ccf8e;++ /* Section bands sit flush with the page, like the app shell. */+ --color-band: var(--color-background);++ --shadow-panel: inset 0 0 0 1px var(--color-border);++ /* Motion tokens shared with the app. */+ --duration-quick: 150ms;+ --duration-fast: 250ms;+ --duration-slow: 400ms;+ --duration-very-slow: 500ms;+ --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);+ --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);--font-sans: "Geist", system-ui, sans-serif;--font-serif: "EB Garamond", Georgia, serif;@@ -73,16 +85,17 @@--radius-md: 10px;--radius-lg: 14px;--radius-media: 16px;+ --radius-panel: 18px;/* Legacy aliases used by the download and legal pages */--bg: var(--color-background);--fg: var(--color-foreground);--fg-muted: var(--color-muted-foreground);- --fg-dim: #6f6f6f;- --fg-faint: #545454;+ --fg-dim: #858585;+ --fg-faint: #6b6b6b;--border: var(--color-border);--border-strong: var(--color-input);- --accent: var(--color-primary);+ --accent: var(--color-foreground);--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex fc23e178a..d5875cfdf 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -173,6 +173,9 @@ importers:apps/marketing:dependencies:+ '@hugeicons/core-free-icons':+ specifier: ^4.3.0+ version: 4.3.0'@usenotra/geo':specifier: 0.3.0version: 0.3.0([email protected])