"use client"; import "./components/ui/tidal.css"; import { useId, useState } from "react"; import { ArrowRight, Check, Circle, FileText, LayoutDashboard, Milestone, Sparkles } from "lucide-react"; import { TidalHeroAction, TidalHeroSection } from "./components/ui/hero-section"; import "./components/ui/hero-section.css"; function tidalExampleAvatarDataUri(seed: unknown) { const text = String(seed).replace(/[^a-z0-9]/gi, "").slice(-2) || "UI"; const palette = ["#333333", "#555555", "#777777", "#999999", "#bbbbbb"]; const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length]; const svg = ``; return `data:image/svg+xml,${encodeURIComponent(svg)}`; } function tidalExampleImageDataUri(label: string) { const safeLabel = label.replace(/[<>&]/g, "").slice(0, 28) || "Sample image"; const svg = `${safeLabel}`; return `data:image/svg+xml,${encodeURIComponent(svg)}`; } const tidalExampleStyles = ".tidal-scope .hero-section-demo {\n width: 100%;\n min-width: 0;\n}\n\n.tidal-scope .hero-demo-eyebrow {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n}\n\n.tidal-scope .hero-demo-eyebrow > span {\n width: 6px;\n height: 6px;\n background: var(--t-ink);\n border-radius: 50%;\n box-shadow: 0 0 0 4px var(--t-wash);\n}\n\n.tidal-scope .hero-demo-announcement {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n white-space: nowrap;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.tidal-scope .hero-demo-product {\n position: relative;\n width: 100%;\n min-width: 0;\n overflow: hidden;\n color: var(--t-surface);\n background: var(--t-ink);\n border: 1px solid var(--t-ink);\n border-radius: 20px;\n box-shadow:\n 0 38px 70px -36px #000000a6,\n 0 0 0 8px var(--t-wash);\n transform: rotate(1.1deg);\n transition:\n transform 420ms var(--t-ease-spring),\n box-shadow 420ms var(--t-ease-out);\n}\n\n.tidal-scope .hero-demo-product-bar {\n display: grid;\n grid-template-columns: 34px minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px;\n min-height: 66px;\n padding: 12px 16px;\n border-bottom: 1px solid color-mix(in srgb, var(--t-surface) 18%, transparent);\n}\n\n.tidal-scope .hero-demo-product-mark {\n display: grid;\n width: 34px;\n height: 34px;\n place-items: center;\n color: var(--t-ink);\n font-family: \"Instrument Serif\", Georgia, serif;\n font-size: 19px;\n font-style: italic;\n background: var(--t-surface);\n border-radius: 10px;\n}\n\n.tidal-scope .hero-demo-product-bar h2,\n.tidal-scope .hero-demo-product-bar small {\n display: block;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .hero-demo-product-bar h2 {\n margin: 0;\n font-size: 12px;\n font-weight: 650;\n}\n\n.tidal-scope .hero-demo-product-bar small {\n margin-top: 3px;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n font-size: 11px;\n}\n\n.tidal-scope .hero-demo-state {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-height: 28px;\n padding: 5px 8px;\n color: color-mix(in srgb, var(--t-surface) 76%, transparent);\n font-size: 11px;\n border: 1px solid color-mix(in srgb, var(--t-surface) 20%, transparent);\n border-radius: 999px;\n}\n\n.tidal-scope .hero-demo-state > span {\n width: 6px;\n height: 6px;\n background: currentColor;\n border-radius: 50%;\n transition: transform 320ms var(--t-ease-spring);\n}\n\n.tidal-scope .hero-demo-state[data-opened=\"true\"] {\n color: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-state[data-opened=\"true\"] > span {\n transform: scale(1.45);\n}\n\n.tidal-scope .hero-demo-view-picker {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 3px;\n padding: 10px;\n border-bottom: 1px solid color-mix(in srgb, var(--t-surface) 13%, transparent);\n}\n\n.tidal-scope .hero-demo-view-picker button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 44px;\n min-height: 44px;\n padding: 8px;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n font: inherit;\n font-size: 11px;\n font-weight: 600;\n touch-action: manipulation;\n cursor: pointer;\n background: transparent;\n border: 1px solid transparent;\n border-radius: 9px;\n transition:\n color 160ms,\n background 160ms,\n transform 160ms var(--t-ease-out);\n}\n\n.tidal-scope .hero-demo-view-picker button svg {\n display: none;\n flex: none;\n}\n\n.tidal-scope .hero-demo-view-picker button:hover {\n color: var(--t-surface);\n background: color-mix(in srgb, var(--t-surface) 10%, transparent);\n}\n\n.tidal-scope .hero-demo-view-picker button:active {\n transform: scale(0.97);\n}\n\n.tidal-scope .hero-demo-view-picker button[aria-pressed=\"true\"] {\n color: var(--t-ink);\n background: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-view-picker button:focus-visible {\n outline: 2px solid var(--t-surface);\n outline-offset: -3px;\n}\n\n.tidal-scope .hero-demo-view-picker button[aria-pressed=\"true\"]:focus-visible {\n outline-color: var(--t-ink);\n}\n\n.tidal-scope .hero-demo-product-body {\n min-height: 294px;\n padding: 22px;\n animation: hero-demo-view-in 280ms var(--t-ease-out) both;\n}\n\n.tidal-scope .hero-demo-summary {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 18px;\n min-height: 108px;\n padding: 18px;\n background: color-mix(in srgb, var(--t-surface) 7%, transparent);\n border: 1px solid color-mix(in srgb, var(--t-surface) 14%, transparent);\n border-radius: 14px;\n}\n\n.tidal-scope .hero-demo-summary > div:first-child > span {\n display: block;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n font-size: 11px;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n\n.tidal-scope .hero-demo-summary strong {\n display: block;\n margin-top: 8px;\n font-size: clamp(34px, 5vw, 48px);\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 0.9;\n letter-spacing: -0.05em;\n}\n\n.tidal-scope .hero-demo-summary strong small {\n margin-left: 2px;\n font-size: 0.45em;\n}\n\n.tidal-scope .hero-demo-ring {\n position: relative;\n display: grid;\n width: 68px;\n height: 68px;\n flex: none;\n place-items: center;\n}\n\n.tidal-scope .hero-demo-ring svg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n transform: rotate(-90deg);\n}\n\n.tidal-scope .hero-demo-ring circle {\n fill: none;\n stroke: color-mix(in srgb, var(--t-surface) 15%, transparent);\n stroke-width: 5;\n}\n\n.tidal-scope .hero-demo-ring circle:last-child {\n stroke: var(--t-surface);\n stroke-dasharray: 67 100;\n stroke-linecap: round;\n animation: hero-demo-ring-draw 720ms 260ms var(--t-ease-out) both;\n}\n\n.tidal-scope .hero-demo-tasks {\n margin-top: 12px;\n}\n\n.tidal-scope .hero-demo-tasks > div {\n display: grid;\n grid-template-columns: 26px minmax(0, 1fr) 30px;\n align-items: center;\n gap: 9px;\n min-height: 52px;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n font-size: 11px;\n border-bottom: 1px solid color-mix(in srgb, var(--t-surface) 12%, transparent);\n}\n\n.tidal-scope .hero-demo-tasks > div[data-done=\"true\"] {\n color: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-check,\n.tidal-scope .hero-demo-owner {\n display: grid;\n place-items: center;\n flex: none;\n border: 1px solid color-mix(in srgb, var(--t-surface) 20%, transparent);\n}\n\n.tidal-scope .hero-demo-check {\n width: 24px;\n height: 24px;\n border-radius: 7px;\n}\n\n.tidal-scope [data-done=\"true\"] .hero-demo-check {\n color: var(--t-ink);\n background: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-owner {\n width: 28px;\n height: 28px;\n object-fit: cover;\n border-radius: 50%;\n}\n\n.tidal-scope .hero-demo-timeline {\n position: relative;\n display: grid;\n min-height: 250px;\n padding-left: 12px;\n}\n\n.tidal-scope .hero-demo-timeline::before {\n position: absolute;\n top: 28px;\n bottom: 28px;\n left: 20px;\n width: 1px;\n content: \"\";\n background: color-mix(in srgb, var(--t-surface) 20%, transparent);\n}\n\n.tidal-scope .hero-demo-timeline > div {\n position: relative;\n display: grid;\n grid-template-columns: 18px 50px minmax(0, 1fr) auto;\n align-items: center;\n gap: 9px;\n min-height: 72px;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n}\n\n.tidal-scope .hero-demo-timeline > div > span {\n z-index: 1;\n width: 10px;\n height: 10px;\n margin-left: 3px;\n background: var(--t-ink);\n border: 2px solid color-mix(in srgb, var(--t-surface) 55%, transparent);\n border-radius: 50%;\n box-shadow: 0 0 0 4px var(--t-ink);\n}\n\n.tidal-scope .hero-demo-timeline > div[data-active=\"true\"] {\n color: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-timeline > div[data-active=\"true\"] > span {\n background: var(--t-surface);\n border-color: var(--t-surface);\n}\n\n.tidal-scope .hero-demo-timeline time,\n.tidal-scope .hero-demo-timeline small {\n font-size: 11px;\n}\n\n.tidal-scope .hero-demo-timeline strong {\n min-width: 0;\n overflow-wrap: anywhere;\n font-size: 11px;\n font-weight: 600;\n}\n\n.tidal-scope .hero-demo-notes {\n min-height: 250px;\n padding: 24px;\n color: var(--t-ink);\n background: var(--t-surface);\n border-radius: 14px;\n box-shadow: 10px 10px 0 color-mix(in srgb, var(--t-surface) 13%, transparent);\n}\n\n.tidal-scope .hero-demo-notes > span {\n color: var(--t-muted);\n font-size: 11px;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n}\n\n.tidal-scope .hero-demo-notes h3 {\n max-width: 16ch;\n margin: 28px 0 12px;\n font-family: \"Instrument Serif\", Georgia, serif;\n font-size: 29px;\n font-weight: 400;\n line-height: 1.05;\n letter-spacing: -0.02em;\n}\n\n.tidal-scope .hero-demo-notes p {\n max-width: 48ch;\n margin: 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.7;\n}\n\n.tidal-scope .hero-demo-notes > div {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 18px;\n margin-top: 25px;\n padding-top: 14px;\n color: var(--t-muted);\n font-size: 11px;\n border-top: 1px solid var(--t-border);\n}\n\n.tidal-scope .hero-demo-product-footer {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n min-height: 44px;\n padding: 13px 16px;\n color: color-mix(in srgb, var(--t-surface) 70%, transparent);\n font-size: 11px;\n border-top: 1px solid color-mix(in srgb, var(--t-surface) 13%, transparent);\n}\n\n@keyframes hero-demo-view-in {\n from {\n opacity: 0;\n transform: translateY(9px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes hero-demo-ring-draw {\n from {\n stroke-dasharray: 0 100;\n }\n to {\n stroke-dasharray: 67 100;\n }\n}\n\n@container (min-width: 470px) {\n .tidal-scope .hero-demo-view-picker button {\n gap: 7px;\n }\n\n .tidal-scope .hero-demo-view-picker button svg {\n display: block;\n }\n}\n\n@container (max-width: 430px) {\n .tidal-scope .hero-demo-product {\n border-radius: 16px;\n box-shadow:\n 0 28px 52px -34px #000000a6,\n 0 0 0 5px var(--t-wash);\n transform: none;\n }\n\n .tidal-scope .hero-demo-product-bar {\n grid-template-columns: 30px minmax(0, 1fr) auto;\n min-height: 60px;\n padding: 10px 12px;\n }\n\n .tidal-scope .hero-demo-product-mark {\n width: 30px;\n height: 30px;\n }\n\n .tidal-scope .hero-demo-state {\n padding-inline: 7px;\n }\n\n .tidal-scope .hero-demo-product-body {\n min-height: 274px;\n padding: 14px;\n }\n\n .tidal-scope .hero-demo-summary {\n padding: 14px;\n }\n\n .tidal-scope .hero-demo-timeline > div {\n grid-template-columns: 18px 46px minmax(0, 1fr);\n }\n\n .tidal-scope .hero-demo-timeline small {\n grid-column: 3;\n }\n\n .tidal-scope .hero-demo-notes {\n min-height: 246px;\n padding: 18px;\n }\n\n .tidal-scope .hero-demo-notes h3 {\n margin-top: 20px;\n font-size: 25px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .hero-demo-product,\n .tidal-scope .hero-demo-state > span,\n .tidal-scope .hero-demo-view-picker button,\n .tidal-scope .hero-demo-product-body {\n transition: none;\n animation: none;\n transform: none;\n }\n\n .tidal-scope .hero-demo-ring circle:last-child {\n animation: none;\n stroke-dasharray: 67 100;\n }\n}"; type WorkspaceView = "overview" | "timeline" | "notes"; const VIEWS: Array<{ id: WorkspaceView; label: string; Icon: typeof LayoutDashboard; }> = [ { id: "overview", label: "Overview", Icon: LayoutDashboard }, { id: "timeline", label: "Timeline", Icon: Milestone }, { id: "notes", label: "Notes", Icon: FileText }, ]; const TASKS = [ { label: "Approve release copy", owner: "Ava", portrait: "01", done: true }, { label: "Review launch checklist", owner: "Noah", portrait: "02", done: true, }, { label: "Schedule sample walkthrough", owner: "Mila", portrait: "03", done: false, }, ]; function ProductScene({ view, onViewChange, opened, }: { view: WorkspaceView; onViewChange: (view: WorkspaceView) => void; opened: boolean; }) { const titleId = useId(); return (

Northstar launch

Fictional sample workspace
{VIEWS.map(({ id, label, Icon }) => ( ))}
{view === "overview" ? (
Launch readiness 67%
{TASKS.map((task) => (
{task.label} {`${task.owner},
))}
) : null} {view === "timeline" ? (
{[ ["Oct 14", "Positioning review", "Complete"], ["Oct 18", "Interface handoff", "In progress"], ["Oct 24", "Sample release", "Planned"], ].map(([date, label, status], index) => (
))}
) : null} {view === "notes" ? (
Sample release note ยท draft 03

One shared view for the final week.

Keep the latest decisions, owners, and launch milestones together. This fictional note changes only inside the demo.

3 decisions 2 approved
) : null}
); } export function HeroSectionDemo() { const [view, setView] = useState("overview"); const [opened, setOpened] = useState(false); const [message, setMessage] = useState(""); function selectView(next: WorkspaceView) { setView(next); setMessage(`${VIEWS.find((item) => item.id === next)?.label} selected.`); } function openWorkspace() { setOpened(true); setView("overview"); setMessage("Sample workspace opened in this preview."); } function readNotes() { setView("notes"); setMessage("Sample notes selected."); } return (
} title={ <> Keep every launch decision in view. } description={

A reusable hero for products with something real to show. Explore the fictional Northstar workspace to see the copy, controls, and product scene work as one system.

} actions={ <> {opened ? "Return to overview" : "Open sample workspace"} Read sample notes } visual={ } visualLabel="Interactive fictional product preview" />

{message}

); } export default function AgentExample() { return (
); }