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

figcaption {
    color: rgb(119, 113, 132);
    font-family: "lato", sans-serif;
    font-weight: 400;
    font-style: italic;
    margin: 0.2rem 0rem 3rem 0.5rem;
    font-size: 0.9rem;
}

div.container,
div.gallery,
div.newsletter,
div.home-container {
    max-width: 51rem;
    margin: 0 auto;
}

header {
    margin: 0 0.5rem 0.5rem;
    padding-top: 1rem;
}

h1 {
    width: 20rem;
 
}

nav {
    margin: 1rem 0rem;
    font-family: "lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    border-bottom: 3px solid rgb(110, 135, 120);
    padding-bottom: 1rem;
}

li {
    margin-top: 0.1rem;
}

ul {
    list-style-type: none;
}

a {
	text-decoration: none;

	}

nav a {
    color: rgb(110, 135, 120);
    font-size: 1.3rem;
}

div {
    background-color: rgb(244, 244, 246);
}

body,
html {
    background-color: rgb(50, 50, 56);
}

h2 {
    color: rgb(110, 135, 120);
    margin-left: 0.5rem;
}

aside.story {
    padding-top: 3rem;
}

aside.story h2 {
    color: rgb(30, 30, 36);
}

p {
    color: rgb(9, 9, 11);
    font-family: "lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

.main h2,
article h2,
.gallery h2,
.container h2,
.newsletter h2 {
    font-size: 3rem;
    padding-top: 1rem;
    font-family: "abril-fatface", serif;
    font-weight: 400;
    font-style: normal;
}

.newsletter h2 {
    margin-bottom: 4rem;
}

section p {
    padding-bottom: 2rem;
}

article p {
    margin-bottom: 2rem;
}

.secondary h2 {
    font-size: 1.5rem;
    margin-top: 1rem;
    font-family: "cormorant-garamond", serif;
    font-weight: 700;
    font-style: normal;
}

.tertiary h2 {
    font-size: 1.5rem;
    padding-top: 0.5rem;
    font-family: "cormorant-garamond", serif;
    font-weight: 700;
    font-style: normal;
}

section.tertiary h2 {
    border-top: 1px solid rgb(110, 135, 120);
}

main .secondary h2 {
    font-size: 2.3srem;
}

aside {
    background-color: rgb(164, 175, 171);
    padding: 1rem;
}

div.home-container aside {
    background-color: rgb(244, 244, 246);
}

.secondary {
    padding: 0 1.5rem;
}

footer p {
    background-color: rgb(110, 135, 120);
    color: rgb(244, 244, 246);
    margin-left: 0;
    padding: 0.8rem 0.5rem;
}


.gallery main {
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    display: flex;
}

.gallery main figure{
    position: absolute;
    opacity: 0;
    transition: left 0.5s, ease-in 0.5s;
    left: 100%;
}

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

nav.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-gap: 0.2em;
    padding-top: 50rem;
}


.gallery input {
    display: none;
}

div.newsletter {
    margin: 0 auto;
    max-width: 51rem;
}

section.personal-info ul li input[type="text"],
section ul li input[type="email"],
section ul li select {
flex: 3 0 24em;
box-sizing: border-box;
}



.newsletter section {
background: #eee;
padding: 1em;
margin-bottom: 3em;
}

.newsletter section.personal-info ul li{
display: flex;
flex-wrap: wrap;
}

.newsletter section ul {
padding-left: 0em;
}

.newsletter section.personal-info label {
flex: 1 0 8em;
}

.newsletter section.personal-info input,
.newsletter section.personal-info select{
flex: 3 0 24em;
}

textarea {
box-sizing: border-box;
display: block;
width: 100%;
height: 6em;
background: #fcfcfc;
border: 1px solid #e8e8e8;
padding: 0.4em;
font-family: sans-serif;
color: #777;
}

.newsletter ul {
list-style: none;
}

body.newsletter {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@media only screen and (min-width: 60em) {
    
    div.home-container {
        max-width: 100rem;
        padding: 0 1em;
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 1em;
    }

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

    div.newsletter {
        max-width: 75rem;
        padding: 0 1em;
        height: 100vh;
    }

    header,
    footer {
        grid-column: 1/3;
        margin-left: 0;
    }

    div.home-container main {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 1em;
    }

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

    div.home-container aside {
        background-color: rgb(244, 244, 246);
        padding-top: 0;
        margin-top: 0;
    }

    section.main a {

        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
        margin-left: 0;
    }

    section.main a figure {
        flex: 1 0 12em;
        display: flex;
        margin-bottom: 1rem;
    }

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

    section.main a h2 {
        flex: 0 0 1em;
        margin-left: 0;
    }

    section.main a p {
        flex: 0 0 4em;
        margin-left: 0;
    }

    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;
        margin-left: 0;
    }

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

    div.newsletter {
        margin: auto;
      }

    li {
        display: inline;
        margin-right: 1.5rem;
    }
}

@media screen and (prefers-color-scheme: dark) {

    div {
        background-color: rgb(30, 30, 36);
    }

    body {
        background-color:rgb(110, 135, 120) ;
    }

    p {
        color: rgb(244, 244, 246);
    }

    aside {
        background-color: rgb(90, 115, 100);
    }

    div.home-container aside {
        background-color: rgb(30, 30, 36);
    }

    .newsletter section {
        background-color: rgb(50, 50, 56);
    }

    .newsletter label,
    .newsletter h3 {
        color: rgb(244, 244, 246);
    }

    footer p {
        background-color: rgb(70, 95, 80);
    }

    h1 {
        background-image: url(KeyTrendsalt.svg);
    }

    h1 img {
        opacity: 0;
    }
}