@layer components {

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: var(--font-heading);
  background: var(--brand-tertiary);
  color: var(--brand-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo img {
  display: block;
  height: 100px;
  width: auto;
}

.nav__logo .nav__logo-wordmark {
  display: none;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  justify-self: start;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand-primary);
}

.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 150;
}

.nav__overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.nav__panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 200;
}

.nav__panel.is-active {
  transform: translateX(0);
}

.nav__panel-close {
  display: block;
  align-self: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  margin-bottom: 1rem;
}

.nav__panel-logo {
  display: block;
  height: 60px;
  width: auto;
}

.nav__panel a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  font-size: 1.4rem;
}

.nav__links a {
  position: relative;
  line-height: 1;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  width: 100%;
}

.nav__links a.is-active {
  color: var(--brand-secondary);
}

.external-link-icon {
  fill: var(--brand-primary);
  stroke: none;
  width: 15px;
  height: 15px;
  margin-left: 6px;
}

}
