@import url('https://fonts.googleapis.com/css?family=Poppins:200,400,600&display=swap');

:root {
    --red: hsl(0, 78%, 62%);
    --cyan: hsl(180, 62%, 55%);
    --orange: hsl(34, 97%, 64%);
    --blue: hsl(212, 86%, 64%);
    --veryDarkBlue: hsl(234, 12%, 34%);
    --grayishBlue: hsl(229, 6%, 66%);
    --veryLightGray: hsl(0, 0%, 98%);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 15px;
    background-color: var(--veryLightGray);
}
header {
    max-width: 500px;
    margin: 60px auto 80px;
    text-align: center;
}
header h1:first-child {
    font-weight: 200;
}
p {
    color: var(--grayishBlue);
}
main {
    max-width: 81%;
    margin: 0 auto;
    display: grid;
    gap: 20px;
    grid-template-areas: 'box-1 box-2 box-4'
                         'box-1 box-3 box-4';
}
.box {
    background-color: #fff;
    width: 350px;
    padding: 30px;
    box-shadow: 0 12px 15px rgba(0, 0, 0, 0.1),
    0 6px 6px rgba(0, 0, 0, 0.01);
    border-radius: 4px;
    border-top: 4px solid var(--cyan);
}
.box-1 {grid-area: box-1; align-self: center;}
.box-2 {border-color: var(--red); grid-area: box-2;}
.box-3 {border-color: var(--orange); grid-area: box-3;}
.box-4 {border-color: var(--blue); grid-area: box-4; align-self: center;}

.box-mid {
    align-self: center;
}
.box p {
    font-size: 13px;
    margin: 15px 0 40px;
}
.box img {
    display: block;
    margin-left: auto;
}
footer {
    width: 100%;
    height: 60px;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
footer a {
    text-decoration: none;
    color: var(--veryDarkBlue);
    transition: all .5s;
}
footer a:hover {
    font-weight: bold;
    color: yellowgreen;
}

@media (max-width: 1170px){
    main {
        grid-template-areas: 'box-1 box-2'
                             'box-3 box-4';
        justify-content: center;
        gap: 40px;
    }
    .box-1, .box-4 {
        align-self: auto;
    }
}
@media (max-width: 770px) {
    main {
        grid-template-areas: 'box-1''box-2''box-3''box-4';
        gap: 30px;
    }
}
