body {
  font-family: sans-serif;
}

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

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: #eee;
  height: 100vh;
  min-height: 35em;
}

.text {
  padding: 2em;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

h1 {
  font-family: "Oswald", sans-serif;
  font-size: 3em;
  text-transform: uppercase;
  line-height: 1em;
  font-size: clamp(2em, 5vw, 5em);
}

p {
  margin-top: 2em;
  line-height: 30px;
  max-width: 550px;
}

.planets {
  position: relative;
  background: url(./img/stars.jpg) center no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: rotate 200s linear infinite;
}

.planet {
  width: 20em;
  height: 20em;
  background: url(./img/mars.jpg);
  border-radius: 50%;
  box-shadow: 
    inset -2em -2em 2em #000,
    -0.5em -0.5em 1em #ff9462;
  position: relative;
  animation: rotate 10s linear infinite;
  z-index: 1;
}

.moon {
  background: url(./img/moon.jpg);
  border-radius: 50%;
  box-shadow: 
    inset -1.5em -1.5em 1.5em #000,
    -0.2em -0.2em 0.5em #ccc;
  width: 6em;
  height: 6em;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: 
    rotate 5s linear infinite,
    orbit 20s infinite ease-in-out;
  z-index: 0;
}

.planets, .planet, .moon {
  background-repeat: repeat;
  background-size: 200% 100%;
}

@keyframes rotate {
  to{ background-position: -200% 0;}
}

@keyframes orbit {
  0% {
    left: 45%;
    transform: translate(-50%, -50%) scale(0.3);
  }
  25% {
    left: 5%;
    transform: translate(-50%, -50%) scale(0.6);
  }
  45% {z-index: 1;}
  50% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    left: 95%;
    transform: translate(-50%, -50%) scale(0.6);
  }
  95% {z-index: 0;}
  100% {
    left: 65%;
    transform: translate(-50%, -50%) scale(0.3);
  }
}

@media screen and (max-width: 1000px) {
  .planets {
    font-size: 12px;
  }
}

@media screen and (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
}