@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&family=Sora:wght@100..800&display=swap');

:root {
  --primary: #219ebc;
  --secondary: #8ecae6;
  --dark-shade: #023047;
  --complementary-1: #ffb703;
  --complementary-2: #fb8500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

header {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 1fr;
  background-color: var(--primary);
  z-index: 99;
  border-bottom: 1px solid var(--dark-shade);
}

main {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 20px;
}

#nav-bar {
  top: 0;
  position: sticky;
  display: flex;
  padding: 10px 0;
  width: 100%;

  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
}

#nav-bar a {
  text-decoration: none;
  color: #000;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  padding-bottom: 2px;
  transition: 0.7 all ease-in;
}

#nav-bar a:hover {
  color: var(--complementary-1);
}

#hero {
  width: 100%;
  height: 80vh;
  position: relative;
  background: center / cover no-repeat
    url(https://cdn.pixabay.com/photo/2019/01/28/11/48/chess-3960184_1280.jpg);
  color: #fff;
  z-index: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: rgba(0, 0, 0, 0.75);
  z-index: -1;
}

#hero-headline {
  padding: 0 20px;
  font-size: 2rem;
  font-family: 'Sora', sans-serif;
  color: var(--secondary);
  line-height: 3rem;
  margin-top: -100px;
}

#sub-headline {
  font-size: 0.8rem;
  font-family: 'Rubik', sans-serif;
  color: #fff;
  padding: 10px 20px;
  background-color: var(--dark-shade);
  width: 80%;
}

#btn-newsletter {
  font-family: 'Rubik';
  font-weight: 700;

  border-radius: 20px;
  background-color: var(--complementary-2);
  padding: 10px;
  color: #fff;
  text-decoration: none;
  margin-top: 50px;
  transition: 0.5 all ease-in-out;
}

#btn-newsletter:hover {
  background-color: #fff;
  color: var(--complementary-2);
  transform: scale(1.3);
}

.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

#features,
#materials,
#pricing,
#newsletter {
  scroll-margin-top: 215px;
}

#features {
  display: grid;
  gap: 2px;
  background-color: var(--primary);
}

.feature {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.feature-title {
  font-family: Rubik, sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.feature-desc {
  font-family: Sora;
  font-weight: 400;
  font-size: 0.8rem;
  padding: 2px 5px 2px 0;
  text-align: start;
  line-height: 1.5rem;
  width: 100%;
}

.icon {
  font-size: 2rem;
  color: var(--complementary-1);
}
#materials {
  background-color: #fff;
  display: flex;
  flex-wrap: wrap;
}

.material {
  display: grid;
  flex-wrap: wrap;
  margin: 20px;
  padding: 10px;
  gap: 2px;
  background-color: var(--complementary-1);
  color: #000;
  border-radius: 5%;
}

.material:hover {
  background-color: var(--secondary);
}

.material-title {
  font-family: Rubik, sans-serif;
  font-weight: 900;
  text-align: center;
  font-size: 1.3rem;
  padding-top: 5px;
}

.material-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 10px;
  border-radius: 5%;
}

#pricing {
  background-color: var(--primary);
  font-family: Rubik, sans-serif;
  width: 100%;
  display: grid;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

#pricing-title {
  text-align: center;
  padding-top: 5px;
}

#pricing-table {
  border-collapse: collapse;
  padding: 20px 10px;
  margin: 10px;
}

#pricing-table th,
#pricing-table td {
  border: 1px solid #9c9c9c;
  background-color: #fff;
  padding: 15px 10px;
  text-align: left;
}

#pricing-table th {
  background-color: var(--complementary-1);
}

.pricing-btn {
  padding: 8px;
  text-decoration: none;
  font-weight: 500;
  background-color: var(--dark-shade);
  color: white;
  margin: 5px 0;
}

.pricing-btn:hover {
  background-color: var(--complementary-1);
  color: #000;
}

#newsletter {
  font-family: Rubik, sans-serif;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary);
}

#newsletter-banner {
  width: 100%;
  background-color: #fff;
}

#newsletter-caption {
  background-color: var(--complementary-1);
  transform: skew(-200deg);
  border-radius: 2%;
  margin: 15% 10%;
  padding: 20px;
  text-align: center;
  line-height: 1.3rem;
  font-size: 0.7rem;
}

#newsletter > div {
  width: 100%;
  display: grid;
  gap: 20px;
  padding: 50px 20px;
}

#newsletter-sub-caption {
  font-size: 1rem;
  padding: 0 20px;
}

#form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 0 20px;
}

#email {
  font-family: inherit;
  width: 100%;
  padding: 10px;
}

