/*CSS document*/

body {
    background-color: #e5e5e6;
    margin: 0em;
    font-family: ibm-plex-sans, sans-serif;
}

div.container {
    max-width: 100em;
    margin: auto;
}

header {
    background-color: #150404;
    padding: .01em 1em;
    margin-bottom: 2em;
}

h1 {
    max-width: 10em;
}

h2 {
    color: #B70320;
    text-transform: uppercase;
    font-family: degular, sans-serif;
    margin-bottom: 0;
}

h3 {
    font-family: degular, sans-serif;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

p {
    font-family: ibm-plex-sans, sans-serif;
    font-size: .9em;
    line-height: 150%;
    margin-top: 0;
}

main {
    padding: 0em 2em;
    max-width: 70em;
}

figure {
    margin: 0;
}

img {
    width: 100%;
    margin: 0;
}

ul {
    list-style-type: none;
    padding: 0;
}

nav ul li a {
    color: #e5e5e6;
}

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

nav ul li {
    display: inline;
    margin-right: 1em;
    font-family: degular, sans-serif;
    text-transform: uppercase;
    font-size: 1em;
}

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

main section a:hover {
    color: #B70320;
}

section {
    padding: 0 0 2em 0;
}

div.page {
    max-width: 70em;
    display: flex;
    flex-wrap: wrap;
}

article {
    flex: 2 1 25em;
    margin: 0 1em 3em 2em;
}

aside {
    flex: 1 1 15em;
    margin: 0em 1em;
}

footer {
    background-color: #150404;
    padding: .01em 1em;
}

footer p {
    color: #e5e5e6;
    padding-top: .8em;
}

div.gallery {
    max-width: 50em;
    margin: 1em auto;
}

main.gallery {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(72% + 1em);
    padding-left: 0;
}

h2.gallery {
    margin-bottom: 1em;
}

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

figcaption {
    font-family: ibm-plex-sans, sans-serif;
    font-size: 1em;
    margin: .2em 0;
    color: #150404;
}

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(4, 1fr);
    grid-gap: .5em;
}

div.gallery input {
    display: none;
}

main.newsletter {
    max-width: 40em;
    margin: 1em;
    padding: 1em;
}

main.newsletter h2 {
    margin-bottom: 1em;
}

main.newsletter section {
    margin-bottom: 2em;
    padding: 0;
}

button {
    color: #B70320;
    font-size: 1em;
}

section.personal-info ul li {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

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 0 20em;
	box-sizing: border-box;
}

section.personal-info ul li label {
	flex: 0 0 5em;
}

section.order ul, section.method ul {
	display: flex;
	flex-wrap: wrap;
	}

section.order ul li , section.method ul li {
	flex: 1 0 15em;
}

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

@media only screen and (min-width: 60em) {
    main.home {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 2em;
        margin: 2em auto;
    }

    div.page {
        margin: auto;
    }

    section {
        padding: 0;
    }

    section.page {
        padding-bottom: 2em;
    }

    section.mainstory {
        grid-column: 1/3;
        grid-row: 1/5;
    }

    section.mainstory a {
        display: flex;
        flex-direction: column;
    }
    
    section.mainstory a figure div {
        flex: 1 0 18em;
        background-image: url(city_lights.jpg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
    
    section.mainstory a figure div img {
        height: 100%;
        opacity: 0;
    }
    
    section.mainstory a h3 {
        flex: 0 0 auto;
        padding-top: .3em;
    }
    
    section a p {
        flex: 0 0 auto;
        margin: 0;
    }

    main.newsletter {
        margin: auto;
    }
}