/*
 * Site header — Figma "Website" file, node 4194:549 (homepage desktop 1440) and
 * 4267:967 (homepage mobile 393); 4482:1919 / 4484:4325 for the light variant
 * the supporting pages use.
 *
 * On the homepage the bar is transparent and sits over the hero photo; a dark
 * scrim fades down from the top edge so the wordmark and links stay legible on
 * any photo. The supporting pages (/faqs, /validation, /privacy-notice,
 * /terms-of-service) add `.site-header--light` for the solid white bar in
 * Figma 4482:1919 — see the variant block below. This file owns the header on
 * every page; css/navigation.css is gone.
 *
 * Units: rem, like the rest of the site (1rem = 1px at the design widths, see
 * the <style> block in index.html). Breakpoint 992px matches the site's
 * "medium" collapse: below it the links move into a right-hand drawer.
 *
 * Fonts: Inter throughout, as in Figma — the bar has no display type. The
 * shared .button-pill sets Inter itself so it travels with the component.
 */

.site-header {
  --header-fg: #ebebeb;
  --header-fg-muted: rgba(255, 255, 255, 0.8);
  --header-orange: var(--_colors---colors-brand-orange, #ff6000);
  /* Figma "Button" 4398:392, Button-hover: color/brand/600 */
  --header-orange-hover: #cc4700;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20rem 0;
  color: var(--header-fg);
  /* Inter (Figma Typography/font/Primary). The token override, not just
     font-family, is what redirects the Webflow `a` / `h1` element rules. */
  --_colors---family-paragraph: var(--font-ui);
  font-family: var(--font-ui);
}

/* Top scrim — Figma exports it as a PNG (rgba(33,33,33) .98 → 0 over 60px);
   a gradient does the same without a request. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 84rem;
  background: linear-gradient(to bottom, rgba(33, 33, 33, 0.98), rgba(33, 33, 33, 0.55) 45%, rgba(33, 33, 33, 0));
  pointer-events: none;
  z-index: -1;
}

/* The bar's box is a plain .container so its edges line up with the hero copy
   (layout.css owns --container-max). */
.site-header .container.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32rem;
  height: 44rem;
}

/* Brand — the wordmark is drawn with currentColor */
.site-header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 30rem;
  padding: 0;
  color: #fff;
  cursor: pointer;
}

.site-header-brand:hover {
  color: #fff;
}

.site-header-logo {
  display: block;
  height: 30rem;
  width: auto;
}

/* Primary nav: links on the left, account actions pushed right */
.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: 8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 8rem;
}

