@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

body {
  font-family: 'Permanent Marker', Arial, Helvetica, sans-serif;
  background-color: #193549;
  color: #fff;
  text-align: center;
  box-sizing: content-box;
  margin: 0;
}

.panels {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  transition:
    font-size 0.7s cubic-bezier(0.19, 0.31, 0.7, -0.11),
    flex-grow 0.7s cubic-bezier(0.19, 0.31, 0.7, -0.11),
    background 0.2s;
}

.panel:hover {
  cursor: pointer;
}

.panel>p {
  margin: 0;
  padding: 10px;
  text-transform: uppercase;
  transition: transform 0.5s;
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.panel img {
  position: absolute;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.panel1 img {
  object-position: 60%;
}

.panel2 img {
  object-position: 35%;
}

.panel3 img {
  object-position: 65%;
}

.panel4 img {
  object-position: 52%;
}

.panel5 img {
  object-position: 70%;
}

.panel>p:nth-of-type(2) {
  font-size: 1.5em;
}

.panel>p:first-of-type {
  transform: translateX(-100%);
}

.panel>p:last-child {
  transform: translateX(100%);
}

.active>p:first-of-type,
.active>p:last-child {
  transform: translate(0);
}

.open {
  flex: 5;
  font-size: 1.5em;
}

a,
a:visited,
a:active {
  color: #fff;
}

footer {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.8em;
}

@media only screen and (min-width: 1024px) {
  .panels {
    flex-direction: row;
  }
  
  .panel {
    flex-direction: column;
  }

  .panel>p:first-of-type {
    transform: translateY(-100%) translateX(0);
  }

  .panel>p:last-child {
    transform: translateY(100%) translateX(0);
  }

  .active>p:first-of-type,
  .active>p:last-child {
    transform: translate(0);
  }

  .panel>p:nth-of-type(2) {
    font-size: 2em;
  }

  .open {
    font-size: 2em;
  }

  footer {
    font-size: 1em;
  }
}