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

:root {
    --Purple100: hsl(254, 88%, 90%);
    --Purple500: hsl(256, 67%, 59%);

    --Yellow100: hsl(31, 66%, 93%);
    --Yellow500: hsl(39, 100%, 71%);

    --White: hsl(0, 0%, 100%);
    --Black: hsl(0, 0%, 7%);
}

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

body {
    font-size: 18px;
    min-height: 100vh;
    background-color: #f2f2f2;
    font-family: 'DM Sans';
    line-height: 1;
    place-content: center;
}

.xlg-text {
    font-size: 4rem;
    font-weight: 500;
}

.med-text {
    font-weight: 500;
    font-size: 2.35rem;
}

.lg-text {
    font-weight: 500;
    font-size: 2.75rem;
}

.sm-text {
    font-weight: 400;
    font-size: 1.5rem;
}

.bento-grid {
    max-width: 1400px;
    margin: 1rem;
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-rows: 75px;
    gap: 2rem;
    grid-template-areas:
        'box1 box2 box2 box3'
        'box1 box2 box2 box3'
        'box1 box2 box2 box3'
        'box1 box2 box2 box3'
        'box1 box5 box6 box3'
        'box4 box5 box6 box3'
        'box4 box5 box6 box3'
        'box4 box7 box8 box8'
        'box4 box7 box8 box8'
        'box4 box7 box8 box8';
}

.bento-grid .item {
    border-radius: .5rem;
    overflow: hidden;
}

.bento-grid .item:nth-child(1) {
    background-color: var(--Yellow100);
}

.bento-grid .item:nth-child(2),
.bento-grid .item:nth-child(8) {
    background-color: var(--Purple500);
    color: var(--White);
}

.bento-grid .item:nth-child(3) {
    background-color: var(--Purple100);
}

.bento-grid .item:nth-child(4),
.bento-grid .item:nth-child(6) {
    background-color: var(--Yellow500);
}

.bento-grid .item:nth-child(5),
.bento-grid .item:nth-child(7) {
    background-color: var(--White);
}

.bento-grid .item:nth-child(1) {
    grid-area: box1;
    padding: 6rem 2rem 0 2.5rem;
}

.bento-grid .item:nth-child(1) em {
    color: var(--Purple500);
}

.bento-grid .item:nth-child(1) img {
    margin-top: 1rem;
}

.bento-grid .item:nth-child(2) {
    grid-area: box2;
    padding: 2rem;
    text-align: center;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bento-grid .item:nth-child(2) .emphasis {
    color: var(--Yellow500);
}

.bento-grid .item:nth-child(2) img {
    width: 250px;
    margin: 1rem 0 .5rem;
}

.bento-grid .item:nth-child(3) {
    grid-area: box3;
    padding: 2.75rem 2rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.bento-grid .item:nth-child(3) img {
    position: absolute;
    padding-top: 2.25rem;
    padding-bottom: 2rem;
    height: 410px;
    object-fit: cover;
    object-position: left;
    top: 150px;
}

.bento-grid .item:nth-child(4) {
    grid-area: box4;
    padding: 1.75rem 2.25rem;
}

.bento-grid .item:nth-child(4) p {
    margin-bottom: 2rem;
}

.bento-grid .item:nth-child(5) {
    grid-area: box5;
    padding: 1rem 2rem 1rem 2rem;
    position: relative;
}

.bento-grid .item:nth-child(5) p {
    margin-top: 6rem;
}

.bento-grid .item:nth-child(5) img {
    position: absolute;
}

.bento-grid .item:nth-child(6) {
    grid-area: box6;
    position: relative;
    padding: 1rem 1.75rem;
}

.bento-grid .item:nth-child(6) p {
    margin-bottom: 1rem;
}

.bento-grid .item:nth-child(7) {
    grid-area: box7;
    padding: 1.5rem;
}

.bento-grid .item:nth-child(7) span {
    display: block;
    margin-bottom: 1rem;
}

.bento-grid .item:nth-child(7) img {
    margin-top: 1.5rem;
}

.bento-grid .item:nth-child(8) {
    grid-area: box8;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.75fr 2fr;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-auto-rows: initial;
        grid-template-areas:
            'box1 box1 box2 box2'
            'box1 box1 box2 box2'
            'box3 box3 box4 box4'
            'box3 box3 box4 box4'
            'box5 box5 box6 box6'
            'box5 box5 box6 box6'
            'box7 box7 box8 box8'
            'box7 box7 box8 box8';
    }

    .bento-grid .item:nth-child(8) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bento-grid .item {
        text-align: center;
    }

    .bento-grid {
        grid-template-areas:
            'box2'
            'box5'
            'box6'
            'box3'
            'box8'
            'box7'
            'box1'
            'box4';
    }

    .bento-grid .item:nth-child(4),
    .bento-grid .item:nth-child(5),
    .bento-grid .item:nth-child(6),
    .bento-grid .item:nth-child(7) {
        text-align: left;
    }

    .bento-grid .item:nth-child(1) {
        padding: 2rem;
        text-align: left;
    }

    .bento-grid .item:nth-child(1) .lg-text {
        font-size: 2.5rem;
    }

    .bento-grid .item:nth-child(1) img {
        width: 250px;
    }

    .bento-grid .item:nth-child(3) {
        padding: 2.75rem 1rem 2.5rem 1rem;
    }

    .bento-grid .item:nth-child(3) .lg-text {
        font-size: 2.25rem;
    }

    .bento-grid .item:nth-child(3) img {
        margin: 1rem 0;
        position: initial;
        height: initial;
    }

    .bento-grid .item:nth-child(5) p {
        margin-top: 10rem;
    }

    .bento-grid .item:nth-child(8) {
        padding: 1.5rem 4rem;
    }
}

@media (max-width: 540px) {
    .bento-grid .item:nth-child(5) p {
        margin-top: 6rem;
    }
}