@font-face {
    font-family: 'fauna';
    src: url('../assets/fonts/FaunaMono-Regular.otf');
}

body {
    margin: 0;
    background: black;
    color: white;
    font-family: 'fauna';
    overflow-x: hidden;
}

p::selection, div::selection, span::selection, b::selection {
    color: black;
    background-color: none;
    text-shadow: 0 0 .5em white, 0 0 1em white, 0 0 2em white;
}

img, button, summary, a {
    user-select: none;
}

#paper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/paper.jpeg');
    background-repeat: repeat;
    background-size: 50%;
    z-index: 999;
    mix-blend-mode: multiply;
    pointer-events: none;
    filter: saturate(40) contrast(90) grayscale(2);
}

.no-anim {
    .xtra, .signup, #modal {
        animation: none;
        transition: 0;
    }

    .blurb {
        div {
            animation: none;
            transition: 0;
        }
    }

    /* kiara trying to remove the anims on the schedule but gave up */
    .container .col-left .schedule .schedule-body .schedule-room .entry:hover {
        transform: unset;
        transition: 0;

        &&::after {
            rotate: 0deg;
        }
    }
}

.blurb {
    color: white;
    transition: .5s ease-out;
    text-align: justify;
    text-justify: inter-word;
    margin-top: 250px;
    margin-left: 20px;
    height: 400px;
    padding-top: 80px;
    z-index: -1;

    div {
        animation: blurbAnim 8s ease-in-out infinite;
        background: black;
        border: 1px solid white;
        box-sizing: border-box;

        div {
            div {
                div {
                    div {
                        div {
                            padding: .2em 1em;
                            width: 250px;
                            height: auto;
                            font-size: 1.1em;
                            animation: none;
                            background: black;
                        }
                    }
                }
            }
        }
    }
}

