@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');
@property --sphere-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: true;
}

@property --slider-offset {
    syntax: '<length>';
    initial-value: 32px;
    inherits: true;
}

@property --slider-position {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: true;
}

:root {
    --page-padding-vertical: 16px;
    --page-padding-horizontal: max(8px, calc(50vw - 500px));
    --color-background: #392020;
    --color-blur: #521173;
    --color-font: #ffffff;
    --color-font-header: #392020;
    --color-accent: #cecece;
    --slider-speed: 8s;
    --slider-width: 400px;
    --slider-spacing: 10px;
    --slider-offset: 32px;
}

html {
    background: var(--color-background);
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Quicksand", sans-serif;
    color: var(--color-font);
    scrollbar-color: #0b1749 #040c2c;
}

body {
    overflow-x: hidden;
    position: relative;
}

button {
    padding: 10px 25px;
    text-align: center;
    border: 1px solid var(--color-font);
    color: var(--color-font);
    border-radius: 40px;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
    font-family: "Quicksand", sans-serif;
    font-size: 1rem;
}

body main
{
    width: 100vw;
    overflow-x: hidden;
    position: relative;
}

button.inverted {
    background: var(--color-font);
    border-color: var(--color-font);
    color: var(--color-background)
}

button+button {
    margin-left: 10px;
}

body>*:not(main),
main>*:not(div) {
    padding: var(--page-padding-vertical) var(--page-padding-horizontal);
    box-sizing: border-box;
}

header {
    --header-height: 63vh;
    height: var(--header-height);
    backdrop-filter: hue-rotate(40deg) brightness(1.3);
    position: relative;
    //clip-path: polygon(0 0, 100% 0, 100% calc(100% - 100px),50% 100%,   0 calc(100% - 100px));
    clip-path: polygon(0 0, 100% 0, 100% 100%,50% calc(100% - 50px),   0 100%);
    overflow: hidden;
    background: #FEFAF2;
    color:  var(--color-font-header);
    background-image: url(./../bg-hills.png), url(./../bg-rocks.png);
    background-repeat: no-repeat, no-repeat;
    background-position: right bottom, left bottom;
    background-size: 600px 600px, 600px 300px;
}
header .title
{
    align-content: center;
}
header h1 {
    font-size: 6rem;
    margin-bottom: 0;
    margin-top: 0;
}

header .image {
    align-content: end;
}
header .image .game-character
{
    width: 400px;
    max-width: 100%;
}
header .image .reel
{
    width: 150px;
    position: relative;
    /overflow: hidden;
    /mask-image: linear-gradient(180deg, transparent 10%, black 25%, black 50%, transparent 90%);
}
header .image .reel .reel-container
{
    width: 100%;
    top: 5%;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 4;
}
header .image .reel .moving-reel
{
    animation: reel-move 1s linear infinite;
}
header .image .reel .symbol
{
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    background: #edd8b8;
    box-sizing: border-box;
    padding: 20px;
    border: solid 2px #000000bd;
    box-shadow: black 0 0 4px inset, #000000c2 0 0 25px inset;
}
header .image .reel .symbol img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
header .image .reel .reelcover
{
    position: absolute;
    top: -6%;
    width: 500%;
    left: -176%;
}
header .title p {

    margin-left: 8px;
}

.lava-lamp {
    --circle-size: 80px;
    height: calc(.75 * var(--header-height));
    width: 400px;
    overflow: hidden;
    position: relative;
    background: black;
    filter: blur(25px) contrast(20);
}

.lava-lamp .lava {
    position: absolute;
    height: calc(16 * var(--circle-size));
    width: var(--circle-size);
    transform-origin: 50% 30vh;
    background-image: radial-gradient(red 30%, transparent 30%);
    background-size: var(--circle-size) var(--circle-size);
    animation: lava-move 3s linear infinite;
}

.body-background {
    position: absolute;
    top: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    /* This will add a vertical scrollbar if the content overflows */
    filter: blur(150px);
}

