
/* || GLOBAL */
:root{
    --dark: #031926;
    --shade1: #616D73;
    --shade2: #BFC0C0;
    --shade3: #D4D4D4;
    --light: #E8E8E8;
    --primary: #4965FF;
    --secondary: #F26419;
    --borderColour: #0000002a;
    --borderWidth: .05rem;
    --cornerSize: .8rem;
}

/* || GENERAL STYLES */

html{
    color: var(--dark);
    font-family: "Anta", sans-serif;
    font-weight: 400;
    font-style: normal;
}

body{
    background-color: var(--light);
    position: fixed;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    margin: 0;
    user-select: none;
}

hr{
    border-top: var(--borderWidth) solid var(--shade2);
}

a{
    color: var(--primary);
}

canvas{
    position: fixed;
    z-index: -1;
}

nav, footer{
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    min-height: fit-content;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
    align-content: center;
}

nav{
    top: 0;
}

footer{
    bottom: 0;
}

/* || BUTTON STYLES */

button{
    position: relative;
    isolation: isolate;
    background: var(--shade3);
    color: var(--primary);
    text-align: center;
    font-family: "Anta", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    border-style: hidden;
    display: flex;
    align-items: center;
    justify-content:center;
}

button::before,
button::after{
    content:'';
    position: absolute;
    inset: 0;
}

/* Button border */
button::before{
    background: var(--primary);
    z-index: -2;
}

/* Button fill */
button::after{
    background: var(--light);
    z-index: -1;
}

/* Navigation and footer button shape */
nav button, footer button{
    clip-path: polygon(
        /* top left */
        0 0, 
        /* top right */
        100% 0, 
        /* bottom right upper*/
        100% calc(100% - var(--cornerSize)), 
        /* bottom right lower*/
        calc(100% - var(--cornerSize)) 100%, 
        /* bottom left */
        0 100%
        );
}

nav button::after, 
footer button::after{
    clip-path: polygon(
        /* top left */
        var(--borderWidth) 
        var(--borderWidth), 
        /* top right */
        calc(100% - var(--borderWidth)) 
        var(--borderWidth), 
        /* bottom right upper*/
        calc(100% - var(--borderWidth)) 
        calc(100% - var(--borderWidth) - var(--cornerSize) + (var(--borderWidth) * .5)), 
        /* bottom right lower*/
        calc(100% - var(--borderWidth) - var(--cornerSize) + (var(--borderWidth) * .5)) 
        calc(100% - var(--borderWidth)), 
        /* bottom left */
        var(--borderWidth) 
        calc(100% - var(--borderWidth))
        );
}

nav button{
    flex-shrink: 1;
    width: 8rem;
    height: 4rem;
}

footer button{
    width: 3rem;
    height: 3rem;
}

/* Tab button shape */
.tab{
    width: 8rem;
    height: 2.5rem;
    font-size:medium;

    align-items: flex-start;
    padding-top: .4em;

    clip-path: polygon(
        /* top left 1*/
        0 var(--cornerSize), 
        /* top left 2*/
        var(--cornerSize) 0, 
        /* top right 1*/
        calc(100% - var(--cornerSize)) 0, 
        /* top right 2*/
        100% var(--cornerSize), 
        /* bottom right */
        100% 100%,
        /* bottom left*/
        0 100%
        );
}

.tab::after{
    clip-path: polygon(
        /* top left 1*/
        calc(var(--borderWidth)) 
        calc(var(--cornerSize) + var(--borderWidth) * .5), 
        /* top left 2*/
        calc(var(--cornerSize) + var(--borderWidth) * .5) 
        calc(var(--borderWidth)), 
        /* top right 1*/
        calc(100% - var(--cornerSize) - var(--borderWidth) * .5) 
        calc(var(--borderWidth)) , 
        /* top right 2*/
        calc(100% - var(--borderWidth)) 
        calc(var(--cornerSize) + var(--borderWidth) * .5), 
        /* bottom right */
        calc(100% - var(--borderWidth)) 
        calc(100% - var(--borderWidth)),
        /* bottom left*/
        var(--borderWidth) 
        calc(100% - var(--borderWidth))
        );
}

.close{
    position: absolute;
    right: 0;
    margin-top: calc(0% + .5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 2.1rem;
    background-color: var(--light);
    border: var(--borderWidth) solid var(--primary);
}

.close-icon {
    position: absolute;
    right: 0.5rem;
    width: 1em;
    height: 1em;
    display: block;
}

/* Toggle buttons */
.toggleOff{
    color: var(--primary);
}
.toggleOff::after{
    background: var(--light);
}
.toggleOn{
    color: var(--light);
}
.toggleOn::after{
    background: var(--primary);
}

/* || WINDOW STYLE */

window-frame{
    position: absolute;
    top: calc(50% - var(--windowHeight) / 2);
    left: calc(50% - var(--windowWidth) / 2);
    width: var(--windowWidth);
    height: var(--windowHeight);
    isolation: isolate;
    z-index: 0;
}