.container {
    width: 80vw;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 75% 25%;
    grid-template-rows: 100%;
    gap: 1em;

    .col-left {
        grid-column-start: 1;
        grid-column-end: 2;
        grid-row-start: 0;
        grid-row-end: 1;

        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        min-height: 400px;

        .logo {
            display: flex;
            align-items: center;

            img {
                position: absolute;
                top: -5%;
                right: 26%;
                width: 53%;
            }
        }

        .schedule {
            margin-top: 60px;
            margin-bottom: 100px;
            width: 100%;

            .title {
                font-weight: 900;
                width: 95%;
                font-size: 2.5em;
                text-align: left;
                border: 1px solid white;
                margin: 0;
                margin-bottom: 1em;
                rotate: -4deg;
            }

            img {
                border: 1px solid black;
                filter: invert(2);
                width: 100%;
            }

            .schedule-body {
                width: 100%;
                display: grid;
                grid-template-rows: 1/6;
                grid-template-columns: 1/8;

                box-sizing: border-box;
                border: 1px solid white;
                background: black;
                text-align: justify;
                text-justify: inter-character;
                line-height: 1em;

                p {
                    margin: .2em .5em;
                }

                p:first-of-type {
                    padding-bottom: .3em;
                    border-bottom: 1px solid white;
                }

                p:nth-of-type(2) {
                    font-size: .85em;
                }

                p:nth-of-type(3n) {
                    padding: .5em;
                    margin: 0;
                    margin-top: .5em;
                    background: black;
                    color: white;
                }

                .schedule-time {
                    grid-row-start: 1;
                    grid-row-end: 2;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;
                    justify-content: space-between;

                    div {
                        width: 12.5%;
                        padding: .1em 0 .3em .2em;
                        border-left: 1px solid white;
                        border-bottom: 1px solid white;
                        font-weight: 900;
                    }
                }

                .schedule-room {
                    .entry {
                        position: relative;
                        transition: .2s ease-out;
                        color: white;
                        padding: 1em;
                    }

                    .entry::after {
                        content: "";
                        border: 1px solid #ffffff;
                        display: block;
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        transition: .2s ease-out;
                        pointer-events: none;
                    }

                    .entry:hover, .entry:nth-of-type(n):hover {
                        transform: scale(1.1);
                        rotate: 0deg;

                        &&::after {
                            rotate: 90deg;
                        }
                    }

                    .entry-popover {
                        background: black;
                        color: white;
                        border: 1px solid #ffffff;
                        width: 25vw;
                        height: fit-content;
                        font-size: 1.2em;
                        box-shadow: 0 0 1em var(--entry-clr);

                        p:nth-of-type(1) {
                            background-color: var(--entry-clr);
                            padding: .25em;
                        }
                        p:nth-of-type(2) {
                        }
                        p:nth-of-type(3) {
                        }
                        p:nth-of-type(4) {
                        }
                    }
                    .entry-popover::backdrop {
                        backdrop-filter: blur(2.5px);
                    }
                }

                .schedule-room:nth-child(odd) .entry {
                    background-color: #ffffff3a;
                }

                .schedule-room:nth-child(even) .entry {
                    background-color: #ffffff79;
                }

                .room1 {
                    grid-row-start: 2;
                    grid-row-end: 3;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;

                    border-bottom: 1px dashed white;

                    --entry-clr: #cc4500;

                    div:nth-of-type(1) {
                        width: 12.5%;
                        font-weight: 900;
                        padding: .2em;
                    }

                    .entry {
                        width: 12.5%;
                        left: 25%;
                        rotate: -2deg;
                    }

                    .entry::after {
                        rotate: 3deg;
                    }

                    .entry:hover {
                        background-color: var(--entry-clr);

                        &&::after {
                            border: 1px solid orangered;
                        }
                    }
                }

                .room2 {
                    grid-row-start: 3;
                    grid-row-end: 4;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;

                    border-bottom: 1px dashed white;

                    --entry-clr: #0000cc;

                    div:nth-of-type(1) {
                        width: 12.5%;
                        font-weight: 900;
                        padding: .2em;
                    }

                    .entry:hover {
                        background-color: var(--entry-clr);

                        &&::after {
                            border: 1px solid blue;
                        }
                    }

                    /* embroidery - wyn */
                    .entry:nth-of-type(1) {
                        width: 21%;
                        left: -2%;
                        rotate: 2deg;

                        &::after {
                            rotate: 1deg;
                        }
                    }

                    /* zinecrew - azn */
                    .entry:nth-of-type(2) {
                        left: 3.25%;
                        width: 12%;
                        rotate: -4deg;

                        &::after {
                            rotate: 5deg;
                        }
                    }

                    /* g4g - eleni */
                    .entry:nth-of-type(3) {
                        left: 10%;
                        width: 11%;
                        rotate: 4deg;

                        &::after {
                            rotate: -6deg;
                        }
                    }
                }

                .room3 {
                    grid-row-start: 4;
                    grid-row-end: 5;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;

                    border-bottom: 1px dashed white;

                    --entry-clr: #cc00cc;

                    div:nth-of-type(1) {
                        width: 12.5%;
                        font-weight: 900;
                        padding: .2em;
                    }

                    .entry:hover {
                        background-color: var(--entry-clr);

                        &&::after {
                            border: 1px solid magenta;
                        }
                    }

                    /* imre */
                    .entry:nth-of-type(1) {
                        width: 23%;
                        left: 42.5%;
                        rotate: -1deg;

                        &&::after {
                            rotate: -2deg;
                        }
                    }
                }

                .room4 {
                    grid-row-start: 5;
                    grid-row-end: 6;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;

                    border-bottom: 1px dashed white;

                    --entry-clr: #cc0000;

                    div:nth-of-type(1) {
                        width: 12.5%;
                        font-weight: 900;
                        padding: .2em;
                    }

                    .entry:hover {
                        background-color: var(--entry-clr);

                        &&::after {
                            border: 1px solid red;
                        }
                    }

                    /* luddites - fred */
                    .entry:nth-of-type(1) {
                        width: 17%;
                        left: 10%;
                        rotate: 4deg;

                        &&::after {
                            rotate: -2deg;
                        }
                    }
                }

                .audi {
                    grid-row-start: 6;
                    grid-row-end: 7;
                    grid-column-start: 1;
                    grid-column-end: 9;

                    display: flex;
                    flex-direction: row;
                    flex-wrap: nowrap;

                    --entry-clr: #29a129;

                    div:nth-of-type(1) {
                        width: 12.5%;
                        font-weight: 900;
                        padding: .2em;
                    }

                    .entry:hover {
                        background-color: var(--entry-clr);

                        &&::after {
                            border: 1px solid lime;
                        }
                    }

                    /* lensbased */
                    .entry:nth-of-type(1) {
                        width: 17%;
                        left: 61%;
                        rotate: -4deg;

                        &&::after {
                            rotate: 2deg;
                        }
                    }
                }
            }
        }
    }

    .col-right {
        grid-column-start: 2;
        grid-column-end: 3;
        grid-row-start: 0;
        grid-row-end: 1;
    }
}

