\providecommand{\brandlogo}{}
\makeatletter
\fancyhead[R]{%
    \ifdefempty{\brandlogo}{}{%
        \raisebox{-0.6cm}[0pt][0pt]{\includegraphics[height=0.855cm]{\brandlogo}}%
    }%
}
\fancyfoot[C]{%
    \kx@setlang%
    \fontsize{6pt}{9pt}\selectfont\color{brandsecondary}%
    \kx@page\ \thepage\ \kx@of\ \pageref{LastPage}%
}
\makeatother
\ifdefempty{\brandlogo}{%
  \geometry{top=2cm, headheight=0pt, headsep=0pt, includehead=false}%
  \fancyhead{}%
}{}
