@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #fafaff;
  font-family: "DM Serif Display", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  width: 90vw;
}

.panel {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  font-size: 5em;
  height: 80vh;
  flex: 0.5;
  margin: 10px;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  transition: all 0.4s ease-in, flex 1s;
}

.panel:hover {
  transform: translateY(-10px);
  box-shadow: 3px 3px 3px 2px rgba(70, 44, 74, 0.3);
}

.panel h3 {
  opacity: 0;
  position: absolute;
  left: 0.5em;
  bottom: 0.25em;
  font-weight: 400;
}

.active {
  flex: 5;
}

.panel.active h3 {
  opacity: 1;
  transition: all 1s ease-in 0.4s;
}

@media (max-width: 1024px) {
  .panel {
    font-size: 3.5em;
  }
}

@media (max-width: 810px) {
  .container {
    flex-direction: column;
    width: 100%;
    height: 100%;
  }

  .panel {
    max-width: 100%;
    border-radius: 25px;
    margin: 5px;
  }
}

@media (max-width: 480px) {
  .panel {
    font-size: 3em;
  }
}
