/*CSS document*/

body {
    margin: 3em;
}

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

figure {
    margin: 0;
}

img {
    width: 100%;
}

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

h1{
    max-width: 4em;
}

h2{
    font-family: catseye;
    font-style: medium;
    color: #d46e5e;
    font-size: 1.5em;
    margin-top: 1em;
    margin-bottom: 0.2em;
}

figcaption{
    font-family: proxima-nova;
    font-weight: 300;
    font-size: .7em;
    font-style: normal;
    color: #363537;
}

aside{
    margin-top: 2em;
}

nav ul li a{
    font-family: catseye;
    font-style: medium;
    font-size: .9em;
    color: #0882a8;
    margin-right: 0.5em;

}

ul li{
    display: inline;
}

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

h3{
    font-family: catseye;
    font-weight: 500;
    font-style: medium;
    color: #d46e5e;
    font-size: 1.5em;
    margin-top: 1em;
    margin-bottom: 0.2em;
}

h4{
    font-family: proxima-nova, sans-serif;
    font-weight: 500;
    font-size: 1.25em;
    color: #363537;
    font-style: normal;
    padding: 0;
}

a{
    text-decoration: none;
}

p{
    font-family: proxima-nova;
    font-weight: 300;
    font-style: normal;
    color: #363537;
    padding: auto;
}

footer{
    background-color: #d46e5e;
    padding: 0.1em;
    font-family: proxima-nova;
    font-weight: 300;
    font-style: normal;
    margin-top: 2em;
}

footer p{
    color:#fafafa;
    margin: 0.5em;

}

div.gallery{
    display: grid;
    grid-template-columns: 2fr 1fr;
    margin: auto;
}

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

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

 nav.button{
     text-align: right;
 }

main.figure {
    width: 100%;
}

.gallery figure{
    position: absolute;
    opacity: 0;
    transition: opacity 1s;
    width: 100%;
}

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

input[type="radio"] {
    display: none;
}



form ul li{
    font-family: proxima-nova, sans-serif;
    font-weight: 500;
    font-size: 1.25em;
    color: #363537;
    font-style: normal;
    margin-right: 2em;
}

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

section.personalinfo ul, section.preferences ul {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1em;
}

section.personalinfo ul li , section.preferences ul li {
    flex: 1 0 15em;
}


section.personalinfo ul li input[type="text"],
section ul li input[type="text"],
section ul li input[type="email"],
section ul li select {
    flex: 4 0 10em;
    box-sizing: border-box;
}

section.personalinfo ul li label {
    flex: 0 0 3em;
}

button{
    color: #0882a8;
    font-family: proxima-nova, sans-serif;
    font-weight: 300;
    font-style: normal;
    padding: 1em;
    text-align: left;
    margin-top: 1em;
}

@media screen and (min-width: 45em){
    div.container {
        max-width: 65em;
        display: grid;
        grid-gap: 0 2em;
        }
    nav ul li a{
        font-size: 2vw;
    }

    header{
        grid-column: 1/6;
    }

    main{
        grid-column: 1/3;
        display: grid;
        grid-gap: 0 2em;
    }

    .section figure{
        display: flex;
        flex: 1 0 16em;
    }

    section.mainstory{
        grid-column: 1/4;

    }

     section.secondary{
        grid-column: 1/2;
        grid-row: 2/4;
    }

    section.tertiarty{
        grid-column: 4/5;
    }


    section.quaternary{
        grid-column: 3/4;
        grid-row: 3/4;
    }

    section.senary{
        grid-column: 1/2;
        grid-row: 3/4;
    }

    aside{
        grid-column: 3/4;
        margin: 0;
    }

    article{
        grid-column: 1/3;
        display: grid;
        grid-gap: 0 2em;
    }

    footer{
        grid-column: 1/5;
    }




    }