#submit {
  font-family: inherit;
  border: none;
  padding: 8px 20px;
  font-weight: 500;
  background-color: var(--complementary-1);
  color: #000;
  margin: 5px 0;
}

#submit:hover {
  background-color: var(--dark-shade);
  color: #fff;
}

#chess-video {
  position: relative;
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%;
}

#chess-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

footer {
  background-color: var(--dark-shade);
  color: #fff;
  width: 100%;
  display: flex;
  padding: 10px 0;
}

#footer-text {
  font-family: Rubik, sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  text-align: center;
  margin: 0 auto;
}

@media only screen and (min-width: 380px) and (max-width: 425px) {
  #newsletter-caption {
    font-size: 1rem;
  }
}

@media only screen and (min-width: 768px) {
  #features,
  #materials,
  #pricing,
  #newsletter {
    scroll-margin-top: 200px;
  }

  #nav-bar {
    flex-direction: row;
    justify-content: space-around;
    padding: 20px;
  }

  #nav-bar a {
    font-size: 1.5rem;
  }

  #hero-headline {
    font-size: 2.5rem;
  }
  #sub-headline {
    font-size: 1.2rem;
  }

  #btn-newsletter {
    font-size: 1.5rem;
    padding: 1.5rem;
  }

  #btn-newsletter:hover {
    transform: scale(1.1);
  }

  .icon {
    font-size: 3rem;
  }

  #features {
    padding: 20px 0;
  }
  .feature {
    padding: 1.2rem 5rem;
  }
  .feature-title {
    font-size: 1.8rem;
  }
  .feature-desc {
    font-size: 1.2rem;
  }

  #materials {
    padding: 2rem 4rem;
  }
  .material {
    margin-left: 4rem;
    margin-right: 4rem;
  }
  .material-title {
    font-size: 2rem;
  }

  #pricing {
    padding: 2rem 4rem;
  }
  #pricing-title {
    font-size: 2rem;
  }

  #newsletter-caption {
    padding: 3rem 20px;
    font-size: 1.5rem;
  }

  #newsletter > div {
    padding: 3rem 4rem;
  }

  #newsletter-sub-caption {
    font-size: 1.5rem;
    padding: 0 20px;
  }

  #email {
    font-size: 1.5rem;
  }

  #submit {
    font-size: 1.4rem;
  }

  #pricing-table {
    font-size: 1.5rem;
  }
}

@media only screen and (min-width: 1024px) {
  #hero {
    height: 100vh;
  }
  #features,
  #materials,
  #pricing,
  #newsletter {
    scroll-margin-top: 70px;
  }

  #features,
  #materials,
  #pricing {
    padding: 4rem 10%;
  }

  header {
    grid-template-columns: 1fr 1.5fr;
    column-gap: 3em;
    padding: 0 10%;
  }

  #hero-headline {
    margin: 0 4em;
    font-size: 2.5rem;
    line-height: 4rem;
  }

  #sub-headline {
    width: auto;
    font-size: 1.3rem;
  }

  #nav-bar a {
    font-size: 1.2rem;
  }

  #features {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
  }
  .feature {
    padding: 0;
  }

  #materials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .material {
    margin: 1rem;
  }

  .material-title {
    font-size: 1.2rem;
  }

  #newsletter-caption {
    width: 70%;
    padding: 4rem 10%;
    margin: 8% auto;
    font-size: 1.5rem;
  }

  #newsletter > div:last-of-type {
    width: 80%;
    margin: 0 auto;
    font-size: 2rem;
  }
  #chess-video {
    width: 80%;
    margin: 2rem auto;
  }

  #chess-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

@media only screen and (min-width: 1440px) {
  #hero-headline {
    font-size: 3em;
    padding-left: 2em;
    padding-right: 2em;
    line-height: 1.5em;
  }

  #sub-headline {
    font-size: 2em;
  }

  .icon {
    font-size: 4rem;
  }

  .feature-title {
    font-size: 2.5rem;
  }

  .feature-desc {
    font-size: 1.6rem;
    line-height: 2rem;
  }

  #nav-bar a {
    font-size: 1.8rem;
  }

  .material-title {
    font-size: 2em;
  }

  #pricing-title {
    font-size: 2.5rem;
    padding-bottom: 2rem;
  }
  #pricing-table {
    font-size: 2rem;
    width: 80%;
    margin: 0 auto;
  }

  #newsletter-caption {
    font-size: 2rem;
  }

  #newsletter-sub-caption {
    font-size: 2.2rem;
    width: 80%;
    margin: 0 auto;
  }
  #email {
    font-size: 2.5rem;
    width: 70%;
    margin: 2rem auto;
  }

  #submit {
    font-size: 2.5rem;

    margin: 0 auto;
  }

  #footer-text {
    font-size: 1.2em;
  }
}
