*{
    box-sizing: border-box;
    margin: 0;
}
:root{
    --clr-purple--muted: hsl(254, 88%, 90%);
    --clr-purple: hsl(256, 67%, 59%);
    --clr-yellow--muted: hsl(31, 66%, 93%);
    --clr-yellow: hsl(39, 100%, 71%);
    --clr-white: hsl(0, 0%, 100%);
    --clr-black: hsl(0, 0%, 7%);
    --clr-bkg: hsl(0, 13%, 92%);
}
body{
    font-family: DM Sans,sans-serif;
    background-color: var(--clr-white);
    font-size: 18px;
    font-weight: 500;
}
img{
    display: block;
    max-width: 100%;
}
h2{
    font-weight: 500;
    line-height: 1.1;
}
p{
    text-wrap: pretty;
}
.container{
    display: grid;
    gap: 10px;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
    "one"
    "two"
    "three"
    "four"
    "five"
    "six"
    "seven"
    "eight";
    background-color: hsl(0, 13%, 92%);
}

.container > *{
    border-radius: 8px;
    padding: 30px;
    margin: 10px;
}


.card1{
    grid-area: one;
    background-color: var(--clr-purple);
    text-align: center;
    color: var(--clr-white);
}
.card1 img{
    width: 300px;
    justify-self: center;
}
.card1 span{
    color: var(--clr-yellow);
}
@media screen and (min-width: 768px){
    .card1 img{
        width: 100%;
    }
}
.card2{
    grid-area: two;
    background-color: var(--clr-white);
}


.card3{
    grid-area: three;
    background-color: var(--clr-yellow);
    padding-block-end: 0;
    overflow: hidden;
}
.card3 img{
    width: 250px;
}
@media screen and (min-width: 768px){
    .card3 img{
        width: 100%;
    }
}


.card4{
    grid-area: four;
    background-color: var(--clr-purple--muted);
    text-align: center;
}
.card4 img{
    margin-inline: auto;
}


.card5{
    grid-area: five;
    background-color: var(--clr-purple);
    text-align: center;
    color: var(--clr-white);
    place-items: center;
}
.card5 p{
    padding: 5px 0px;
    font-size: 20px;
}
.card5 img{
    width: 250px;
}
@media screen and (min-width: 768px){
    .card5 img{
        width: 100%;
        
    }
}

.card6{
    grid-area: six;
    background-color: var(--clr-white);
}
.card6 img{
    width: 250px;
}
.card6 p{
    font-size: 60px;
    font-weight: 500;
}
.card6 h2{
    font-size: 20px;
}
@media screen and (min-width: 768px){
    .card6 img{
        width: 100%;
    }
}


.card7{
    grid-area: seven;
    background-color: var(--clr-yellow--muted);
    font-size: 25px;
}
.card7 i{
    color: var(--clr-purple);
}
.card7 img{
    width: 200px;
}

.card8{
    grid-area: eight;
    background-color: var(--clr-yellow);
    font-size: 25px;
}
.card8 img{
    width: 350px;
}

.attribution {
  text-align: center;
  font-size: 12px;
  margin: 20px 0;
  padding: 10px;
  color: var(--clr-black);
  background: transparent;
}


@media screen and (min-width:768px){
    .container{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
        "seven one one   four"
        "seven one one   four"
        "eight two three four"
        "eight six five  five";
    }
    .card1{
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
    }
    .card1 h2{
        font-size: 50px;
        text-wrap: balance;
        text-align: center;
    }
    .card1 p{
        align-self: center;
    }
    .card1 img{
        max-width: 250px;
        align-self: center;
    }

    .card2 img{
        max-width: 300px;
        padding-bottom: 15px
    }
    .card3 img{
        margin-block-end: -5em;
    }
    .card3 h2{
        font-size: 23px;
        text-wrap: pretty;
    }
    
    .card4{
        overflow: hidden;
    }
    .card4 .one{
        font-size: 20px;
        font-weight: 600;
        text-align: left;
    }
    .card4 img{
        margin-inline-end: -3em;
        max-width: 260px;
        padding: 15px 0px;
    }
    .card4 .two{
        text-align: left;
    }
    .card5{
        display: flex;
    }
    .card5 p{
        align-self: center;
        font-size: 30px;
        line-height: 1.1;
        text-wrap: balance;
    }
    .card5 img{
        max-width: 250px;
    }
    .card6{
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .card6 img{
        max-width: 200px;
    }
    .card7 img{
        width: 100%;
    }
    .card8{
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .card8 p{
        font-size: 40px;
        text-wrap: balance;
        line-height: 1.1;
    }
    .card8 img{
        max-width: 300px;
    }
}