.body-background>* {
    position: absolute;
    background-image: radial-gradient(#0796ad, transparent 45%), radial-gradient(#008062, transparent 45%);
    background-size: 800px 500px, 1400px 1200px;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
}

nav .menuContainer {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-content: center;
    flex-wrap: wrap;
    text-align: center;
}

nav .menuIconContainer {
    display: none;
    height: 60px;
    width: 70px;
    z-index: 200000;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
}

nav .menuIcon, nav .menuIcon:before, nav .menuIcon:after
{
    content: '';
    position: absolute;
    height: 4px;
    width: 36px;
    background: var(--color-font);
    border-radius: 5px;
    transition: transform 200ms, background-color 200ms;
}
nav .menuIcon
{
    top: 28px;
    right: 18px;
}

nav .menuIcon:before
{
    top: 10px;
}

nav .menuIcon:after {

    top: -10px;
}

nav.open .menuIcon {
    background: transparent !important;
}

nav.open .menuIcon:before {
    transform: translateY(-10px) rotate(45deg);
}

nav.open .menuIcon:after {
    transform: translateY(10px) rotate(-45deg);
}

header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    overflow-x: hidden;
    align-items: stretch !important;
}

header h1 {
    font-weight: 1000;
    letter-spacing: -1px;
    line-height: 5rem;
}
header h1:first-letter
{
    letter-spacing: 2px;
}
section {
    width: 100%;
    margin: 64px 0;
    position: relative;
}

section h2 {
    font-size: 2rem;
}

section p {
    line-height: 1.4rem;
}

section:has(.slider):not(:has(.expanded)) {
    padding: 0;
}

section .slider {
    width: 100%;
    overflow: hidden;
}

section .slider .content,
.ribbon .content {
    display: flex;
    gap: var(--slider-spacing);
}

section .slider .content {
    animation: slider-scroll var(--slider-speed) linear infinite;
    transform: translateX(calc(var(--slider-position) + var(--slider-offset)));
    transition: --slider-offset 1s ease-out;
    width: max-content;
}

section .slider.reverse .content {
    animation: slider-scroll var(--slider-speed) linear infinite;
    animation-direction: reverse;
    transform: translateX(calc(var(--slider-position) - var(--slider-offset)));
}

section .slider .content:hover {
    animation-play-state: paused;
    --slider-offset: 0;
}

section .slider .content>div {
    flex-shrink: 0;
}

section .slider .content .element .card {
    display: block;
    position: relative;
    width: 400px;
    aspect-ratio: 3 / 2;
    background: linear-gradient(-45deg, var(--color-end), var(--color-start));
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
    overflow: hidden;
    cursor: pointer;
}

section .slider .content .element .card.ai {
    background: url(./../ai.png), linear-gradient(-45deg, var(--color-end), var(--color-start));
    background-blend-mode: overlay;
    .window {
        padding: 0;
    }
}

section .slider .content .element .card:has(.window) {
    display: flex;
    align-items: center;
    justify-content: center;
}

section .slider .content .element .card .screenshot {
    position: relative;
    width: 65%;
    margin: 32px auto;
    display: block;
    border-radius: 5px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.38);
    transition: .6s ease-out;
}

section .slider .content .element:hover .card .screenshot {
    width: 70%;
    margin: 24px auto;
    border-radius: 5px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.27);
    transition: .6s .2s ease-out;
}

section .slider .content .element .card .window {
    position: relative;
    height: 65%;
    width: 65%;
    margin: 24px auto;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(3px);
    background-color: #80808033;
    padding: 2px;
    transition: .6s ease-out;
    .bar {
        height: 6px;
        margin: 2px 0;
        width: 100%;
        background-image: url(../titlebar.svg);
        background-size: contain;
        background-position: calc(100% - 2px);
        background-repeat: no-repeat;
    }
    .app-preview {
        width: 100%;
        height: calc(100% - 10px);
        background-image: url(../projects/jsbench.png);
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        border-radius: 3px;
    }
}

section .slider .content .element .card:hover .window {
    width: 70%;
    height: 70%;
    transition: .6s .2s ease-out;
}

section .slider .content .element .card .window.game {
    .bar {
        display: none;
    }
    .app-preview {
        height: 100%;
    }
    .game-ui {
        position: absolute;
        width: 100%;
        height: 100%;
        background-image: url(./../game_buttons.svg), url(./../game_joystick.svg);
        background-repeat: no-repeat, no-repeat;
        background-size: 60px 60px, 60px 60px;
        background-position: 95% 90%, 5% 90%;
        opacity: .8;
    }
}

section .slider .content .element .name {
    margin-top: 16px;
    margin-left: 2px;
}

section .slider-text {
    padding: var(--page-padding-vertical) var(--page-padding-horizontal);
}

