@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

html,body{
    height: 100%;
    margin:0;
    padding:0;
    background:black;
    color:#fff;
    font-family: "Oswald", serif;
    font-size: 16px;
}



#container{
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

#background{
    position: absolute;
    top:0;
    left:0;
    background:url(images/background.jpg) center center no-repeat;
    background-size: cover;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

#artefact{
    width: 1000px;
    max-width: 80%;
    display: block;
    filter: drop-shadow(0 0 20px black);
    cursor: pointer;

    .main{
        width: 100%;
        height: 0;

        img{
            width: 100%;
            animation: fadeIn 2s;
            position: absolute;
            top:0;
            left:0;
            transform: translate(0,-50%);
        }
    }

    .hover{
        position: absolute;
        top:0;
        left:0;
        width: 100%;
        opacity: 0;
        transition: opacity 0.8s;
        pointer-events: none;
        transform: translate(0, -50%);
    }
}

.user-input{
    display: none;
    position: relative;

    .field{
        animation: fadeIn 0.5s;
    }

    &.visible{
        display: block;
    }

    &.loading{
        .field{
            visibility: hidden;
        }

        .loader{
            display: block;
        }
    }
}

.loader{
    position: absolute;
    top:0;
    left:calc(50% - 30px);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    margin:40px auto 0;
    animation: fadeIn 0.5s;
    display: none;

    .spinner{
        box-sizing: border-box;
        width: 30px;
        height: 30px;
        border:3px solid transparent;
        border-top-color: #efdba0;
        border-bottom-color: #efdba0;
        border-radius: 50%;
        position: absolute;
        top:14px;
        left:14px;
        animation: spin 2s infinite ease-in-out;
        filter: drop-shadow(0 0 10px #492a28);

        &.alt{
            animation: spin 2s reverse infinite ease-in-out;
            width: 50px;
            height: 50px;
            border-width: 6px;
            border-top-color: #492a28;
            border-bottom-color: #492a28;
            top:4px;
            left:4px;
        }
    }
}

#artefact:hover .hover{
    opacity: 1;
}

#vignette{
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background:radial-gradient(transparent, black);
    pointer-events: none;
}

.stage{
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    width: 90%;
    height: 90%;
    background:rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    animation: animIn 0.5s;
    box-shadow: 0 0 20px black;
    display: none;
}

.stage.visible{
    display: block;
}

.stage .inner{
    position: absolute;
    top:20px;
    left:20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    border:1px solid rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stage .content{
    width: 800px;
    max-width: 90%;
}

h1{
    font-size: 5em;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 10px;
    padding:0;
    margin:0 0 40px;
    background:linear-gradient(to bottom, #efdba0, #492a28);
    background-clip:text;
    color:transparent;
    filter: drop-shadow(0 0 20px black);
}

p{
    margin:0 0 20px;
    font-size: 1.2em;
    opacity: 0.6;
}

input{
    width: 100%;
    background:rgba(255,255,255,0.03);
    border:1px solid rgba(255,255,255,0.03);
    text-align: center;
    font-size: 2em;
    padding: 20px;
    color:#fff;
    outline: none;
    transition: border-color 1s;
    margin-top: 40px;
    margin-bottom: 20px;
}

input:focus{
    border-color: #efdba0;
}

.btn{
    display: inline-block;
    padding:20px 40px;
    border:1px solid #492a28;
    color:#492a28;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 5px;
    transition: border-color 0.4s;
    background:linear-gradient(to bottom, #efdba0, #492a28);
    font-weight: bold;
    cursor: pointer;
}

.btn:hover{
    border-color: #efdba0;
}

.close{
    width: 40px;
    height: 40px;
    background:url(images/close.png) center center no-repeat;
    background-size: cover;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    margin:0 auto 20px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.close:hover{
    opacity: 1;
}

#shade{
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background:black;
    visibility: hidden;
    opacity: 0;
    transition:opacity 8s, visibility 8s;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    .message{
        display: none;
        text-transform: uppercase;
        letter-spacing: 6px;
        animation: fadeIn 2s;
    }

    &.visible{
        visibility: visible;
        opacity: 1;
        pointer-events: all;

        .message{
            display: block;
        }
    }
}

video{
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    z-index: 50;
    mix-blend-mode: screen;
    width: 200%;
    pointer-events: none;
}

.link{
    color:#efdba0;
    text-decoration: none;
    display: inline-block;
    padding:10px;
    border:1px solid rgba(255,255,255,0.03);
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 5px;

    &:hover{
        color:#fff;
    }

    &.hidden{
        display: none;
    }
}

#error{
    color:#a81e1e;
}

.error-msg{
    padding-top: 20px;
    animation: fadeIn 0.5s;
}

@keyframes fadeOut {
    0%{
        opacity: 1;
    }

    100%{
        opacity: 0;
    }
}

@keyframes fadeIn {
    0%{
        opacity: 0;
    }

    100%{
        opacity: 1;
    }
}

@keyframes animIn {
    0%{
        opacity: 0;
        margin-top: -100px;
    }

    100%{
        opacity: 1;
        margin-top: 0;
    }
}

@keyframes spin {
    0%{
        transform: rotate(0deg);
    }

    100%{
        transform: rotate(360deg);
    }
}

@media screen and (max-width:1600px) {
    html,body{
        font-size: 14px;
    }

    h1{
        font-size: 4em;
        margin-bottom: 20px;
    }

    input{
        padding:10px;
        margin-top: 20px;
    }
}