/*CSS document*/

html, body, div, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;}


body {
    font-family: neulis-sans, sans-serif;
    font-weight: 300;
    font-style: normal;
    line-height: 1.3;
    color: #280004;
    background-color: #FAF4EF;
}

div.container, div.home-container {
    max-width: 40em;
    margin: auto;
}

div.container-gallery, div.container-newsletter  {
    max-width: 40em;
    margin: auto;
}


header {
    margin: 0.75em;

}

h1 {
    margin: 2em 0 0.75em;
    max-width: 25em;
}

nav ul {
    padding: 0.5em 0;
}
nav ul li { /*give this guy a mergin to the right */
    list-style-type: none;
    /* letter-spacing: 0.05em; */
    line-height: 1.4;
    /* transition-duration: 0.2s; */
}


nav ul li a, h3 {
    color: #d23c35;
    font-family: new-kansas, sans-serif;
    font-weight: 300;
    font-style: normal;  
}

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


section.mainstory h2 {
    font-size: 3em;
    margin: 0 0.3em;
    padding-top: 0.2em;

}

section.secondary h2 {
    font-size: 1.8em;
}

section.tertiary h2 {
    font-size: 1.2em;
    border-top: 1px solid #d23c35;
}

h2 {
    font-family: new-kansas, sans-serif;
    font-weight: 300;
    font-style: normal;
    color: #d23c35;
    margin: 0 0.4em;
    padding-top: 0.2em;
}

h3 {
    margin: 0.3em 0.6em 0.7em;
    border-bottom: 1px solid #d23c35;
}

figcaption {
    font-style: italic;
    font-size: 0.8em;
    margin: 0.75em;
    padding-bottom: 1em;
}

p {
    margin: 0 0.75em 1.5em;
}

a {
    text-decoration: none;
    color: #280004;
}

aside h2 {
    margin: 0 0.6em;
}

aside section.secondary h2 {
    border-top: 1px solid #d23c35;
}

aside section.secondary figure {
    margin-bottom: 0.75em;
    /* border: 1px solid #d33d18; */
}

aside section.secondary h2 {
    font-size: 1.2em;
}

footer {
    bottom: 0;
    color: #d23c35;
    margin-left: 0.75em;
    padding: 0.75em 0;
    height: 1.5em;
    font-size: 0.8em;
}

footer p {
    margin: 0;
}

article h2 {
    font-size: 1.8em;
}

main.gallery {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(120% + 4em);
}

main.gallery figure{
    margin: 0;
    width: 100%;
    position: absolute;
    opacity: 0;
    transition: opacity 1s; 
}

main.gallery figcaption {
    font-family: new-kansas, sans-serif;
    font-weight: 300;
    font-style: normal;
    color: #d23c35;
    font-size: 1.6em;
    margin: 0.5em 0 0 0.4em;
}

input:nth-of-type(1):checked ~ main figure:nth-of-type(1),
input:nth-of-type(2):checked ~ main figure:nth-of-type(2),
input:nth-of-type(3):checked ~ main figure:nth-of-type(3),
input:nth-of-type(4):checked ~ main figure:nth-of-type(4),
input:nth-of-type(5):checked ~ main figure:nth-of-type(5),
input:nth-of-type(6):checked ~ main figure:nth-of-type(6),
input:nth-of-type(7):checked ~ main figure:nth-of-type(7),
input:nth-of-type(8):checked ~ main figure:nth-of-type(8){
    opacity: 1;
}

nav.gallery {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
}

nav.gallery label {
    flex: 1 0 10em;
}

div.container-gallery input {
    display: none;
}

h2.page-title {
    font-family: new-kansas, sans-serif;
    font-weight: 500;
    font-style: normal;
    color: #d23c35;
    font-size: 1.8em;
}

form {
    margin-bottom: 1em;
}

form ul {
    list-style-type: none;
}

form section.personal-info li {
    display: grid;
}

form li {
    margin: 0.25em 0;
}

form section {
    margin-top: 0.75em;
}

form section.personal-info input {
    max-width: 25em;
    padding: 0.25em;
}

section.feedback textarea {
    min-width: 25em;
    font-family: neulis-sans, sans-serif;
    font-weight: 300;
    font-style: normal;
    color: #280004;
}

input[type=text] {
    font-family: neulis-sans, sans-serif;
    font-weight: 300;
    font-style: normal;
    color: #280004;
}

