@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  overflow-x: hidden;
  margin: 0;
  background-color: #333;
  color: #222;
}

.container {
  background-color: #fafafa;
  width: 100vw;
  min-height: 100vh;
  padding: 50px;
  transform-origin: top left;
  transition: transform .5s linear;
}

.circle-container {
  position: fixed;
  top: -100px;
  left: -100px;
}

.circle {
  background-color: #ff7979;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative; /* Para aplicar "position: absolute" nos botões */
  transition: transform .5s linear;
}

.circle button {
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100px; /* A altura do botão precisa ser metade do valor da altura de ".circle" */
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 26px;
}

.circle button:focus {
  outline: none;
}

.circle button#open {
  left: 60%;
}

.circle button#close {
  top: 60%;
  transform-origin: top left;
  transform: rotate(90deg); /* Com rotate de 90deg no botão close, top vai funcionar como se fosse um right */
}

.content {
  max-width: 1000px;
  margin: 50px auto;
}

.content h1 {
  margin: 0;
}

.content small {
  color: #555;
  font-style: italic;
}

.content p {
  color: #333;
  line-height: 1.5;
}

.content img {
  max-width: 100%;
}

nav {
  position: fixed;
  bottom: 40px;
  left: 0;
  z-index: 100;
}

nav ul {
  list-style-type: none;
  padding-left: 30px;
}

nav ul li {
  text-transform: uppercase;
  color: #fff;
  margin: 40px 0;
  transform: translateX(-100%);
  transition: transform .4s ease-in;
}

/* Para o efeito de escadinha */
nav ul li + li {
  margin-left: 15px;
  transform: translateX(-150%);
}

nav ul li + li + li {
  margin-left: 30px;
  transform: translateX(-200%);
}

nav ul li i {
  font-size: 20px;
  margin-right: 10px;
}

/* Animações ao adicionar a tag */
.container.show-nav {
  transform: rotate(-20deg);
}

.container.show-nav .circle {
  transform: rotate(-70deg); /* Com rotate -20 no container e -70 em circle, é o suficiente para fazer o botão close aparecer (-20+-70=-90) */
}

.container.show-nav + nav li {
  transform: translateX(0);
  transition-delay: .1s; /* Delay para iniciar a animação assim que a classe "show-nav" é adicionada */
}

/* Resolução da tela menor que 720px */
@media (max-width: 720px) {
  .container {
    padding: 50px 30px;
  }
  
  .circle-container {
    top: -75px;
    left: -75px;
  }
  
  .circle {
    width: 150px;
    height: 150px;
  }
  
  .circle button {
    height: 75px;
    font-size: 20px;
  }
}