@font-face {
    font-family: 'Alegreya Sans';
    font-weight: 400;
    font-style: normal;
    src: url('fonts/AlegreyaSans-Regular.woff2') format('woff2'),
         url('fonts/AlegreyaSans-Regular.woff') format('woff');
    font-display: swap;
}

/* @font-face {
    font-family: 'Alegreya Sans';
    font-weight: 700;
    font-style: normal;
    src: url('fonts/AlegreyaSans-Bold.woff2') format('woff2'),
         url('fonts/AlegreyaSans-Bold.woff') format('woff');
    font-display: swap;
} */

@font-face {
    font-family: 'Alegreya Sans SC';
    font-weight: 700;
    font-style: normal;
    src: url('fonts/AlegreyaSansSC-Bold.woff2') format('woff2'),
         url('fonts/AlegreyaSansSC-Bold.woff') format('woff');
    font-display: swap;
}

/*------------
General Styles
------------*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --keycol: #D4B273;
    --highlight: #00BAD1;
    --brown: #2E0D02;
    --gap: 2rem;
    --spacing: 4rem;
    --body-fontstack: 'Alegreya Sans', sans-serif;
    --headline-fontstack: bourbon, 'Alegreya Sans SC', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-fontstack);
    font-size: 1.2rem;
    background-color: #141314;
    background-image: url(img/bg.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.block {
    max-width: 1440px;
    width: 75vw;
    margin: 0 auto var(--spacing) auto;
}

/*---------
Text styles
---------*/

h1, h2, h3, h4 {
    margin-bottom: 2rem;
    font-family: var(--headline-fontstack);
    font-size: 2.3rem;
    font-weight: 400;
    color: var(--keycol);
}

h1 {
    padding: .5rem 0;
    text-align: center;
    background: url(img/splatter.png) no-repeat center;
}

#features h2 {
    width: 75vw;
    margin: 0 auto 2rem auto;
}

.feature h3, .card h3 {
    color: var(--brown);
}

#order h3 {
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
    font-family: 'Alegreya Sans SC', serif;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--keycol);
    line-height: 150%;
}

.ccm-root p {
    color: #424242;
}

.feature p, .card p {
    color: var(--brown);
}

#apply h2, #apply p {
    text-align: left;
}

footer p {
    font-size: .8rem;
}

p.highlight {
    font-family: 'Alegreya Sans SC', serif;
    font-weight: 700;
    text-decoration: underline;
}

p:last-of-type {
    margin-bottom: 0;
}

a {
    color: var(--highlight);
}

.header-links a:not(.btn) {
    font-family: 'Alegreya Sans SC', serif;
    color: var(--keycol);
    font-weight: 700;
    text-decoration: none;
}

.header-links a:not(.btn):hover {
    text-decoration: underline;
}

.select a {
    display: inline-block;
    margin-bottom: calc(var(--gap) / 2);
}

.plfm-btn, .vrsn-btn, .select a {
    margin: 0 calc(var(--gap) / 2) calc(var(--gap) / 2) 0;
    padding: calc(var(--gap) / 4) calc(var(--gap) / 2);
    font-family: var(--body-fontstack);
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--keycol);
    background: transparent;
    border: 3px solid var(--keycol);
}

.plfm-btn:hover, .vrsn-btn:hover, .select a:hover {
    color: var(--brown);
    background: var(--keycol);
}

#order .plfm-btn:last-of-type, #order .slct-btn:last-of-type, .select a:last-of-type {
    margin-right: 0;
}

.active, .select a:active {
    color: var(--brown);
    background: var(--keycol);
    border: 3px solid var(--keycol);
}

/*---------------
Inputs and Labels
---------------*/

input {
    margin-bottom: 1rem;
}

input[type='email'], input[type='text'], input[type='number'] {
    margin: 0 auto 1rem auto;
    padding: .5rem;
    font-family: var(--body-fontstack);
    font-size: 1.2rem;
    background: var(--keycol);
    border: 0;
}

input[type='email']:focus, input[type='text']:focus {
    outline: 1px solid var(--highlight);
}

label {
    font-family: var(--body-fontstack);
    color: var(--keycol);
}

label[for="privacy"] {
    font-family: var(--body-fontstack);
}

/*-------------
Disciples Button
-------------*/