h2.mag-description, h2.page-title {
    font-size: 1.8em;
    font-weight: 300;

}

button {
    font-family: new-kansas, sans-serif;
    font-weight: 300;
    font-style: normal;
    color: #FAF4EF;
    background-color: #d23c35;
    width: 8em;
    height: 3em;
    border-style: none;
    margin: 0.75em 0;
    transition-duration: 0.2s;
    border-radius: 2px;
}

button:hover {
    background-color: #FAF4EF;
    color: #d23c35;
    border: 1px solid #d23c35;
}

form section h2, button, form ul, form textarea {
    margin-left: 0.75em;
}

/* hover */
nav ul li a:hover, section.mainstory h2:hover, section.secondary h2:hover, section.tertiary h2:hover{
    color: #D37D36;
}

@media only screen and (min-width: 40em) {
    nav ul li {
        display: inline;
    }

    nav ul li a {
        padding-right: 1em;
    }

    /* give both the h1 and the nav ul an auto margin. */
    header, figcaption {
        margin: 0.75em 0;
    }


    h2, section.mainstory h2, section.tertiary h2, section.secondary h2 {
        margin: 0;
    }

    h3 {
        margin: 1.5em 0 0.7em;
    }

    form section h2, button, form ul, form textarea, main.gallery figcaption, footer {
        margin-left: 0;
    }

    p {
        margin: 0 0 1.5em;
    }
}

@media only screen and (min-width: 60em) {

    div.home-container, div.container {
        max-width: 65em;
        padding: 0 1em;
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 1em;
    }

    div.container-newsletter, div.container-gallery {
        max-width: 65em;
        padding: 0.75em 1em;
    }
    

    header, footer, h2.mag-description {
        grid-column: 1/3;
    }

    div.home-container main {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 1em;
    }

    div.home-container aside {
        background: none;
        padding: 0;
        margin-top: 0;
    }


    div.container aside {
        margin-top: 0;
    }

    section.mainstory {
        grid-column: 2/4;
        grid-row: 1/3;
        display: flex;
    }

    section.mainstory a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }

    section.mainstory a figure {
        flex: 1 0 12em;
        display: flex;
    }

    section.mainstory a figure img {
        object-fit: cover;
    }

    section.mainstory a h2 {
        flex: 0 0 1em;
    }

    section.mainstory a p {
        flex: 0 0 4em;
    }

    section.secondary {
        display: flex;
    }

    section.secondary a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }

    section.secondary a figure {
        flex: 1 0 12em;
        display: flex;
    }

    section.secondary a figure img {
        object-fit: cover;
    }

    section.secondary a h2 {
        flex: 0 0 1em;
    }

    section.secondary a p {
        flex: 0 0 4em;
    }

    form {
        display: grid;
        grid-template-columns: 40% auto;
        grid-column-gap: 2em;
    }
    
    section.personal-info {
        grid-row: 1/4; 
    }

    section.subscription-type {
        grid-row: 1/2;
    }
    
    section.feedback {
        grid-row: 2/3;
    }

    button {
        grid-row: 3/4;
    }

}

@media only screen and (prefers-color-scheme: dark) {
    body {
        color: #FAF4EF;
        background-color: #280004;    
    }

    a {
        color: #FAF4EF;
    }

    h1 {
        background-image: url("archive-logo-alt.png");  
        background-repeat: no-repeat;  
        background-size: contain;  
    }

    img.img-dark {
        opacity: 0;
    }

    h2, h2.page-title, main.gallery figcaption {
        color: #FAF4EF;
    }

    nav ul li a, h3 {
        color: #FAF4EF;
    }

    aside section.secondary h2 {
        border-top: 1px solid #E2A879;
    }

    button {
        color: #FAF4EF;
        background-color: #D37D36;
    }

    button:hover {
        background-color: #FAF4EF;
        color: #D37D36;
        border: 1px solid #faf4fa;
    }

    section.tertiary h2 {
        border-top: 1px solid #E2A879;
    }

    footer {
        color: #E9BEAD;
    }

    h3 {
        border-bottom: 1px solid #E2A879;
    }

    nav ul li a:hover, section.mainstory h2:hover, section.secondary h2:hover, section.tertiary h2:hover{
        color: #E2A879;
    }
}