/********/
/* BASE */
/********/

:root {
    --accent-color: #00b338;
}

::selection {
    background: white;
    color: var(--accent-color);
}

html {
    scroll-behavior: smooth;
}

body {
    background-image:
        url('../images/noise-texture.png'),
        linear-gradient(to bottom, rgb(0, 100, 0) 0, rgb(0, 0, 0) 50vh);
    font: normal 100% 'Archivo Black', sans-serif;
    margin: 0;
    overscroll-behavior: none;
    padding: 0;
}

video {
    background-color: #000;
}

/**********/
/* LAYOUT */
/**********/

/* Main */
#main {
    color: white;
    margin: 2em auto;
    max-width: 80em;
    width: 100%;
}

#main-header {
    margin: 2em 0;
    text-align: center;
}

#main-header > img {
    filter: drop-shadow(8px 8px 0px rgb(0 0 0 / 1));
    max-width: 40em;
    width: calc(100% - 4em);
}

#main-nav {
    box-sizing: border-box;
    margin-bottom: 1em;
    padding: 0 1em;
}

#main-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: left;
}

#main-nav > ul > li {
    margin-bottom: 1em;
}

#main-nav > ul > li:last-child {
    margin-right: 0;
    margin-left: auto;
}

#main-nav > ul > li > a {
    align-content: center;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: .25em;
    border: 2px solid var(--accent-color);
    box-sizing: border-box;
    color: white;
    display: block;
    height: 100%;
    padding: .75em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s ease;
}

#main-nav > ul > li > a:hover {
    background-color: var(--accent-color);
}

#main-content {
    background-color: rgba(0, 0, 10, 0.75);
    padding: 1em;
    box-sizing: border-box;
}

#main-content > h1 {
    margin-top: 0;
    text-align: center;
}


/***********/
/* MODULES */
/***********/

/* Card Grid */
.card-grid {
    display: grid;
    grid-gap: 1em;
    grid-template-columns: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Card */
.card {
    background-color: black;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: .5em;
    box-sizing: border-box;
    font-family: 'Archivo Black', sans-serif;
    height: 16em;
    overflow: hidden;
    padding: 1em;
    position: relative;
}

a.card {
    color: #fff;
    display: block;
    text-decoration: none;
}

.card-image {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}
.card-image > img {
    height: 100%;
    object-fit: cover;
    transition: transform ease-in-out 2s;
    width: 100%;
}
.card:focus .card-image > img,
.card:hover .card-image > img {
    transform: scale(1.2) translate3d(0, 0, 0);
}
.card::after {
    background-color: var(--accent-color);
    background-image: url('../images/noise-texture.png');
    background-size: 50%;
    bottom: -2.5em;
    content: '';
    left: -2em;
    mix-blend-mode: hard-light;
    position: absolute;
    right: -2em;
    top: 90%;
    transform: rotate(-10deg) translate3d(0, 0, 0);
    transition: all ease .75s;
}
.card:focus::after,
.card:hover::after {
    top: 80%;
}
.card-title {
    bottom: 0;
    box-sizing: border-box;
    font-size: 1.75em;
    line-height: 1;
    padding: 1rem;
    position: absolute;
    right: 0;
    text-align: right;
    text-shadow:
        1px 1px 1px black,
        2px 2px 1px black,
        3px 3px 1px black,
        4px 4px 1px black,
        5px 5px 1px black;
    text-transform: uppercase;
    transform: scale(0.8);
    transform-origin: bottom right;
    transition: all ease-in-out .2s;
    width: 100%;
    z-index: 1;
}
.card:focus .card-title,
.card:hover .card-title {
    transform: scale(1.0);
}

/* Parallax Layers */
.parallax-layer {
    --loop-duration: 30s;

    animation-iteration-count: infinite;
    animation-name: loop;
    animation-timing-function: linear;
    background-repeat: round no-repeat;
    bottom: 0;
    left: 0;
    min-height: 2000px;
    position: absolute;
    right: 0;
    top: 0;
    transform: translate3d(0, 0, 0);
    width: 100%;
    z-index: -1;
}
.parallax-layer:nth-child(1) {
    animation-duration: calc(var(--loop-duration) * 6);
    background-image: url('../images/clouds_3.png');
    background-size: 25%;
}
.parallax-layer:nth-child(2) {
    animation-duration: calc(var(--loop-duration) * 3);
    background-image: url('../images/clouds_2.png');
    background-size: 50%;
    top: 3em;
}
.parallax-layer:nth-child(3) {
    animation-duration: initial !important;
    background-image: url('../images/moon.png');
    background-position: top;
    background-repeat: no-repeat;
    background-size: clamp(15em, 90%, 600px);
    min-height: 600px;
    top: 4em;
}
.parallax-layer:nth-child(4) {
    animation-duration: calc(var(--loop-duration) * 1);
    background-image: url('../images/clouds_1.png');
    background-size: 75%;
    top: 4em;
}
.parallax-layer:nth-child(5) {
    animation-duration: calc(var(--loop-duration) * 0.5);
    background-image: url('../images/clouds_foreground.png');
    background-size: 75%;
    top: 10em;
    z-index: 1;
    opacity: 0.95;
    pointer-events: none;
}

/* Quilt */
.quilt {
    display: flex;
    width: 100%;
}

.quilt > img {
    width: 50%;
}

/* Section Header */
.section-header {
    background-color: var(--accent-color);
    border-radius: .5em;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5em;
    font-weight: normal;
    padding: .5em;
    margin-bottom: 2em;
    text-shadow:
        1px 1px 1px black,
        2px 2px 1px black,
        3px 3px 1px black,
        4px 4px 1px black,
        5px 5px 1px black;
    text-transform: uppercase;
    position: relative;
}
.section-header::after {
    background-image: url('../images/drips.svg');
    background-repeat: round no-repeat;
    bottom: -99px;
    content: '';
    display: block;
    height: 100px;
    left: 0;
    position: absolute;
    right: 0;
    width: 100%;
}

/**************/
/* ANIMATIONS */
/**************/

@keyframes loop {
    0% { background-position: 0 0; }
    100% { background-position: 100vw 0; }
}


/***********/
/* UTILITY */
/***********/

.is-not-mobile {}


/*****************/
/* MEDIA QUERIES */
/*****************/

@media screen and (min-width: 30em) {
    /* Main */
    #main {
        width: calc(100% - 2em);
    }

    #main-header {
        margin: 2em 0;
    }

    #main-nav > ul {
        display: flex;
    }

    #main-nav > ul > li {
        margin-bottom: 0;
        margin-right: 1em;
    }

    #main-content {
        border-radius: .5em;
    }

    /* Card Grid */
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
    }

    /* Section Header */
    .section-header {
        font-size: 2em;
    }
}


@media screen and (min-width: 40em) {
    body {
        background-image:
            url('../images/noise-texture.png'),
            linear-gradient(to bottom, rgb(0, 100, 0) 0, rgb(0, 0, 0) 100vh);
    }

    /* Main */
    #main-header {
        margin: 4em 0;
    }
}
