html,
body,
main,
#landing {
  height: 100%;
  width: 100%;
  margin: 0;
  font-family: "Inter", sans-serif;
}

nav {
  position: fixed;
  top: 10px;
  left: 10px;
  color: #eee;
  background-color: transparent;
  padding: 0.5rem;
  border-radius: 0.35rem;
  user-select: none;
  cursor: pointer;
  font-weight: 600;
}

nav a {
  color: #eee;
  text-decoration: none;
}

nav:hover {
  background-color: #1c1c1c;
}

/* LANDING SECTION */

#landing {
  background-color: #111;
  color: #eee;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#landing h1 {
  font-size: xxx-large;
  margin: 0;
  word-break: keep-all;
  width: fit-content;
}

#landing h2 {
  font-size: large;
  font-weight: 500;
}

#landing h1 #words {
  background-color: #eee;
  color: #111;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  animation: change 30s infinite;
}

#landing h1 #words::after {
  content: "";
  animation: change 30s infinite;
}

#landing #response {
  position: relative;
  margin-top: 1rem;
}

#landing #response a {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #eee;
  text-decoration: none;
  background-color: rgba(51, 51, 51, 0.502);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

#landing #response a:hover {
  background-color: rgba(51, 51, 51, 1);
}

#landing #response #json {
  margin: 0;
  font-family: inherit;
  font-size: medium;
  height: 30vh;
  width: 35vw;
  overflow: scroll;
  background-color: #222;
  border: 1px solid #333;
  padding: 0.25rem;
  border-radius: 0.5rem;
}

#landing #get-started code {
  background-color: #222;
  font-family: inherit;
  padding: 0.25rem;
  border-radius: 0.25rem;
}

@keyframes change {
  0% {
    content: "location";
  }
  10% {
    content: "timezone";
  }
  20% {
    content: "currency";
  }
  30% {
    content: "city";
  }
  40% {
    content: "browser";
  }
  50% {
    content: "calling code";
  }
  60% {
    content: "languages";
  }
  70% {
    content: "ip address";
  }
  80% {
    content: "country";
  }
  90% {
    content: "time";
  }
  100% {
    content: "location";
  }
}

/* FEATURES SECTION */

#features {
  height: fit-content;
  width: 100%;
  background-color: #222;
  color: #eee;
  display: flex;
  padding-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#features h2 {
  font-size: xx-large;
  margin: 0;
}

#features #cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding-top: 1.5rem;
}

#features #cards .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 5vw;
  max-width: 8vw;
  height: 5vw;
  max-height: 8vw;
  padding: 0.25rem;
  border-radius: 0.5rem;
  background-color: #2e2e2e;
  user-select: none;
  cursor: pointer;
}

#features #cards .card p {
  margin: 0;
  font-weight: 500;
}

#features #cards .card img {
  transition: transform 0.1s ease-in-out;
  pointer-events: none;
}

#features #cards .card:hover > img {
  transform: translateY(-0.25rem);
}

/* USE CASES SECTION */

#use-cases {
  height: fit-content;
  width: 100%;
  background-color: #222;
  color: #eee;
  display: flex;
  padding-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#use-cases h2 {
  font-size: xx-large;
  margin: 0;
}

#use-cases ul {
  list-style-type: none;
  width: 30vw;
}

#use-cases ul li:first-child {
  border-top: 1px solid #333;
}

#use-cases ul li {
  border-style: solid;
  border-color: #333;
  border-width: 0 1px 1px 1px;
  padding: 1rem;
  font-weight: 500;
  text-align: center;
  font-size: large;
  cursor: default;
}

#use-cases ul li:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

#use-cases ul li:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

#use-cases ul li:hover {
  background-color: #333;
}

/* FAQ SECTION */

#faq {
  height: fit-content;
  width: 100%;
  background-color: #222;
  color: #eee;
  display: flex;
  padding-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#faq h2 {
  font-size: xx-large;
  margin: 0;
}

.questions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.5rem;
  gap: 1rem;
}

.question {
  width: 30vw;
  background-color: #333;
  color: #eee;
  font-size: larger;
  border: 1px solid #444;
  border-radius: 0.5rem;
  padding: 1rem;
}

.question summary {
  cursor: pointer;
  user-select: none;
  font-size: large;
  font-weight: 500;
}

.question div {
  font-size: large;
  margin-top: 0.5rem;
}

.accordion details:not(:first-child) {
  margin-top: 1rem;
}

section:last-of-type {
  padding-bottom: 5rem;
}

/* FOOTER */

footer {
  height: fit-content;
  width: 100%;
  background-color: #333;
  color: #eee;
  display: flex;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer a {
  color: #eee;
}

/* MEDIA QUERIES */

@media screen and (max-width: 800px) {
  nav {
    z-index: 99;
  }
  #landing h1 {
    font-size: xx-large;
    text-align: center;
    line-height: 1.5;
    max-width: 90vw;
  }
  #landing h1 #words {
    display: block;
    width: fit-content;
    margin: 0 auto;
  }
  #landing h2 {
    font-size: medium;
    text-align: center;
    max-width: 90vw;
    margin-top: 1rem;
  }
  #landing #response,
  #json {
    width: 80vw !important;
    box-sizing: border-box;
  }
  #landing #response a {
    display: none;
  }

  #landing #get-started {
    text-align: center;
    line-height: 1.75;
  }

  #features h2 {
    font-size: x-large;
  }

  #features #cards {
    width: 95vw;
    height: fit-content;
  }

  #features #cards .card {
    width: 20vw;
    height: 20vw;
    padding: 2rem;
  }

  #use-cases h2 {
    font-size: x-large;
  }

  #use-cases ul {
    width: 80vw;
    padding: 0;
  }

  #use-cases ul li {
    width: 100%;
    box-sizing: border-box;
  }

  #faq h2 {
    font-size: x-large;
  }

  #faq .questions {
    width: 80vw;
  }

  #faq .questions .question {
    width: 100%;
  }
}