section.about-us {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.technologies {
    width: 400px;
    height: 400px;
    position: relative;
    perspective: 260px;
}

.technologies .sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 0;
    width: 0;
    transform-style: preserve-3d;
    animation: sphere-rotate 30s linear infinite;
    transform: rotateY(var(--sphere-angle));
    user-select: none;
}

.technologies .sphere .text {
    position: absolute;
    width: 40px;
    height: 40px;
    left: -20px;
    top: -20px;
    text-align: center;
    font-size: 10px;
    text-shadow: 0 0 2px black;
}
.technologies .sphere .text .sphere-img {
    width: 100%;
    height: 100%;
    object-fit: contain;

}

.ribbon {
    position: absolute;
    width: 100%;
    overflow: hidden;
    background: white;
    color: black;
    padding: 10px 0;
    box-shadow: 0 0 6px #0000008a;
    transform: translateY(-20px);
}

.ribbon:nth-of-type(1) {
    transform: translateY(-40px) translateY(11px) rotate(3deg);
}

.ribbon:nth-of-type(2) {
    transform: translateY(-40px) rotate(-1deg);
}

.ribbon .content {
    animation: ribbon-scroll 50s linear infinite;
    width: max-content;
}

.ribbon:nth-of-type(2) .content {
    animation: ribbon-scroll 40s linear infinite;
    animation-delay: -8s;
}

.ribbon .text {
    flex-shrink: 0;
    font-size: 1.5em;
}

.ribbon .text:last-child {
    padding-right: var(--slider-spacing);
}

.contact-sent-message
{
    position: absolute;
    margin-top: 50px;
    opacity: 0;
    pointer-events: none;
}
.contact-form {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 70px 10px;
    transition: opacity 300ms;
}
.contact-form .g-recaptcha
{
    width: 100%;
    display: none;
}
.contact-form.sent
{
    opacity: 0;
    pointer-events: none;
}
.contact-form .label-input {
    width: 48%;
}

.contact-form .label-message {
    width: 100%;
}

.contact-form label {
    display: inline-block;
    position: relative;
}

label input,
label textarea {
    width: 100%;
}

input,
textarea {
    background: transparent;
    outline: none;
    border: none;
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    color: var(--color-font) !important;
    font-size: 1rem;
    font-family: "Quicksand", sans-serif;
    padding: 8px 0;
    border-bottom: solid 1px;
    resize: vertical;
}

label span,
label input,
label textarea,
label textarea::placeholder {
    color: var(--color-accent);
    border-color: var(--color-accent);
    transition: 250ms;
}

label:has(:focus) span,
label:has(:focus) input,
label:has(:focus) textarea {
    color: var(--color-font);
    border-color: var(--color-font);
}

label span,
label:has(input:focus) span {
    display: inline-block;
    transform-origin: 0 0;
    transform: scale(1) translateY(30px);
    transition: 250ms;
}

label:has(input:focus) span,
label:has(input:valid) span,
label:has(textarea) span {
    transform: scale(.85);
}


/*label:not(:has(input:valid)) span
{
    transform: scale(.9) translateY(30px);
}*/

.testimonials {
    width: 100%;
    display: flex;
    gap: 20px;
}