.btn {
    position: relative;
    margin: 1rem 52px 0 52px;
    padding: 0 2rem;
    height: 78px;
    font-family: var(--headline-fontstack);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--keycol);
    background: transparent;
    background-image: url(img/btn/btn_center.png);
    border: 0;
}

a.btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-image: url(img/btn/btn_center_hvr.png);
}

.btn::before, .btn::after {
    display: block;
    position: absolute;
    top: 0;
    width: 52px;
    height: 78px;
    content: '';
}

.btn::before {
    left: -52px;
    background-image: url(img/btn/btn_left.png);
}

.btn:hover::before {
    background-image: url(img/btn/btn_left_hvr.png);
}

.btn::after {
    right: -52px;
    background-image: url(img/btn/btn_right.png);
}

.btn:hover::after {
    background-image: url(img/btn/btn_right_hvr.png);
}

/*------
Age Gate
------*/

#age-gate {
    padding-top: var(--spacing);
    text-align: center;
}

.inputs {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: repeat(3, min-content);
    align-items: center;
    width: max-content;
    margin: 0 auto calc(var(--spacing) / 2) auto;
}

label[for="month"], label[for="day"], label[for="year"] {
    grid-row: 1 / 2;
}

#month, #day, #year {
    grid-row: 2 / 3;
    width: 6rem;
    margin: 0 2rem;
    text-align: center;
}

#month {
    justify-self: end;
}

#day {
    justify-self: center;
}

#year {
    justify-self: start;
}

/*----
Header
----*/

header {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 90vh;
    margin-bottom: var(--spacing);
    background-image: url(img/keyart.jpg) center;
    background-size: cover;
    border-bottom: 2px solid var(--keycol);
}

header::after {
    display: block;
    position: absolute;
    left: 50%;
    bottom: -27px;
    width: 255px;
    height: 28px;
    content: '';
    background: url(img/divider_small.png) no-repeat center;
    transform: translateX(-50%);
}

header video {
    position: absolute;
    width: 100%;
    height: 100%;
    max-height: 90vh;
    object-fit: cover;
    z-index: -1;
}

.social-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: .5rem;
    background: rgba(0, 0, 0, .75);
}

.social-bar a {
    margin-right: var(--gap);
}

.social-bar a:last-of-type {
    margin-right: calc(var(--gap) / 2);
}

.social-bar img {
    height: 28px;
}

#age-header {
    height: 100%;
    margin-bottom: 1rem;
    border: none;
}

#age-header::after {
    display: none;
}

#logo {
    width: 35%;
    margin: 4rem 0 0 2rem;
}

#age-header #logo {
    margin: 4rem auto 0 auto;
}

.header-links {
    display: grid;
    grid-template-columns: 1fr .5fr 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    margin-top: auto;
    padding: 0 2rem 2rem 2rem;
    background: linear-gradient(to top, rgb(20, 19, 20, 1), rgb(20, 19, 20, 0));
}

.header-links .btn {
    order: 2;
    justify-self: center;
    max-width: max-content;
    margin: 0 4rem;
}

.header-links a:nth-child(2) {
    order: 1;
    justify-self: end;
    width: max-content;
    margin-right: 1.5rem;
}

.header-links a:last-of-type {
    order: 3;
    width: max-content;
    margin-left: 1.5rem;
}

/*-----
Trailer
-----*/

#trailer, #trailer-thumb {
    width: 75%;
    margin: 0 auto 4rem auto;
}

.trailer-thumb {
    width: 100%;
}

.trailer-thumb picture, .trailer-thumb img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Play Button */

.play-btn {
    position: absolute;
    margin: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: 0;
    cursor: pointer;
}

.play-btn svg {
    width: 75px;
    height: 75px;
    fill: #7D5F26;
    opacity: .8;
}

.trailer-thumb:hover svg {
    opacity: 1;
}
.devdiaries a:hover svg {
    opacity: 1;
}

/* YouTube Embed */

.trailer {
    height: 0;
    padding-bottom: 56.25%;
}

.trailer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/*--------
Newsletter
--------*/

