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

body {
    background-color: rgb(250, 246, 237);
}

div.container, div.home-container {
    max-width: 40em;
    margin: auto;
    margin-top: 1em;
}

img {
    width: 100%;
    display: block;
    border-radius: 0.5em;
}

.home-container figure:hover {
    filter: contrast(110%) drop-shadow(0.1em 0.1em 0.5em rgb(255, 184, 200));
}

header {
    padding:1em 0 1em 1em;
    position: inherit;
    background-image: linear-gradient(rgba(248, 242, 228, 0.7), rgba(253,251,246,1));
    border-bottom: solid 0.1em rgb(109, 138, 150,0.2);
    backdrop-filter: blur(0.5em);
    z-index: 1;
}

nav ul li a {
    color: rgb(93, 112, 127);  
    text-decoration: none;
    font-family: "articulat-cf", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 1.2em;
}

h1 {
    width: 6rem;
    padding-bottom: 1em;
}

ul {
    list-style-type: none;
}

h2 {
    font-family: kepler-std-semicondensed, serif;
    font-weight: 700;
    font-style: normal;
    line-height: 1em;
    font-size: 1.5em;
    color: rgb(109, 138, 150);
    margin: 0.5rem 0 0 0.5rem;
}

.story-1 h2 {
    color: rgb(93, 112, 127);  
    font-size: 3em;
}

main section.story-2 h2 {
    font-size: 2em;
}

section.story-3 {
    border-top: solid 0.1em rgb(255, 184, 200);
    padding: 0.5em 0 1em;
}

p {
    font-family: articulat-cf, sans-serif;
    font-weight: 400;
    font-style: normal;
    margin: 0.5em 0.5em 0.5em;
    font-size: 1.05em; 
    line-height: 1.4em;
}

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


figcaption {
    font-family: sans-serif;
    font-style: italic;
    margin: 0.5rem 0.5rem 1rem;
    color: #555555;
}

aside section.story-2 {
    padding: 1em 0.5em;
    background-color: rgb(255, 184, 200, 0.5);
    margin-bottom: 1em;
    border: 0.1em solid #FFF;
    border-radius: 0.5rem;
    box-shadow: 0.5em 0.5em 1em #FFF;

}


footer {
    background-color: rgb(255, 184, 200, 0.5);
    margin-top: 2em;
    padding: 1em 0;
    box-sizing: border-box;
}

footer p {
    color: rgb(93, 112, 127);
    font-family: kepler-std, serif;
    font-weight: 400;
    font-style: italic;
}

/*photo gallery page*/

.gallery-container {
    max-width: 40em;
    margin: auto;
}

main.gallery {
    position: relative;
    padding-bottom: calc(100% + 5em);
    z-index: 0;
    display: flex;
    justify-content: center;
    }

.gallery figure{
    margin: 0;
    width: calc(100% - 2em);
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
    object-fit: cover;
    filter: contrast(120%);
}

.carousel label {
    filter: saturate(40%);
}

.carousel label:hover {
    filter: saturate(110%) contrast(120%) drop-shadow(0.1em 0.1em 0.8em rgb(255, 184, 200));
}

#xtonz {
    font-size: 2em;
    margin: 0.5em 0 0.5em 0.5em;
}


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.carousel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1em;
    align-content: space-around;
    background-color: rgb(255, 184, 200, 0.2);
    padding: 0.5em;
    margin: 1em;
    border-radius: 0.5em;
}

input {
    display: none;
}

/*NEWSLETTER*/

.cta-contain {
    margin: 3rem 1rem;
    border: 0.1em solid #E8E8E8;
    border-radius: 0.5rem;
    box-shadow: 0.5em 0.5em 1em #E8E8E8;
}

.cta-l {
    padding: 1.2em;
    margin: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #FFF;
    background-color: rgb(109, 138, 150);
    display: inline-block;
    align-content: center;
}

