---
id: seed:archetypes/navigation
title: Site navigation / header archetypes
source_type: seed_archetype
priority: warm
---

The header is the single most-trafficked element on any site. Get it boring on purpose — surprise belongs lower on the page. Six working archetypes:

---

**Logo + links + CTA (default).** Logo on the left, 3–5 nav links centered or right-aligned, one primary CTA button on the far right. Mobile collapses links into a hamburger.

*Animation & Visual Details:*
- *Entrance*: Header fades in with translateY(-20px) → 0 on page load
- *Hover*: Nav links get gradient underline on hover (width 0% → 100%); CTA button scales slightly
- *Gradients*: Active nav link has gradient underline; CTA button has gradient background
- *Radial circles*: Small radial dot beside the logo
- *Scroll trigger*: None
- *JS interaction*: Mobile hamburger drawer with slide-in animation, backdrop blur overlay

```html
<header data-amb-section="site-header" class="site-header">
  <div class="container">
    <div class="site-header-inner">
      <a class="site-logo" href="/">
        <span class="site-logo-dot"></span>
        <span class="site-logo-text">Brand</span>
      </a>
      <nav class="site-nav" aria-label="Primary">
        <a class="site-nav-link" href="#">Product</a>
        <a class="site-nav-link" href="#">Pricing</a>
        <a class="site-nav-link" href="#">Docs</a>
        <a class="site-nav-link" href="#">Blog</a>
      </nav>
      <div class="site-header-actions">
        <a class="site-header-link" href="/login">Log in</a>
        <a class="cta-button cta-button--compact" href="/signup">Sign up</a>
      </div>
      <button class="site-hamburger" aria-label="Toggle menu" aria-expanded="false">
        <span class="site-hamburger-line"></span>
        <span class="site-hamburger-line"></span>
        <span class="site-hamburger-line"></span>
      </button>
    </div>
  </div>
  <div class="site-mobile-nav">
    <nav class="site-mobile-nav-links" aria-label="Mobile">
      <a class="site-mobile-nav-link" href="#">Product</a>
      <a class="site-mobile-nav-link" href="#">Pricing</a>
      <a class="site-mobile-nav-link" href="#">Docs</a>
      <a class="site-mobile-nav-link" href="#">Blog</a>
      <a class="site-mobile-nav-link" href="#">Log in</a>
      <a class="cta-button cta-button--full" href="/signup">Sign up</a>
    </nav>
  </div>
</header>
```

```css
:root {
  --header-height: 72px;
  --header-blur-bg: rgba(255,255,255,0.85);
}

.site-header {
  position: relative;
  height: var(--header-height);
  background: var(--header-blur-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.5);
  z-index: 100;
  opacity: 0;
  transform: translateY(-16px);
  animation: header-enter 0.5s ease-out 0.1s forwards;
}

@keyframes header-enter {
  to { opacity: 1; transform: translateY(0); }
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text, #1e293b);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent, #6366f1) 0%, rgba(99,102,241,0.5) 100%);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text, #64748b);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent, #6366f1), #7c3aed);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.site-nav-link:hover {
  color: var(--color-text, #1e293b);
  background: rgba(99,102,241,0.05);
}

.site-nav-link:hover::after {
  width: calc(100% - 32px);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-header-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted, #64748b);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-header-link:hover {
  color: var(--color-text, #1e293b);
  background: rgba(99,102,241,0.05);
}

.cta-button--compact {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.site-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.site-hamburger:hover {
  background: rgba(99,102,241,0.08);
}

.site-hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text, #1e293b);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-hamburger.is-active .site-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-hamburger.is-active .site-hamburger-line:nth-child(2) {
  opacity: 0;
}

.site-hamburger.is-active .site-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  z-index: 99;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-mobile-nav.is-open {
  transform: translateX(0);
}

.site-mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-mobile-nav-link {
  display: block;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text, #1e293b);
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.site-mobile-nav-link:hover {
  background: rgba(99,102,241,0.05);
}

.cta-button--full {
  display: block;
  text-align: center;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .site-nav, .site-header-actions {
    display: none;
  }
  .site-hamburger {
    display: flex;
  }
  .site-mobile-nav {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .site-mobile-nav {
    transition: none;
  }
}
```

