AI Product · Landing Page Template
AI Landing Page
A quartz crystal floats over the headline and splits it into color fringes, then a working demo streams an answer while the sources it cites light up.
Live demo
Move the pointer to steer the crystal, then scroll down to try the chat demo.
The Prompt
Build a landing page for Kaleid, an AI assistant that answers questions from a company's own documents and shows its sources. The hero is the showpiece: a quartz crystal rendered in a WebGL fragment shader floats over the headline and genuinely refracts it, splitting the letters into color fringes as it turns, follows the pointer on a spring and spins when flicked. Below it, a working demo streams an answer word by word while the source cards it cites light up. Dark, glassy and precise, lit by one warm light. Match my project's existing stack, conventions, and design tokens. If there are none, output a single HTML file with inline CSS and JavaScript and zero dependencies. Raw WebGL only: no 3D library, no images, no fonts.
LOOK
- Page #060609, text #F3F0EA, secondary text the same at 62%, hairlines at 11%. One accent, warm light #FFC08A, used for glows, the active citation and focus rings.
- ui-sans-serif, system-ui. Section headings clamp(38px, 5.4vw, 84px), weight 620, line-height 0.96, letter-spacing -0.045em. Body 17px.
- Glass panels: color-mix(in oklab, #15151C 48%, transparent), backdrop-filter blur(22px) saturate(180%), 1px inner edge, 1px top highlight. Radius 28px.
- Behind the demo and feature sections, two huge blurred discs of color (amber #FFB06A, blue #4F7DFF or violet #7B5CFF, 26 to 34% opacity) drift slowly on 26 to 32 second loops, so the glass has light to bend.
- Panels marked as lit get a soft pool of light and a bright stretch of border under the pointer (radial gradients positioned by two custom properties, the border one masked to a 1px ring).
- Film grain over everything: a 128px noise tile made on a canvas at load, overlay at 9%.
- Pills are 48px tall. Primary is solid #F3F0EA with dark text and a warm glow on hover; secondary is a 1px outline. They scale on a CSS spring (a damped spring sampled into linear()).
NAV
- Fixed glass bar, 58px, centered, max 1240px: a small faceted crystal mark and "Kaleid", links (Product, Why it works, Results, Pricing), "Sign in" and a small pill "Start free".
- With animation-timeline: scroll(), over the first 320px of scroll it narrows to 760px and its glass darkens. No script.
HERO
- h1 "Ask everything / your company / knows." at clamp(46px, 9.4vw, 168px), weight 640, line-height 0.9, letter-spacing -0.052em. Its color is transparent: the browser lays it out and the shader draws it.
- Typesetting for the shader: walk the h1's text nodes with a Range, read each glyph's bounding box, redraw each glyph at that position in white on an offscreen canvas at 2x (baseline = box top + fontBoundingBoxAscent), upload as a texture. Redo on resize and when fonts load.
- Under it, a two-column row: left, the pitch ("Kaleid reads your documents, tickets and chats, then answers in plain language with the sources attached. Nothing is guessed, and nobody sees what they could not open themselves."). Right, a 64px glass "ask" button that types example questions one character at a time, pauses, deletes and moves on, with a blinking caret and a round send mark. A beam of light circles its border: a conic gradient whose start angle is a registered @property animated from 0 to 360 degrees every 4.5s, masked to a 1.5px ring. Pressing it scrolls to the demo and plays the question on screen. Small print: "Free for teams of five. No card needed."
THE CRYSTAL
- One fullscreen fragment shader. The background function returns the page color, plus the headline texture, plus a warm pool of light around the crystal, plus a faint spectrum band cast down and to the right of it (a cosine palette across the band, Gaussian falloff).
- The crystal is a double-ended hexagonal prism described exactly as 18 planes: six sides at distance 0.42 and six facets on each tip (normal = normalize(cos a, plus or minus 0.9, sin a), distance 0.836). A ray enters at the farthest entry plane and leaves at the nearest exit plane; no ray marching.
- Use parallel rays. Rotate the ray into crystal space with a matrix built from spin about the long axis, a lean toward the viewer and a lean sideways.
- For each of red, green and blue, with index of refraction 1.46, 1.505 and 1.55: refract at the entry face, intersect the planes again to find the exit, refract out. If that is total internal reflection, the facet shows the room instead. Otherwise continue to a plane 1.7 units behind and sample the background function there. Taking one channel from each pass produces the fringes.
- Add Fresnel reflection (5% rising to 100% at grazing angles) of a procedural room: dark, one large overhead light, a warm strip, a cool floor. Brighten edges where the two nearest entry planes are almost tied.
- Size 0.25 of the viewport height (0.13 on portrait screens), resting over the ends of the first two lines of the headline so letters are always inside it.
HERO MOTION
- The headline fades up over 1.1s; half a second in, the crystal grows on a spring (stiffness 60, damping 9) from half size.
- It follows the pointer a third of the way on a spring (38, 8), leans with its velocity, bobs slightly, and sinks as the page scrolls. Horizontal pointer speed adds spin, which decays back to a slow 0.34 rad/s.
- Render at up to 1.75x device pixels and step the resolution down when frames run long. Stop drawing when the hero is off screen.
DEMO ("It shows its work.")
- Left: heading, one line of copy and three question buttons. Right: a glass chat panel in two columns.
- Playing a question: the question appears as a bubble; a status line shimmers "Reading 3 sources" while source cards swing in one by one from a 28 degree turn; then the answer streams, each word fading up from a 6px blur about 35 to 65ms apart. When a citation marker is reached, a numbered chip pops in on a spring, its source card glows amber and slides 8px, and the quoted phrase in that card is underlined by a line that draws itself. Ends with "Answered in 1.5 s from 3 sources."
- Hovering or focusing a chip or a card lights its partner. Starting another question cancels the one in flight.
- Three scripted answers: Northwind delivery dates (3 sources), customers on the 2023 price list (3), this year's leave policy changes (2). Start the first when the panel is 35% visible.
FEATURES ("Four reasons it gets used.")
- A six-column grid of four glass tiles, each a working miniature:
- "It only knows what you may know." A three-way switch (Amara, Finance / Jo, Support / Lin, Contractor) whose thumb slides using :has(). Three sentences; the ones that person may not read blur out and a note explains why.
- "Reads where the work already lives." Seven small app tiles circling the crystal mark on two elliptical offset-path orbits.
- "Fast enough to interrupt." A large "1.8 s median" and 26 bars; every 1.1s a new bar grows in on the right and the oldest leaves.
- "Answers in the language of the question." The same question and answer in English, French, German and Japanese, crossfading through a blur every 3.2s.
RESULTS AND CLOSE
- Three figures that count up with an expo-out curve when seen: 92%, 1.8 s, 14 h, each over a hairline with one line of explanation.
- A closing section with "Stop asking around." at clamp(48px, 9vw, 150px), two magnetic pills ("Start free", "Book a demo") that lean toward the pointer, a wide warm glow rising from the bottom edge, and a note that the brand and figures are invented.
- Sections sharpen from a 10px blur and settle on a spring as they enter, once.
ACCESSIBILITY
- The canvas is aria-hidden and the h1 is real text. Citations are buttons labeled with their source title; source cards are focusable.
- Status changes in the demo use a status region; the streaming text itself is not announced word by word.
- prefers-reduced-motion: the crystal is drawn once at rest and no longer follows the pointer; answers appear whole; no typing, beam, orbit, bars or language rotation; counters show final values.
- Without WebGL the headline is shown as ordinary text.
NEVER
- No purple-to-blue gradient text, no orb, no neural-net illustration.
- No 3D library or model. The crystal is mathematics.
- No fake logos or testimonial carousel.
- No animation that replays every time a section scrolls back into view.
- No chat demo that calls a network. Everything is scripted in the file.
- CopyThe full prompt, one click.
- PasteInto Cursor, Claude Code, or any agent.
- CompareAgainst the live demo above.