#newsletter {
    display: flex;
    gap: 4rem;
    padding: 1rem 2rem;
    text-align: center;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5) 15%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .75) 60%, rgba(0, 0, 0, .5) 85% , rgba(0, 0, 0, 0)),
                      url(img/GLYPH.png);
    background-size: cover;
    background-repeat: space;
    border-top: 2px solid var(--keycol);
    border-bottom: 2px solid var(--keycol);
}

.nl-email {
    margin-top: 2rem;
}

label[for='email'] {
    margin-right: 1rem;
}

#wallpapers {
    align-self: center;
    max-width: 33%;
    padding: 1rem 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5) 15%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .75) 60%, rgba(0, 0, 0, .5) 85% , rgba(0, 0, 0, 0));
    border-image: url(img/frame.png) 72 / 22px / 6px round;
    border-style: solid;
}

#wallpapers img {
    padding-bottom: 1rem;
    width: 90%;
    height: auto;
    border-bottom: 1px solid var(--keycol);
}

#nl-reply {
    max-width: 50vw;
    margin-bottom: 25vh;
}

/*---------
Description
---------*/

#apply {
    text-align: center;
}

/*------
Features
------*/

#features {
    position: relative;
    overflow: hidden;
}

#features::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    content: '';
    background-image: url(img/GLYPH.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: opacity(25%);
    animation: rotation 60s infinite linear;
    z-index: -1;
}

@keyframes rotation {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(359deg);
    }
  }

#features-list {
    display: grid;
    grid-template-columns: 1fr var(--spacing) var(--spacing) 1fr;
    grid-template-rows: repeat(3, auto auto var(--gap) var(--spacing));
    margin-bottom: 0;
}

.feature {
    padding: var(--gap);
    background: #CCAD7F;
}

.screen1, .screen3 {
    grid-column: 1 / span 3;
}

.feature1, .feature3 {
    grid-column: 3 / span 2;
}

.screen1 {
    grid-row: 1 / 4;
}

.feature1 {
    grid-row: 2 / 3;
}

.screen2 {
    grid-column: 2 / span 3;
    grid-row: 5 / 8;
}

.feature2 {
    grid-column: 1 / span 2;
    grid-row: 6 / 7;
}

.screen3 {
    grid-row: 9 / 12;
}

.feature3 {
    grid-row: 10 / 11;
}

.screen > picture, .screen img {
    width: 100%;
    object-fit: cover;
}

#order-btn {
    display: flex;
    justify-content: center;
}

/*---
Media
---*/

.videos a {
    height: max-content;
}

.videos a:nth-child(1) {
    grid-column: 1 / 5;
    grid-row: 1 / 4;
}

.videos a:nth-child(2) {
    grid-column: 5 / 6;
    grid-row: 1 / 2;
}

.videos a:nth-child(3) {
    grid-column: 5 / 6;
    grid-row: 2 / 3;
}

.videos a:nth-child(4) {
    grid-column: 5 / 6;
    grid-row: 3 / 4;
}

:is(.screenshots, .videos, .devdiaries) a img {
    max-width: 336px;
    width: 100%;
    border-image: url(img/frame.png) 60 / 20px / 4px round;
    border-style: solid;
}

button.splide__arrow {
    border-radius: 0;
    background: #7D5F26;
}

.splide__arrow svg path {
    fill: var(--brown);
}

/*-------------
Order Selection
-------------*/

#order {
    padding: 1rem 2rem;
    text-align: center;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5) 15%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .75) 60%, rgba(0, 0, 0, .5) 85% , rgba(0, 0, 0, 0));
    background-size: cover;
    background-repeat: space;
    border-top: 2px solid var(--keycol);
    border-bottom: 2px solid var(--keycol);
}

/*------
Wishlist
------*/

#wishlist {
    display: flex;
    gap: var(--gap);
}

.card {
    flex: 1;
    padding: var(--gap);
    text-align: center;
    text-decoration: none;
    background: var(--keycol);
    border: 6px solid transparent;
}

.card:hover {
    border-image: url(img/frame.png) 72 / 22px / 6px round;
}

/*----
Footer
----*/

footer {
    position: relative;
    width: 100%;
    padding: 4rem;
    text-align: center;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)),
                      url(img/bottom_banner.webp);
    background-position: bottom;
    background-repeat: no-repeat;
    border-top: 2px solid var(--keycol);
}

