/* inspired by http://www.jqueryscript.net/menu/Fullscreen-Mobile-Navigation-Menu-with-jQuery-CSS3.html */

#toggle {
  position:absolute;
  z-index: 3;
  width: 2.85714em;
  height: 2.85714em;
  top: 1rem;
  right: 3rem;
  margin: 15px 0 0 15px;
  cursor: pointer;
}

#toggle span {
  display: block;
  position: absolute;
  width: 100%;
  height: 0.2em;
  margin: 1.25em 0 0 0;
  background: #eee;
  -webkit-transition: 350ms ease all;
  -moz-transition: 350ms ease all;
  transition: 350ms ease all;
}

#toggle span:before,
#toggle span:after {
  content: " ";
  position: absolute;
  width: 100%;
  height: 0.2em;
  background: #ffffff;
  -webkit-transition: 350ms ease all;
  -moz-transition: 350ms ease all;
  transition: 350ms ease all;
}

#toggle span:before { margin: -1em 0 0 0; }

#toggle span:after { margin: 1em 0 0 0; }

#toggle:hover {
  border: none;
}

#toggle.open span { 
  background-color: transparent; 
  position: fixed;
  height: 3em;
  width: 3em;
}

#toggle.open span:before,
#toggle.open span:after {
  margin: 0;
  background: #ffffff;
}

#toggle.open span:before {
  -webkit-transform: rotate(135deg);
  -moz-transform: rotate(135deg);
  transform: rotate(135deg);
}

#toggle.open span:after {
  -webkit-transform: rotate(-135deg);
  -moz-transform: rotate(-135deg);
  transform: rotate(-135deg);
}

#menu {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 2;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  text-align: center;
  background: rgba(163, 87, 77, 0.95);
  -webkit-transform: scale(1.5);
  -moz-transform: scale(1.5);
  transform: scale(1.5);
  -webkit-transition: 350ms ease all;
  -moz-transition: 350ms ease all;
  transition: 350ms ease all;
}

#menu.opened {
  visibility: visible;
  opacity: 1;
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  transform: scale(1);
  -webkit-transition: 350ms ease all;
  -moz-transition: 350ms ease all;
  transition: 350ms ease all;
}

#menu span#title {
  display: block;
  line-height: 1em;
  margin: 0 0 0.5em 0;
  font-size: 5em;
  color: #ffffff;
}

#menu ul {
  list-style: none;
  margin: 0 auto;
  padding-top: 100px;
}

#menu ul li {
  display: block;
  width: 100%;
  margin: 0 auto 0.5em auto;
  background-color: transparent;
}

#menu ul li a {
  position: relative;
  z-index: 4;
  display: block;
  width: 80%;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 65px;
  font-size: 3em;
  margin: 0 auto;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid #ffffff;
  border-radius: 0.2em;
}

#menu ul li a:hover {
  color: rgba(163, 87, 77, 0.9);
  background-color: #ffffff;
}

@media (max-width: 550px) {
  #toggle {
    top: 1rem;
    right: 1rem;
    margin: 15px 0 0 15px;
  }
}

@media (min-width: 550px) {
  #toggle {
    top: 1rem;
    right: 2rem;
    margin: 15px 0 0 15px;
  }
}