@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    src: url("assets/fonts/static/DMSans-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 500;
    src: url("assets/fonts/static/DMSans-Medium.ttf") format("truetype");
}

@font-face {
    font-family: "DM Sans";
    font-style: italic;
    font-weight: 500;
    src: url("assets/fonts/static/DMSans-MediumItalic.ttf") format("truetype");
}

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

:root {
    --color-purple-100: hsl(254, 88%, 90%);
    --color-purple-500: hsl(256, 67%, 59%);
    --color-yellow-100: hsl(31, 66%, 93%);
    --color-yellow-500: hsl(39, 100%, 71%);
    --color-white: hsl(0, 0%, 100%);
    --color-black: hsl(0, 0%, 7%);

    --font-family-main: "DM Sans", serif;
    --font-size-body: 1.125rem;
    --font-size-heading: 1.75rem;
}

body {
    background-color: #f4f4f4;
    font-family: var(--font-family-main);
    line-height: 1;
}

.grid {
    margin: 1em;
    gap: 1em;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "col-1"
        "col-2"
        "col-3"
        "col-4";
}

.card h2 {
    font-size: var(--font-size-heading);
    font-weight: 500;
}

.card {
    border-radius: 1em;
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    overflow: hidden;
}

.card .yellow {
    color: var(--color-yellow-500);
}

.card .purple {
    color: var(--color-purple-500);
}

.card img {
    display: block;
    max-width: 100%;
}

.col-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

.sub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

.col-2 {
    grid-area: col-2;
}

.col-3 {
    display: grid;
    gap: 1em;
}

.col-4 {
    grid-area: col-4;
    display: grid;
    gap: 1em;
}

.social-media {
    background-color: var(--color-purple-500);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2em 1.5em;
    color: var(--color-purple-100);
}

.social-media h1 {
    color: var(--color-white);
    font-size: 2.75rem;
}

.social-media img {
    max-height: 1.875em;
}

.accounts {
    background-color: var(--color-white);
}

.schedule {
    padding-block-end: unset;
    background-color: var(--color-yellow-500);
}

.schedule img {
    max-height: 12.5em;
}

.create-post {
    background-color: var(--color-yellow-100);
    padding: 1.5em;
}

.create-post img {
    max-height: 5em;
}

.ai-content {
    background-color: var(--color-yellow-500);
}

.ai-content img {
    max-height: 13.5em;
}

.schedule-posts {
    background-color: var(--color-purple-100);
    text-align: center;
}

.schedule-posts img {
    width: 100%;
    max-height: 250px;
}

.grow-followers {
    background-color: var(--color-purple-500);
    color: var(--color-white);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5em 2em;
}

.grow-followers img {
    max-height: 12.5em;
}

.audience-growth {
    background-color: var(--color-white);
}

.audience-growth img {
    max-height: 3.125em;
}

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

@media only screen and (min-width: 600px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        margin: 2em;
    }

    .col-1 {
        grid-column: span 2;
    }

    .social-media img {
        width: 100%;
        max-height: 100%;
    }

    .col-1 .sub-grid {
        grid-template-columns: 1fr 1fr;
    }

    .col-2 {
        grid-column: span 2;
    }

    .col-2 img {
        object-fit: contain;
    }

    .col-3 {
        grid-column: span 2;
        grid-template-columns: 1fr 1fr;
    }

    .col-4 {
        grid-column: span 2;
        grid-template-columns: 1fr 1fr;
    }

}

@media only screen and (min-width: 768px) {
    .grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        max-width: 1024px;
        margin: 2em auto;
    }

    .col-1 {
        grid-column: 2 / span 2;
        grid-row-start: 1;
        display: grid;
        gap: 1em;
    }

    .col-1 .sub-grid {
        display: grid;
        gap: 1em;
        grid-template-columns: 1fr 1fr;
    }

    .schedule img {
        width: 100%;
        object-fit: cover;
        object-position: top;
        height: 5em;
    }

    .accounts img {
        height: 3.75em;
        object-fit: cover;
        object-position: left;
    }

    .col-2 {
        display: grid;
        grid-column: 4/5;
        grid-row-start: 1;
    }

    .schedule-posts {
        justify-content: center;
        text-align: start;
        padding: 1.5em;
        padding-inline-end: unset;
    }

    .schedule-posts img {
        position: relative;
        object-position: left;
        display: block;
        object-fit: cover;
        height: 250px;
    }

    .col-3 {
        grid-column: 2 / span 3;
        display: grid;
        gap: 1em;
        grid-template-columns: 1fr 2fr;
    }

    .audience-growth {
        padding: 1em;
        grid-column: 1/2;
        grid-row-start: 1;
    }

    .col-3 .grow-followers {
        padding: 1em;
        grid-column: 2 / span 2;
        grid-row-start: 1;
        flex-direction: row;
        text-align: start;
    }

    .grow-followers img {
        max-height: 100%;
    }

    .col-4 {
        grid-column: 1/2;
        grid-row: 1 / span 3;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1em;
    }
}
