/* Redesigned site header (Figma: home / Header, node 6755:4894).
   At 100% zoom the bar is 1100×64 with a 44px content row — same as Inspect.
   Width is fluid (max 1100px, side inset 16px) so it stays centered and
   scales with viewport / browser zoom; no hardcoded left offset. */

/* The legacy navbar is only hidden once header.js has run, so a blocked or
   failed script still leaves the old nav in place. */
.fl-redesign nav[class*="top-6"] {
  display: none !important;
}

.fl-header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--fl-page-gutter);
  box-sizing: border-box;
  font-family: var(--fl-font-sans);
  pointer-events: none;
}

.fl-header__pill {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  width: 100%;
  max-width: var(--fl-container);
  box-sizing: border-box;
  /* Logo keeps the 22px left inset from Figma. Book a Demo uses the same
     8px offset on top, bottom, and right so it sits equally in the cap. */
  padding: 8px 8px 8px 22px;
  border: 2px solid var(--fl-ink-80);
  border-radius: var(--fl-radius-pill);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow-lg);
}

/* Inner 1056×44 content row (1100 − 20px pad × 2 − 2px border × 2). */
.fl-header__row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  min-height: 44px;
}

/* Wordmark has no descenders — Figma places the 32px logo at y:3 in the
   44px row (3px above true center) so it optically matches the nav. */
.fl-header__logo {
  display: flex;
  align-items: center;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 3px;
}

.fl-header__logo img {
  display: block;
  width: 95px;
  height: 32px;
}

.fl-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  height: 32px;
}

/* Link chrome is 6×12; with gap 4 that yields ~28px between labels. */
.fl-header__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 12px;
  border-radius: var(--fl-radius-pill);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--fl-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.fl-header__link:hover,
.fl-header__link:focus-visible {
  color: var(--fl-text);
  background: var(--fl-ink-06);
}

/* CTA fills the 44px row: 8+24+8 text + 2+2 border = 44. */
.fl-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  height: 44px;
  padding: 8px 20px;
  border: 2px solid var(--fl-ink);
  border-radius: var(--fl-radius-pill);
  background: var(--fl-green);
  box-shadow: var(--fl-shadow-md);
  color: var(--fl-white);
  font-family: var(--fl-font-script);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.fl-header__cta:hover {
  background: var(--fl-green-dark);
  transform: translate(1px, 1px);
  box-shadow: var(--fl-shadow-sm);
}

.fl-header__cta:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* Mobile menu button: three bars, same pattern the previous navbar used. */
.fl-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--fl-radius-pill);
  background: transparent;
  cursor: pointer;
}

.fl-header__toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--fl-ink);
  transition: transform 0.2s ease, opacity 0.15s ease;
}

/* Bars are 2px tall with a 4px gap, so their centres sit 6px apart. */
.fl-header[data-open="true"] .fl-header__toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.fl-header[data-open="true"] .fl-header__toggle span:nth-child(2) {
  opacity: 0;
}

.fl-header[data-open="true"] .fl-header__toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* The panel stacks under the pill. It can outgrow a short viewport (browser
   zoom shrinks the CSS viewport), so cap it below the bar and let it scroll
   instead of running off screen. Panel top = 24 top + 64 pill + 12 gap. */
.fl-header__panel {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: var(--fl-container);
  max-height: calc(100vh - 124px);
  max-height: calc(100dvh - 124px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 12px;
  padding: 12px;
  box-sizing: border-box;
  border: 2px solid var(--fl-ink-80);
  border-radius: var(--fl-radius-card);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow-lg);
  pointer-events: auto;
}

.fl-header__panel .fl-header__link {
  padding: 12px;
  flex-shrink: 0;
  font-size: 16px;
}

/* The pill still shows a CTA down to 480px, so don't repeat it in the panel. */
.fl-header__panel .fl-header__cta {
  display: none;
}

.fl-header[data-open="true"] .fl-header__panel {
  display: flex;
}

@media (max-width: 1023px) {
  .fl-header__nav {
    display: none;
  }

  .fl-header__toggle {
    display: flex;
  }

  .fl-header__row {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .fl-header__cta {
    display: none;
  }

  .fl-header__panel .fl-header__cta {
    display: inline-flex;
    flex-shrink: 0;
    width: 100%;
    margin-top: 8px;
  }
}