.topbar {
    display: none;
}

.utilbar {
    display: none;
}

.xtra {
    width: 100%;
    animation: ufoAnim 2s infinite ease-in;
}

.signup {
    border: 5px double black;
    background-color: white;
    font-size: 1.8em;
    font-weight: 900;
    height: 100px;
    color: black;
    text-decoration: none;
    text-align: center;
    padding: .1em 0;
    animation: signupAnim 2s ease-in infinite;

    img {
        width: 95%;
    }
}

.signup:hover {
    filter: invert(2);
}

.sidebar {
    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
    width: 8vw;
    z-index: 99;

    .whois {
        display: flex;
        flex-direction: column;
        gap: .5em;
        text-align: center;
        font-weight: 900;

        a {
            display: block;
            color: white;
            text-decoration: none;
            box-sizing: border-box;
            border: 1px solid transparent;
            transition: .2s ease-out;
            border: 1px solid white;
            cursor: pointer;
        }

        a:hover {
            background: white;
            color: black;
        }
    }

    .toggle {
        position: relative;
        display: inline-block;
        width: 100%;
        height: 34px;
    }

    .toggle input {
        display: none;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: white;
        transition: 0.2s ease-out;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: black;
        transition: 0.2s ease-out;
    }

    input:checked+.slider {
        background-color: white;
    }

    input:checked+.slider:before {
        left: unset;
        right: 4px;
        background-color: black;
    }

    .address {
        text-align: justify;
        text-justify: inter-character;

        p {
            margin: 0;
        }

        p:after {
            content: "";
            display: inline-block;
            width: 100%;
        }
    }
}

#bookcase-sign {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 900;
    font-size: 2.5em;
    text-align: center;
    border: 1px solid white;
    margin: .5em 0;
    rotate: -3deg;
}

#bookcase {
    background: black;
    border: 1px white solid;

    display: flex;
    flex-direction: row;
    align-items: end;
    flex-wrap: wrap;
    row-gap: 10px;

    max-width: 800px;
    padding: 10px;

    .divider, .book {
        display: flex;
        align-items: center;
        justify-content: center;

        border: 1px solid black;
        box-sizing: border-box;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        text-transform: uppercase;
        color: black;
        background: white;
    }

    .divider {
        height: 40px;
        width: 25px;
        display: none;
    }

    .book {
        min-height: 150px;
        max-height: 300px;
        width: 40px;
        writing-mode: vertical-rl;
        letter-spacing: .2em;
        text-align: center;
        padding: 1em 1.5em;
        transition: transform .2s ease-out;
        box-shadow: 0 0 0 transparent;
        border: 1px solid white;
        box-sizing: border-box;
        transform-origin: 50% 100%;
        color: white;
        font-weight: 900;
        background: black;
        user-select: none;
    }

    .book:hover {
        cursor: pointer;
        transform: scale(1.05);
        z-index: 997;
        filter: grayscale(0);
    }

    .open {
        visibility: hidden;
    }

}