.cta-l h2 {
    font-family: kepler-std-semicondensed, serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2.5em;
    color: #FFF;
}

.cta-r {
    padding: 1em;
    background-color: #f8f8f8;
    border-radius: 0 0 0.5rem 0.5rem;
}


input[type=text], input[type=submit] {
    width: 90%;
    padding: 0.5em;
    margin: 0.5em 0;
    display: inline-block;
    border: 0.1em solid #ccc;
    box-sizing: border-box;
}

.info h3, .prefs h3 {
    font-family: kepler-std-semicondensed, serif;
    font-weight: 700;
    font-style: normal;
    line-height: 1em;
    font-size: 1.5em;
    color: rgb(109, 138, 150);
    margin: 0.5rem 0 0 0.5rem;
}

input[type=checkbox] {
    display: initial;
}

.prefs ul li label {
    font-family: articulat-cf, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.05em; 
    line-height: 1.5em;
}


/* submit button */

input[type=submit] {
    text-transform: uppercase;
    background-color: rgb(255, 184, 200, 0.7);
    color: #FFF;
    border: none;
    border-radius: 0.5em;
}

input[type=submit]:hover {
    background-color: rgb(255, 184, 200);
}

.submit {
    padding: 0.5em 0;
}


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

    nav ul li {
    display: inline;
    margin: 0 1rem 0 0;
    }

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

    header {
        padding: 2em 0 1em 5em;
        position: sticky; top: 0;
    }

    footer {
        margin-top: 2em;
        padding: 1em 5em;
        box-sizing: border-box;
    }

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

    h2, p, figcaption {
        margin-left: 0;
    }

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


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

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

    section.story-1 a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }

    section.story-1 a figure {
        flex: 1 0 12em;
        display: flex;
    }

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

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

    section.story-1 a p {
        flex: 0 0 3em;
    }

    section.story-2 {
        display: flex;
    }

    section.story-2 a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }

    section.story-2 a figure {
        flex: 1 0 12em;
        display: flex;
    }

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

    section.story-2 a h2 {
        flex: 0 0 1em;
    }

    section.story-2 a p {
        flex: 0 0 3em;
    }

    /*photo gallery page*/

    .gallery-container {
        max-width: 80em;
        display: grid;
        grid-template-columns: 1.2fr 2fr;
    }
    main.gallery {
        grid-column: 1/2;
        margin-right: 3em;
        padding-bottom: calc(100% + 1em);
    }

    nav.carousel {
        padding: 1em;
        margin: 0;
    }

    /*NEWSLETTER*/

    .cta-contain {
        margin: 3rem 4rem;
        display: grid;
        grid-template-columns: 1fr 2fr;
        margin-bottom: 10%;
    }

    .cta-l {
        padding: 1em 1em 1em 1.2em;
        margin: 0;
        border-radius: 0.5rem 0 0 0.5rem;
        display: inline-block;
        align-content: center;
    }


    .cta-r {
        padding: 1em;
        border-radius: 0 0.5rem 0.5rem 0;
    }

}

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

    body {
        background-color: #222;
    }

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

    h1 img {
        opacity: 0;
    }

    h2, .story-1 h2, nav ul li a, figcaption {
        color: #A7B9C0;
    }

    p, aside .story-2 h2, footer p {
        color: #FFF;
    }

    header {
        background-image: linear-gradient(rgba(40, 40, 40, 0.7), rgba(0,0,0,1));
    }

    footer {
        background-color: rgb(93, 112, 127);
    }

    aside section.story-2 {
        background-color: rgb(93, 112, 127);  
        margin-bottom: 1em;
        border: 0.05em solid #E8E8E8;
        box-shadow: 0.1em 0.1em 0.5em #E8E8E8;
    }

    nav.carousel {
    background-color: rgb(93, 112, 127, 0.5);
    }

    .cta-contain {
        border: 0.05em solid #E8E8E8;
        box-shadow: 0.1em 0.1em 0.5em #E8E8E8;  
    }

}
