:root {
  --soft-orange: hsl(35, 77%, 62%);
  --soft-red: hsl(5, 85%, 63%);
  --off-white: hsl(36, 100%, 99%);
  --grayish-blue: hsl(233, 8%, 79%);
  --dark-grayish-blue: hsl(236, 13%, 42%);
  --very-dark-blue: hsl(240, 100%, 5%);
  --fs: 15px;
}

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

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  margin: 0 15px;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 70px;
  margin: 10px 0;
}

.header__logo--and--button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header__logo {
  height: 30px;
}

.overlay {
  position: absolute;
  height: 100vh;
  background-color: black;
  opacity: 0.6;
  z-index: 5;
  width: 100vw;
  left: 0;
  top: 0;
  display: none;
}

.add-overlay {
  display: block;
}

.header__nav {
  position: absolute;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.5, 0, 0.5, 1);
  background-color: var(--off-white);
  width: 250px;
  height: 100vh;
  z-index: 100;
}

.nav__toggle {
  background: none;
  border: none;
}

.header__nav__list {
  list-style: none;
  position: absolute;
  padding: 0;
  top: 100px;
}

.header__nav__list__item {
  margin: 20px 10px;
  font-size: 20px;
  color: var(--very-dark-blue);
  font-weight: 400;
}

.nav-open .header__nav {
  transform: translateX(0%);
}

.fixed {
  overflow: hidden;
}

.close--button {
  position: absolute;
  right: 0;
  padding: 1rem;
}

.hero--image {
  width: 100%;
}

.hero--content--title {
  color: var(--very-dark-blue);
  font-size: 45px;
  font-weight: 600;
  margin: 20px 0;
  line-height: 1;
}

.hero--content--text {
  color: var(--dark-grayish-blue);
  font-size: 16px;
  line-height: 1.6;
}

.hero--content--button {
  background-color: var(--soft-red);
  color: var(--off-white);
  letter-spacing: 2px;
  font-size: var(--fs);
  width: 180px;
  padding: 1rem;
  border: none;
  margin-top: 10px;
  margin-bottom: 30px;
}

.news--list {
  margin: 20px 0;
  background-color: var(--very-dark-blue);
  padding: 1rem 2rem;
}

.news--item--bottom--border {
  border-bottom: thin solid var(--off-white);
}

.news--list--title {
  color: var(--soft-orange);
  margin-top: 10px;
  font-size: 36px;
  font-weight: 500;
}

.news--list--item h2 {
  color: var(--off-white);
  font-size: 20px;
  margin-top: 30px;
}

.news--list--item p {
  color: var(--dark-grayish-blue);
  margin-bottom: 20px;
}

.article--list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.article--list--item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin: 10px 0;
}

.article--list--item img {
  height: 120px;
  margin-right: 10px;
}

.article--list--item--content {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
  height: 150px;
}

.article--list--item--content h2 {
  margin: 0;
  color: var(--grayish-blue);
  font-size: 30px;
  vertical-align: top;
  line-height: 24px;
}

.article--list--item--content h3 {
  margin: 10px 0;
}

.article--list--item--content p {
  margin: 0;
  color: var(--dark-grayish-blue);
  font-size: var(--fs);
  text-align: left;
  max-width: 300px;
  line-height: 1.6;
  font-size: 17px;
}

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: auto;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (min-width: 1440px) {
  body {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
  }

  main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 200px;
    align-items: flex-start;
    justify-content: center;
    column-gap: 30px;
    row-gap: 30px;
  }

  .header {
    margin: 30px 0;
  }

  .hero {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .hero--content {
    display: grid;
    grid-template-columns: 4fr 1fr 4fr;
    grid-template-rows: 1fr 1fr;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .hero--content--title {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }

  .hero--content--text {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }

  .hero--content--button {
    margin-top: 30px;
    grid-column: 3 / 4;
    grid-row: 2 / 3;
  }

  .news--list {
    margin: 0;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .news--list--item p {
    margin-bottom: 30px;
    color: var(--off-white);
    line-height: 1.6;
  }

  .article--list {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
  }

  .nav__toggle {
    display: none;
  }

  .close--button {
    display: none;
  }

  .header__nav {
    all: initial;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .header__nav__list {
    all: initial;
  }

  .header__nav__list {
    display: flex;
    flex-direction: row;
    list-style: none;
    justify-content: space-between;
    align-items: center;
    width: 500px;
  }

  .header__nav__list__item {
    color: var(--dark-grayish-blue);
    font-size: 16px;
  }

  .hero--content--title {
    font-size: 60px;
  }

  .article--list {
    flex-direction: row;
  }

  .hero--image {
    content: url("./assets/images/image-web-3-desktop.jpg");
  }
}
