@font-face {
    font-family: 'DM Sans';
    src: url(assets/fonts/DMSans-Italic-VariableFont_opsz\,wght.ttf);
}

:root {
    --purple-100: hsl(254, 88%, 90%);
    --purple-500: hsl(256, 67%, 59%);

    --yellow-100: hsl(54, 96%, 50%);
    --yellow-500: hsla(46, 100%, 51%, 0.616);

    --white: hsl(0, 0%, 100%);
    --black: hsl(0, 0%, 7%);

    --font-main: 'DM Sans', sans-serif;
}

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

.attribution {
    font-size: 0.6875rem;
    text-align: center;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

body {
    width: 100%;
    min-height: 100dvh;
    background-color: whitesmoke;
    font-family: var(--font-main);
    line-height: 1.4;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;

}


.container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    gap: 1rem;

    grid-template-areas:
        "box1"
        "box2"
        "box3"
        "box4"
        "box5"
        "box6"
        "box7"
        "box8"

    ;
}

img {
    width: 40%;
    height: auto;


}

.card-1 {
    grid-area: box1;
    background-color: var(--purple-500);
    color: var(--white);
    justify-content: center;
    text-align: center;
    align-items: center;
    min-height: 200px;


}

.card-1 h1 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.card-1 em {
    color: var(--yellow-500);
    font-style: italic;
}

.card-1 p {
    font-size: 1rem;
}


.card-2 {
    grid-area: box2;
    background-color: var(--white);
    border: 1px solid #f0f0f0;



}

.card-2 img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 1rem;

}

.card-2 h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--black);
}

.card-3 {
    grid-area: box3;
    background-color: var(--yellow-500);
    gap: 1rem;
    justify-content: space-between;
}

.card-3 h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.card-3 img {
    width: 100%;
    max-width: 150px;
    height: auto;

}


.card-4 {
    grid-area: box4;
    background-color: var(--purple-100);
    text-align: center;
    justify-content: center;
    align-items: center;
}

.card-4 h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.card-4 p {
    font-size: 0.95rem;
    color: var(--black);
    line-height: 1.5;
}

.card-4 img {
    width: 100%;
    height: auto;
}

.card-5 {
    grid-area: box5;
    background-color: var(--purple-500);
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;

}

.card-5 img {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.card-5 h2 {
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.card-6 {
    grid-area: box6;
    background-color: var(--white);
    border: 1px solid #f0f0f0;
}

.card-6 img {
    width: 100%;
    max-width: 80px;
    height: auto;
}

.card-6 h1 {
    font-size: 3rem;
    font-weight: 500;
    color: var(--black);
}

.card-6 p {
    font-size: 0.95rem;
    color: var(--black);
}

.card-7 {
    grid-area: box7;
    background-color: rgba(252, 240, 203, 0.411);

}

.card-7 h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.card-7 em {
    color: var(--purple-500);
    font-style: italic;
}

.card-7 img {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.card-8 {
    grid-area: box8;
    background-color: var(--yellow-500);
}

.card-8 img {
    width: 100%;
    max-width: 140px;
    height: auto;

}

.card-8 h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);

}

.card-1,
.card-2,
.card-3,
.card-4,
.card-5,
.card-6,
.card-7,
.card-8 {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    padding: 1rem;
    gap: 1rem;


}

@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "box1 box1"
            "box2 box3"
            "box7 box4"
            "box6 box5"
            "box8 box5";
    }

    .card-1 {
        min-height: 250px;
    }

    .card-1 h1 {
        font-size: 2.75rem;
    }
}

@media (min-width: 1024px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        grid-template-areas:
            "box7 box1 box1 box4"
            "box8 box2 box3 box4"
            "box8 box6 box5 box5";
    }

    .card-1 {
        min-height: 300px;
    }

    .card-1 h1 {
        font-size: 3rem;
    }

    .card-5 {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .card-5 img {
        max-width: 180px;
    }

    .card-2 {
        align-items: flex-end;
    }

    .card-8 {
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
    }

    .card-8 h2 {
        font-size: 2.3rem;
    }

    .card-8 img {
        max-width: 200px;
    }

}
