
/*********************************************/
/*            HEADER                         */
/*********************************************/

header {
  position: fixed;
  height: var(--header-height);
  left: 0;
  right: 0;
  top: 0;
  background-color: white;
  border-bottom: 1px solid var(--brand-alt-color);
  z-index: 999;
  padding: 0 var(--main-margin);

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  align-content: stretch;
}

.header-logo {
  display: flex;
  align-items: center;
}

.main-logo {
  cursor: pointer;
  height: 70px;
  background-color: var(--brand-color);
  vertical-align: middle;
  transition: background-color 0.6s ease-out;
}

a.home-link {
  text-decoration: none;
}

.tagline {
  display: inline-block;
  color: var(--brand-color);
  font-size: 14px;
  line-height: 14px;
  padding: 0 12px;
  transition: color 0.6s ease-out;
  vertical-align: middle;
}

.header-logo:hover .main-logo {
  background-color: var(--brand-alt-color);
  transition: background-color 0.15s ease-out;
}

.header-logo:hover .tagline {
  color: var(--brand-alt-color);
  transition: color 0.18s ease-out;
}

/*********************************************/
/*            MENU - COMMON                 */
/*********************************************/

ul.menu li  a {
  font-family: "lunchtype21medium";
  text-transform: uppercase;
  /*font-size: 24px;*/
  color: black;
  background-color: white;
  text-decoration: none;
  transition: color 0.4s linear;
}

ul.menu li a.current {
  color: var(--brand-color);
}

ul.menu li a:hover {
  color: var(--brand-color);
  transition: color 0.1s linear;
}

ul.menu > li > a.external {
  padding: 2px 16px;
  margin: 24px;
  margin-right: 0;
  border: 1px solid var(--brand-color);
  border-radius: 24px;

  color: var(--brand-color);
  text-transform: none;
  transition: all 0.3s linear;
}

ul.menu > li > a.external:hover {
  color: white;
  background-color: var(--brand-color);
  transition: all 0.1s linear;
}


/*********************************************/
/*            MENU - DESKTOP                 */
/*********************************************/

@media(min-width: 880px) {

  #menu-checkbox {
    display: none;
  }

  ul.menu {
    display: inline;
    margin: 0;
    padding: 0;
  }

  ul.menu > li {
    list-style-type: none;
    display: inline;
    position: relative;
    z-index: 4;
  }

  ul.menu > li > a {
    display: inline-block;
    padding: 24px;
    margin: 0;
  }


  ul.menu > li:hover > ul.submenu {
    /*display: block;*/
    opacity: 1;
    top: 2em;
    transition: all 0.15s ease-out;
    pointer-events: auto;
  }

  ul.submenu {
    /*display: none;*/
    pointer-events: none;
    opacity: 0;
    padding: 0;
    position: absolute;
    width: max-content;
    min-width: 8em;
    z-index: 2;
    top: 1em;
    left: 0;
    background-color: white;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--brand-alt-color);
    border-left: 1px solid var(--brand-alt-color);
    border-right: 1px solid var(--brand-alt-color);
    transition: all 0.15s ease-in;
  }
  ul.submenu > li {
    list-style-type: none;
    display: block;
  }
  ul.submenu > li > a {
  /*  padding: 2px 16px;
    margin: 24px;
    margin-right: 0;
  */
    font-size: 20px;
    display: block;
    padding: 6px 24px;
    color: black;
    text-transform: none;
    text-decoration: none;
  }
}

/*********************************************/
/*            MENU - MOBILE                  */
/*********************************************/

@media(max-width: 879px) {

  .menu-container {
    display: block;
    position: fixed;
    top: calc( ( var(--header-height) - 22px )  / 2 );
    right: var(--main-margin);
    
    z-index: 1;
    
    -webkit-user-select: none;
    user-select: none;
  }

  .menu-container input {
    display: block;
    width: 40px;
    height: 32px;
    position: absolute;
    top: -7px;
    left: -5px;
    
    cursor: pointer;
    
    opacity: 0; /* hide this */
    z-index: 2; /* and place it over the hamburger */
    
    -webkit-touch-callout: none;
  }

  .menu-container span {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;
    
    background: #000;
    /*border-radius: 3px;*/
    z-index: 1;
    transform-origin: 4px 0px;
    
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                opacity 0.55s ease;
  }

  .menu-container span:first-child {
    transform-origin: 0% 0%;
  }

  .menu-container span:nth-last-child(2) {
    transform-origin: 0% 100%;
  }

  /* 
   * Transform all the slices of hamburger
   * into a crossmark.
   */
  .menu-container input:checked ~ span {
    opacity: 1;
    transform: translate(7px, 4px) rotate(45deg) translate(-2px, -1px);
    background: #000;
  }
  .menu-container input:checked ~ span:nth-last-child(3) {
    opacity: 0;
    transform: translate(7px, 4px) rotate(0deg) scale(0.2, 0.2);
  }
  .menu-container input:checked ~ span:nth-last-child(2) {
    transform: translate(7px, 4px) rotate(-45deg) translate(0, -1px);
  }

  /*
   * Make this absolute positioned
   * at the top left of the screen
   */
  .menu {
    position: absolute;
    /*max-width: 300px;*/
    left: calc( var(--main-margin) * 2);
    width: 105vw; /* was 150 */
    height: calc( 100vh - var(--main-margin) - var(--main-margin));
    /*margin: -100px 0 0 -50px;*/
    padding: 0px 35px;
    padding-bottom: 6em;
    /*box-sizing: border-box;*/
    overflow-y: scroll;
    background: white;
    list-style-type: none;
    -webkit-font-smoothing: antialiased; /* to stop flickering of text in safari */
    
    transform-origin: 0% 0%;
    transform: translate(40vw, 0);
    
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
  }

  .menu-container input:checked ~ ul.menu {
    transform: translate(-100vw, 0);;
  }

  ul.menu > li > a {
    font-size: 22px;
    display: inline-block;
    margin-top: 0.7em;
    margin-bottom: 0.05em;
  }

  ul.submenu {
    /*padding-left: var(--main-margin);*/
    padding: 0;
  }

  ul.submenu > li {
    list-style-type: none;
    display: inline-block;
  }

  ul.submenu > li > a {
  /*  padding: 2px 16px;
    margin: 24px;
    margin-right: 0;
  */
    font-size: 20px;
    display: inline-block;
    margin: 4px;
    padding: 6px 12px;
    color: black;
    font-family: 'lunchtype21regular';
    text-transform: none;
    text-decoration: none;
    border: 1px solid #CCC;
    border-radius: 4px;
}