/* Shared header geometry and menu control for every page. */
:root {
  --site-header-height: 88px;
  --site-header-gutter: 32px;
  --site-header-logo-width: 200px;
}

.hide-header #menu-toggle,
.hide-header #header,
.hide-header .site-pagination {
  opacity: 0;
}

#menu-toggle,
#header,
.site-pagination {
  opacity: 1;
}

#header {
  align-items: center;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  height: var(--site-header-height);
  padding: 0 var(--site-header-gutter);
  transition: background-color .3s ease, opacity .4s ease;
  width: 100%;
  z-index: 1010;
}

#header .logo {
  flex: 0 1 auto;
  float: none;
  line-height: 0;
  width: var(--site-header-logo-width);
}

#header .logo a {
  display: block;
}

#header .logo img {
  display: block;
  height: auto;
  width: 100%;
}

#header .logo .dark {
  display: block;
}

#header .logo .light {
  display: none;
}

.header-block {
  clear: both;
  display: block;
  height: var(--site-header-height);
  width: 100%;
}

#menu-toggle {
  align-items: center;
  display: flex;
  height: var(--site-header-height);
  position: fixed;
  right: var(--site-header-gutter);
  top: 0;
  transition: opacity .4s ease;
  z-index: 1050;
}

.lines-button {
  background: none;
  border: 0;
  cursor: pointer;
  display: block;
  height: 32px;
  margin: 0;
  padding: 0;
  position: relative;
  transition: transform .3s ease;
  user-select: none;
  width: 32px;
}

.lines-button:focus-visible {
  border-radius: 3px;
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.lines-button:hover {
  opacity: 1;
}

.lines-button:active {
  transition: none;
}

.lines {
  background: #4f5252;
  border-radius: 4px !important;
  display: inline-block;
  height: 4px;
  position: relative;
  transition: background-color .3s ease, transform .3s ease;
  width: 100%;
}

.lines::before,
.lines::after {
  background: #4f5252;
  border-radius: 4px !important;
  content: '';
  display: inline-block;
  height: 4px;
  left: 0;
  position: absolute;
  transform-origin: .28571rem center;
  transition: background-color .3s ease, transform .3s ease, top .3s ease;
  width: 100%;
}

.lines::before {
  top: .57rem;
}

.lines::after {
  top: -.57rem;
}

.lines-button:hover .lines::before {
  transform: translateY(2px);
}

.lines-button:hover .lines::after {
  transform: translateY(-2px);
}

body.light #header {
  background: transparent;
}

body.light.white-logo #header .logo .dark {
  display: none;
}

body.light.white-logo #header .logo .light {
  display: block;
}

body.light.white-logo .lines,
body.light.white-logo .lines::before,
body.light.white-logo .lines::after {
  background: #fff;
}

body.menu-open .lines-button {
  transform: scale3d(.8, .8, .8);
}

body.menu-open .lines-button.x .lines {
  background: transparent !important;
}

body.menu-open .lines-button.x .lines::before,
body.menu-open .lines-button.x .lines::after {
  background: #000 !important;
  top: 0;
  transform-origin: 50% 50%;
  width: 2rem;
}

body.menu-open .lines-button.x .lines::before {
  transform: rotate3d(0, 0, 1, 45deg);
}

body.menu-open .lines-button.x .lines::after {
  transform: rotate3d(0, 0, 1, -45deg);
}

@media (max-width: 767px) {
  :root {
    --site-header-height: 64px;
    --site-header-gutter: 18px;
    --site-header-logo-width: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #header,
  #menu-toggle,
  .lines,
  .lines::before,
  .lines::after,
  .lines-button {
    transition: none;
  }
}
