/*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;}

header {
    padding: 1em 0.5em 0;
}

body {
    font-family: "brother-1816";
    font-size: 1em;
    font-display:auto;
    font-style:normal;
    font-weight:400;
    font-stretch:normal;
}

h1 {
    width: 10em; 
}

h2 {
    font-family: "p22-mackinac-pro";
    font-size: 1.5em;
    font-weight: bold;
    color: #E07400;
    padding-top: 0.25em;
}

h3 {
    font-family: "brother-1816";
    font-size: 1em;
    font-weight:lighter;
    color: #E07400;
    padding-top: 0.25em;
}

h2 li a {
    color: #FBAC0E;
    font-weight: bold;
}


.main h2 {
    padding-top: 0.5em;
    font-size: 2em;
}

.secondary h2 {
    padding-top: 0.5em;
    font-size: 1.5em;
}

.tertiary h2 {
    padding-top: 0.5em;
    font-size: 1.25em;
    border-top: 0.10em solid #F3C05A;
}

p {
    color: #808080;
    font-family: "brother-1816";
    font-size: 1rem;
    padding-bottom: 1.75em;
    padding-top: 0.5em;
    line-height: 1.25em;
}

li {
    list-style-type: none;
    line-height: 1.25em;
}

a {
    text-decoration: none;
}

nav {
    padding: 1em 0;
    font-family: sans-serif;
}

h2 p figcaption {
    margin: 0.5em;
}

figcaption {
    font-family: "brother-1816";
    font-style: oblique;
    color: rgb(102, 102, 102);
    padding: 0.5em 0 1.2em;
}

aside {
    background-color: rgb (102 102 102);
    padding: 1em 0.5em;
}

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

footer {
    width: 100%;
    background: #BEAA37;
    padding: .5em;
    box-sizing: border-box;
 }

nav ul li {
    list-style-type: none;
    display: inline;
    padding: 0 1em;
    padding-left: 0;
}

nav ul li a{
    font-weight: bold;
    font-family: "brother-1816";
    color: #86C5E7
}

nav ul li a:hover{
    color: #FBAC0E;
}

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

/*gallery*/
div.gallery-container header {
    padding: 1em 0 0 0;
}

div.gallery-container h1 {
    padding-bottom: 0;
    margin-bottom: 0;
}

div.gallery-container body {
    font-family: "brother-1816";
	line-height: 1.4em;
	color: #222;
	background-color: #ddd;
	box-sizing: border-box;
    margin: 0;
    padding: 0;
}

div.gallery-container image {
    width: 100%;
}

div.gallery-container {
    background-color: #fafafa;
    max-width: 60em;
    margin: 0 auto;
    padding: 1em;
}

div.gallery-container main {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(67% + 3em);
}

div.gallery-container figure{
    margin: 0;
    width: 60em;
    position: absolute;
    left: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

div.gallery-container figcaption {
    font-size: 1em;
    font-weight: lighter;
    margin: 0 0;
    color: #9b9b9b
}

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){
    left: 0;
    opacity: 1;
}

div.gallery-container nav {
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-gap: 0.2em;
    padding: 1em 0;
}

div.gallery-container label {
    flex: 1 0 6em;
} 

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

/*news letter*/

div.newsletter {
    margin: auto;
    position: relative;
    max-width: 50em;
    font-family: "brother-1816";
}

div.newsletter h3 {
    font-family: "brother-1816";
    color: #E07400;
    padding-top: 1em;
}

div.newsletter img {
    max-width: 60em;
    padding-top: 2em;
    margin-bottom: 2em;
}

div.newsletter label {
    margin-right: 0.3em;
}

button {
    background-color: #86C5E7;
    color: white;
    margin-top: 2em;
    padding: 1em;
    border: none;
    cursor: pointer;
    width: 20%;
    font-family: "brother-1816";
  }


ul li {
    list-style-type: none;
    font-family: "brother-1816";
    font-weight: lighter;
    color: #000000;
}

li {
    line-height: 1.5em;
}

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

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

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

    div.newsletter-container {
        max-width: 60em;
        background-color: #fafafa;
        margin: 0 auto;
        padding: 1em;
    }
    
    header, footer {
        grid-column: 1/3;
        padding: 1rem 0 0 0;
    }

    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;
        padding: 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;
    }

    }

    header {
        padding: 1em 0 0 0;
    }

    h2 p figcaption {
        margin: 0;
    }

    p {
        padding-bottom: 0.75em;
    }

    main p {
        margin: 0 0 1em 0;
    }
 
    @media screen and (prefers-color-scheme: dark) {

        body {
            background-color: #31302c;
        }

        img.logo-light {
            opacity: 0;
        }
    
       h1 {
        background-image: url("onward_magazine_alt_logo.svg");
        background-repeat: no-repeat;
        background-size: contain;
        }

        p, figcaption, label, aside.home p {
        color: rgb(246, 244, 238);
        }

        div.gallery-container {
            background-color: #31302c;
            max-width: 60em;
            margin: 0 auto;
            padding: 1em;
        }

        div.newsletter-container {
            background-color: #31302c;
            margin: auto;
            position: relative;
            max-width: 50em;
            font-family: "brother-1816";
        }
    }