﻿.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(5, 18, 15, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 72px;
  padding: 4px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: auto;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 92px;
  width: auto;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  margin-left: auto;
  margin-right: 12px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 8px;
  color: rgba(255,255,255,0.82);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
  transition: color 180ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -5px;
  height: 1px;
  background: rgba(255,255,255,0.9);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-link.active {
  color: rgba(255,255,255,1);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.nav-link.active::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Hover underline only where hover exists. Touch browsers keep a tapped
   link in :hover until the next tap, which left a second underline on
   phones once the active section moved on. */
@media (hover: hover) {
  .nav-link:hover::after {
    transform: scaleX(1);
  }
}

.nav-link:hover,
.nav-link:focus-visible {
  color: rgba(255,255,255,1);
}

.nav-cta {
  margin-left: 2px;
  color: rgba(255,255,255,0.96);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 8px;
  min-height: 30px;
}

.nav-cta::after {
  left: 8px;
  right: 8px;
}

@media (max-width: 780px) {
  .site-header {
    background: rgba(4, 32, 15, 0.96);
    border-bottom: 1px solid rgba(255, 251, 208, 0.16);
  }

  .navbar {
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-height: 58px;
    padding: 5px 0;
  }

  .brand-logo {
    height: 70px;
  }

  .nav-links {
    flex: 1 1 0;
    min-width: 0;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    margin-left: 8px;
    margin-right: 0;
    padding: 2px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .nav-cta {
    flex: 0 0 auto;
    min-height: 40px;
    font-size: 0.68rem;
    letter-spacing: 0;
  }

  .nav-link {
    padding: 0 4px;
  }

  .nav-cta {
    padding: 0 4px;
  }
}

@media (max-width: 680px) {
  .navbar.container {
    width: calc(100% - 24px);
  }

  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    padding: 10px 0 8px;
  }

  .brand {
    flex: 0 0 100%;
    justify-content: center;
    margin: 0;
  }

  .brand-logo {
    height: 60px;
  }

  .nav-links {
    flex: 0 1 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
    white-space: normal;
  }

  .nav-link,
  .nav-cta {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
  }

  .nav-cta {
    margin-left: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .nav-link::after,
  .nav-cta::after {
    bottom: 2px;
    left: 8px;
    right: 8px;
  }
}

@media (max-width: 360px) {
  .navbar.container {
    width: calc(100% - 20px);
  }

  .nav-links {
    column-gap: 4px;
  }

  .nav-link,
  .nav-cta {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 0.7rem;
  }
}
