/* Shared header and full-screen navigation */
.site-header,
.site-menu {
  --nav-inset: 40px;
  --nav-ink: #161919;
  --menu-fill: var(--nav-ink);
  --menu-hover: #333a38;
  font-family: "DM Sans", sans-serif;
}
.site-header,
.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 68px;
  padding: 0 var(--nav-inset);
}
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  pointer-events: none;
  color: var(--nav-ink);
}
.site-header > * {
  pointer-events: auto;
}
.site-account {
  background: rgba(251, 250, 247, .95);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}
.site-header[data-over-hero] .site-brand {
  color: #fff;
}
.site-brand,
.site-tools,
.site-account,
.menu-account,
.menu-control {
  display: flex;
  align-items: center;
}
.site-brand {
  min-height: 48px;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font: 700 15px/1.2 "Syne", sans-serif;
  letter-spacing: .02em;
}
.site-brand img {
  flex: none;
  width: 34px;
  height: 34px;
}
.site-tools {
  gap: 6px;
}
.site-account,
.menu-account {
  gap: 14px;
}
.site-account {
  padding: 3px 3px 3px 14px;
}
.site-login,
.site-join,
.menu-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
  text-decoration: none;
  font: 600 14px/1 "DM Sans", sans-serif;
}
.site-login { color: inherit; }
.site-login:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-join,
.menu-control {
  border-radius: 999px;
  padding: 0 17px;
}
.site-join {
  background: #e9eae3;
  color: var(--nav-ink);
}
.site-join:hover { background: #dfe4d6; }
.menu-control {
  width: 100px;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: var(--menu-fill);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-control:hover { background: var(--menu-hover); }
.site-header[data-over-hero] .menu-control {
  background: #fff;
  color: var(--nav-ink);
}
.menu-label {
  text-box: trim-both cap alphabetic;
}
.menu-icon {
  flex: none;
  display: grid;
  align-content: center;
  row-gap: 4.5px;
  width: 17px;
  height: 12px;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  height: 1.5px;
  background: currentColor;
}
.menu-icon-close::before,
.menu-icon-close::after { grid-area: 1 / 1; transform: rotate(45deg); }
.menu-icon-close::after { transform: rotate(-45deg); }
.site-header :focus-visible,
.site-menu :focus-visible {
  outline: 2px solid #0082aa;
  outline-offset: 3px;
}
.menu-control:focus:not(:focus-visible),
html[data-menu-pointer] .menu-control:focus {
  outline: none;
}
html:has(.site-menu[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
  background-color: #fff;
}
.site-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  color: var(--nav-ink);
  background: #fff;
}
.site-menu::backdrop { background: transparent; }
.menu-sheet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.menu-sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("../images/logo.svg") no-repeat right -17vw center / min(65vw, 980px) auto;
}
.menu-header { flex-shrink: 0; }
.menu-body,
.menu-account {
  padding-inline: clamp(24px, 8vw, 150px);
}
.menu-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: safe center;
  padding-block: clamp(22px, 5vh, 60px);
}
.menu-links {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-links li {
  --arrow-color: #f4c607;
  margin: 0;
  font: inherit;
  color: inherit;
}
.menu-links li:nth-child(2) { --arrow-color: #60b130; }
.menu-links li:nth-child(3) { --arrow-color: #27b6a5; }
.menu-links li:nth-child(4) { --arrow-color: #1fabd0; }
.menu-links li:nth-child(5) { --arrow-color: #357ebe; }
.menu-links li:nth-child(6) { --arrow-color: #6b4392; }
.menu-links li:nth-child(7) { --arrow-color: #d3157f; }
.menu-links a {
  display: inline-block;
  align-content: center;
  min-height: 44px;
  padding-block: .045em;
  color: inherit;
  font: 600 clamp(30px, min(5.5vw, 6.8vh), 86px)/1.08 "Syne", sans-serif;
  letter-spacing: -.045em;
  text-decoration: none;
  transition: transform .18s ease;
}
.menu-links a::after {
  content: "";
  display: inline-block;
  width: .32em;
  height: .32em;
  margin-inline-start: .35em;
  /* Center the chevron on the capital letters above the text baseline. */
  vertical-align: calc(.5cap - .16em);
  border-top: .045em solid currentColor;
  border-right: .045em solid currentColor;
  transform: translateX(-.15em) rotate(45deg);
  color: var(--arrow-color);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.menu-links a[href$="#membership"]::after {
  /* Include the descender in the visual center of “Membership”. */
  vertical-align: calc(.5cap - .23em);
}
.menu-links a:is(:hover, :focus-visible, [aria-current])::after {
  opacity: 1;
  transform: rotate(45deg);
}
.menu-links a:hover { transform: translateX(5px); }
.menu-account {
  min-height: 74px;
  flex-wrap: wrap;
  padding-block: 12px;
  gap: 24px;
}
.menu-account .site-join {
  background: var(--nav-ink);
  color: #fff;
}
.menu-account .site-join:is(:hover, :active) { background: #000; }
@media (prefers-reduced-motion: no-preference) {
  .site-menu[open] {
    animation: menu-splash 560ms cubic-bezier(.45, .05, .2, 1) both;
  }
  @keyframes menu-splash {
    from { clip-path: circle(0% at 100% 100%); }
    to { clip-path: circle(142% at 100% 100%); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-links a,
  .menu-links a::after { transition: none; }
  .menu-links a:hover { transform: none; }
}
@media (max-width: 1024px) {
  .site-header,
  .site-menu { --nav-inset: 20px; }
}
@media (max-width: 700px) {
  .site-account { display: none; }
  .site-tools { flex: none; }
  .menu-body,
  .menu-account { padding-inline: 24px; }
  .menu-links a { font-size: clamp(35px, 8.7vw, 54px); min-height: 48px; }
  .menu-sheet::before {
    background-size: 100vw auto;
    background-position: right -62vw bottom 7vh;
  }
}
@media (max-width: 440px) {
  .site-header,
  .menu-header { gap: 6px; }
  .menu-control { width: 84px; gap: 6px; padding-inline: 10px; }
}
@media (max-width: 380px) {
  .site-header,
  .menu-header { gap: 2px; padding-right: 4px; }
  .menu-control { width: 40px; justify-content: center; padding: 0; gap: 0; font-size: 0; }
}
@media (max-height: 520px) {
  .menu-body { padding-block: 16px; }
  .menu-links a { min-height: 40px; font-size: 30px; }
}
