/*
 * Canonical TapSocial navigation geometry.
 *
 * Markup source of truth: partials/site-header.html (run scripts/sync-header.js).
 * Behaviour: /site-header.js — one implementation, not the three this file
 * used to carry duplicate selectors for.
 * Keep this stylesheet loaded last on every page with .primary-nav.
 * The homepage is the visual source of truth for header spacing.
 */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 101px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 40px;
  color: #fff;
  /* The header must carry its own typeface and box model. /content/fundraise/
     loads neither site-pages.css nor any base rule of its own, so the nav
     rendered in Times, unsmoothed, and — because `min-width` then applied to the
     content box — with a CTA 22px wider than every other page. A shared partial
     cannot depend on whichever page stylesheet happens to be present. */
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: rgba(10, 16, 24, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px) saturate(135%);
}

.site-header,
.site-header * { box-sizing: border-box; }

.site-header .logo {
  --logo-width: 220px;
  --logo-height: 46px;
  position: relative;
  flex: 0 0 var(--logo-width);
  width: var(--logo-width);
  height: var(--logo-height);
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  transform: rotate(-3deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.site-header .logo img,
.site-header .logo-img {
  display: block;
  width: var(--logo-width);
  height: var(--logo-height);
  max-height: none;
  object-fit: fill;
  object-position: left center;
  opacity: 0;
}

/* Locks the page behind an open mobile menu. This lived only in
   site-pages.css and inline on /pricing/, so the homepage — which loads
   neither — scrolled behind its own menu. It belongs with the nav. */
body.menu-open { overflow: hidden; }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 31px;
  margin-left: auto;
}

.primary-nav > .site-nav-link {
  position: relative;
  padding: 12px 0;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav > .site-nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 3px;
  background: var(--active-logo, #35D0EE);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.primary-nav > .site-nav-link:hover::after,
.primary-nav > .site-nav-link:focus-visible::after,
.primary-nav > .site-nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.primary-nav > .site-nav-cta {
  min-width: 139px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 21px;
  border: 0;
  color: #0A1018;
  background: #3EE08F;
  box-shadow: 4px 4px 0 #4B3FD6;
  transform: rotate(1deg);
  font-size: .85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .07em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: siteNavCtaFloat 4.8s ease-in-out infinite;
  will-change: transform, translate;
}

.primary-nav > .site-nav-cta .material-symbols-rounded {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: 19px;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 20;
}

@keyframes siteNavCtaFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2px; }
}

.primary-nav > .site-nav-cta:hover,
.primary-nav > .site-nav-cta:focus-visible {
  transform: rotate(-1deg) translateY(-2px);
  box-shadow: 6px 6px 0 #F45FC0;
  outline: none;
}

.primary-nav > .site-nav-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.primary-nav > .site-nav-cta:active {
  transform: rotate(0deg) translate(3px, 3px);
  box-shadow: 2px 2px 0 #F45FC0;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 13px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  /* Both arrived from the homepage's inline block when it was removed (#103).
     They were the only two declarations in ~180 lines that were not duplicating
     or shadow-boxing this file, so the other fourteen pages had been rendering
     the toggle with the UA button padding and a default cursor. */
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  color: #fff;
  background: transparent;
}

/* Canonical action geometry: every button uses the sharp-cornered nav CTA shape. */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
a.cta,
a.button,
a.btn,
a.cta-button,
a.site-nav-cta,
a.site-contact-cta__button {
  border-radius: 0 !important;
}

@media (max-width: 1080px) {
  .primary-nav { gap: 20px; }
  .primary-nav > .site-nav-link { font-size: .78rem; }
  .site-header .logo {
    --logo-width: 185px;
    --logo-height: 38px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 76px;
    padding: 12px 20px;
  }

  .site-header .logo {
    --logo-width: 168px;
    --logo-height: 36px;
  }

  .menu-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    inset: 76px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 28px 20px 34px;
    background: #0A1018;
    border-top: 1px solid rgba(255, 255, 255, .10);
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .34);
  }

  .primary-nav.open { display: flex; }

  .primary-nav > .site-nav-link {
    padding: 15px 4px;
    font-size: .9rem;
  }

  .primary-nav > .site-nav-link::after {
    right: auto;
    bottom: 8px;
    width: 38px;
  }

  .primary-nav > .site-nav-cta {
    width: 100%;
    margin-top: 14px;
    padding: 16px 22px;
  }
}

@media (max-width: 420px) {
  .site-header { padding-inline: 14px; }
  .header-tools { gap: 8px; }
  .site-header .logo {
    --logo-width: 148px;
    --logo-height: 31px;
  }
}

@media (prefers-reduced-motion: reduce) and (min-width:100000px) {
  .site-header .logo,
  .site-header .logo::before,
  .site-header .logo::after,
  .primary-nav > .site-nav-cta {
    animation: none !important;
    transition: none !important;
    translate: none;
  }

  .site-header .logo:hover,
  .site-header .logo:focus-visible { transform: rotate(-3deg); }

  .site-header .logo:hover::before,
  .site-header .logo:focus-visible::before {
    background: linear-gradient(108deg, #35D0EE, #3EE08F);
  }

  .site-header .logo:hover::after,
  .site-header .logo:focus-visible::after { opacity: 0; }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) and (min-width:100000px) {
  .primary-nav > .site-nav-cta {
    animation: siteNavCtaFloat 4.8s ease-in-out infinite !important;
    will-change: translate;
  }
}
