@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700;800;900&family=Permanent+Marker&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Mulish", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background-color: rgb(14, 16, 26);
  padding: 20px 50px;
  overflow: hidden;
}

header h1 {
  font-family: "Permanent Marker", cursive;
  font-size: clamp(2.5rem, 3vw, 3rem);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 30px;
  text-align: center;
}

main {
  display: flex;
  width: 90vw;
  margin: 20px;
}

.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  border-radius: 50px;
  color: #fff;
  cursor: pointer;
  flex: 0.5;
  margin: 10px;
  transition: flex 0.5s linear;
}

.hero:nth-child(1) {
  background-image: url(images/harry-potter.png);
}

.hero:nth-child(2) {
  background-image: url(images/hermione-granger.png);
}

.hero:nth-child(3) {
  background-image: url(images/ron-weasley.png);
}

.hero:nth-child(4) {
  background-image: url(images/severus-snape.png);
}

.hero:nth-child(5) {
  background-image: url(images/rubeus-hagrid.png);
}

.hero:nth-child(6) {
  background-image: url(images/bellatrix-lestrange.png);
}

.hero:nth-child(7) {
  background-image: url(images/sirius-black.png);
}

.hero:nth-child(8) {
  background-image: url(images/albus-dumbledore.png);
}

.hero:nth-child(9) {
  background-image: url(images/draco-malfoy.png);
}

.hero:nth-child(10) {
  background-image: url(images/dobby.png);
}

.hero:nth-child(11) {
  background-image: url(images/neville-longbottom.png);
}

.hero:nth-child(12) {
  background-image: url(images/lord-voldemort.png);
}

.hero h1 {
  position: absolute;
  font-size: 1.5rem;
  bottom: 20px;
  left: 20px;
  opacity: 0;
}

.hero.active {
  flex: 5;
}

.hero.active h1 {
  opacity: 1;
  transition: opacity 0.3s ease-in 0.4s;
}

@media (max-width: 1000px) {
  .hero:nth-of-type(7),
  .hero:nth-of-type(8),
  .hero:nth-of-type(9),
  .hero:nth-of-type(10),
  .hero:nth-of-type(11) {
    display: none;
  }
}

@media (max-width: 650px) {
  .hero:nth-of-type(4),
  .hero:nth-of-type(5),
  .hero:nth-of-type(6),
  .hero:nth-of-type(7),
  .hero:nth-of-type(8),
  .hero:nth-of-type(9),
  .hero:nth-of-type(10),
  .hero:nth-of-type(11),
  .hero:nth-of-type(12) {
    display: none;
  }
}
