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

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

div.container, div.home-container, div.newsletter {
    max-width: 40em;
    margin: auto;
    position: relative;
    min-height: 100vh;
}

a:hover {
    color: rgb(215, 177, 246);
}

body {
    background-color: rgb(255,250,245);
}

a {
    text-decoration: none;
}

p {
    font-family: "owners-text", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: rgb(0,0,0);
    line-height: 1.25em;
    padding: 0em 1em .5em;

}

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

ul li a {
    text-decoration: none;
    color: rgb(149,187,218);
    font-family: "minion-pro", serif;
    font-weight: 700;
    font-style: normal;
    line-height: 1.3em;
}

header {
    padding: .5em .5em;
}

h1 {
    max-width: 40em;
    padding: 1em 0em;
}

h2 {
    font-size: 3em;
    color: rgb(143, 139, 207);
    font-family: "minion-pro", serif;
    font-weight: 700;
    font-style: normal;
    padding: 0em .2em;
    line-height: 1em;
    }

h3 {
    font-size: 2em;
    color: rgb(239,180,221);
    font-family: "minion-pro", serif;
    font-weight: 700;
    font-style: normal;
    padding: 0em .4em;
    }

section.mainstory h2 {
    font-size: 3em;
    padding: .25em;
    }
    
section.secondary h2 {
    font-size: 1.8em;
    padding: .1em .3em;
    }
    
section.tertiary h2 {
    font-size: 1.5em;
    border-top: 1px solid rgb(92,118,150);
    padding: .1em .2em .1em .5em;
    }

section.aside h2 {
    font-size: 1.3em;
    padding: .3em 0em .2em .4em;
    }

figcaption {
    padding: .2em .2em .4em .8em;
    font-family: "owners-text", sans-serif;
    font-weight: 400;
    font-style: italic;
    }

aside {
    background-color: rgb(255,242,251);
    padding: 1em .5em 3em;
    }

footer {
    background:rgb(149,187,218);
    box-sizing: border-box;
    padding: 0em 1em;
    position: absolute;
    bottom: 0;
    width: 100%;
    }
    
footer p {
    color: rgb(255, 255, 255);
    padding: .75em 0em .75em .5em;
    text-align:left;
    }
     
/*Gallery*/

main.photogallery {
    position: relative;
    overflow: hidden;
    max-width: 60em;
    grid-column: 1/3;
    padding-bottom: calc(62% + 3em);
}

figure.photogallery {
    margin: auto;
    width: calc(100%-2em);
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}

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.photogallery {
    display: grid;
    grid-template-columns: repeat(4, 2fr);
    grid-gap: 0.2em;
    max-width: 80em;
    grid-column: 1/3;
    padding: 0em 0em 3.5em;
}

div.container input {
    display: none;
}

/*Newsletter*/
div.newsletter {
    max-width: 60em;
    margin: auto;
}

section.personal-info {
    margin: .5em 0 0 0;
}
section.personal-info ul {
    list-style-type: none;
    padding: 0em .8em;
}
section.personal-info ul li {
    display: flex;
    flex-wrap: wrap;
}
section.personal-info ul li input[type="text"],
section ul li input[type="email"],
section ul li input[type="tel"],
section ul li select {
    flex: 4em 0 20em;
    box-sizing: border-box;
    margin: 0.25em 0 0.25em 0;
}

section.personal-info ul li label {
    flex: 0 0 5em;
    font-family: "owners-text", sans-serif;
    font-weight: 400;
    font-style: normal;
}

label {
    font-family: "owners-text", sans-serif;
    font-weight: 400;
    font-style: normal;
}
textarea {
    box-sizing: border-box;
    display: flex;
    width: 55%;
    height: 6em;
    background: #fcfcfc;
    border: 1px solid #e8e8e8;
    padding: 0.4em;
    font-family: sans-serif;
    color: #777;
}

section.notifications {
    margin: 0 0 1em 0;
}
section.notifications ul li {
    margin: 0.2em 1em 0.25em 0;
    flex: 1 0 15em;
}

section.notifications ul li label {
    flex: 1 0 8em;
}

section.questions {
    margin: 0 0 1em 0;
    padding: 0em .8em;
}

section.button {
    padding: 0em .8em 1em;
}

form {
    padding: 0em 0em 2.8em;
}

@media 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;
    }

    nav ul li{
		display: inline-block;
		font-size: 1.2em;
		margin: 0em 0.2em;
	}
    header {
        padding: 0em 0em 1em 0em;
    }

    section.secondary h2 {
        padding: .1em 0em;
        }

    section.tertiary h2 {
        padding: .2em 0em .2em;
    }

    section.aside h2 {
        padding: .5em 0em .2em;
    }

    header, footer {
        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;
        flex-direction: column;
        grid-gap:0 1em
    }

    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;
        flex: 1 0 10em;
    }

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

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

    section.secondary {
        display: flex;
        padding: 0em 0em 2.5em;
    }

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

    section.tertiary a p {
        padding: 0em;
    }

    h3 {
        padding: 0em;
    }
    p {
        padding: 0em 3em .5em 0em;
    }
    figcaption {
        padding: .4em 0em .5em 0em;
    }
    footer p {
        padding: .75em 0em;
    }
    article {
        padding: 0em 0em 3em;
    }

}

@media screen and (prefers-color-scheme: dark) {
    ul li a {
        color: rgb(225, 242, 255);
    }

    h2 {
        color: rgb(217, 214, 255);
    }

    h3 {
        color: rgb(255, 211, 242);
    }

    p {
        color: rgb(255, 255, 255);
    }

    figcaption {
        color: rgb(255, 255, 255); 
    }

    body {
        background-color: rgb(56, 73, 117);
    }
    aside {
        background-color: rgb(138, 105, 148);
    }

    section.tertiary h2 {
        border-top: 1px solid rgb(148, 164, 184);
        }

    label {
        color: rgb(255, 255, 255); 
    }

    footer {
        background-color: rgb(83, 116, 142);
    }

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