html {
  box-sizing: border-box;
  font-family: 'helvetica neue';
  font-size: 20px;
  font-weight: 200;
}

body {
  margin: 0;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.panels {
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  overflow: hidden;
}

.panel {
  text-align: center;
  height: 100vh;
  box-shadow: 2px 2px 10px 10px rgba(0, 0, 0, 0.116);
  flex: 1;
  color: black;
  font-size: 40px;
  font-weight: bold;

  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.5s;

}


.panel>* {
  transition: all 0.5s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

  margin: 0;
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 3rem;
}




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

.panel.open-active > *:first-child {
  transform: translateY(0%);
}

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

.panel.open-active > *:last-child {
  transform: translateY(0%);
}

.open {
  flex-grow: 5;
}

.panel1 {
  background-image: url(https://source.unsplash.com/nytYUjp5a_g/1500x1500);
}

.panel2 {
  background-image: url(https://source.unsplash.com/mnEA-GPB0Pc/1500x1500);
}

.panel3 {
  background-image: url(https://source.unsplash.com/KZWmMYBRzQE/1500x1500);
}

.panel4 {
  background-image: url(https://source.unsplash.com/LdCpEcMQgQI/1500x1500);
}

.panel5 {
  background-image: url(https://source.unsplash.com/hqoCVZpqXQ0/1500x1500);
}