/* CSS document */

/* Normalize styles for a consistent baseline */
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;
}

div.photogallery {
    max-width: 60em;
    grid-column: 1/3;
    margin: 0 auto;
    
}

div.newsletter {
    margin: auto;
    position: relative;
    max-width: 50em;
    font-weight: bold;
    font-family: 'bilo', sans-serif; 
    }
    
div.newsletter h3 {
    font-family: Nove;
    color: rgb(146, 173, 164);
    padding-top: 1em;

}

div.newsletter img {
    max-width: 60em;
    padding-top: 2em;
    
}


div.photogallery nav {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: .23m;
}

/* div.photogallery input{
    display: none;
} */

div.photogallery figure{
    margin: 0;
    width: calc (100%-2em);
    position: absolute;
    opacity: 0;
    transition: left 0.5s, opacity 0.5s;
}

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

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


div.photogallery img {
    width: 100%
}

div.main-photogallery img {
position: relative;



overflow: hidden;
padding-bottom: calc (66% + 5em);
}


body {
    font-family: "bilo", sans-serif;
font-weight: 500;
font-style: normal;

}

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

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

h1 {
    width: 10rem;

}

h2 {
    font-weight: bold;
    font-family: 'nove', sans-serif; 

}

h3 {
    font-weight: bold;
    font-family: serif;
    
}


a {
    text-decoration: none;
}

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

nav {
    padding: 1rem 0;
    font-family: "bilo", sans-serif;
    font-weight: 700;
    font-style: normal;
}

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

section.main h2 {
    padding-top: .5rem;
    font-size: 3em;
}

section.secondary h2 {
    padding-top: .5rem;
    font-size: 2em;
}

section.tertiary h2 {
    border-top: 1px solid rgb(241, 168, 5);
    padding-top: .5em;
    font-size: 1em;
}

h2, li a {
    color: rgb(146, 173, 164);
}

li {
    line-height: 1.4em;
}

p {
    color: rgb(34 34 34);
    font-family: "bilo", sans-serif;
    font-weight: 500;
    font-style: normal;
    padding-bottom: 1.8rem;
    line-height: 1.2em;
    font-size: 1.2em;
}

figcaption {
    font-style: italic;
    font-family: "bilo", sans-serif;
    font-weight: 500;
    color: rgb(241, 168, 5);
    padding: .5rem 0 1.2rem;
}

h2, p, figcaption {
    margin: 0 .5rem;
}

aside {
    background-color: rgb(251, 241, 221);
    padding: 1rem .5rem;
}

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

article h2 {
    font-size: 2.5em;
    padding: 1.5rem 0 .5rem 0;
}
article img {
    max-width: 100%;
}

footer {
    background-color: rgb(146, 173, 164);
    box-sizing: border-box;
    padding: 0 0 0 1rem;
}

footer p {
    color: rgb(251, 241, 221);
    padding: auto;
    padding-top: .75rem;
}

@media screen and (min-width: 40em) {
    nav ul li {
        display: inline;
        margin-right: 0.75rem;
    }

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

    body{
        background-color: rgb(53, 62, 59);
    }
    p{
        color: rgb(251, 241, 221)
    }
    h1 {
        background-image: url("beyond_the_break_surfboard_mini_light.svg");
        background-repeat: no-repeat;
        background-size: contain;  
    }
    h1 img {  
        opacity: 0;  
        }  
    aside{
        background-color: rgb(146, 173, 164);
        h2{
            color: rgb(53, 62, 59)
        }
    }
    
    .logo-alternate {
        display: none;
    }

    }

    main.main-photogallery {
        position: relative;
        overflow: hidden;
        padding-bottom: calc(66% + 4em);
    
    }

    header {
        padding: 1rem 0 0 0;
    }

    h2, p, figcaption {
        margin: 0;
    }

    p {
        padding-bottom: .8em;
    }

    aside p {
        margin: 0 0 0.7rem 0;
    }

    main p {
        margin: 0 0 1rem 0;
    }
}

@media only screen and (min-width: 60em) {
    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, footer {
        grid-column: 1/3;
    }

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

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

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

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

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

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

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

    section.main a h2 {
        flex: 0 0 1em;
    }
    
    section.main a p {
        flex: 0 0 4em;
    }

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