*JS behavior:*
```javascript
const hamburger = document.querySelector('.site-hamburger');
const mobileNav = document.querySelector('.site-mobile-nav');

hamburger.addEventListener('click', () => {
  const isOpen = hamburger.classList.toggle('is-active');
  hamburger.setAttribute('aria-expanded', isOpen);
  mobileNav.classList.toggle('is-open', isOpen);
  document.body.style.overflow = isOpen ? 'hidden' : '';
});

// Close on link click
mobileNav.querySelectorAll('.site-mobile-nav-link').forEach(link => {
  link.addEventListener('click', () => {
    hamburger.classList.remove('is-active');
    hamburger.setAttribute('aria-expanded', 'false');
    mobileNav.classList.remove('is-open');
    document.body.style.overflow = '';
  });
});
```

---

**Sticky header.** Same shape, but `position: sticky; top: 0` with a `backdrop-filter: blur(8px)` background once the page has scrolled. Reveal on scroll-up, hide on scroll-down for long pages.

*Animation & Visual Details:*
- *Entrance*: Standard fade-in on page load
- *Hover*: Nav links get gradient underline; CTA button scales
- *Gradients*: CTA button has gradient background
- *Radial circles*: Radial glow behind logo appears on scroll
- *Scroll trigger*: Header background intensifies (opacity 0 → 1) after 50px scroll; hides on scroll-down, shows on scroll-up
- *JS interaction*: Scroll direction detection — header hides on scroll down past 100px, shows on scroll up

```css
.site-header--sticky {
  position: sticky;
  top: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.site-header--sticky.is-scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-header--sticky.is-hidden {
  transform: translateY(-100%);
}

.site-header--sticky.is-at-top {
  background: rgba(255,255,255,0.85);
}

.site-header--sticky .site-logo-dot {
  animation: none;
}

.site-header--sticky.is-scrolled .site-logo-dot {
  animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
```

*JS behavior:*
```javascript
const stickyHeader = document.querySelector('.site-header--sticky');
let lastScrollY = 0;
let ticking = false;

function updateHeader() {
  const scrollY = window.scrollY;
  const isAtTop = scrollY < 50;

  stickyHeader.classList.toggle('is-scrolled', scrollY > 50);
  stickyHeader.classList.toggle('is-at-top', isAtTop);

  if (scrollY > lastScrollY && scrollY > 100) {
    stickyHeader.classList.add('is-hidden');
  } else {
    stickyHeader.classList.remove('is-hidden');
  }

  lastScrollY = scrollY;
  ticking = false;
}

window.addEventListener('scroll', () => {
  if (!ticking) {
    requestAnimationFrame(updateHeader);
    ticking = true;
  }
}, { passive: true });
```

---

**Mega menu.** A nav link expands into a multi-column dropdown with links + product cards. Use only when you have a genuine product breadth problem (15+ pages worth navigating into); on a typical SaaS landing it's overkill.

*Animation & Visual Details:*
- *Entrance*: Dropdown fades in from opacity 0 + translateY(-8px), 0.25s ease-out
- *Hover*: Main nav link stays highlighted; dropdown has subtle radial glow at top center
- *Gradients*: Dropdown has gradient top border (accent colors); link cards have gradient hover background
- *Radial circles*: Radial glow at the top center of the dropdown pointing to the trigger link
- *Scroll trigger*: Not applicable (hover-triggered)
- *JS interaction*: Dropdown opens on hover with delayed close (200ms) to allow mouse travel to dropdown