.testimonials .container {
    width: 33%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonials .testimonial {
    position: relative;
    background: rgb(93 47 189 / 19%);
    backdrop-filter: hue-rotate(40deg) brightness(1.5);
    box-sizing: border-box;
    padding: 20px;
    border-radius: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.testimonials .testimonial img {
    max-width: 50%;
}

.testimonials .testimonial .name {
    font-weight: bold;
}

textarea {
    min-height: 100px;
    height: 200px;
    max-height: 400px;
}

footer {
    backdrop-filter: hue-rotate(40deg) brightness(.8);
    position: relative;
    clip-path: polygon(0 100px, 100% 0, 100% 100%, 0 100%);
    min-height: 280px;
    box-sizing: border-box;
    padding-top: 110px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer .socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

footer .socials a {
    cursor: pointer;
}

footer .socials img {
    filter: invert();
}

a {
    color: #e7e0ff;
    text-decoration: none;
}

body nav {
    height: 60px;
    width: calc(100% - 12px);
    margin: 6px;
    position: fixed;
    //background: #2c124e01;
    background: rgb(204 61 61 / 84%);
    backdrop-filter:  blur(25px);
    z-index: 10000;
    box-sizing: border-box;
    padding: 10px var(--page-padding-horizontal);
    display: flex;
    align-content: flex-start;
    justify-content: space-between;
    border-radius: 20px;
    overflow-y: hidden;
    transition: background-color 300ms, height 300ms, filter 300ms;
}

body nav.on-top {
    background: transparent;
    backdrop-filter: blur(0);
}
body nav.on-top img{
    filter: invert(0);
}

body nav img {
    margin-right: 200px;
    box-sizing: border-box;
    padding: 5px;
    transform: translateY(-10px);
    filter: invert(1);
    transition: filter 200ms;

}

nav.on-top .menuIcon, nav.on-top .menuIcon:before, nav.on-top .menuIcon:after
{
    background: black;
}

body nav a {
    color: var(--color-font);
    cursor: pointer;
}
body nav.on-top a
{
    color: black
}

#games .view-all {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* pull the track back into the page bounds */
#games .slider.expanded {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    transform: none;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
}

#games .slider.expanded .content {
    position: static;
    animation: none;
    transform: none;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: auto;
    align-items: start;
    gap: 40px 24px;
    overflow: hidden;
}

/* undo whatever positioning the track used on the cards */
#games .slider.expanded .content .element {
    position: relative;
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    left: auto;
    top: auto;
    margin: 0;
    transform: none;
}

#games .slider.expanded .content .element .card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    transform: none;
}

@media only screen and (max-width: 700px) {
    section.about-us {
        justify-content: center;
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }
    section.about-us .technologies {
        width: 100%;
    }
    header {
        --header-height: 80vh;
    }
    header .title {
        width: 100%;
        text-align: center;
    }

    header .title p {
        font-weight: bold;
        margin-left: auto;
    }
    header .image {
        position: absolute;
        z-index: -1;
        left: 50%;
        transform: translate(-50%, 0);
    }
    header p {
        width: 70%;
        margin: 0 auto;
        margin-top: 10px;
    }
    header h1 {
        font-size: 4rem;
    }
    nav .menuIconContainer {
        display: block;
    }
    .technologies {
        display: none;
    }
    section:first-of-type {
        margin-top: 0px;
    }
    section .slider .content,
    section .slider.reverse .content {
        animation: none;
        transform: none;
        width: 100%;
        overflow-y: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        padding: 0 210px;
        box-sizing: border-box;
        .element {
            scroll-snap-align: start;
            scroll-margin: 8px;
        }
    }
    section .slider.expanded .content
    {
        padding: 0;
    }
    section .slider .content .element.clone {
        display: none;
    }
    section .slider .content .element .card {
        width: 250px;
    }
    section .slider .content .element .card .window.game .game-ui {
        background-size: 40px 40px, 40px 40px;
    }
    .contact-form .label-input {
        width: 100%;
    }
    .testimonials {
        flex-wrap: wrap;
    }
    .testimonials .container {
        width: 100%;
    }
    footer {
        justify-content: space-between;
        flex-wrap: wrap;
        display: flex;
        flex-direction: column;
        align-content: flex-end;
        align-items: flex-end;
    }
    nav .menuContainer {
        height: calc(100vh - 150px);
        width: 100%;
        padding: 0;
        display: flex;
        justify-content: center;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 25px;
        font-size: 24px;
        line-height: 2;
    }
    body nav {
        width: calc(100% - 8px);
        margin: 4px;
        display: block;
    }
    body nav img
    {
        margin-right: 0;
    }
    body nav.open {
        height: calc(100% - 8px);
        background: rgb(204 61 61 / 84%);
        backdrop-filter: blur(25px);
    }
    /*body nav img {
        display: block;
        width: 50%;
        height: auto;
        margin: auto;
        margin-right: 0px;
        box-sizing: border-box;
        padding: 5px;
    }*/
}

@keyframes ribbon-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes slider-scroll {
    from {
        --slider-position: -25%;
    }
    to {
        --slider-position: -50%;
    }
}

@keyframes sphere-rotate {
    from {
        --sphere-angle: 0deg;
    }
    to {
        --sphere-angle: 360deg;
    }
}

@keyframes lava-move {
    from {
        top: calc(-2 * var(--circle-size));
    }
    to {
        top: calc(-1 * var(--circle-size));
    }
}

@keyframes reel-move
{
    from {
        transform: translateY(-25%);
        transform: translateY(-50%);
    }
    to
    {
        transform: translateY(25%);
        transform: translateY(0);
    }
}