body {
  margin: 2rem 4rem;
  font-family: Inter;
  z-index: 0;
}

#shadow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: 0.5s ease-in-out;
}

*::selection {
  background-color: hsl(5, 85%, 63%);
  color: hsl(36, 100%, 99%);
}

/* nav */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  gap: 2rem;
}

ul li {
  display: inline-block;
  color: hsl(236, 13%, 42%);
  transition: 0.3s ease;
}

ul li:hover {
  color: hsl(5, 85%, 63%);
  cursor: pointer;
}

/* main */

.container {
  margin-bottom: 2rem;
  display: grid;
  gap: 2rem;
  grid-template-areas:
    "hero hero aside"
    "hero hero aside"
    "hero hero aside"
    "card1 card2 card3";
}

/* hero */

.hero {
  grid-area: hero;
  display: grid;
  grid-template-columns: subgrid;
  gap: 2rem;
}

.hero .hero__image {
  background-image: url('assets/images/image-web-3-desktop.jpg');
  background-size: cover;
  grid-column: 1 / 3;
  grid-row-start: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 1;
}

.hero h1 {
  grid-column: 1;
  font-size: 2.5rem;
  margin: 0;
  width: 75%;
}

.hero .text {
  grid-area: paragraph;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;

  @media (max-width: 1200px) {
    padding: 0;
    gap: 1rem;
  }
}

.hero p {
  margin: 0;
  font-size: 15px;
  color: hsl(236, 13%, 42%);
  line-height: 2;
}

.hero button {
  display: block;
  border: none;
  background-color: hsl(5, 85%, 63%);
  padding: 0.5rem 2rem;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 2rem;
  transition: 0.3s ease;
  color: hsl(240, 100%, 5%);
}

.hero button:hover {
  cursor: pointer;
  background-color: hsl(240, 100%, 5%);
  color: hsl(36, 100%, 99%);
}

/* aside */

aside {
  background-color: hsl(240, 100%, 5%);
  padding: 2rem;
  grid-area: aside;

  & * {
    color: white;
  }
}

aside p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: hsl(0, 0%, 67%);
}

aside h2 {
  color: hsl(35, 77%, 62%);
  margin: 0;
}

aside h4 {
  color: hsl(36, 100%, 99%);
  transition: 0.3s ease;
}

aside h4:hover {
  color: hsl(35, 77%, 62%);
  cursor: pointer;
}

aside .new + .new::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: hsl(236, 13%, 42%);
  margin: 2rem 0;
}

/* cards */

.cards {
  display: contents;
}

.card {
  display: flex;
  flex-basis: 30%;
  flex-grow: 1;
}

.card img {
  width: 150px;
  height: 160px;
}

.card .content {
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.card .content h2 {
  color: hsl(5, 85%, 63%);
}

.card .content h3 {
  transition: 0.3s ease;
}

.card .content h3:hover {
  color: hsl(5, 85%, 63%);
  cursor: pointer;
}

.card .content p {
  color: hsl(236, 13%, 42%);
  font-size: 15px;
  line-height: 1.5;
}

.card .content * {
  margin: 0;
}

.card:first-child {
  grid-area: card1;
}

.card:nth-child(2) {
  grid-area: card2;
}

.card:last-child {
  grid-area: card3;
}

/* menu */

#menu {
  height: 100vh;
  width: 75vw;
  background: hsl(36, 100%, 99%);
  position: fixed;
  top: 0;
  transition: 0.5s ease-in-out;
  z-index: 2;
}

#menu__icon {
  display: none;
  cursor: pointer;
}

#menu__icon-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2rem;
  cursor: pointer;
}

#menu ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2rem;
  margin-top: 7rem;

  & * {
    color: hsl(240, 100%, 5%);
    padding: 1rem 0;
  }

  & *:hover {
    transform: translateX(0.75rem);
  }
}

/* responsive */

@media (max-width: 1200px) {
  .container {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 890px) {
  body {
    margin: 1rem;
  }
  .hero {
    display: contents;
  }
}

@media (max-width: 768px) {
  ul {
    display: none;
  }

  #menu__icon {
    display: block;
    font-size: 2rem;
    color: hsl(236, 13%, 42%);
    z-index: 2;
  }

  .hero h1 {
    width: 100%;
  }

  .hero button {
    margin-top: 0;
  }

  .hero .hero__image {
    background-image: url('assets/images/image-web-3-mobile.jpg');
    aspect-ratio: 686 / 600;
  }
}

/* attributes */

.hidden {
  right: -100%;
}

.visible {
  right: 0;
}

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