@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --Red: hsl(0, 78%, 62%);
  --Cyan: hsl(180, 62%, 55%);
  --Orange: hsl(34, 97%, 64%);
  --Blue: hsl(212, 86%, 64%);
  --Very-Dark-Blue: hsl(234, 12%, 34%);
  --Grayish-Blue: hsl(229, 6%, 66%);
  --Very-Light-Gray: hsl(0, 0%, 98%);
  --Black: hsl(0, 0%, 0%);
  font-family: "Poppins", sans-serif;
}

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

html {
  font-size: 62.5%;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--Very-Light-Gray);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* header */
.header {
  background-color: var(--Red);
  padding: 1.5rem;
  text-align: center;
  color: var(--Black);
  width: 100%;
}

/* main */
main {
  width: 100%;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

h2,
main p:first-child {
  font-size: 3rem;
  color: var(--Very-Dark-Blue);
  text-align: center;
  margin-bottom: 1.5rem;
}

main p:first-child {
  font-weight: 200;
}

h2 {
  font-weight: 600;
}

.description {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.8rem;
  color: var(--Grayish-Blue);
}

.grid-system {
  display: grid;
  place-self: center;
  gap: 4rem;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  margin: 4rem 0;
}

.card-component {
  position: relative;
  max-width: 40rem;
  min-height: 30rem;
  padding: 4rem;
  border-radius: 10px;
  box-shadow: 10px 5px 5px #0000001b;
  background-color: var(--Very-Light-Gray);
}

.card-component h3 {
  font-size: 2rem;
}

.card-component p {
  font-size: 1.5rem;
  line-break: loose;
}

.card-component img {
  position: absolute;
  bottom: 4rem;
  right: 4rem;
  height: auto;
  width: 6rem;
}

.card-component--1 {
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  border-top: var(--Cyan) solid 5px;
}

.card-component--2 {
  border-top: var(--Red) solid 5px;
}

.card-component--3 {
  grid-column: 2 / 3;
  border-top: var(--Orange) solid 5px;
}

.card-component--4 {
  grid-row: 1 / 3;
  grid-column: 3 / 4;
  border-top: var(--Blue) solid 5px;
}

/* footer */
footer.attribution {
  font-size: 1.5rem;
  color: var(--Very-Dark-Blue);
  place-self: center;
}

footer.attribution a {
  color: var(--Orange);
  text-decoration: none;
}

footer.attribution a:hover {
  text-decoration: underline;
  color: var(--Blue);
}

/* queries */
@media screen and (max-width: 1310px) {
  .grid-system {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media screen and (max-width: 900px) {
  .grid-system {
    grid-template-columns: repeat(1, 1fr);
  }
  .card-component--1 {
    grid-row: 1;
    grid-column: 1;
    border-top: var(--Cyan) solid 5px;
  }

  .card-component--2 {
    grid-row: 2;
    grid-column: 1;
    border-top: var(--Red) solid 5px;
  }

  .card-component--3 {
    grid-row: 3;
    grid-column: 1;
    border-top: var(--Orange) solid 5px;
  }

  .card-component--4 {
    grid-row: 4;
    grid-column: 1;
    border-top: var(--Blue) solid 5px;
  }

  footer {
    padding: 0 2rem;
    text-align: center;
  }
}
