:root{
  --nav-h: 64px;
  --nav-bg: rgba(10, 10, 10, 0.28);
  --nav-border: rgba(255, 255, 255, 0.14);
  --nav-text: rgba(255, 255, 255, 0.92);
  --nav-text-muted: rgba(255, 255, 255, 0.78);
}

/* Reserve space for fixed header */
body{
  padding-top: var(--nav-h);
}

/* Most pages use .ui-content as a full-screen layout. Offset its top padding so the fixed header never covers the content. */
.ui-content{
  padding-top: calc(3rem + var(--nav-h));
}


.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 9999;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

.site-header__inner{
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-sizing: border-box;
}

.brand{
  color: var(--nav-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__text{
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 14px;
}

.desktop-nav{
  display: flex;
  gap: 22px;
  align-items: center;
}

.desktop-nav a{
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 4px;
  position: relative;
}

.desktop-nav a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: rgba(255,255,255,0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
  opacity: 0.75;
}

.desktop-nav a:hover{ color: var(--nav-text); }
.desktop-nav a:hover::after{ transform: scaleX(1); }

.nav-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle__bar{
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
}

/* Mobile drawer */
.mobile-drawer{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.mobile-drawer__panel{
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100%;
  background: rgba(12,12,12,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255,255,255,0.14);
  transform: translateX(18px);
  transition: transform 220ms ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer__top{
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand--drawer{
  letter-spacing: 0.22em;
  font-weight: 700;
  font-size: 13px;
}

.drawer-close{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
}

.drawer-close span{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  transform-origin: center;
}

.drawer-close span:nth-child(1){ transform: translate(-50%,-50%) rotate(45deg); }
.drawer-close span:nth-child(2){ transform: translate(-50%,-50%) rotate(-45deg); }

.mobile-nav{
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  gap: 10px;
}

.mobile-nav a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
}

.mobile-drawer__footer{
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.drawer-cta{
  display: block;
  text-align: center;
  text-decoration: none;
  color: rgba(0,0,0,0.9);
  background: rgba(255,255,255,0.9);
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.mobile-drawer.is-open{
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer.is-open .mobile-drawer__panel{
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 900px){
  .desktop-nav{ display: none; }
  .nav-toggle{ display: inline-flex; }
}

/* If a page already has its own fixed overlays, allow opting out */
body.nav-disabled{ padding-top: 0; }
body.nav-disabled .site-header{ display: none; }

@media (max-width: 860px){
  .desktop-nav{ display:none; }
  .nav-toggle{ display:flex; }
}

/* If a page intentionally needs full-bleed (no top padding), add class .no-nav-pad on body */
body.no-nav-pad{ padding-top: 0; }


/* Account / auth actions */
.nav-auth{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 18px;
}

.nav-auth__link{
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 4px;
}

.nav-auth__link:hover{ color: var(--nav-text); }

.nav-auth__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  color: var(--nav-text);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-auth__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.30);
}

.mobile-auth{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.mobile-auth__link{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
}

@media (max-width: 860px){
  .nav-auth{ display: none; }
}
