/* #edf5e1 - cream  */
/* #05386b - blue  */
/* #379683 - blue-green  */
/* #5cdb98 - green  */
/* #8ee4af - light-green  */

@keyframes bouncein {
  0% {
    transform: scale(0.1);
    opacity: 0;
    border-radius: 100%;
    width: 400px;
    margin: 0 auto;
  }

  60% {
    transform: scale(1.2);
    opacity: 1;
    width: 100%;
    border-radius: 20%;
    margin: 0 auto;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes drop {
  0% {
    opacity: 0;
    top: -100vh;
  }

  60% {
    opacity: 1;
    top: -30vh;
  }

  90% {
    top: 2vh;
  }

  100% {
    top: 0;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

* {
  color: #05386b;
  box-sizing: border-box;
}

body {
  background-color: #f1f1f1;
  width: 100vw;
  height: 100vh;
}

section {
  padding: 24px;
  width: 90vw;
  overflow: hidden;
  margin: 0 auto;
  animation: fade-in 1s ease-in-out;
}

h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

p {
  line-height: 20px;
  margin-bottom: 8px;
}

a {
  text-decoration: none;
}

a:hover {
  cursor: pointer;
}

nav li {
  opacity: 1;
  position: relative;
  animation-name: drop;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 1;
  margin-left: 24px;
}

#show-menu {
  visibility: hidden;
}

header {
  padding: 16px;
  background-color: #5cd595;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  box-shadow: 0 5px 5px -5px #333;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 10;
}

header > section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#desktop-nav {
  display: none;
}

label::after {
  content: "\2630";
  font-size: 24px;
}

.sidenav-wrapper {
  position: fixed;
  overflow-x: hidden;
  top: 70px;
  left: 0;
  bottom: 0;
  right: 0;
  visibility: hidden;
  z-index: 10;
}

#sidenav {
  position: fixed;
  right: -100vw;
  width: 80vw;
  min-width: 300px;
  height: 100%;
  transform: translateX(100vw);
  transition: transform 0.3s ease-in, visibility 0.3s ease-in,
    right 0.3s ease-in;
  background-color: #f1f1f1;
  box-shadow: -5px 0 5px -5px #333;
}

#sidenav > li {
  text-decoration: none;
  border-bottom: 1px solid #a4e9bf;
  margin-left: 0;
  list-style-type: none;
  padding: 16px;
  text-transform: capitalize;
}

#sidenav > li:hover {
  background: #8ee4af;
}

#show-menu:checked ~ .sidenav-wrapper {
  visibility: visible;
}

#show-menu:checked ~ .sidenav-wrapper > #sidenav {
  transform: translateX(0);
  right: 0;
}

#show-menu:checked ~ header label::after {
  content: "\2715";
}

.sidenav-overlay {
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #333;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

#show-menu:checked ~ .sidenav-wrapper > .sidenav-overlay {
  opacity: 0.4;
}

li.first {
  animation-duration: 1s;
}

li.second {
  animation-duration: 1.5s;
}

li.third {
  animation-duration: 1.75s;
}

li.fourth {
  animation-duration: 2.25s;
  animation-timing-function: ease-in;
}

#main-banner {
  background-image: url("https://images.unsplash.com/photo-1540573133985-87b6da6d54a9?ixlib=rb-1.2.1&auto=format&fit=crop&w=2555&q=80");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 400px;
  animation: bouncein 3s ease-in;
}

button {
  border: 1px solid #379683;
  box-shadow: none;
  border-radius: 2px;
  height: 36px;
  padding: 8px 16px;
}

#gallery {
  display: flex;
  flex-direction: column;
}

#gallery img {
  width: 100%;
}

.image-wrapper {
  margin-bottom: 5px;
  position: relative;
}

.image-overlay {
  position: absolute;
  top: 0;
  bottom: 3px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #333;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.image-overlay > h1 {
  color: white;
}

.image-overlay:hover {
  opacity: 0.6;
}

@media only screen and (min-width: 640px) {
  #mobile-menu-button {
    display: none;
  }

  #desktop-nav,
  #desktop-nav > ul {
    display: flex;
  }

  #gallery {
    flex-direction: row;
    flex-wrap: wrap;
    width: 90%;
    margin: 0 auto;
  }

  .image-wrapper {
    margin-right: 8px;
    width: calc((100% / 2) - 4px);
  }

  .image-wrapper:nth-child(2n + 2) {
    margin-right: 0;
  }
}

@media only screen and (min-width: 800px) {
  .image-wrapper {
    width: calc((100% / 3) - 5.5px);
  }

  .image-wrapper:nth-child(2n + 2) {
    margin-right: 8px;
  }

  .image-wrapper:nth-child(3n + 3) {
    margin-right: 0;
  }
}

@media only screen and (min-width: 1140px) {
  #gallery {
    width: 1100px;
  }

  section {
    width: 1100px;
    margin: 0 auto;
  }

  .image-wrapper {
    width: calc((100% / 4) - 6px);
  }

  .image-wrapper:nth-child(3n + 3) {
    margin-right: 8px;
  }

  .image-wrapper:nth-child(4n + 4) {
    margin-right: 0;
  }
}