footer::before {
    display: block;
    position: absolute;
    left: 50%;
    top: -27px;
    width: 255px;
    height: 28px;
    content: '';
    background: url(img/divider2_small.png) no-repeat center;
    transform: translateX(-50%);
}

footer::after {
    display: block;
    position: absolute;
    left: 0;
    top: -184px;
    width: 300px;
    height: 184px;
    content: '';
    background-image: url(img/skulls.png);
    background-repeat: no-repeat;
    background-size: contain;
    filter: opacity(75%);
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem 3rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.logo:last-of-type {
    margin-right: 0;
}

.logo img {
    object-fit: contain;
}

.region {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/*--------
Responsive
--------*/

@media (max-width: 1350px) {
    #features-list {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, auto auto auto auto var(--spacing));
    }

    .screen1, .screen2, .screen3 {
        grid-column: 1 / span 3;
    }

    .feature1, .feature2, .feature3 {
        grid-column: 2 / span 3;
    }

    .screen1 {
        grid-row: 1 / 4;
    }

    .feature1 {
        grid-row: 3 / 5;
    }

    .screen2 {
        grid-row: 6 / 9;
    }

    .feature2 {
        grid-row: 8 / 10;
    }

    .screen3 {
        grid-row: 11 / 14;
    }

    .feature3 {
        grid-row: 13 / 15;
    }
}

@media (max-width: 889px) {
    header {
        background: url(img/keyart.jpg) center;
        background-size: cover;
    }

    header video {
        display: none;
    }

    #age-header {
        background: none;
    }

    #newsletter {
        flex-direction: column;
        gap: 0;
        padding: 0;
        background: none;
        border: none;
    }

    #nl-form {
        margin-bottom: calc(var(--spacing) / 2);
        padding: 1rem 2rem;
        text-align: center;
        background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5) 15%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .75) 60%, rgba(0, 0, 0, .5) 85% , rgba(0, 0, 0, 0)),
                          url(img/GLYPH.png);
        background-size: cover;
        background-repeat:space;
        border-top: 2px solid var(--keycol);
        border-bottom: 2px solid var(--keycol);
    }

    #wallpapers {
        max-width: 100%;
    }

    #features-list {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, auto auto var(--spacing));
    }
    
    #features-list > * {
        grid-column: 1;
    }

    .screen1 {
        grid-row: 1;
    }

    .feature1 {
        grid-row: 2;
    }

    .screen2 {
        grid-row: 4;
    }

    .feature2 {
        grid-row: 5;
    }

    .screen3 {
        grid-row: 7;
    }

    .feature3 {
        grid-row: 8;
    }

    .videos {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .videos a:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .videos a:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .videos a:nth-child(3) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .videos a:nth-child(4) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .screenshots {
        grid-template-columns: repeat(2, 1fr);
    }

    footer::after {
        width: 200px;
        top: -122px;
    }
}

@media (max-width: 600px) {
    #logo {
        display: block;
        width: 80%;
        margin: 2rem auto 0 auto;
    }

    .header-links {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr .5fr;
    }

    .header-links .btn {
        order: 1;
        grid-column: 1 / 3;
        justify-self: center;
    }

    .header-links a:nth-child(2) {
        order: 2;
        text-align: center;
    }

    .header-links a:last-of-type {
        order: 3;
        text-align: center;
    }

    footer::after {
        display: none;
    }

    label[for='year'] {
        grid-row: 3 / 4;
        grid-column: 1 / span 2;
        margin-top: 2rem;
    }

    #year {
        grid-row: 5 / 6;
        grid-column: 1 / span 2;
        width: auto;
        margin: 0 auto;
    }
}

@media (max-width: 550px) {
    #wishlist {
        flex-direction: column;
    }

    .videos, .screenshots, .devdiaries {
        grid-template-columns: 1fr;
    }

    .videos a:is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4)) {
        grid-column: 1 / 2;
    }

    .videos a:nth-child(1) {
        grid-row: 1 / 2;
    }

    .videos a:nth-child(2) {
        grid-row: 2 / 3;
    }

    .videos a:nth-child(3) {
        grid-row: 3 / 4;
    }

    .videos a:nth-child(4) {
        grid-row: 4 / 5;
    }

    .videos a:first-of-type {
        grid-column: 1 / 2;
    }
}