{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"aurora-flow-nav","type":"registry:component","title":"Aurora Flow Nav","description":"A floating night-glass nav whose active mark is a band of aurora light that takes the colour of the sky above its link and flows to the next one leading edge first.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/aurora-flow-nav.tsx","content":"\"use client\";\n\nimport { useEffect, useId, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, ReactNode } from \"react\";\n\n/**\n * AuroraFlowNav — a nav whose active mark is a band of aurora light.\n *\n * A thin lit line with short rays rising from it, cut from one gradient\n * that spans the nav and drifts on a 60s clock, so the band takes the colour\n * of the sky above the link it sits under. Choose a link and the band\n * flows there, leading edge first (240ms), trailing edge after (420ms);\n * hover or focus lays a faint ghost of it. Controlled (a scroll spy) or\n * not; the links fold into a menu on narrow containers.\n *\n * Part of the Aurora kit: a near-black night (#050608) lit by curtains of\n * aurora in mint #7cf5c4 and sky #38bdf8, a violet #a78bfa blend, a rose\n * #f472b6 crown and an indigo #5b6cc4 fringe, all on one 60s clock; Bricolage\n * Grotesque through var(--font-bricolage) for lit display type over Geist.\n * Respects prefers-reduced-motion. No dependencies beyond React. Paste it as\n * its own file: it repeats the kit's small helpers, which would clash in one\n * module. For the display face, load Bricolage Grotesque with next/font\n * (variable: \"--font-bricolage\") on a parent; elsewhere, load it with a\n * Google Fonts link or @fontsource and set --font-bricolage yourself.\n * Needs Tailwind v4 (on v3.4, add the @tailwindcss/container-queries plugin).\n */\n\nconst SANS = 'var(--font-sans, \"Geist\", \"Inter\", ui-sans-serif, system-ui, sans-serif)';\n\nconst DISPLAY = 'var(--font-bricolage, \"Bricolage Grotesque\", var(--font-sans, \"Geist\"), ui-sans-serif, system-ui, sans-serif)';\n\nconst EASE = \"cubic-bezier(0.22, 1, 0.36, 1)\";\n\nconst HEX = /^#[0-9a-fA-F]{6}$/;\n\n/** The night the kit is set in. */\nconst SKY = {\n  ground: \"#050608\",\n  panel: \"#0a0d12\",\n  raised: \"#0f141a\",\n  ink: \"rgba(236,244,248,0.94)\",\n  ink2: \"rgba(236,244,248,0.64)\",\n  ink3: \"rgba(236,244,248,0.42)\",\n  line: \"rgba(236,244,248,0.08)\",\n  line2: \"rgba(236,244,248,0.16)\",\n  shadow: \"0 40px 100px -30px rgba(0,0,0,0.7)\",\n} as const;\n\n/**\n * The sky's colours by altitude: the core low in the curtain (two hues it\n * drifts between on the aurora clock), a violet blend above it, a rose crown\n * seen only in a strong display, and an indigo fringe under the lower border.\n */\nexport type AuPalette = { core: string; core2: string; blend: string; high: string; fringe: string };\n\nexport const AU_PALETTES = {\n  boreal: { core: \"#7cf5c4\", core2: \"#38bdf8\", blend: \"#a78bfa\", high: \"#f472b6\", fringe: \"#5b6cc4\" },\n  verdant: { core: \"#6ee7a0\", core2: \"#7cf5c4\", blend: \"#8fb4f0\", high: \"#e879b9\", fringe: \"#5b6cc4\" },\n  violet: { core: \"#a78bfa\", core2: \"#38bdf8\", blend: \"#c4a6fb\", high: \"#f472b6\", fringe: \"#4c5bb8\" },\n} as const satisfies Record<string, AuPalette>;\n\nexport type AuPaletteName = keyof typeof AU_PALETTES;\n\nfunction own<T extends object>(map: T, key: string): key is Extract<keyof T, string> {\n  return Object.prototype.hasOwnProperty.call(map, key);\n}\n\n/** A named palette, or boreal. */\nfunction paletteOf(name: string): AuPalette {\n  return own(AU_PALETTES, name) ? AU_PALETTES[name] : AU_PALETTES.boreal;\n}\n\nfunction rgbOf(hex: string): [number, number, number] {\n  const n = parseInt((HEX.test(hex) ? hex : \"#7cf5c4\").slice(1), 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\nfunction rgba(hex: string, a: number): string {\n  const [r, g, b] = rgbOf(hex);\n  return `rgba(${r},${g},${b},${a})`;\n}\n\n/**\n * The aurora clock: every lit part of the page reads one 60s cycle, so a\n * button, a rim and the sky drift together instead of breathing out of step.\n * The phase is the page's own timeline (performance.now), shared by\n * everything on it.\n */\nconst CLOCK_S = 60;\n\n/**\n * A ref callback that starts an element's CSS animation where the clock\n * already is, so parts that mount at different moments stay in step.\n */\nfunction syncClock(periodS: number) {\n  return (el: HTMLElement | null) => {\n    if (el) el.style.animationDelay = `${(-(performance.now() / 1000) % periodS).toFixed(3)}s`;\n  };\n}\n\n/** Links: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and same-site paths. */\nfunction safeHref(raw: string): string {\n  const v = raw.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!v || v.includes(\"\\\\\")) return \"#\";\n  if (/^(https?:|mailto:|tel:)/i.test(v)) return v;\n  if (/^[/#?]/.test(v) && !/^\\/\\//.test(v)) return v;\n  return \"#\";\n}\n\nfunction subscribeMotion(cb: () => void) {\n  const m = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  m.addEventListener(\"change\", cb);\n  return () => m.removeEventListener(\"change\", cb);\n}\n\n/** True when the visitor asked for reduced motion. False on the server. */\nfunction useReducedMotion(): boolean {\n  return useSyncExternalStore(\n    subscribeMotion,\n    () => window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches,\n    () => false,\n  );\n}\n\n// Each part carries only the CSS it needs, so any one of them works on its own.\n// Nothing is interpolated into these sheets; colours arrive as CSS variables.\n// revert-layer keeps an element's own rounded corners when a host page's focus rule flattens them.\nconst FOCUS_CSS = \".au-scope :focus-visible,.au-scope:focus-visible{outline:2px solid var(--au-ring,#7cf5c4);outline-offset:3px;border-radius:revert-layer}\";\n\n/** The palette as CSS variables, for the parts drawn in CSS. */\nfunction paletteVars(p: AuPalette): CSSProperties {\n  return { \"--au-core\": p.core, \"--au-core2\": p.core2, \"--au-blend\": p.blend, \"--au-high\": p.high, \"--au-ring\": p.core } as CSSProperties;\n}\n\n// A registered angle, so the under-glow turns on the compositor without a render per frame.\nconst GLOW_BTN_CSS =\n  \"@property --au-a{syntax:'<angle>';inherits:false;initial-value:0deg}\" +\n  \"@keyframes au-turn{to{--au-a:360deg}}\" +\n  \"@keyframes au-ring{from{opacity:.9;transform:scale(1)}to{opacity:0;transform:scale(1.18,1.5)}}\" +\n  \".au-glow{inset:-6px -8px -12px;opacity:.55;animation:au-turn 60s linear infinite}\" +\n  \".au-btn:hover .au-glow,.au-btn:focus-visible .au-glow{inset:-12px -14px -18px;opacity:.85}\" +\n  \".au-q .au-glow{opacity:0}.au-q:hover .au-glow,.au-q:focus-visible .au-glow{opacity:.4}\" +\n  \".au-btn:active{transform:translateY(1px) scale(.985)}\" +\n  \"@media (prefers-reduced-motion: reduce){.au-glow{animation:none}.au-ring{animation:none!important;opacity:0}}\";\n\nexport type AuroraGlowButtonProps = {\n  children: ReactNode;\n  /** Renders a link when given, else a button. */\n  href?: string;\n  onClick?: () => void;\n  type?: \"button\" | \"submit\";\n  /** \"solid\" carries the sky under it; \"quiet\" is a hairline pill whose light wakes on hover. */\n  variant?: \"solid\" | \"quiet\";\n  size?: \"md\" | \"lg\";\n  palette?: AuPaletteName;\n  disabled?: boolean;\n  className?: string;\n};\n\n/**\n * A pill with a sliver of the sky under it. The under-glow is a slow turn\n * through the palette on the page's 60s aurora clock, so every button on the\n * page glows in step with the sky; hover or focus lets it spread (220ms), and\n * a press (or Enter or Space) sends a ring of light out from the pill (380ms). The top edge\n * carries a thin lit rim. Renders a link when given an href, else a button.\n */\nexport function AuroraGlowButton({ children, href, onClick, type = \"button\", variant = \"solid\", size = \"md\", palette = \"boreal\", disabled, className }: AuroraGlowButtonProps) {\n  const p = paletteOf(palette);\n  const [ring, setRing] = useState(0);\n  const solid = variant === \"solid\";\n  const cls =\n    \"au-scope au-btn relative isolate inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium transition-[transform,color,box-shadow] duration-200 disabled:cursor-not-allowed disabled:opacity-50 \" +\n    (size === \"lg\" ? \"h-[52px] px-7 text-[15px]\" : \"h-11 px-5 text-[14px]\") +\n    (solid ? \"\" : \" au-q\") +\n    (className ? \" \" + className : \"\");\n  const style: CSSProperties = {\n    ...paletteVars(p),\n    color: SKY.ink,\n    fontFamily: SANS,\n    background: solid ? `linear-gradient(180deg, ${SKY.raised}, ${SKY.panel})` : \"transparent\",\n    boxShadow: solid ? `inset 0 0 0 1px ${SKY.line2}, 0 10px 30px -12px rgba(0,0,0,0.8)` : `inset 0 0 0 1px ${SKY.line2}`,\n  };\n  const sheet = <style>{FOCUS_CSS + GLOW_BTN_CSS}</style>;\n  const inner = (\n    <>\n      {/* The sky under the pill, turning on the aurora clock. */}\n      <span\n        ref={syncClock(CLOCK_S)}\n        aria-hidden\n        className=\"au-glow pointer-events-none absolute -z-10 rounded-full transition-[inset,opacity] duration-200\"\n        style={{\n          background: \"conic-gradient(from var(--au-a), var(--au-core), var(--au-core2), var(--au-blend), var(--au-core2), var(--au-core))\",\n          filter: \"blur(14px)\",\n        }}\n      />\n      {/* A lit rim along the top edge. */}\n      <span\n        aria-hidden\n        className=\"pointer-events-none absolute inset-0 rounded-full\"\n        style={{\n          padding: 1,\n          background: `linear-gradient(90deg, transparent 12%, ${rgba(p.core, solid ? 0.7 : 0.35)} 40%, ${rgba(p.core2, solid ? 0.6 : 0.3)} 62%, transparent 88%) top / 100% 1px no-repeat`,\n        }}\n      />\n      {ring > 0 && (\n        <span\n          key={ring}\n          aria-hidden\n          className=\"au-ring pointer-events-none absolute inset-0 rounded-full\"\n          style={{ boxShadow: `0 0 0 1px ${rgba(p.core, 0.8)}, 0 0 24px ${rgba(p.core2, 0.5)}`, animation: `au-ring 380ms ${EASE} both` }}\n        />\n      )}\n      <span className=\"relative\">{children}</span>\n    </>\n  );\n  const onDown = () => {\n    if (!disabled) setRing((r) => r + 1);\n  };\n  const onKey = (e: ReactKeyboardEvent) => {\n    if (!e.repeat && (e.key === \"Enter\" || e.key === \" \")) onDown();\n  };\n  if (href !== undefined) {\n    return (\n      <>\n        {sheet}\n        <a href={safeHref(href)} onClick={onClick} onPointerDown={onDown} onKeyDown={onKey} className={cls} style={style}>\n          {inner}\n        </a>\n      </>\n    );\n  }\n  return (\n    <>\n      {sheet}\n      <button type={type} onClick={onClick} onPointerDown={onDown} onKeyDown={onKey} disabled={disabled} className={cls} style={style}>\n        {inner}\n      </button>\n    </>\n  );\n}\n\nexport type AuLink = { label: string; href: string };\n\n// Registered lengths, so the band's two edges can travel at different speeds.\nconst NAV_CSS =\n  \"@property --au-l{syntax:'<length>';inherits:false;initial-value:0px}\" +\n  \"@property --au-r{syntax:'<length>';inherits:false;initial-value:0px}\" +\n  \"@keyframes au-slide{to{background-position:-200% 0}}\" +\n  \".au-band{transition-property:--au-l,--au-r,opacity;transition-timing-function:cubic-bezier(0.22,1,0.36,1)}\" +\n  \".au-sky{background-size:200% 100%;animation:au-slide 60s linear infinite}\" +\n  \"@keyframes au-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}\" +\n  \"@media (prefers-reduced-motion: reduce){.au-band{transition:none!important}.au-sky{animation:none}.au-drop{animation:none!important}}\";\n\n/** Lays a band under a link: its two edges travel at different speeds, the leading one first. */\nfunction layBand(el: HTMLSpanElement | null, a: HTMLElement | undefined, flow: boolean) {\n  if (!el) return;\n  if (!a) {\n    el.style.opacity = \"0\";\n    return;\n  }\n  const l = a.offsetLeft + 12;\n  const r = a.offsetLeft + a.offsetWidth - 12;\n  const prevL = parseFloat(el.style.getPropertyValue(\"--au-l\")) || l;\n  const right = l >= prevL;\n  el.style.transitionDuration = flow ? (right ? \"420ms, 240ms, 200ms\" : \"240ms, 420ms, 200ms\") : \"0ms, 0ms, 200ms\";\n  el.style.setProperty(\"--au-l\", `${l}px`);\n  el.style.setProperty(\"--au-r\", `${r}px`);\n  el.style.opacity = \"1\";\n}\n\nexport type AuroraFlowNavProps = {\n  brand: string;\n  links: AuLink[];\n  cta?: AuLink;\n  /** \"solid\" by default; \"quiet\" when the page already has a filled action in view. */\n  ctaVariant?: \"solid\" | \"quiet\";\n  /** The active link's href, when the page controls it (a scroll spy). */\n  active?: string;\n  /** The link active at first, when the nav controls it. */\n  defaultActive?: string;\n  onNavigate?: (href: string) => void;\n  palette?: AuPaletteName;\n  className?: string;\n};\n\n/**\n * A floating night-glass nav whose active mark is a band of aurora light: a\n * thin lit line with short rays rising from it, cut from one gradient that\n * spans the whole nav and drifts on the 60s aurora clock, so the band shows\n * the colour of the sky above whichever link it sits under. Choose a link and\n * the band flows to it, its leading edge first (240ms) and its trailing edge\n * after (420ms); hovering or focusing a link lays a faint ghost of the band\n * under it. Below the container's small breakpoint the links fold into a\n * menu. The call to action is the kit's AuroraGlowButton.\n */\nexport function AuroraFlowNav({ brand, links, cta, ctaVariant = \"solid\", active, defaultActive, onNavigate, palette = \"boreal\", className }: AuroraFlowNavProps) {\n  const p = paletteOf(palette);\n  const [chosen, setChosen] = useState(defaultActive ?? links[0]?.href ?? \"\");\n  const [open, setOpen] = useState(false);\n  const current = active ?? chosen;\n  const listRef = useRef<HTMLUListElement>(null);\n  const bandRef = useRef<HTMLSpanElement>(null);\n  const ghostRef = useRef<HTMLSpanElement>(null);\n  const items = useRef(new Map<string, HTMLAnchorElement>());\n  const rootRef = useRef<HTMLElement>(null);\n  const menuBtn = useRef<HTMLButtonElement>(null);\n  const uid = useId().replace(/[^a-zA-Z0-9]/g, \"\");\n  const reduced = useReducedMotion();\n\n  // The band follows the active link, and re-measures when the nav changes size.\n  useEffect(() => {\n    const list = listRef.current;\n    const band = bandRef.current;\n    if (!list || !band) return;\n    const first = !band.style.getPropertyValue(\"--au-l\");\n    const map = items.current;\n    layBand(band, map.get(current), !first && !reduced);\n    const ro = new ResizeObserver(() => layBand(band, map.get(current), false));\n    ro.observe(list);\n    return () => ro.disconnect();\n  }, [current, links, reduced]);\n\n  // The folded menu closes on Escape and on a click outside.\n  useEffect(() => {\n    if (!open) return;\n    const onKey = (e: KeyboardEvent) => {\n      if (e.key === \"Escape\") {\n        setOpen(false);\n        menuBtn.current?.focus();\n      }\n    };\n    const onDown = (e: PointerEvent) => {\n      if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n    };\n    document.addEventListener(\"keydown\", onKey);\n    document.addEventListener(\"pointerdown\", onDown);\n    return () => {\n      document.removeEventListener(\"keydown\", onKey);\n      document.removeEventListener(\"pointerdown\", onDown);\n    };\n  }, [open]);\n\n  const choose = (href: string) => {\n    setChosen(href);\n    setOpen(false);\n    onNavigate?.(href);\n  };\n  const skyGradient = `linear-gradient(90deg, ${p.core}, ${p.core2} 25%, ${p.blend} 50%, ${p.core2} 75%, ${p.core})`;\n  const bandLayers = (strength: number) => (\n    <>\n      <span ref={syncClock(CLOCK_S)} className=\"au-sky absolute inset-x-0 bottom-0 h-[2px] rounded-full\" style={{ backgroundImage: skyGradient, opacity: strength }} />\n      <span\n        ref={syncClock(CLOCK_S)}\n        className=\"au-sky absolute inset-x-0 bottom-[2px] h-[16px]\"\n        style={{\n          backgroundImage: skyGradient,\n          opacity: 0.75 * strength,\n          filter: \"blur(1.5px)\",\n          WebkitMaskImage: \"linear-gradient(to top, #000, transparent), repeating-linear-gradient(90deg, #000 0 2px, rgba(0,0,0,0.3) 2px 5px)\",\n          maskImage: \"linear-gradient(to top, #000, transparent), repeating-linear-gradient(90deg, #000 0 2px, rgba(0,0,0,0.3) 2px 5px)\",\n          WebkitMaskComposite: \"source-in\",\n          maskComposite: \"intersect\",\n        }}\n      />\n    </>\n  );\n  return (\n    <nav ref={rootRef} aria-label=\"Main\" className={\"au-scope @container relative\" + (className ? \" \" + className : \"\")} style={{ ...paletteVars(p), fontFamily: SANS, color: SKY.ink }}>\n      <style>{FOCUS_CSS + NAV_CSS}</style>\n      <div\n        className=\"flex h-[60px] items-center gap-2 rounded-full pl-6 pr-2\"\n        style={{ background: \"rgba(10,13,18,0.66)\", WebkitBackdropFilter: \"blur(16px) saturate(140%)\", backdropFilter: \"blur(16px) saturate(140%)\", boxShadow: `inset 0 0 0 1px ${SKY.line2}, ${SKY.shadow}` }}\n      >\n        <a href=\"#\" className=\"mr-2 text-[20px] font-semibold tracking-[-0.01em]\" style={{ fontFamily: DISPLAY, color: SKY.ink }}>\n          {brand}\n        </a>\n        <ul ref={listRef} className=\"relative m-0 hidden h-full flex-1 list-none items-center gap-1 p-0 @xl:flex\">\n          {/* The band, and a ghost of it under the link you point at. */}\n          <span ref={ghostRef} aria-hidden className=\"au-band pointer-events-none absolute inset-x-0 bottom-[9px] h-[18px]\" style={{ opacity: 0, clipPath: \"inset(0 calc(100% - var(--au-r)) 0 var(--au-l) round 2px)\" }}>\n            {bandLayers(0.3)}\n          </span>\n          <span ref={bandRef} aria-hidden className=\"au-band pointer-events-none absolute inset-x-0 bottom-[9px] h-[18px]\" style={{ opacity: 0, clipPath: \"inset(0 calc(100% - var(--au-r)) 0 var(--au-l) round 2px)\" }}>\n            {bandLayers(1)}\n          </span>\n          {links.map((l) => {\n            const on = l.href === current;\n            return (\n              <li key={l.href}>\n                <a\n                  ref={(n) => {\n                    if (n) items.current.set(l.href, n);\n                    else items.current.delete(l.href);\n                  }}\n                  href={safeHref(l.href)}\n                  aria-current={on ? \"page\" : undefined}\n                  onClick={() => choose(l.href)}\n                  onPointerEnter={(e) => layBand(ghostRef.current, e.currentTarget, !reduced)}\n                  onPointerLeave={() => layBand(ghostRef.current, undefined, !reduced)}\n                  onFocus={(e) => layBand(ghostRef.current, e.currentTarget, !reduced)}\n                  onBlur={() => layBand(ghostRef.current, undefined, !reduced)}\n                  className=\"relative block rounded-full px-3.5 py-2 text-[14px] transition-colors duration-200\"\n                  style={{ color: on ? SKY.ink : SKY.ink2 }}\n                >\n                  {l.label}\n                </a>\n              </li>\n            );\n          })}\n        </ul>\n        <div className=\"ml-auto flex items-center gap-2\">\n          <button\n            ref={menuBtn}\n            type=\"button\"\n            aria-expanded={open}\n            aria-controls={`${uid}-menu`}\n            onClick={() => setOpen((o) => !o)}\n            className=\"rounded-full px-3.5 py-2 text-[14px] @xl:hidden\"\n            style={{ color: SKY.ink2, boxShadow: `inset 0 0 0 1px ${SKY.line2}` }}\n          >\n            Menu\n          </button>\n          {cta && (\n            <AuroraGlowButton href={cta.href} variant={ctaVariant} palette={palette}>\n              {cta.label}\n            </AuroraGlowButton>\n          )}\n        </div>\n      </div>\n      {open && (\n        <ul\n          id={`${uid}-menu`}\n          className=\"au-drop absolute inset-x-0 top-[68px] m-0 grid list-none gap-1 rounded-[20px] p-2 @xl:hidden\"\n          style={{ background: \"rgba(10,13,18,0.9)\", WebkitBackdropFilter: \"blur(16px)\", backdropFilter: \"blur(16px)\", boxShadow: `inset 0 0 0 1px ${SKY.line2}, ${SKY.shadow}`, animation: `au-drop 260ms ${EASE} both` }}\n        >\n          {links.map((l) => {\n            const on = l.href === current;\n            return (\n              <li key={l.href}>\n                <a href={safeHref(l.href)} aria-current={on ? \"page\" : undefined} onClick={() => choose(l.href)} className=\"relative flex items-center gap-3 rounded-[14px] px-4 py-3 text-[15px]\" style={{ color: on ? SKY.ink : SKY.ink2 }}>\n                  <span aria-hidden className=\"h-4 w-[2px] rounded-full\" style={{ background: on ? `linear-gradient(${p.core}, ${p.core2})` : \"transparent\", boxShadow: on ? `0 0 10px ${p.core}` : \"none\" }} />\n                  {l.label}\n                </a>\n              </li>\n            );\n          })}\n        </ul>\n      )}\n    </nav>\n  );\n}\n","type":"registry:component","target":"components/viberdy/aurora-flow-nav.tsx"}],"meta":{"tier":"free","tags":["navigation","navbar","indicator","aurora","glass","scroll spy"],"href":"https://viberdy.dev/library/aurora-flow-nav","aiPrompt":"Build a React + Tailwind nav, `AuroraFlowNav({ brand, links, cta, ctaVariant, active, defaultActive, onNavigate, palette })`.\n\nRegister --au-l and --au-r as <length> with @property. Inside the link list lay two spans across its full width near the bottom: a ghost (0.3 strength) and the band. Each holds a 2px line and a 16px ray layer above it (the same gradient, blurred 1.5px, masked by a fade upward intersected with repeating 2px threads), both painting linear-gradient(90deg, core, core2, blend, core2, core) at 200% width, sliding over 60s. Clip each span with clip-path: inset(0 calc(100% - var(--au-r)) 0 var(--au-l) round 2px). To place a band under a link, read the link's offsetLeft and offsetWidth (12px in from each side) and set both variables; when it moves right give --au-l 420ms and --au-r 240ms (the reverse when it moves left), so the leading edge goes first. Place the band in an effect keyed on the active link and on a ResizeObserver; the ghost from pointerenter, focus, leave and blur. Below @xl hide the list and show a Menu disclosure. The nav is a 60px pill of rgba(10,13,18,0.66) glass with a hairline.\n\nAurora grammar: a near-black night #050608 (panels #0a0d12, raised #0f141a; ink #ecf4f8 at 94/64/42%; hairlines at 8% and 16%). The light is real aurora, coloured by altitude: a core in mint #7cf5c4 drifting toward sky #38bdf8 on one shared 60s clock, a violet #a78bfa blend above it, a rose #f472b6 crown seen only in a strong display, and an indigo #5b6cc4 fringe under the lower border (palettes: boreal, verdant #6ee7a0, violet). Never a hue-rotate cycle, never full-saturation rainbow; colour is a function of position and altitude, blended through noise. Curtains have a bright lower border, rays that rise and fray, folds that brighten where a sheet turns edge-on, and stretches that are lit and gone; layers are phase-offset, never in unison. A static 2% dither against banding (not re-seeded). Text never sits on bare aurora: frosted glass (blur 14-18px) or the dark between curtains. Bricolage Grotesque through var(--font-bricolage, \"Bricolage Grotesque\", ...) at 600-650 for lit display type only, Geist for UI, Geist Mono uppercase captions. Radii 20-24px on panels, pills for controls. Motion: the 60s aurora clock, ambient drifts of 30s and longer, discrete hover or focus changes under 450ms, pointer chases that settle over 600-900ms (1 - e^(-4dt)); WebGL runs at 30fps and only on screen. Every CSS-animated glow is started where the clock already is (a negative animation-delay from performance.now()), so parts mounted at different moments stay in step. Nothing interpolated into the small static <style> each part renders; colours arrive as CSS variables. Respect prefers-reduced-motion (still sky, no chases). No dependencies beyond React.","license":"https://viberdy.dev/license"}}