Floating Nav
The pill that arrives once the reader is a couple of screens into a page, and leaves on the way back up. It is a separate fixed element from the Header bar, not a transformation of it.
Live Preview
The real pill surface (.nav-pill-surface) at its production size, over a deliberately awkward ground — the same near-black / saturated-yellow / white run it crosses on the home page. In production it sits 12px from the top of the viewport, hugging its content above lg and full width below it.
Behaviour
When it appears
After roughly two screens of scrolling, clamped to 1600–2000px. Unclamped, two screens swings from 1400px on a short laptop to 2880px on a tall display — either side of the content it is meant to arrive with. On the home page it lands on the case studies band, which starts at ~1825px. It leaves 200px earlier than it arrived: not for scroll jitter, but because collapsing the iOS URL bar moves the threshold itself mid-scroll.
Which pages get it
Only pages with at least one more screen of reading left once the pill arrives — measured live from the document height, never a list of routes. A page that grows content later starts qualifying on its own; today that means short pages like /thank-you and /contact skip it. Arriving is debounced by 200ms so that growing the page mid-interaction (expanding FAQ accordions, say) can't summon a nav under the reader's hands.
Motion
Opacity and y only, on a spring — it slides down from behind the top edge. It is never mounted on arrival: it renders from the first paint, transparent and inert, and is shown by a property change. Its backdrop-filter is a compositor surface, and inserting one into the layer tree mid-scroll was a one-frame flash of whatever sat under it — on the home page, exactly as the case studies band pinned. Deliberately not scale: on a w-fit element a 5% scale is a 5% change in rendered width, which is the artifact this component exists to avoid. This pill replaced a bar that morphed into it, and every version of that morph read as a glitch. Nothing here may animate width, border-radius, margin, scale or layout, and no transition-* class may be added — a transition-all would let the full-width ↔ hugged switch animate on resize, which is the same artifact arriving through a side door. It is one size from its first frame.
Below lg the pill goes full width with 12px side margins matching its 12px top offset, and the row's justify-between pushes the menu button to the far end. Above lg it hugs its content and justify-between is inert, since there is no free space to distribute.
Surface
Frosted glass — .nav-pill-surface. The wide 28px blur is what makes it read as glass rather than a slab: a narrow blur leaves the backdrop as sharp noise directly behind the labels, which is both harder to read and less convincing. A brightness filter darkens the backdrop before the 62% tint composites over it, so far more of the ground's texture survives than a heavier flat fill would allow at the same contrast.
No saturate(), unlike .popover-surface. The canonical glass recipe boosts saturation, but over the vivid yellow case-study card that clips two of three channels and leaves the pill a yellow-cast olive — it costs contrast rather than buying it. The tint, not the filters, is what keeps the text readable; the binding case is the secondary line over a white screenshot. Browsers without backdrop-filter fall back to the opaque fill this replaced.
10px padding on all four sides, matching the even inset around the 32px circular avatar and the CTA. On dark pages the fill lands within a few units of the page itself, so the border and the top inset highlight are the only things drawing the pill's shape — don't weaken either.
Styling tokens
.nav-pill-surface — color-mix(--surface-elevated 62%) + blur(28px) brightness(0.72) + border-border + --shadow-nav-pillrounded-full, p-2.5, top-3, w-full lg:w-fitlockup uses the flat chrome ramp — ui-sm (13px) / ui-xs (12px), and the links ui-md (14px), with a circular avatarImport
import { FloatingNav } from '@/components/layout/FloatingNav'