/***** RESET *****/

h1, h2, h3, p, ul, ol {
	margin: 0;
	padding: 0;
}

ul, ol {
	list-style-type: none;
}

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

/***** TYPOGRAPHY *****/

header {
    font-family: "Inter";
    font-weight: 400;
    font-size: .85em;
}

h1 {
    font-weight: 700;
    font-size: 4.4em;
    text-transform: uppercase;
    color: #3d280a;
}

h2 {
    font-weight: 500;
    font-size: 1.75em;
    color: white;
}

strong {
    font-weight: 600;
}

main {
    font-family: "Fredoka";
    font-weight: 400;
    color: #3d280a;
    font-size: 1.1em;
}

figcaption {
    color: gray;
    font-size: 0.85em;
    font-weight: 400;
    font-style: italic;
}

.date {
    font-family: "Quicksand";
    font-weight: 500;
    text-transform: uppercase;
}

.text-entry {
    font-family: "Quicksand";
    font-weight: 500;
    line-height: 1.15em;
}

footer {
    font-family: "Inter";
    font-weight: 400;
    color: #3d280a;
}

/***** LINKS *****/

a:link {
    text-decoration: none;
    color: #3d280a;
}

article a:link, article a:visited {
    text-decoration: none;
    color: #d3212a;
}

a:hover {
    color: #d3212a;
}

main a:hover {
    color: #d3212a;
}
  
a:visited {
    color: inherit;
}

footer a:link {
    text-decoration: underline;
}

/***** ELEMENTS *****/

body {
    width: 100%;
    height: 100%;
    margin: auto;
    align-content: center;
}

header {
    /* display: flex;
    align-items: center;
    justify-content: center;
    margin: auto; */
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 152px;
    grid-template-rows: 65px;
    grid-template-areas: 
    "A A A B";

    background-color: #FFFBEF;
    border-bottom: 3px solid #E8E3D6;
    margin-bottom: 50px;
    padding: 40px 60px;
}

h1 {
    grid-area: A;
}

header img {
    animation: opacity 4s;
    animation-iteration-count: infinite;

    float: right;
    grid-area: B;
    padding-top: 10px;
}

main {
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

article {
    width: 100%;
    align-items: center;
    justify-content: center;
    margin: auto;
}

article h2 {
    text-align: center;
    padding: 20px 15px;
    background-color: #d3212a;
    /* margin-bottom: 20px; */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

article p {
    padding: 5px;
}

.entry {
    padding: 20px;
    border-style: Solid;
    border-color: #E8E3D6;
    border-width: 3px;
    background-color: #FFFBEF;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.text-entry {
    margin-top: 10px;
}

article img {
    display: block;
    padding: 20px 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

figure img {
    padding-top: 5px;
}

figcaption {
    padding-bottom: 6px;
}

ul, ol {
    padding: 5px;
}

footer {
    display: flex;
    bottom: 0;

    background-color: #FFFBEF;
    border-top: 3px solid #E8E3D6;
    padding: 32px 50px 32px 50px;
    margin-top: 50px;
    text-align: center;
}

footer p {
    align-items: center;
    justify-content: center;
    margin: auto;
}

.spacer {
    padding: 15px;
}

/****** ANIMATION *****/

@keyframes opacity {
    0% { opacity: 1; }
    12.5% { opacity: .9; }
    25% { opacity: .8; }
    37.5% { opacity: .7; }
    50% { opacity: .6; }
    62.5% { opacity: .7; }
    75% { opacity: .8; }
    87.5% { opacity: .9; }
    100% { opacity: 1;} 
}

/****** RESPONSIVE *****/

/* Tablet */
@media screen and (max-width: 768px) {

    h1 {
        line-height: 0.9em;
        font-size: 3em;
    }

    h2 {
        font-size: 1.3em;
        max-width: 100%;
    }

    header {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    header img {
        padding-top: 10px;
        float: left;
        animation: opacity infinite;
    }

    main {
        font-size: 0.9em;
        width: 100%;
        margin: 0;
        padding: 0 15px;
        row-gap: 10px;
    }

    article {
        display: flex;
        flex-direction: column;
        max-width: 90%;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    article h2 {
        width: 100%;
        box-sizing: border-box;
    }

    footer {
        font-size: 0.9em;
    }
}

/* Smaller Desktop */
@media screen and (min-width: 768px) and (max-width: 1040px) {

    h1 {
        line-height: 0.9em;
        font-size: 4em;
    }

    header {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    header img {
        padding-top: 10px;
        float: left;
        animation: opacity infinite;
    }

    main {
        font-size: 0.9em;
        width: 100%;
        margin: 0;
        padding: 0 15px;
        row-gap: 10px;
    }

    article {
        display: flex;
        flex-direction: column;
        max-width: 95%;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    article h2 {
        width: 100%;
        box-sizing: border-box;
    }
}