*,
*:before,
*:after {
  box-sizing: border-box;
}

/* Variables */
:root {
  --font-family: 'Space Mono', monospace;
  --primary-color: #333333;
  --color-black: #000;
  --color-paragraph: #4f4f4f;
  --secondary-color: #fff;
  --font-size: 24px;
  --font-size-h1: 64px;
  --line-height: 30px;
  --heading-line-height: 50px;
  --word-spacing: 6px;
}

body {
  font-family: var(--font-family);
}

/* 404 not found */

.not-found {
  padding: 8px 0 40px 40px;
}

.not-found p {
  color: var(--primary-color);
  font-size: var(--font-size);
  font-weight: 700;
  font-family: 'Inconsolata';
  letter-spacing: -0.08em;
}

.main-body {
  display: flex;
}
.scarecrow-image {
  width: 50%;
  padding-left: 20px;
}

.scarecrow-image img {
  width: 100%;
  padding-right: 50px;
}

/* Text section on right */

.main-text {
  width: 50%;
  padding-right: 20px;
}

.main-text h1 {
  font-size: var(--font-size-h1);
  line-height: 70px;
  font-weight: bold;
  width: 100%;
}

.main-text p {
  width: 70%;
  font-size: var(--font-size);
  line-height: var(--line-height);
  word-spacing: var(--word-spacing);
  color: var(--color-paragraph);
}

/* Back to home page button */

.btn-tohomepage {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  padding: 15px 20px;
  color: var(--secondary-color);
  font-size: 14px;
  word-spacing: var(--word-spacing);
  cursor: pointer;
  margin-top: 20px;
  font-style: normal;
  font-weight: bold;
  line-height: 21px;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.btn-tohomepage:hover {
  background-color: var(--color-black);
}

/* Media for responsiveness */
@media screen and (max-width: 830px) {
  .main-body {
    display: block;
    margin: 0 5% 0 5%;
  }

  .not-found {
    padding: 8px 0 80px 40px;
  }

  /* Image section on left*/

  .scarecrow-image {
    width: 100%;
    padding: 0 2px 0 2px;
  }

  .scarecrow-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .main-text {
    width: 100%;
    padding: 0 2px 0 2px;
  }

  .main-text h1 {
    font-size: 40px;
    line-height: 50px;
    font-weight: bold;
    width: 100%;
    letter-spacing: -0.035em;
  }

  .main-text p {
    width: 100%;
    word-spacing: 5px;
  }
}

/* Footer section */

footer {
  float: left;
  margin-top: 50px;
  width: 100%;
  text-align: center;
  font-family: Montserrat;
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 17px;
}

.design-by a {
  text-decoration: none;
  color: #bdbdbd;
  font-weight: 800;
  text-decoration: underline;
}

.design-by p {
  color: #bdbdbd;
}
