:root {
  --clr-red: hsl(0, 78%, 62%);
  --clr-cyan: hsl(180, 62%, 55%);
  --clr-orange: hsl(34, 97%, 64%);
  --clr-blue: hsl(212, 86%, 64%);

  --clr-grey-500: hsl(234, 12%, 34%);
  --clr-grey-400: hsl(212, 6%, 44%);
  --clr-white: hsl(0, 0%, 100%);

  --fs-primary: 15px;
  --ff-primary: "Poppins", sans-serif;
  --fw-light: 200;
  --fw-regular: 400;
  --fw-bold: 600;
}

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

body {
  font-family: var(--ff-primary);
  font-size: 15px;
  color: var(--clr-grey-500);
  background-color: var(--clr-white);
  padding: 60px 40px;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 60px;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  
}

h1 {
  font-weight: var(--fw-light);
  color: var(--clr-grey-400);
  font-size: 1.45rem;
}

h2 {
  margin-bottom: 20px;
}

header p {
  font-weight: var(--fw-regular);
  color: var(--clr-grey-500);
  font-size: 0.9rem;
  text-align: center;
  max-width: 510px;
}

.cards {
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.card {
  padding: 20px 30px;
  border-radius: 5px;
  border-top-width: 4px;
  border-top-style: solid;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background-color: var(--clr-white);

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.card:nth-child(1) {
  border-top-color: var(--clr-cyan);
}
.card:nth-child(2) {
  border-top-color: var(--clr-red);
}
.card:nth-child(3) {
  border-top-color: var(--clr-orange);
}
.card:nth-child(4) {
  border-top-color: var(--clr-blue);
}

.card h3 {
  font-weight: var(--fw-bold);
  color: var(--clr-grey-500);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.card p {
  font-weight: var(--fw-regular);
  color: var(--clr-grey-400);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

.card img {
  align-self: flex-end;
  width: 60px;
  height: 60px;
  margin-bottom: 25px;
}

@media (min-width: 1250px) {

  h1{
    font-size: 2.2rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  header p {
    padding-inline: 40px;
    max-width: 600px;
  }


  .cards {
    max-width: 1440px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  .card {
    width: 350px;
    height: 248px;
  }

  .card:nth-child(1) {
    grid-area: 1 / 1 / 3 / 2; /* spans both rows in first column */
  }
  .card:nth-child(2) {
    grid-area: 1 / 2 / 2 / 3; /* first row, middle column */
  }
  .card:nth-child(3) {
    grid-area: 2 / 2 / 3 / 3; /* second row, middle column */
  }
  .card:nth-child(4) {
    grid-area: 1 / 3 / 3 / 4; /* spans both rows in last column */
  }
}
