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

a:hover {
    opacity: 75%;
  }

body {
    background-color: rgb(225, 225, 225);
}

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

header {
	padding: 3rem .5rem 1rem;
}

div.container, div.home-container {
    max-width: 40em;
    position: relative;
    margin: auto;
    background-color: rgb(250, 249, 247);
}

div.form {
max-width: 40em;
max-height: 200vh;
margin: auto;
background-color: rgb(250, 249, 247);
position: relative;
}

footer {
    background-color: rgb(156, 155, 54);
    padding: 1rem;
    color:  rgb(250, 249, 247);
    margin: 0rem;
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

h1 {
	width: 15rem;
    padding: 0rem 0rem 1.5rem;
    margin-left: 1rem;
}

h2 {
    color: rgb(156, 155, 54);
    font-size: 2.25rem;
    font-family: "adelle", serif;
    font-weight: 400;
    font-style: normal;
    padding: 1.5rem 1rem .75rem;
}

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

p, nav, figcaption, footer, section.personal-info ul li label, .preferences ul li label {
    font-family: "neue-haas-grotesk-text", sans-serif;
    font-weight: 200;
    font-style: normal;
}

p {
    color: rgb(89, 72, 11);
    margin-bottom: .75rem;
    line-height: 1.25em;
    padding: 0rem 1rem 1rem;
}

aside p {
    padding-left: 0rem;
    padding-right: 0rem;
}

a {
	text-decoration: none;
}

nav ul li a {
	color: rgb(89, 72, 11);
    font-weight: 250;
    line-height: 1.5rem;
    text-transform: uppercase;
    font-size: .9rem;
}

nav {
    padding: 0rem 1rem .5rem;
}

nav.gallery {
    display: grid;
    grid-column: 1/3;
    grid-template-columns: repeat(10, 1fr);
    grid-gap: .2em;
}

main.gallery {
    position: relative;
    overflow: hidden;
    grid-column: 1/3;
    padding-bottom: calc(66% + 3em);
}

figure.gallery{
    margin: 0;
    width: calc(100% + 1em);
    position: absolute;
    opacity: 0;
    transition: opacity .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),
input:nth-of-type(9):checked ~ main figure:nth-of-type(9),
input:nth-of-type(10):checked ~ main figure:nth-of-type(10){
    opacity: 1;
}

input {
    display: none;
}

figcaption {
    font-style: italic; 
    color:  rgb(103, 103, 103);
    padding: .5rem 1rem 1rem;
}

section.mainstory h2 {
    padding: .25rem 1rem 0rem;
}

section.secondary h2 {
    font-size: 1.3em;
    padding: .25rem 1rem 0rem;
}

section.tertiary h2 {
    font-size: 1em;
    padding-top: .5rem;
    border-top: 1px solid rgb(217, 73, 39);
    padding: .5rem 0rem 0rem;
    color:  rgb(217, 73, 39);
}

aside h2 {
    font-size: 1.25em;
    padding-left: 0rem;
}

aside {
    padding: 1rem;
    background-color:  rgb(239, 239, 223);
}

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: 4 1 30em;
	box-sizing: border-box;
	margin: 0rem;
}

.personal-info p, .preferences p {
    padding: .5rem 0rem .25rem; 
    font-size: 1.1rem;
    font-family: "adelle", serif;
    color: rgb(156, 155, 54);
}

.personal-info, .preferences {
    max-width: 40em;
    margin-top: 1rem;
    padding: 2rem;
    background-color:   rgb(239, 239, 223);
}

.personal-info ul, .preferences ul {
	display: flex;
	flex-wrap: wrap;
}

.personal-info ul li, .preferences ul li {
    padding-bottom: .75rem;
    flex: 2 0 30em;
}

.personal-info ul li label, .preferences ul li label  {
    flex: 0 0 10em;
    color: rgb(89, 72, 11);
}

.personal-info ul li input {
    padding: .25rem;
    background-color:  rgb(250, 249, 247);
    border: .5px solid rgb(89, 72, 11);
    display: block;
}

.preferences ul li input {
    padding: .25rem;
    background-color:  rgb(250, 249, 247);
    border: .5px solid rgb(89, 72, 11);
    display: inline;
}

main h2 {
    padding: 1rem;
}

main form {
    padding-bottom: 3rem;
}


button {
    background-color: rgb(156, 155, 54);
    border-style: none;
    padding: .5rem;
    margin-top: 1rem;
    color: rgb(250, 249, 247);
}


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

	nav ul li {
		display: inline;
        padding-right: 1rem;
        font-size: .75rem;  
	}

    h2, section.mainstory h2, section.secondary h2, nav, p {
        padding-right: 1rem;
        padding-left: 1rem;
	}

    .personal-info ul li input {
        display: inline;
    }

    .personal-info ul li label {
        padding-right: .5rem;
    }

    .personal-info, .preferences {
    margin: 0rem 1rem 1rem;
    }
}

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

    p, section.mainstory h2, section.secondary h2, section.tertiary h2, nav, aside p, article h2 {
        padding-left: 0rem;
        padding-right: 0rem;
    }
    
    div.home-container {
        max-width: 80em;
        padding: 0 1rem;
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 1rem;
    }

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

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

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

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

    header {
        grid-column: 1/3;
        padding-left: 0rem;
    }

    footer {
        grid-column: 1/3;
        padding-left: 1rem;
    }

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

    figcaption, nav.gallery {
        padding-left: 0rem;
        padding-right: 0rem;
    }

    main.gallery h2 {
        padding: 0rem 0rem 1rem;
    }

    h1 {
        margin-left: 1rem;
    }

    nav {
        padding-left: 1rem;
    }
}

@media screen and (prefers-color-scheme: dark) {
    body {
        background-color: rgb(38, 33, 13);
    }

    p, nav ul li a, section.personal-info ul li label, section.preferences ul li label {
        color: rgb(250, 249, 247);
    }

    h1 {
        background-image: url("logo-dark.svg");
        background-repeat: no-repeat;
        background-size: contain;
    }

    h1 img {
        opacity: 0;
    }

    h2 {
        color: rgb(156, 155, 54);
    }

    aside h2 {
            color: rgb(156, 155, 54);
    }

    div.container, div.home-container, div.form {
        background-color:  rgb(5, 5, 5);
    }
    
    section.personal-info, section.preferences, aside {
        background-color:  rgb(22, 21, 21);
    }

    .preferences ul li input, .personal-info ul li input {
        border-style: none;
    }
}
