/* Shared by every page; load after page-specific styles. */
html {
  --site-header-height: 96px;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--site-header-height) + 16px);
}
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

.nav {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 200px;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  width: 100%;
  height: var(--site-header-height);
  margin: 0;
  padding: 0 3.5vw;
  background: #242126;
  color: white;
  font-family: "DM Sans", sans-serif;
}
.nav .brand {
  display: block;
  width: 74px;
  height: 74px;
  line-height: 0;
}
.nav .brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav #navlinks {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.8rem, 1.45vw, 1.5rem);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.nav #navlinks a {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9c6c9;
  font: 400 .86rem/1.25 "DM Sans", sans-serif;
  white-space: nowrap;
  text-decoration: none;
  transition: color 180ms ease;
}
.nav #navlinks a:hover,
.nav #navlinks a[aria-current="page"] { color: #e2eb35; }
.nav .nav-cta {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  background: #e2eb35;
  color: #262328;
  font: 600 .86rem/1.25 "DM Sans", sans-serif;
  white-space: nowrap;
  text-decoration: none;
}
.nav .nav-cta span { display: inline; }
.nav .menu { display: none; }
.nav a:focus-visible,
.nav button:focus-visible { outline: 2px solid #e2eb35; outline-offset: 4px; }

@media (max-width: 1180px) {
  html { --site-header-height: 78px; }
  .nav {
    grid-template-columns: 58px minmax(0, 1fr) 44px;
    gap: 1rem;
    height: var(--site-header-height);
    padding: 0 1.25rem;
  }
  .nav .brand { width: 58px; height: 58px; }
  .nav #navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--site-header-height));
    max-height: calc(100dvh - var(--site-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: .25rem;
    padding: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.12);
    background: #242126;
    box-shadow: 0 18px 35px rgba(0,0,0,.24);
  }
  .nav #navlinks.open { display: flex; }
  .nav #navlinks a { padding: .8rem .9rem; font-size: .9rem; }
  .nav .nav-cta {
    justify-self: end;
    width: min(200px, 100%);
    height: 44px;
    padding: 0 .85rem;
    font-size: .82rem;
  }
  .nav .menu {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.28);
    background: transparent;
    color: white;
    cursor: pointer;
  }
  .nav .menu span {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0;
    background: currentColor;
    transition: transform 180ms ease;
  }
  .nav .menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav .menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
}
@media (max-width: 420px) {
  .nav { gap: .65rem; padding: 0 1rem; }
  .nav .nav-cta { padding: 0 .7rem; font-size: .78rem; }
  .nav .nav-cta span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav #navlinks a, .nav .menu span { transition: none; }
}