#modal {
    position: fixed;
    right: 100px;
    bottom: 100px;
    width: 306px;
    height: 500px;
    z-index: 998;

    display: none;
    justify-content: center;
    align-items: center;

    background-color: transparent;
    background-image: url(../assets/images/placeholder.jpg);
    background-size: auto 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;

    animation: modalAnim 2s linear infinite;
    transition: transform .5s linear;

    filter: drop-shadow(0 0 .5em white);

    #flip, #close {
        user-select: none;
        position: absolute;
        top: -50px;

        width: 50px;
        height: 50px;
    }

    #flip {
        right: 50px;

        background-image: url(../assets/images/reverse.png);
        background-size: 30px;
        background-position: 10px 10px;
        background-repeat: no-repeat;
        filter: contrast(999) grayscale(2);
    }

    #close {
        right: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        font-size: 40px;
        font-weight: 900;
        color: white;
    }

    #flip:hover, #close:hover {
        cursor: pointer;
        filter: contrast(999) grayscale(2) drop-shadow(0 0 1em white);
        text-shadow: 0 0 1em white;
    }

    #name, #blurb, #spine {
        pointer-events: none;
    }

    #name {
        position: absolute;
        top: 0;
        left: 0;
        margin: .5em 0 0 .5em;

        font-size: 2em;
        font-style: italic;
        font-weight: 900;
    }

    #blurb {
        position: absolute;
        top: 0;
        left: 0;
        margin: .5em;

        font-family: monospace;
        color: black;
        text-align: justify;
        text-justify: inter-word;
        transform: rotateY(180deg);
        font-size: 1.5em;

        visibility: hidden;
    }

    #link {
        width: 100%;
        height: 100%;
    }

    #spine {
        --width: 40px;

        position: absolute;
        left: calc(var(--width)*-1);
        top: 5px;
        height: 100%;
        width: var(--width);

        transform: skewY(-15deg);

        background: black;
        filter: brightness(.7);

        display: flex;
        align-items: center;
        justify-content: center;

        writing-mode: vertical-rl;
        letter-spacing: .2em;
        text-align: center;
        transition: transform .2s ease-out;
        transform-origin: 50% 100%;
        font-family: monospace;
        font-size: 1.5em;
        font-weight: 900;
        text-transform: uppercase;
        color: #0008;
    }

    #pages {
        --height: 11px;

        position: absolute;
        left: -20px;
        bottom: calc(var(--height)*-1);
        height: var(--height);
        width: 100%;

        transform: skewX(-75deg);

        background: repeating-linear-gradient(to bottom, silver 0, black 2px);
    }
}

.flipped {
    transform: rotateY(180deg);
}

@keyframes modalAnim {
    0%, 100% {
        rotate: -2deg;
    }

    50% {
        rotate: 2deg;
    }
}

@keyframes signupAnim {
    0%, 100% {
        rotate: -5deg;
        scale: .95;
    }

    25% {
        scale: 1.1;
    }

    50% {
        rotate: 5deg;
        scale: .95;
    }

    75% {
        scale: 1.1;
    }
}

@keyframes blurbAnim {
    0%, 100% {
        padding: 0;
        rotate: -1deg;
    }

    50% {
        padding: 0 1em 1em 0;
        rotate: 1deg;
    }
}

@keyframes ufoAnim {
    0%, 100% {
        rotate: 5deg;
        scale: .95;
    }

    25% {
        scale: 1.05;
    }

    50% {
        rotate: -5deg;
        scale: .95;
    }

    75% {
        scale: 1.05;
    }
}