*{margin:0;padding:0;}

:root {
  --white: #ffffff;
  --blue: rgba(16, 16, 41, 0.76);
  --dark-blue: rgba(4, 4, 27, 0.85);
  --jet-blue: rgba(4, 4, 27, 0.99);
  --font-family: 'Dancing Script', script, serif;
}


html {
  font-size: 100%; /* 16px */
}

@media (min-width: 700px) {
  html {
    font-size: 125%; /* 20px */
  }
}

img {
  max-width: 100%;
  height: auto;
}

.mountains,
.stars {
  position: relative;
  top: 0;
  left: 100%;
  margin-left: -100%;
  width: 100%;
}


.hero {
  position: relative;
  background-color: var(--blue);
  animation: 5s swapBackground 6s linear infinite alternate;
}

.hero-images {
  overflow: hidden;
  font-size: 0; /* Remove gap between SVG edges and edge of viewport */
}


.tagline {
  padding: 0 16px;
  text-align: center;
  color: var(--white);
  font-family: var(--font-family);
  font-size: 3rem;
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 800px) {
  .tagline {
    font-size: 4.5rem;
  }
}

@media (min-width: 1200px) {
  .tagline {
    font-size: 5rem;
  }
}

.stars {
  fill: var(--white);
  width: 100%;
  height: 100%;
}

/* SVG stars animations */
path[data-name='star'] {
  animation: 4s twinkle-star ease-in-out 0.2s infinite alternate backwards;
}

path[data-name='star-big'] {
   animation: 2s twinkle-star-big ease-in-out infinite alternate backwards;
}

path[data-name='star-medium'] {
  animation: 3s twinkle-star-medium ease-in-out 0.4s infinite alternate;
}

/* Note: these 2 are additions from the lesson, adding in a shooting star animation */
path[data-name='shooting-star'] {
  opacity: 0;
  animation: 8s shooting-star 1s linear infinite;
}

path[data-name='shooting-star-alternate'] {
  opacity: 0;
  animation: 8s shooting-star 2s reverse linear infinite;
}


/* Keyframes */
@keyframes swapBackground {
  50% {
    background-color: var(--dark-blue);
    opacity: 0.8;
  }
  100% {
    background-color: var(--jet-blue);
    opacity: 0.9;
  }
}

@keyframes twinkle-star {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.4;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

@keyframes twinkle-star-big {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 1;
  }
}

@keyframes twinkle-star-medium {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.1;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

/* Note: this is an addition from the lesson, adding movement in stars that have a "shooting-star" data attribute in the SVG file. We finish properties changes at 20% and use the rest of the time as a delay until the next run, to simulate a delay before each repeat run  -
https://css-tricks.com/css-keyframe-animation-delay-iterations/ */
@keyframes shooting-star {
  0% {
    opacity: 0.1;
  }
  20% {
    opacity: 1;
    transform: translateX(-85px);
  }
  100% {
    transform: translateX(-85px);
  }
}