```html
<header data-amb-section="site-header" class="site-header site-header--mega">
  <div class="container">
    <div class="site-header-inner">
      <a class="site-logo" href="/">Brand</a>
      <nav class="site-nav" aria-label="Primary">
        <div class="site-nav-item">
          <button class="site-nav-trigger" aria-expanded="false" aria-controls="product-menu">
            Product
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
          </button>
          <div class="site-mega-menu" id="product-menu">
            <div class="site-mega-menu-glow"></div>
            <div class="site-mega-menu-content">
              <div class="site-mega-menu-section">
                <h4 class="site-mega-menu-heading">Core</h4>
                <ul class="site-mega-menu-list">
                  <li><a class="site-mega-menu-link" href="#">
                    <span class="site-mega-menu-icon">
                      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
                    </span>
                    <span>
                      <strong>Fast Deploy</strong>
                      <small>Ship in minutes</small>
                    </span>
                  </a></li>
                  <li><a class="site-mega-menu-link" href="#">
                    <span class="site-mega-menu-icon">
                      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                    </span>
                    <span>
                      <strong>Analytics</strong>
                      <small>Real-time insights</small>
                    </span>
                  </a></li>
                </ul>
              </div>
              <div class="site-mega-menu-section">
                <h4 class="site-mega-menu-heading">Add-ons</h4>
                <ul class="site-mega-menu-list">
                  <li><a class="site-mega-menu-link" href="#">
                    <span class="site-mega-menu-icon">
                      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
                    </span>
                    <span>
                      <strong>Security</strong>
                      <small>SOC 2 certified</small>
                    </span>
                  </a></li>
                  <li><a class="site-mega-menu-link" href="#">
                    <span class="site-mega-menu-icon">
                      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
                    </span>
                    <span>
                      <strong>Team</strong>
                      <small>Collaborate</small>
                    </span>
                  </a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <a class="site-nav-link" href="#">Pricing</a>
        <a class="site-nav-link" href="#">Docs</a>
        <a class="site-nav-link" href="#">Blog</a>
      </nav>
      <div class="site-header-actions">
        <a class="site-header-link" href="#">Log in</a>
        <a class="cta-button cta-button--compact" href="#">Sign up</a>
      </div>
    </div>
  </div>
</header>
```

```css
.site-header--mega .site-nav-item {
  position: relative;
}

.site-nav-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted, #64748b);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav-trigger:hover,
.site-nav-trigger[aria-expanded="true"] {
  color: var(--color-text, #1e293b);
  background: rgba(99,102,241,0.05);
}

.site-nav-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.site-nav-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.site-mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 500px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 200;
}

.site-nav-item:hover .site-mega-menu,
.site-mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-mega-menu-glow {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.site-mega-menu-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.site-mega-menu-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.site-mega-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-mega-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.site-mega-menu-link:hover {
  background: rgba(99,102,241,0.05);
}

.site-mega-menu-link strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
}

.site-mega-menu-link small {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted, #64748b);
}

.site-mega-menu-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
  border-radius: 8px;
  flex-shrink: 0;
}

.site-mega-menu-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent, #6366f1);
}

@media (prefers-reduced-motion: reduce) {
  .site-mega-menu {
    transition: none;
  }
}
```

---

**Announcement bar.** Optional thin strip above the header for promos, new releases, or notices. Must be dismissible. Keep to one line of text.

*Animation & Visual Details:*
- *Entrance*: Slides down from translateY(-100%) on page load, 0.4s ease-out
- *Hover*: Dismiss button highlights
- *Gradients*: Announcement bar has subtle gradient background (accent at low opacity)
- *Radial circles*: None
- *Scroll trigger*: Not applicable
- *JS interaction*: Dismiss button with localStorage persistence, slide-out animation on dismiss

```html
<div class="announcement-bar" data-announcement-id="summer-sale">
  <div class="container">
    <div class="announcement-inner">
      <p class="announcement-text">
        <span class="announcement-icon">
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
        </span>
        Summer sale: 30% off all plans — ends August 31
        <a class="announcement-link" href="#">Shop now</a>
      </p>
      <button class="announcement-dismiss" aria-label="Dismiss announcement">
        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
      </button>
    </div>
  </div>
</div>
<header data-amb-section="site-header" class="site-header site-header--has-announcement">
```

```css
.announcement-bar {
  background: linear-gradient(90deg, rgba(99,102,241,0.08), rgba(124,58,237,0.08));
  border-bottom: 1px solid rgba(99,102,241,0.1);
  padding: 10px 0;
  opacity: 0;
  transform: translateY(-100%);
  animation: announcement-enter 0.4s ease-out 0.3s forwards;
}

@keyframes announcement-enter {
  to { opacity: 1; transform: translateY(0); }
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.announcement-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text, #1e293b);
}

.announcement-icon {
  display: flex;
  align-items: center;
}

.announcement-icon svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent, #6366f1);
}

.announcement-link {
  font-weight: 600;
  color: var(--color-accent, #6366f1);
  text-decoration: none;
}

.announcement-link:hover {
  text-decoration: underline;
}

.announcement-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.announcement-dismiss:hover {
  background: rgba(99,102,241,0.1);
  color: var(--color-accent, #6366f1);
}

.announcement-dismiss svg {
  width: 14px;
  height: 14px;
}

.site-header--has-announcement {
  margin-top: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .announcement-bar {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
```

