html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

main {
  padding: 4rem;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

#myForm {
  width: 100%;
  height: 300px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

#formInput {
  width: 400px;
  height: 40px;
  text-align: center;
  border-radius: 1rem;
  border: 1px solid black;
}

#formBtn {
  font-family: "Quicksand", sans-serif;
  background: green;
  color: white;
  border-radius: 2rem;
  font-size: 1rem;
  height: 2.5rem;
  width: 100px;
  border: none;
  box-shadow: 0px 0px 10px -5px black;
}

#formBtn:hover {
  cursor: pointer;
}

.formCross {
  position: absolute;
  top: 6rem;
  left: calc(100% - 50px);
  width: 20px;
}

.formCross:hover {
  cursor: pointer;
}

.errorMsg {
  width: 200px;
  text-align: center;
  z-index: 4;
  position: absolute;
  top: 48%;
  left: calc(50% - 150px);
  color: black;
  font-family: "Mate", sans-serif;
}

.danger-sign {
  color: red;
}

#demo-instruction {
  font-family: "Quicksand", sans-serif;
  margin: 0 2rem;
}

#demo-link {
  font-family: "Quicksand", sans-serif;
}

.form {
  width: 100%;
  height: 100vh;
  background-color: white;
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
}

#nav-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 4rem;
  position: fixed;
  top: 0;
  left: 0;
  font-family: "Quicksand", sans-serif;
  box-shadow: 0px 0px 20px -5px black;
  background-color: white;
  z-index: 2;
}

li > a {
  text-decoration: none;
  color: black;
}

#nav-header {
  margin-left: 2rem;
}

#nav-link-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 800px;
  list-style-type: none;
}

.hidden {
  display: none;
}

.home-page {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100vh;
  gap: 1rem;
}

.home-pic {
  margin-top: -5rem;
  width: 600px;
  height: auto;
  box-shadow: 0px 0px 10px -5px black;
}

.home-text {
  margin-top: -8rem;
  padding-left: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-text > .home-header {
  font-family: "Quicksand", sans-serif;
  font-weight: 300;
  font-size: 6rem;
  margin: 0;
}

.home-text > .home-description {
  font-family: "Mate", serif;
}

.home-button {
  font-family: "Quicksand", sans-serif;
  background: green;
  color: white;
  border-radius: 2rem;
  font-size: 1rem;
  height: 2.5rem;
  width: 80px;
  border: none;
  box-shadow: 0px 0px 10px -5px black;
}

.home-button:hover {
  cursor: pointer;
}

.about-page {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.about-text {
  width: 400px;
}

.about-text > .about-header {
  font-family: "Quicksand", sans-serif;
  font-size: 3rem;
  font-weight: 300;
  margin: 0;
}

.about-text > .about-description {
  font-family: "Mate", serif;
}

.about-pic {
  width: 600px;
  height: auto;
  box-shadow: 0px 0px 10px -5px black;
}

.guide-page {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 2rem;
}

.instruction-image {
  width: 400px;
  height: 350px;
  background-size: cover;
}

.instruction-1 {
  background-image: url("../Photos/instruction-1.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0px 0px 10px -5px black;
  border-radius: 1rem;
}

.instruction-2 {
  background-image: url("../Photos/instruction-2.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0px 0px 10px -5px black;
  border-radius: 1rem;
}

.instruction-3 {
  background-image: url("../Photos/MapItForm.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0px 0px 10px -5px black;
  border-radius: 1rem;
}

.instruction-container {
  width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.instruction-header {
  font-family: "Quicksand", sans-serif;
  font-weight: 900;
  margin-bottom: 0;
}

.instruction-description {
  font-family: "Mate", serif;
}

.mechanism-page {
  gap: 2rem;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  position: relative;
}

.mechanism-pic {
  width: 550px;
  height: auto;
  box-shadow: 0px 0px 10px -5px black;
}

.mechanism-text {
  width: 500px;
}

.mechanism-header {
  font-family: "Quicksand", sans-serif;
  font-size: 4rem;
}

.mechanism-description {
  font-family: "Mate", serif;
}

footer {
  font-family: "Mate", sans-serif;
  text-align: center;
  border-top: 1px solid lightgray;
  margin-top: 4rem;
  padding: 2rem;
}

@media only screen and (max-width: 900px) {
  main {
    padding: 5px;
  }

  .home-text {
    width: min(400px, 90%);
    margin-top: 5rem;
    margin-left: -5rem;
  }

  .about-text {
    width: 90%;
  }

  .instruction-image {
    background-size: contain;
    width: min(400px, 90%);
  }

  .instruction-container {
    width: min(400px, 90%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #nav-bar > nav {
    display: none;
  }

  .home-page {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
  }

  .home-pic {
    width: min(400px, 90%);
  }

  .about-page {
    display: flex;
    flex-direction: column-reverse;
    justify-self: center;
    align-items: center;
  }

  .about-pic {
    width: min(400px, 90%);
  }

  .guide-page {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
    height: auto;
    margin-top: 4rem;
  }

  .mechanism-page {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
    margin-bottom: 4rem;
  }

  .mechanism-pic {
    width: 80%;
    margin-top: 1rem;
  }
  .mechanism-text {
    width: 80%;
  }
  .mechanism-header {
    width: 80%;
    margin-bottom: 1rem;
  }

  #demo-link > a {
    font-size: 0.5rem;
    word-wrap: break-word;
  }

  #demo-link {
    margin-left: 2rem;
  }

  #formInput {
    width: 300px;
  }

  #myForm {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    align-items: center;
  }

  .errorMsg {
    width: 200px;
    text-align: center;
    top: 50%;
    left: calc(50% - 100px);
  }
}

@media (max-width: 600px) {
  .errorMsg {
    top: 45%;
  }
}
