/* genxmichael bar: the shared sticky top bar on sw.genxmichael.com and
   swd.genxmichael.com. Keep both sites' copies of this file identical.
   The wordmark font is a 4.5 KB subset of Newsreader 500 (SIL Open Font
   License) holding only the letters of "genxmichael". */
@font-face {
  font-family: "GXM Wordmark";
  src: url("/fonts/genxmichael-wordmark.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --gxm-bar-h: 65px;
}

html {
  scroll-padding-top: calc(var(--gxm-bar-h) + 12px);
}

.gxm-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 12, 26, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color-scheme: dark;
}

.gxm-bar__inner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1336px;
  min-height: 64px;
  margin: 0 auto;
  padding-left: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 48px), env(safe-area-inset-right, 0px));
}

.gxm-bar__wordmark {
  font: 500 1.5rem/1 "GXM Wordmark", "Newsreader", Georgia, serif;
  letter-spacing: -0.02em;
  color: #f7f0e4;
  text-decoration: none;
}

.gxm-bar__wordmark span {
  color: #8fd5ff;
}

.gxm-bar__social {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  border-radius: 50%;
  color: rgba(247, 240, 228, 0.7);
  transition: color 0.2s, background-color 0.2s;
}

.gxm-bar__social:hover {
  color: #f7f0e4;
  background-color: rgba(255, 255, 255, 0.07);
}

.gxm-bar__social svg {
  display: block;
  width: 20px;
  height: 20px;
}

.gxm-bar a:focus-visible {
  outline: 2px solid #8fd5ff;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  :root {
    --gxm-bar-h: 57px;
  }

  .gxm-bar__inner {
    min-height: 56px;
  }

  .gxm-bar__wordmark {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gxm-bar__social {
    transition: none;
  }
}
