@import url("https://fonts.googleapis.com/css?family=Roboto+Mono");
html {
  box-sizing: border-box;
  background: #f2f2f2;
  font-family: "Roboto Mono", monospace;
  font-size: 20px;
  font-weight: 200;
}

body {
  margin: 0;
}

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

.panels {
  min-height: 100vh;
  overflow: hidden;
  display: flex;
}
/* .panels p:first-child{
  display:none;
} */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  text-align: center;
  align-items: center;
  transition: font-size 0.5s ease-out, flex 0.5s ease-out, background 0.2s;
  font-size: 20px;
  position: relative;
}
.panel:before, .panel:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  background-size: cover;
  background-position: center;
  transition: all 0.2s ease;
}
.panel:before {
  /* background: rgba(0, 0, 0, 0.1); */
}
.panel:after {
  /* z-index: -1; */
  /* filter: grayscale(100%); */
}
.panel.active {
  flex: 5;
}

.panel1:after {
  background-image: url(../images/lsd-index-1.jpg);
}

.panel2:after {
  background-image: url(../images/lsd-index-2.jpg);
}

.panel3:after {
  background-image: url(../images/lsd-index-3.jpg);
}

.panel4:after {
  background-image: url(../images/lsd-index-4.jpg);
}

/* .panel5:after {
  background-image: url(../images/a0856cce3fb31a95a84c06ed27426dc8.webp);
} */

.panel > * {
  margin: 0;
  width: 100%;
  transition: transform 0.5s;
/*   flex: 1 0 auto; */
  display: flex;
  justify-content: center;
  align-items: center;
}
/* .panel > *:first-child {
  transform: translateY(-100%);
} */

.panel.open > *:last-child{
  transform: translateY(0);
  z-index:2;
  font-size:16px;
  text-align: left;
  padding:0 20px;
  letter-spacing: 0;
	    opacity: 1;
}
.panel > *:last-child {
  transform: translateY(100%);
	height:255px;
	    opacity: 0;
}
.panel p {
/*   text-transform: lowercase; */
  letter-spacing: 0.2em;
  font-size: 0.6em;
}
.panel p:nth-child(1) {
  font-size: 1em;
  position: relative;
  z-index: 1;
	height:4em;
}
.panel p:nth-child(1):before {
  content: "";
  display: block;
  background: #222;
  position: absolute;
  height: 100%;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  z-index: -1;
  right: 0;
  opacity: 0.5;
  transition: all 0.2s ease;
}
.panel.active {
  font-size: 40px;
}
.panel.active:before {
  background: rgba(0, 0, 0, 0.9);
}
.panel.active p:nth-child(1):before {
  opacity: 0;
}
@media screen and (max-width:767px) {
  .panels{
    min-height: unset;
    overflow:unset;
    width:100%;
    height: auto;
    flex-direction: column;
  }
  .panel p:nth-child(1){
    
  }
  /* .panel p:nth-child(1):before{
    display: none;
  } */
  .panel{
    margin-bottom: 0;
    max-height:200px;
    /* flex: 0 0 100%; */
    width:100%;
    /* flex-wrap: wrap; */
  }
  .panel.active{
    max-height: unset;
    height:auto;
  }
  .panel.active{
    flex: 0 0 100%;
  }
  .panel p:nth-child(1){
    position: absolute;
  }
  .panel.open > *:last-child{
    padding:20px;
  }
  .panel.open p:first-child{
    display:none;
  }
}