Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Site: the nav stays on screen, solid over the hero and then a floating bar

Eric Brownroutc3041ba9f534
diff --git a/site/content/home.html b/site/content/home.html
index bc8c2ef7..2752f499 100644
--- a/site/content/home.html
+++ b/site/content/home.html
@@ -12,7 +12,10 @@
})();
</script><link href="/marketing/site.css" rel="stylesheet"/><link href="/marketing/headline.css" rel="stylesheet"/><meta content="Yogurt" property="og:site_name"/><meta content="website" property="og:type"/><meta content="https://yogurt.so/" property="og:url"/><meta content="Yogurt · AI meeting notes that stay on your computer" property="og:title"/><meta content="Yogurt takes meeting notes with AI that runs locally on Mac, Windows and Linux. No bot joins the call. Free and open source." property="og:description"/><meta content="https://yogurt.so/marketing/assets/og-image.png" property="og:image"/><meta content="1200" property="og:image:width"/><meta content="630" property="og:image:height"/><meta content="Yogurt logo, Private AI meeting notes, and the app’s meeting summary." property="og:image:alt"/><meta content="summary_large_image" name="twitter:card"/><meta content="Yogurt · AI meeting notes that stay on your computer" name="twitter:title"/><meta content="Yogurt takes meeting notes with AI that runs locally on Mac, Windows and Linux. No bot joins the call. Free and open source." name="twitter:description"/><meta content="https://yogurt.so/marketing/assets/og-image.png" name="twitter:image"/><meta content="Yogurt logo, Private AI meeting notes, and the app’s meeting summary." name="twitter:image:alt"/><script>window.va=window.va||function(){(window.vaq=window.vaq||[]).push(arguments)};</script><script defer src="/_vercel/insights/script.js"></script></head>
<body id="top" tabindex="-1" data-background="ribbon" data-demo="transcript" data-letter="plain" data-motion="flow" data-source="sample"><a class="skip" href="#main">Skip to content</a>
+<div class="sticky-header">
+ <div class="nav-surface" aria-hidden="true"><i></i><i></i><i></i></div>
<header class="site-header"><a aria-label="Yogurt home" class="wordmark" href="#main"><img alt="yogurt" height="30" src="/marketing/assets/wordmark.svg" width="108"/></a><nav aria-label="Main navigation"><button aria-label="Switch to dark mode" aria-pressed="false" class="theme-toggle" hidden="" type="button"><svg aria-hidden="true" class="theme-moon" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24"><path d="M20.9 13A9 9 0 0 1 11 3.1 9 9 0 1 0 20.9 13Z"></path></svg><svg aria-hidden="true" class="theme-sun" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.7" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2m0 16v2M2 12h2m16 0h2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"></path></svg></button><a aria-label="Yogurt on GitHub, {{stars}} stars" class="nav-stars" href="https://github.com/FrigadeHQ/yogurt/stargazers" title="Yogurt on GitHub" target="_blank" rel="noopener noreferrer"><svg aria-hidden="true" fill="currentColor" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"></path></svg><span>{{navStars}}</span></a><a class="button secondary nav-download" data-download="" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-mac-arm64.dmg">Download</a></nav></header>
+</div>
<main id="main" tabindex="-1"><section aria-labelledby="headline" class="hero"><div class="hero-copy"><span aria-label="Frigade, the team behind Yogurt, is backed by Y Combinator" class="yc-pill" role="img"><span aria-hidden="true" class="yc-mark"><svg fill="none" viewBox="0 0 10 12"><path d="M2 2 5 6.5 8 2M5 6.5V10" stroke="currentColor" stroke-linecap="square" stroke-width="1.5"></path></svg></span>Backed by Y Combinator</span><h1 aria-label="Take note." id="headline"><span aria-hidden="true" class="headline-visual"><span class="headline-take">Take</span> <span class="headline-word plain-word">note.</span></span></h1><p><span>Private AI meeting notes.</span> <span>Free and open source.</span> <span class="hero-wrap">Because your business should never be anyone else’s.</span></p><div class="hero-actions"><a class="button primary" data-download="" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-mac-arm64.dmg" id="download"><svg aria-hidden="true" fill="currentColor" viewBox="0 0 24 24"><path d="M17.1 12.3c0-2.6 2.2-3.9 2.3-4-1.3-1.9-3.2-2.1-3.9-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.6 2.7-2 3.4-.5 8.4 1.4 11.1.9 1.3 2 2.7 3.4 2.6 1.3 0 1.9-.8 3.5-.8s2.1.8 3.5.8c1.5 0 2.4-1.3 3.3-2.6 1.1-1.5 1.5-3 1.5-3.1-.1 0-2.6-1-2.6-3.7ZM14.4 4.5c.8-1 1.4-2.3 1.2-3.5-1.2.1-2.6.8-3.4 1.7-.7.8-1.4 2.2-1.2 3.4 1.3.1 2.6-.7 3.4-1.6Z"></path></svg><span data-download-label="">Download for Mac</span></a><button aria-controls="demo-dialog" aria-haspopup="dialog" class="button secondary demo-play" type="button"><svg aria-hidden="true" fill="none" viewBox="0 0 16 16"><path d="m5 3 8 5-8 5Z" stroke="currentColor" stroke-linejoin="round"></path></svg>Watch demo</button><span class="download-requirements"><span class="download-alternatives">Also for <a aria-label="Download for Windows" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-windows-x64.exe">Windows</a> and <a aria-label="Download for Linux" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-linux-x86_64.AppImage">Linux</a></span></span></div></div>
<div class="product-stage"><div aria-hidden="true" class="backdrop ribbon"><svg class="signal-wings" fill="none" preserveaspectratio="none" viewbox="0 0 1600 650"><defs>
<lineargradient gradientunits="userSpaceOnUse" id="ribbon-purple" x1="0" x2="800" y1="0" y2="325"><stop stop-color="#9b65f5"></stop><stop offset=".5" stop-color="#7940e7"></stop><stop offset="1" stop-color="#b189fc"></stop></lineargradient>
@@ -1072,5 +1075,7 @@
<svg class="footer-dock-lockup" aria-hidden="true" viewBox="3.25 9.7307 287.034 57.5093"><path fill="#fff" transform="translate(0 5) scale(.65)" d="M21.528 8.111Q25.000 7.278 30.000 7.278L30.000 7.278Q35.000 7.278 45.833 7.833L56.667 8.389L56.667 8.389L56.111 20.056Q55.556 31.722 54.861 34.222L54.861 34.222Q54.167 36.722 53.472 37.556L53.472 37.556Q52.778 38.389 51.528 39.083L51.528 39.083Q50.278 39.778 44.028 40.889L44.028 40.889Q37.778 42.000 36.111 43.250L36.111 43.250Q34.444 44.500 33.889 45.750L33.889 45.750Q33.333 47.000 33.472 48.806L33.472 48.806Q33.611 50.611 34.583 52.417L34.583 52.417Q35.556 54.222 37.361 55.889L37.361 55.889Q39.167 57.556 40.694 58.250L42.222 58.944L42.222 58.944L42.361 59.778Q42.500 60.611 42.500 62.278L42.500 63.944L42.500 63.944L41.250 63.944Q40.000 63.944 35.139 62.972L35.139 62.972Q30.278 62.000 25.556 60.056L25.556 60.056Q20.833 58.111 18.194 56.306L18.194 56.306Q15.556 54.500 13.611 52.556L13.611 52.556Q11.667 50.611 10.278 48.667L10.278 48.667Q8.889 46.722 7.500 43.389L7.500 43.389Q6.111 40.056 5.556 36.861L5.556 36.861Q5.000 33.667 5.000 31.167L5.000 31.167Q5.000 28.667 5.417 26.028L5.417 26.028Q5.833 23.389 6.944 20.611L6.944 20.611Q8.056 17.833 9.444 15.889L9.444 15.889Q10.833 13.944 12.639 12.417L12.639 12.417Q14.444 10.889 16.250 9.917L16.250 9.917Q18.056 8.944 21.528 8.111L21.528 8.111Z M66.250 33.944Q68.611 33.667 72.639 33.667L72.639 33.667Q76.667 33.667 79.028 34.083L79.028 34.083Q81.389 34.500 83.889 35.611L83.889 35.611Q86.389 36.722 88.611 38.667L88.611 38.667Q90.833 40.611 92.083 42.694L92.083 42.694Q93.333 44.778 93.889 46.444L93.889 46.444Q94.444 48.111 94.861 51.306L94.861 51.306Q95.278 54.500 95.139 57.972L95.139 57.972Q95.000 61.444 94.444 64.222L94.444 64.222Q93.889 67.000 92.083 71.306L92.083 71.306Q90.278 75.611 89.028 77.278L89.028 77.278Q87.778 78.944 85.694 81.028L85.694 81.028Q83.611 83.111 80.694 85.194L80.694 85.194Q77.778 87.278 75.556 88.389L75.556 88.389Q73.333 89.500 71.111 90.333L71.111 90.333Q68.889 91.167 65.833 91.861L65.833 91.861Q62.778 92.556 59.028 92.833L55.278 93.111L55.278 93.111L55.278 89.222L55.278 89.222L56.944 88.528Q58.611 87.833 60.972 85.889L60.972 85.889Q63.333 83.944 64.444 81.722L64.444 81.722Q65.556 79.500 65.417 77.417L65.417 77.417Q65.278 75.333 64.722 74.639L64.722 74.639Q64.167 73.944 63.194 73.528L63.194 73.528Q62.222 73.111 56.667 72.972L56.667 72.972Q51.111 72.833 50.139 72.556L50.139 72.556Q49.167 72.278 48.472 71.583L48.472 71.583Q47.778 70.889 47.361 66.861L47.361 66.861Q46.944 62.833 46.944 57.833L46.944 57.833Q46.944 52.833 47.222 51.167L47.222 51.167Q47.500 49.500 48.611 46.722L48.611 46.722Q49.722 43.944 51.944 41.306L51.944 41.306Q54.167 38.667 56.667 37.139L56.667 37.139Q59.167 35.611 61.528 34.917L61.528 34.917Q63.889 34.222 66.250 33.944L66.250 33.944Z" filter="url(#footer-icon-mark-shadow)"/><path fill="#FBFAFF" transform="translate(82 55) scale(.068 -.068)" d="M265 -179Q225 -179 184.0 -171.0Q143 -163 107.5 -146.5Q72 -130 48 -104L91 0Q120 -33 166.0 -50.0Q212 -67 259 -67Q314 -67 350.0 -44.5Q386 -22 405.0 25.0Q424 72 426 142L433 237H412Q402 169 379.0 126.5Q356 84 321.5 64.5Q287 45 241 45Q184 45 145.0 74.0Q106 103 86.5 160.0Q67 217 67 301V523H194V330Q194 236 217.0 193.5Q240 151 287 151Q312 151 333.0 164.5Q354 178 368.5 203.5Q383 229 391.5 267.0Q400 305 401 354V523H528V137Q528 74 517.5 23.5Q507 -27 486.0 -64.5Q465 -102 433.5 -128.0Q402 -154 360.0 -166.5Q318 -179 265 -179ZM875 -13Q798 -13 739.0 18.5Q680 50 646.5 111.5Q613 173 613 263Q613 355 647.5 415.5Q682 476 741.0 506.0Q800 536 874 536Q951 536 1010.0 505.0Q1069 474 1103.0 412.5Q1137 351 1137 260Q1137 168 1103.0 107.0Q1069 46 1009.5 16.5Q950 -13 875 -13ZM880 83Q922 83 951.0 102.5Q980 122 995.5 161.0Q1011 200 1011 254Q1011 311 994.5 351.5Q978 392 947.5 414.0Q917 436 871 436Q831 436 801.0 416.5Q771 397 755.5 359.0Q740 321 740 265Q740 177 777.5 130.0Q815 83 880 83ZM1428 -180Q1343 -180 1288.5 -167.0Q1234 -154 1208.0 -128.0Q1182 -102 1182 -64Q1182 -18 1218.5 11.5Q1255 41 1327 48V68Q1273 67 1245.0 79.5Q1217 92 1217 120Q1217 147 1244.5 168.0Q1272 189 1336 203V223Q1275 226 1241.0 261.5Q1207 297 1207 354Q1207 405 1235.0 444.0Q1263 483 1317.5 505.5Q1372 528 1450 528H1709V428L1545 452V430Q1607 420 1636.5 395.0Q1666 370 1666 327Q1666 286 1640.0 254.5Q1614 223 1564.5 205.5Q1515 188 1445 188Q1432 188 1417.0 189.0Q1402 190 1370 194Q1349 179 1336.0 167.5Q1323 156 1323 146Q1323 138 1333.0 132.5Q1343 127 1359.0 125.0Q1375 123 1390 123H1529Q1549 123 1580.5 120.0Q1612 117 1643.5 104.0Q1675 91 1696.5 63.0Q1718 35 1718 -16Q1718 -73 1685.5 -109.5Q1653 -146 1588.5 -163.0Q1524 -180 1428 -180ZM1439 -78Q1501 -78 1538.0 -71.0Q1575 -64 1591.0 -48.5Q1607 -33 1607 -9Q1607 13 1597.0 25.5Q1587 38 1571.5 43.0Q1556 48 1540.0 49.0Q1524 50 1513 50H1390Q1342 43 1322.5 23.0Q1303 3 1303 -21Q1303 -45 1319.0 -57.5Q1335 -70 1365.5 -74.0Q1396 -78 1439 -78ZM1442 257Q1494 257 1521.0 281.5Q1548 306 1548 346Q1548 389 1520.5 416.5Q1493 444 1441 444Q1389 444 1360.5 417.0Q1332 390 1332 348Q1332 321 1344.5 300.5Q1357 280 1381.5 268.5Q1406 257 1442 257ZM1968 -13Q1878 -13 1832.5 48.5Q1787 110 1787 235V523H1914V249Q1914 170 1938.0 131.0Q1962 92 2012 92Q2041 92 2063.0 106.5Q2085 121 2101.0 147.5Q2117 174 2126.5 209.0Q2136 244 2138 286V523H2264V215V0H2160L2162 165H2144Q2131 102 2107.5 63.0Q2084 24 2050.0 5.5Q2016 -13 1968 -13ZM2381 0V262V523H2487L2485 343H2503Q2512 407 2531.0 449.5Q2550 492 2584.0 513.5Q2618 535 2668 535Q2678 535 2689.5 534.0Q2701 533 2715 529L2710 396Q2694 402 2677.5 404.5Q2661 407 2647 407Q2608 407 2579.5 387.0Q2551 367 2533.5 330.5Q2516 294 2507 244V0ZM2961 -12Q2878 -12 2839.0 32.5Q2800 77 2800 171V422H2723L2725 522H2776Q2805 522 2819.0 531.0Q2833 540 2836 563L2848 639H2921V523H3059V418H2921V176Q2921 139 2938.5 122.0Q2956 105 2991 105Q3010 105 3028.5 109.5Q3047 114 3063 125V5Q3032 -5 3006.5 -8.5Q2981 -12 2961 -12Z"/></svg></a><div class="footer-main"><div class="footer-brand"><div><p>Private AI meeting notes.<br/>Free and open source.</p><a data-download class="button secondary footer-download" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-mac-arm64.dmg"><svg aria-hidden="true" fill="currentColor" viewbox="0 0 24 24"><path d="M17.1 12.3c0-2.6 2.2-3.9 2.3-4-1.3-1.9-3.2-2.1-3.9-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.6 2.7-2 3.4-.5 8.4 1.4 11.1.9 1.3 2 2.7 3.4 2.6 1.3 0 1.9-.8 3.5-.8s2.1.8 3.5.8c1.5 0 2.4-1.3 3.3-2.6 1.1-1.5 1.5-3 1.5-3.1-.1 0-2.6-1-2.6-3.7ZM14.4 4.5c.8-1 1.4-2.3 1.2-3.5-1.2.1-2.6.8-3.4 1.7-.7.8-1.4 2.2-1.2 3.4 1.3.1 2.6-.7 3.4-1.6Z"></path></svg><span data-download-label>Download for Mac</span></a><span class="download-requirements"><span data-requirements><span>macOS 14.4+</span> · <span>Apple Silicon (M1+)</span></span><span class="download-alternatives">Also for <a aria-label="Download for Windows" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-windows-x64.exe">Windows</a> and <a aria-label="Download for Linux" href="https://github.com/FrigadeHQ/yogurt/releases/latest/download/Yogurt-linux-x86_64.AppImage">Linux</a></span></span></div></div><div class="footer-column"><h3>Yogurt</h3><a href="#how-it-works"><span class="footer-link-label">How it works</span><svg class="footer-link-arrow" width="12" height="12" viewBox="0 0 14 14" aria-hidden="true" fill="none"><path d="m5 3 4 4-4 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.4"/></svg></a><a href="#privacy"><span class="footer-link-label">Privacy</span><svg class="footer-link-arrow" width="12" height="12" viewBox="0 0 14 14" aria-hidden="true" fill="none"><path d="m5 3 4 4-4 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.4"/></svg></a><a href="#questions"><span class="footer-link-label">FAQ</span><svg class="footer-link-arrow" width="12" height="12" viewBox="0 0 14 14" aria-hidden="true" fill="none"><path d="m5 3 4 4-4 4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.4"/></svg></a></div><div class="footer-column"><h3>Open source</h3><a href="https://github.com/FrigadeHQ/yogurt" target="_blank" rel="noopener noreferrer"><span class="footer-link-label">Source code</span><span class="footer-link-arrow" aria-hidden="true">↗</span></a><a href="https://github.com/FrigadeHQ/yogurt/releases" target="_blank" rel="noopener noreferrer"><span class="footer-link-label">Releases</span><span class="footer-link-arrow" aria-hidden="true">↗</span></a><a href="https://github.com/FrigadeHQ/yogurt/issues" target="_blank" rel="noopener noreferrer"><span class="footer-link-label">Feedback</span><span class="footer-link-arrow" aria-hidden="true">↗</span></a></div></div><div class="footer-bottom"><span>© 2026 Frigade</span><div><a aria-label="Made by Frigade — visit Frigade" class="made-by" href="https://frigade.com?utm_source=yogurt&amp;utm_medium=site" rel="noopener noreferrer" target="_blank"><span>Made by</span><img alt="Frigade" height="26" src="/marketing/assets/frigade-logo.svg" width="76"/></a></div></div></footer>
<dialog aria-label="Yogurt demo" class="demo-dialog site-dialog" id="demo-dialog"><div class="demo-player"><button aria-label="Close video" class="demo-close" data-dialog-close="" type="button"><svg aria-hidden="true" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2.25" viewBox="0 0 24 24"><path d="m6 6 12 12M18 6 6 18"></path></svg></button><video aria-label="Yogurt product demo" controls="" data-poster="/marketing/assets/demo-poster.webp" data-src="/marketing/assets/demo.mp4" id="demo-video" playsinline="" preload="none"></video></div><div class="demo-video-message"><p aria-live="polite" id="demo-video-status" role="status"></p><button class="button secondary" hidden="" id="demo-retry" type="button">Retry</button></div></dialog>
<script type="module" src="/marketing/demo-video.mjs"></script>
-<script src="/marketing/theme.mjs" type="module"></script><script src="/marketing/downloads.mjs" type="module"></script><script src="/marketing/hero-entry.mjs" type="module"></script><script src="/marketing/hero-transcript.mjs" type="module"></script><script src="/marketing/ribbons.mjs" type="module"></script><script src="/marketing/walkthrough.mjs" type="module"></script><script src="/marketing/footer.mjs" type="module"></script><script type="module" src="/marketing/reserve.mjs"></script>
+<script src="/marketing/theme.mjs" type="module"></script><script src="/marketing/downloads.mjs" type="module"></script>
+<script src="/marketing/navigation.mjs" type="module"></script>
+<script src="/marketing/hero-entry.mjs" type="module"></script><script src="/marketing/hero-transcript.mjs" type="module"></script><script src="/marketing/ribbons.mjs" type="module"></script><script src="/marketing/walkthrough.mjs" type="module"></script><script src="/marketing/footer.mjs" type="module"></script><script type="module" src="/marketing/reserve.mjs"></script>
<script type="module" src="/marketing/features.mjs"></script><script type="module" src="/marketing/activity.mjs"></script></body></html>
\ No newline at end of file
diff --git a/site/package.json b/site/package.json
index 69447adf..6878d1e9 100644
--- a/site/package.json
+++ b/site/package.json
@@ -9,7 +9,7 @@
"site:bundle": "node scripts/bundle.mjs",
"site:stars": "node scripts/stars-snapshot.mjs --save",
"site:stills": "node scripts/stills.mjs",
- "test": "node renderer/timeline.test.mjs && node scripts/ribbon-geometry.test.mjs && node scripts/hero-entry.test.mjs && node scripts/headline.test.mjs && node scripts/theme.test.mjs && node scripts/stars.test.mjs && node scripts/walkthrough.test.mjs && node scripts/features.test.mjs"
+ "test": "node renderer/timeline.test.mjs && node scripts/ribbon-geometry.test.mjs && node scripts/hero-entry.test.mjs && node scripts/headline.test.mjs && node scripts/theme.test.mjs && node scripts/stars.test.mjs && node scripts/walkthrough.test.mjs && node scripts/features.test.mjs && node scripts/navigation.test.mjs"
},
"dependencies": {
"next": "16.4.5",
diff --git a/site/public/marketing/navigation.mjs b/site/public/marketing/navigation.mjs
new file mode 100644
index 00000000..f79d787a
--- /dev/null
+++ b/site/public/marketing/navigation.mjs
@@ -0,0 +1,98 @@
+const shell = document.querySelector('.sticky-header')
+const header = shell.querySelector('.site-header')
+const wordmark = header.querySelector('.wordmark')
+const nav = header.querySelector('nav')
+const toggle = nav.querySelector('.theme-toggle')
+const hero = document.querySelector('.hero')
+const [left, middle, right] = shell.querySelector('.nav-surface').children
+const reduced = matchMedia('(prefers-reduced-motion: reduce)')
+let geometry, position = 0, velocity = 0, target = 0, frame = 0, lastTime = 0
+
+function paint() {
+ const { width, height, inset, pillHeight, pillTop, logoShift, navShift } = geometry
+ const surfaceHeight = height + 1 + (pillHeight - height - 1) * position
+ const scale = surfaceHeight / height
+ const top = -1 + (pillTop + 1) * position
+ const endX = -(height + 1) / 2 * (1 - position) + inset * position
+ const seam = endX + surfaceHeight / 2
+ // Cover both antialiased joins so the page cannot show through the pill.
+ left.style.transform = `translate(${endX}px, ${top}px) scale(${scale})`
+ middle.style.transform = `translate(${seam - 2}px, ${top}px) scale(${width - 2 * seam + 4}, ${scale})`
+ right.style.transform = `translate(${width - seam}px, ${top}px) scale(${scale})`
+ const dy = (pillTop + (pillHeight - height) / 2) * position
+ wordmark.style.transform = `translate(${logoShift * position}px, ${dy}px)`
+ nav.style.transform = `translate(${navShift * position}px, ${dy}px)`
+}
+
+function settle() {
+ cancelAnimationFrame(frame)
+ frame = lastTime = velocity = 0
+ position = target
+ paint()
+}
+
+function tick(now) {
+ let elapsed = lastTime ? Math.min((now - lastTime) / 1000, .048) : 1 / 60
+ lastTime = now
+ // Short integration steps keep the spring stable when a frame runs late.
+ while (elapsed > .0001) {
+ const step = Math.min(elapsed, .006)
+ velocity += ((target - position) * 310 - velocity * 27.5) * step
+ position += velocity * step
+ elapsed -= step
+ }
+ if (Math.abs(position - target) < .00016 && Math.abs(velocity) < .004) {
+ settle()
+ return
+ }
+ paint()
+ frame = requestAnimationFrame(tick)
+}
+
+function update(immediate = false) {
+ shell.toggleAttribute('data-scrolled', scrollY > 1)
+ // A small dead band keeps trackpad jitter at the hero edge from reversing the spring.
+ target = Number(scrollY >= geometry.threshold - (target ? 12 : 0))
+ if (immediate) settle()
+ else if (position !== target || frame) {
+ if (reduced.matches || document.hidden) settle()
+ else if (!frame) frame = requestAnimationFrame(tick)
+ }
+}
+
+function measure() {
+ const { left, right, height } = header.getBoundingClientRect()
+ const width = shell.clientWidth
+ const phone = matchMedia('(max-width: 760px)').matches
+ const pad = phone ? 10 : 14
+ // The theme toggle is absolutely positioned just before the links.
+ const controlsWidth = nav.offsetWidth - Math.min(0, toggle.offsetLeft)
+ const pillWidth = Math.min(width - 8, 2 * pad + wordmark.offsetWidth + (phone ? 12 : 26) + controlsWidth)
+ const inset = (width - pillWidth) / 2
+ geometry = {
+ width, height, inset, pillTop: phone ? 8 : 10, pillHeight: phone ? 48 : 52,
+ logoShift: inset + pad - left, navShift: width - inset - pad - right,
+ threshold: hero.getBoundingClientRect().bottom + scrollY - height,
+ }
+ update(true)
+}
+
+measure()
+shell.toggleAttribute('data-ready', true)
+const resize = new ResizeObserver(measure)
+for (const el of [shell, header, wordmark, toggle, nav, hero]) resize.observe(el)
+window.addEventListener('scroll', () => update(), { passive: true })
+window.addEventListener('pageshow', measure)
+document.addEventListener('visibilitychange', () => update(true))
+reduced.addEventListener('change', () => update(true))
+document.addEventListener('focusin', ({ target }) => {
+ if (shell.contains(target) || target.closest('dialog, .skip') || !target.matches(':focus-visible')) return
+ requestAnimationFrame(() => {
+ if (document.activeElement !== target) return
+ const { top, bottom, height } = target.getBoundingClientRect()
+ const clearance = geometry.height + 8
+ if (bottom > 0 && top < clearance && height <= innerHeight - clearance) {
+ scrollBy({ top: top - clearance, behavior: 'instant' })
+ }
+ })
+})
diff --git a/site/public/marketing/site.css b/site/public/marketing/site.css
index 0c9c782a..3d666b29 100644
--- a/site/public/marketing/site.css
+++ b/site/public/marketing/site.css
@@ -1314,6 +1314,8 @@ body[data-background=ribbon] .hero-copy{padding-bottom:70px}
/* Shared dimensions between the navigation, hero and meeting window. */
:root {
--content-width: min(76vw, 1200px);
+ --nav-height: 80px;
+ scroll-padding-top: calc(var(--nav-height) + 8px);
--page: #fff;
--panel: #f6f6f6;
--hairline: #e6e6e8;
@@ -1327,10 +1329,33 @@ body[data-background=ribbon] .hero-copy{padding-bottom:70px}
--reading: #a7a4ad;
--link: var(--accent);
}
+.sticky-header {
+ position: sticky;
+ top: 0;
+ z-index: 9;
+ pointer-events: none;
+}
+.sticky-header:not([data-ready]) { background: var(--page); }
+.nav-surface { position: absolute; inset: 0; overflow: clip; }
+.nav-surface i {
+ position: absolute;
+ inset: 0 auto 0 0;
+ width: calc(var(--nav-height) / 2);
+ background: var(--page);
+ border: 1px solid transparent;
+ transform-origin: top left;
+ pointer-events: auto;
+}
+.sticky-header[data-scrolled] .nav-surface i { border-color: var(--hairline); }
+.nav-surface i:first-child { border-right: 0; border-radius: 100% 0 0 100% / 50% 0 0 50%; }
+.nav-surface i:nth-child(2) { width: 1px; border-inline: 0; }
+.nav-surface i:last-child { border-left: 0; border-radius: 0 100% 100% 0 / 0 50% 50% 0; }
+.sticky-header :is(a, button, summary, .mobile-download-list) { pointer-events: auto; }
.site-header {
+ position: relative;
width: var(--content-width);
max-width: none;
- height: 80px;
+ height: var(--nav-height);
padding-inline: 0;
}
.site-header nav {
@@ -1430,9 +1455,7 @@ body[data-background=ribbon] .hero-copy{padding-bottom:70px}
@media (max-width: 760px) {
:root {
--content-width: calc(100% - 40px);
- }
- .site-header {
- height: 72px;
+ --nav-height: 72px;
}
.site-header nav {
gap: 10px;
diff --git a/site/scripts/navigation.test.mjs b/site/scripts/navigation.test.mjs
new file mode 100644
index 00000000..afe4ce67
--- /dev/null
+++ b/site/scripts/navigation.test.mjs
@@ -0,0 +1,55 @@
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import vm from 'node:vm'
+
+const source = readFileSync(new URL('../public/marketing/navigation.mjs', import.meta.url), 'utf8')
+for (const width of [1280, 390, 320]) {
+ const phone = width < 761, height = phone ? 72 : 80
+ const wordmark = { offsetWidth: phone ? 92 : 108, style: {} }
+ const toggle = { offsetLeft: -44 }
+ const nav = { offsetWidth: 130, style: {}, querySelector: () => toggle }
+ const header = {
+ getBoundingClientRect: () => ({ left: 16, right: width - 16, height }),
+ querySelector: selector => selector === 'nav' ? nav : wordmark,
+ }
+ const surface = { children: Array.from({ length: 3 }, () => ({ style: {} })) }
+ const shell = { clientWidth: width, toggleAttribute() {}, querySelector: s => s === '.site-header' ? header : surface }
+ let scroll, motionChange, frame, now = 0, reduced = false
+ const context = {
+ scrollY: 0, document: { querySelector: s => s === '.sticky-header' ? shell : hero, addEventListener() {} },
+ window: { addEventListener(name, cb) { if (name === 'scroll') scroll = cb } },
+ matchMedia: query => query.includes('reduce')
+ ? { get matches() { return reduced }, addEventListener(_, cb) { motionChange = cb } }
+ : { matches: phone },
+ ResizeObserver: class { observe() {} },
+ requestAnimationFrame(cb) { frame = cb; return 1 },
+ cancelAnimationFrame() { frame = null },
+ }
+ const hero = { getBoundingClientRect: () => ({ bottom: 1000 - context.scrollY }) }
+ vm.runInNewContext(source, context)
+ const original = wordmark.style.transform
+ const advance = () => { const next = frame; frame = null; next(now += 16) }
+ const move = y => { context.scrollY = y; scroll() }
+ move(1000 - height - 1)
+ assert(!frame, 'the full header stays still over the app')
+ move(1000 - height)
+ advance()
+ assert.notEqual(wordmark.style.transform, original)
+ move(0)
+ for (let i = 0; frame && i < 120; i++) advance()
+ assert(!frame, 'an interrupted morph stops scheduling frames when settled')
+ assert.equal(wordmark.style.transform, original)
+ move(1000)
+ advance()
+ reduced = true
+ motionChange()
+ const compact = wordmark.style.transform
+ assert.notEqual(compact, original)
+ assert(!frame, 'enabling reduced motion finishes the current morph')
+ move(1000 - height - 5)
+ assert.equal(wordmark.style.transform, compact, 'nearby scroll jitter keeps the same state')
+ move(0)
+ assert.equal(wordmark.style.transform, original)
+ assert(!frame, 'reduced motion changes states immediately')
+}
+console.log('Sticky navigation threshold, reversal, settling and reduced motion passed at desktop and phone widths.')