*JS behavior:*
```javascript
const announcementBar = document.querySelector('.announcement-bar');
const dismissBtn = announcementBar.querySelector('.announcement-dismiss');
const announcementId = announcementBar.dataset.announcementId;

// Check if already dismissed
if (localStorage.getItem(`announcement-${announcementId}-dismissed`)) {
  announcementBar.style.display = 'none';
}

dismissBtn.addEventListener('click', () => {
  announcementBar.style.animation = 'announcement-exit 0.3s ease forwards';
  localStorage.setItem(`announcement-${announcementId}-dismissed`, 'true');
  setTimeout(() => {
    announcementBar.style.display = 'none';
    document.querySelector('.site-header--has-announcement').style.marginTop = '0';
  }, 300);
});
```

```css
@keyframes announcement-exit {
  to { opacity: 0; transform: translateY(-100%); }
}
```

---

**Glassmorphism nav.** Frosted glass effect with backdrop-blur, radial gradient glow behind the logo.

*Animation & Visual Details:*
- *Entrance*: Header fades in from opacity 0 with scale 0.98 → 1
- *Hover*: Nav links get gradient underline; logo radial glow intensifies on hover
- *Gradients*: Nav links use gradient underline on hover/active; CTA button has gradient background
- *Radial circles*: Large radial gradient glow behind the logo (accent color at 15% opacity)
- *Scroll trigger*: Background blur intensifies on scroll past 50px
- *JS interaction*: None

```css
.site-header--glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.site-header--glass .site-logo {
  position: relative;
}

.site-header--glass .site-logo::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.site-header--glass .site-logo:hover::before {
  opacity: 1;
}
```

---

**Scroll-triggered hide/show nav.** Header appears on scroll-up, hides on scroll-down. Creates a clean reading experience while preserving navigation access.

*Animation & Visual Details:*
- *Entrance*: Not applicable (scroll-driven)
- *Hover*: Nav links get gradient underline
- *Gradients*: CTA button has gradient background
- *Radial circles*: None
- *Scroll trigger*: Show on scroll-up > 50px, hide on scroll-down > 80px, always show at top of page
- *JS interaction*: Full scroll direction detection with state machine (visible/hidden/shown)

```css
.site-header--scroll-nav {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease, box-shadow 0.3s ease;
}

.site-header--scroll-nav.is-hidden {
  transform: translateY(-100%);
}

.site-header--scroll-nav.is-visible {
  transform: translateY(0);
}

.site-header--scroll-nav.is-scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
```

*JS behavior:*
```javascript
const scrollNav = document.querySelector('.site-header--scroll-nav');
let lastScrollY = 0;
let ticking = false;
let isHidden = false;
let isAtTop = true;

function updateScrollNav() {
  const scrollY = window.scrollY;

  isAtTop = scrollY < 50;
  scrollNav.classList.toggle('is-scrolled', !isAtTop);

  if (scrollY > lastScrollY && scrollY > 80 && !isHidden) {
    scrollNav.classList.remove('is-visible');
    scrollNav.classList.add('is-hidden');
    isHidden = true;
  } else if (scrollY < lastScrollY && isHidden) {
    scrollNav.classList.add('is-visible');
    scrollNav.classList.remove('is-hidden');
    isHidden = false;
  }

  if (isAtTop) {
    scrollNav.classList.add('is-visible');
    scrollNav.classList.remove('is-hidden');
    isHidden = false;
  }

  lastScrollY = scrollY;
  ticking = false;
}

window.addEventListener('scroll', () => {
  if (!ticking) {
    requestAnimationFrame(updateScrollNav);
    ticking = true;
  }
}, { passive: true });

// Initialize
scrollNav.classList.add('is-visible');
```

---

Copy rules: nav link order matters — visitor's natural exploration order, not org-chart order. Typical: Product → Pricing → Customers → Docs → Blog. Never have "Home" as the first link; the logo IS Home. CTA in the header should be the LOWER commitment ("Sign up free"), not the higher commitment ("Talk to sales").

Layout rules: never use this section if the page has a header template attached — the template owns the masthead. The hero section MUST NOT contain a `<header>` either; that's a separate sibling section.

CSS custom property summary:
```css
:root {
  --header-height: 72px;
  --color-accent: #6366f1;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
}
```