/* Figma "Label/M": 14/18 medium, -0.14px tracking, 8x12 padding */
.site-nav-link {
  position: relative;
  display: block;
  padding: 8rem 12rem;
  font-size: 14rem;
  line-height: 18rem;
  font-weight: 500;
  letter-spacing: -0.14rem;
  white-space: nowrap;
  color: var(--header-fg);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* Hover underline — Figma "Navigation Link" 4407:1730 (Link-hover): a 2rem
   orange rule as wide as the label, sitting 6rem above the bottom of the
   link's box. The design annotation asks for it to animate "in from left to
   right @200ms", so it is a scaled pseudo-element rather than
   text-decoration, which cannot be animated. */
.site-nav-link::after {
  content: "";
  position: absolute;
  left: 12rem;
  right: 12rem;
  bottom: 6rem;
  height: 2rem;
  background-color: #ff5900;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.site-nav-link:hover::after,
.site-nav-link:focus-visible::after {
  transform: scaleX(1);
}

.site-nav-link:hover {
  color: #fff;
}

.site-nav-signin {
  color: var(--header-fg-muted);
}

/* Pill CTA — Figma "Action/S": 14/20 semibold, -0.28px, 13x21 padding,
   fully rounded. Shared with the hero form button (hero.css). */
.button-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13rem 21rem;
  max-height: 44rem;
  border: 1px solid var(--header-orange, var(--_colors---colors-brand-orange, #ff6000));
  border-radius: 9999px;
  background-color: var(--header-orange, var(--_colors---colors-brand-orange, #ff6000));
  color: #fff;
  /* Inter, per Figma's Action/S — set here so it travels with the component
     into sections that do not otherwise redefine the family. */
  font-family: var(--font-ui);
  font-size: 14rem;
  line-height: 20rem;
  font-weight: 600;
  letter-spacing: -0.28rem;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button-pill:hover {
  color: #fff;
  background-color: var(--header-orange-hover, #cc4700);
}

.button-pill:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 2px;
}

/* Burger — two left-aligned lines (24.67 + 15.33 wide, 2 thick, 12.67 apart)
   per the 32px Figma icon; hidden on desktop. */
.site-header-burger {
  display: none;
  flex-shrink: 0;
  width: 44rem;
  height: 44rem;
  padding: 0;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.site-header-burger-icon {
  position: relative;
  display: block;
  width: 24.67rem;
  height: 14.67rem;
  margin: 0 auto;
}

.site-header-burger-icon span {
  position: absolute;
  left: 0;
  height: 2rem;
  background-color: currentColor;
  transition: transform 0.3s ease, width 0.3s ease;
}

.site-header-burger-icon span:first-child {
  top: 0;
  width: 24.67rem;
}

.site-header-burger-icon span:last-child {
  bottom: 0;
  width: 15.33rem;
}

.site-header.is-open .site-header-burger-icon span:first-child {
  width: 24rem;
  transform: translateY(6.33rem) rotate(45deg);
}

.site-header.is-open .site-header-burger-icon span:last-child {
  width: 24rem;
  transform: translateY(-6.33rem) rotate(-45deg);
}

/* Backdrop behind the mobile drawer (rendered only below 992px) */
.site-nav-backdrop {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Light variant — the supporting pages (/faqs, /validation,           */
/* /privacy-notice, /terms-of-service)                                  */
/*                                                                      */
/* Figma 4482:1919 (1440) and 4484:4325 (393): the same bar, painted    */
/* solid white with black content and no scrim. Its design annotation   */
/* reads "Drop shadow appears on scroll, disappears when scroll         */
/* position = 0", so the five-layer Figma shadow hangs off .is-scrolled,*/
/* which js/header.js toggles.                                          */
/*                                                                      */
/* It stays out of flow (position: fixed), like the .navbar it          */
/* replaces, so the supporting pages' existing top padding still clears */
/* it and no page content moves. The homepage bar is absolute over the  */
/* hero and is unaffected by everything below.                          */
/* ------------------------------------------------------------------ */

.site-header--light {
  --header-fg: #000;
  --header-fg-muted: #000;

  position: fixed;
  background-color: #fff;
  box-shadow: none;
  transition: box-shadow 0.2s ease;
}

/* The scrim exists to lift white type off a photo; an opaque bar has no use
   for it. */
.site-header--light::before {
  content: none;
}

/* Figma's five drop-shadow layers — rgb(92, 92, 92) at 5/4/3/1/0% alpha,
   offsets 1/6/13/22/35, blurs 3/6/8/9/10. */
.site-header--light.is-scrolled {
  box-shadow:
    0 1px 3px rgba(92, 92, 92, 0.05),
    0 6px 6px rgba(92, 92, 92, 0.04),
    0 13px 8px rgba(92, 92, 92, 0.03),
    0 22px 9px rgba(92, 92, 92, 0.01),
    0 35px 10px rgba(92, 92, 92, 0);
}

.site-header--light .site-header-brand,
.site-header--light .site-header-brand:hover,
.site-header--light .site-header-burger {
  color: #000;
}

/* The base outline is white, for the dark homepage bar. */
.site-header--light .button-pill:focus-visible {
  outline-color: #000 !important;
}

/* Desktop only — below 992px the links move into the white drawer, which is
   already dark-on-light and keeps the shared hover colour. */
@media screen and (min-width: 992px) {
  .site-header--light .site-nav-link:hover {
    color: #000;
  }
}

/* ------------------------------------------------------------------ */
/* < 992px: logo + burger in the bar; links live in a drawer on the right */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 991px) {
  /* Figma mobile: 16px vertical, 24px horizontal, 76px tall */
  .site-header {
    padding: 16rem 24rem;
  }

  .site-header::before {
    height: 76rem;
  }

  .site-header .container.site-header-inner {
    max-width: none;
    gap: 16rem;
  }

  .site-header-brand,
  .site-header-logo {
    height: 24rem;
  }

  .site-header-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
  }

  /* The drawer. The annotation says "hamburger menu opens overlay (right)";
     there is no overlay mockup, so this reuses the site's white menu card
     language, docked to the right edge. */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(360px, 100%);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 96rem 24rem 32rem;
    background-color: #fff;
    color: var(--_colors---mono-900, #121219);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }

  .site-header.is-open .site-nav {
    transform: none;
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
  }

  .site-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4rem;
  }

  .site-nav-link {
    padding: 12rem 0;
    font-size: 18rem;
    line-height: 28rem;
    letter-spacing: -0.18rem;
    color: var(--_colors---mono-900, #121219);
  }

  .site-nav-link:hover {
    color: var(--header-orange);
  }

  /* The drawer links are full-width rows, so the label-width underline has
     nothing to measure — the colour change is the hover state here. */
  .site-nav-link::after {
    display: none;
  }

  .site-nav-signin {
    color: var(--_colors---mono-700, #64646d);
  }

  .site-nav-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12rem;
    margin-top: auto;
    padding-top: 40rem;
  }

  .site-nav-actions .button-pill {
    width: 100%;
    max-height: none;
    padding: 16rem 21rem;
    font-size: 16rem;
  }

  .site-nav-actions .site-nav-signin {
    text-align: center;
  }

  /* The burger sits on the white drawer once it is open */
  .site-header.is-open .site-header-burger {
    color: var(--_colors---mono-900, #121219);
  }

  .site-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }

  .site-header.is-open .site-nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
  }

  /* js/header.js adds this while the drawer is open */
  html.site-menu-open,
  html.site-menu-open body {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header--light,
  .site-nav,
  .site-nav-backdrop,
  .site-header-burger-icon span,
  .site-nav-link,
  .site-nav-link::after,
  .button-pill {
    transition: none;
  }
}
