* {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: 16px;
}

header {
  height: 77px;
  position: relative;
}
header::before {
  position: absolute;
  display: block;
  content: "";
  width: 100%;
  height: 24px;
  background-color: #887f9e;
  left: 0px;
  top: 35px;
  z-index: -1;
}
header img {
  margin: 0 auto;
  display: block;
}

main {
  height: calc(100% - 77px);
  position: relative;
  overflow: hidden;
}

.splash {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #fff;
  width: 100%;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease-in;
}
.splash.closed {
  opacity: 0;
  transform: scale(2);
  pointer-events: none;
}
.splash h1 span {
  font-family: "Josefin Sans", "Roboto", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  display: block;
  text-align: center;
  font-size: 50px;
  line-height: 50px;
  letter-spacing:15px;
}
.splash h1 span:nth-of-type(2) {
  font-size: 20px;
  line-height: 30px;
  padding-bottom: 5px;
  letter-spacing: 5px;
}
.splash button {
  border: 3px solid #403952;
  padding: 1em;
  font-size: 20px;
  text-transform: uppercase;
  background-color: #fff;
  color: #403952;
  margin-top: 2em;
  cursor: pointer;
}
.splash button:hover, .splash button:active {
  background-color: #403952;
  color: #fff;
}
@media (min-height: 500px) {
  .splash h1 span {
    font-size: 80px;
    line-height: 80px;
    letter-spacing: 25px;
  }
  .splash h1 span:nth-of-type(2) {
    font-size: 30px;
    line-height: 50px;
    padding-bottom: 10px;
    letter-spacing: 8px;
  }
  .splash button {
    padding: 1em;
    font-size: 20px;
    margin-top: 2em;
  }
}

.gallery {
  width: 100%;
  height: 100%;
  position: relative;
  scroll-snap-type: x mandatory;
  overflow-x: scroll;
  scrollbar-width: none;
  display: flex;
}
.gallery::-webkit-scrollbar {
  display: none;
}

.gallery.grid {
  display: grid;
  grid-template: 50% 50% 0px / min(40vh, 50%) min(40vh, 50%);
  justify-content: center;
  align-content: center;
  padding: 20px;
}
.gallery.grid nav .prev, .gallery.grid nav .next, .gallery.grid figcaption section {
  display: none;
}
.gallery.grid figure {
  grid-template: calc(100% - 80px) 80px / 100%;
  padding: 10px;
  overflow: hidden;
}
.gallery.grid figcaption {
  background-color: #fff;
  color: #000;
}
.gallery.grid figcaption h2 {
  font-size: 15px;
  margin: 0;
}
.gallery.grid figcaption h2::first-letter {
  font-size: 20px;
}

figure {
  display: grid;
  grid-template: calc(100% - 150px) auto / 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  align-items: center;
}
figure img, figure canvas {
  max-height: 100%;
  max-width: min(800px, 100%);
  margin: 0 auto;
}
figure figcaption {
  background-color: #403952;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.5;
  text-align: center;
}
figure figcaption h2 {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 400;
  font-family: "Josefin Sans";
  padding-left: 0.3em;
}
figure figcaption h2, figure figcaption section {
  max-width: 800px;
  margin: 0 20px;
}
figure.secret {
  display: none;
}
@media (min-width: 840px) {
  figure figcaption h2, figure figcaption section {
    margin: 0 auto;
  }
}

nav {
  position: fixed;
  top: 77px;
  left: 0;
  width: 100%;
  height: calc(100% - 150px - 77px);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav button {
  pointer-events: all;
  background-color: transparent;
  border: none;
  color: #887f9e;
  cursor: pointer;
  transition: color 50ms ease-in-out;
  font-size: 60px;
  line-height: 60px;
  padding: 10px;
  opacity: 0.5;
}
nav button:hover {
  color: #403952;
  transition: color 150ms ease-in-out;
}
nav button:disabled {
  opacity: 0;
  pointer-events: none;
}
nav .grid-toggle {
  position: absolute;
  top: -10px;
  right: 0;
  font-size: 40px;
  line-height: 24px;
}
@media (min-width: 840px) {
  nav button {
    font-size: 80px;
    line-height: 80px;
    padding: 40px;
    opacity: 1;
  }
  nav .grid-toggle {
    top: -40px;
  }
  nav button:disabled {
    opacity: 0;
  }
}