@import url('https://fonts.googleapis.com/css2?family=League+Script&family=Noto+Sans+JP:wght@100..900&family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto+Slab:wght@100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Sawarabi+Gothic&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow: auto;

    &::-webkit-scrollbar {
        display: none;
    }

    scroll-behavior: smooth;
}

a {
    font-family: "Raleway", sans-serif;
    color: aliceblue;
    text-decoration: none;
}

body {
    overflow: auto;
    /* background-color: rgb(209, 229, 247); */
    /* background-color: rgb(238, 239, 244); */
    transition: background-color 0.5s ease, color 0.5s ease;

    font-family: "Raleway", "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    scroll-snap-type: y mandatory;
    height: 100vh;

    header {
        margin: 30px 50px;
        width: calc(100% - (50px * 2));
        position: fixed;
        z-index: 100;
        pointer-events: none;

        #tit {
            top: 0;
            display: flex;
            justify-content: space-between;

            #titlewrap {

                #h1wrap {
                    background-color: blue;

                    h1 {
                        font-family: "Raleway", sans-serif;
                        font-size: 60px;
                        display: inline-block;
                        color: aliceblue;
                        margin: 10px 10px;
                    }
                }

                #lowertitle {
                    display: flex;
                    gap: 10px;

                    #h2wrap {
                        background-color: blue;
                        width: fit-content;
                        height: fit-content;
                        margin-top: 10px;

                        h2 {
                            font-family: "Raleway", sans-serif;
                            font-size: 20px;
                            display: inline-block;
                            color: aliceblue;
                            margin: 10px 10px;
                        }
                    }
                }
            }

            #navwrap {
                display: flex;
                flex-flow: column;
                justify-content: center;

                div {
                    background-color: blue;
                    padding: 10px 50px 10px 50px;
                    display: flex;
                    gap: 40px;

                    a {
                        padding: 0 10px;

                        &:hover {
                            transition: 0.2s;
                            background-color: rgb(72, 72, 255);
                        }
                    }
                }
            }
        }
    }

    footer {
        margin: 30px 50px;
        width: calc(100% - (50px * 2));
        position: fixed;
        bottom: 0;
        z-index: 500;
        pointer-events: none;
        display: flex;

        #darkmodeSwitchWrap {
            background-color: blue;
            color: aliceblue;

            i {
                padding: 10px 10px;
                margin: 0px 10px;
                line-height: 30px;
                cursor: pointer;

                &:hover {
                    transition: 0.2s;
                    background-color: rgb(72, 72, 255);
                }
            }
        }

        #pagedot {
            display: flex;
            gap: 40px;
            padding: 0 50px;
            justify-content: space-around;
            margin: 0 auto;
            background-color: blue;
            color: aliceblue;
            font-size: 20px;

            i {
                padding: 0 10px;

                &:hover {
                    transition: 0.2s;
                    background-color: rgb(72, 72, 255);
                }
            }
        }

        #switchwrapper {
            display: flex;
            justify-content: center;
            flex-flow: column;

            .form-check {
                margin: 0;
            }
        }

        label {
            font-size: 10px;
        }
    }

    .nonpenetration {
        pointer-events: auto;
    }

    .pages {
        scroll-snap-align: start;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }


    /* page1 */
    #links {
        position: relative;

        #canvas1 {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: calc(100vw * 0.9);
            height: calc(100vh * 0.9);
            border-radius: 15px;
            border: blue 1px solid;
            cursor: move;
        }

        #scrollcap {
            background-color: blue;
            color: aliceblue;
            padding: 10px;
            font-size: 20px;
            white-space: nowrap;
            position: absolute;
            bottom: 30%;
            left: calc((100vw * 0.9) + (100vw - (100vw * 0.9)) / 2);
            transform: translate(-50%, -50%) rotate(90deg);
        }

        #speed {
            font-family: "Roboto", sans-serif;
            font-size: 30px;
            position: absolute;
            white-space: nowrap;
            transform: translate(-150%, -50%);
            top: calc((100vh * 0.9) + (100vh - (100vh * 0.9)) / 2);
            left: calc((100vw * 0.9) + (100vw - (100vw * 0.9)) / 2);
            background-color: blue;
            color: aliceblue;
            margin: 0;
            padding: 0 10px;
        }
    }


    /* page2 */
    #bio {
        justify-content: right;

        #canvas2wrap {
            position: relative;

            #canvas2 {
                z-index: -1;
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 100%;
                height: 100%;
            }
        }

        #biowrapper {
            margin-top: 10vh;
            height: 50vh;
            margin-right: 50px;
            width: 55vw;

            * {
                opacity: 0.9;
            }

            #biomain {
                display: flex;
                align-items: left;
                flex-flow: column;

                p {
                    margin: 5px;
                    padding: 5px;
                    display: inline-block;
                    width: fit-content;
                    height: fit-content;
                    /* background-color: blue; */
                    color: aliceblue;
                    font-size: 20px;
                    position: relative;

                    &::before {
                        content: '';
                        position: absolute;
                        top: 0;
                        left: 0;
                        height: 100%;
                        width: 0;
                        background-color: blue;
                        z-index: -1;
                        transition: width 0.5s ease-in-out;
                    }

                    &.zabuton::before {
                        width: 100%;
                    }
                }
            }
        }
    }


    /* page3 */
    #works {
        justify-content: left;

        #worksModalWrap {
            overflow: visible;

            #worksModalOuter {
                z-index: 1000;
                top: 0;
                left: 0;
                position: fixed;
                height: 100vh;
                width: 100vw;
                background-color: rgba(0, 0, 255, 0.5);
                visibility: hidden;

                #worksModal {
                    position: fixed;
                    z-index: 1001;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    height: 65vh;
                    width: 65vw;
                    background-image: linear-gradient(90deg, rgba(128, 130, 220, 1), rgba(0, 0, 255, 1) 100%, rgba(35, 117, 163, 1));
                    padding: 15px;
                    display: flex;
                    flex-flow: column;
                    justify-content: space-around;

                    #wm1 {
                        display: flex;
                        justify-content: space-around;

                        #modalImgWrapper {
                            display: flex;
                            justify-content: center;

                            img {
                                width: 250px;
                                height: 250px;
                            }
                        }

                        #wm1-1 {
                            display: flex;
                            justify-content: space-evenly;
                            flex-flow: column;

                            #modalTitle {
                                font-size: 25px;
                                background-color: aliceblue;
                                margin: 0;
                                width: fit-content;
                                padding: 0 10px;
                                color: blue;
                            }

                            #modalSubTitle {
                                font-size: 20px;
                                background-color: aliceblue;
                                margin: 0;
                                width: fit-content;
                                padding: 0 10px;
                                color: blue;
                            }
                        }
                    }



                    #modalCaption {
                        color: aliceblue;
                        margin: 0;
                        text-align: center;
                    }

                    #wm3 {
                        text-align: center;

                        a {
                            background-color: aliceblue;
                            color: blue;
                            text-align: center;
                            padding: 15px;
                        }
                    }

                }


                &.modalappiar {
                    visibility: visible;
                    animation: modalFadeIn 0.2s ease-in-out;
                }
            }
        }

        #worksCarousel * {
            opacity: 0.9;
        }

        #worksCarousel {
            margin-top: 10vh;
            float: left;
            text-align: center;
            overflow-x: scroll;
            display: flex;
            gap: 10px;
            width: 55vw;
            margin-left: 50px;
            background:
                linear-gradient(to right, blue 1px, transparent 1px),
                linear-gradient(to left, blue 1px, transparent 1px);
            /* scrollbar-width: thin; */

            .carousel-card {
                height: 30vmin;
                width: 30vmin;
                flex-shrink: 0;
                border: blue 1px solid;
                cursor: pointer;
                position: relative;

                .worksImgWrapper {
                    z-index: 1;
                    position: absolute;
                    width: 100%;
                    height: 100%;

                    img {
                        object-fit: cover;
                        width: 100%;
                        height: 100%;
                    }
                }

                .worksCover {
                    z-index: 2;
                    padding: 15px;
                    text-align: left;
                    position: absolute;
                    opacity: 0;
                    width: 100%;
                    height: 100%;
                    background-color: blue;
                    color: blue;

                    h4 {
                        margin: 0 0 10px 0;
                        padding: 5px;
                        background-color: aliceblue;
                        width: fit-content;
                    }

                    p {
                        margin: 0;
                        padding: 5px;
                        background-color: aliceblue;
                        width: fit-content;
                    }

                    &:hover {
                        visibility: visible;
                        opacity: 0.8;
                        transition: 0.2s;
                    }
                }
            }
        }
    }


    /* page4 */
    #contact {
        justify-content: right;

        #formwrap {
            margin-top: 10vh;
            height: 50vh;
            margin-right: 50px;
            width: 55vw;
            position: relative;

            #formcoverwrap {
                position: absolute;
                width: 100%;
                height: 100%;
                z-index: -1;
                opacity: 0;

                #formcover {
                    padding: 15px;
                    color: aliceblue;

                    p {
                        font-size: 20px;
                    }
                }
            }

            @keyframes notice {
                0% {
                    transform: scale(0.8);
                    opacity: 0;
                    background-color: rgba(0, 0, 0, 0);
                    z-index: -1;
                }

                50% {
                    opacity: 1;
                    transform: scale(1);
                    background-color: blue;
                    z-index: 100;
                }

                100% {
                    transform: scale(0.8);
                    opacity: 0;
                    background-color: rgba(0, 0, 0, 0);
                    z-index: -1;
                }
            }

            .hideform {
                animation: notice 3.0s ease-in-out;
            }


            #form {
                position: absolute;
                width: 100%;
                height: 100%;
                display: flex;
                flex-flow: column;
                justify-content: space-between;

                div {
                    display: flex;
                    flex-flow: column;

                    label {
                        margin: 0 0 10px;
                        text-align: left;
                        padding-left: 10px;
                        font-family: "Raleway", sans-serif;
                        color: aliceblue;
                        width: fit-content;
                        padding: 0 10px;
                        position: relative;

                        &::before {
                            content: '';
                            position: absolute;
                            top: 0;
                            left: 0;
                            height: 100%;
                            width: 0;
                            background-color: blue;
                            z-index: -1;
                            transition: width 0.5s ease-in-out;
                        }

                        &.zabuton::before {
                            width: 100%;
                        }

                    }

                    #f-message {
                        height: 25vmin;
                        border: hidden;
                        background-color: blue;
                        padding: 15px;
                        padding: 10px;
                        color: aliceblue;
                    }

                    input {
                        background-color: blue;
                        padding: 15px;
                        border: hidden;
                        color: aliceblue;
                        padding: 0 10px;
                    }

                    * {
                        opacity: 0.9;

                        &::placeholder {
                            color: blue;
                            font-family: "Raleway", sans-serif;
                            padding-left: 10px;
                        }
                    }
                }

                button {
                    -webkit-appearance: none;
                    -moz-appearance: none;
                    appearance: none;
                    border: aliceblue 1px solid;
                    color: blue;
                    font-family: "Raleway", "Noto Sans JP";
                    border-radius: 0;
                    background: aliceblue;
                }
            }
        }
    }

    &.dark {
        background-color: #191919;
    }
    &.light {
        background-color: "rgb(238, 239, 244)";
    }
}

#cover {
    font-family: "Raleway", sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: blue;
    z-index: 9999;
    padding: 50px;

    #covermain {
        color: aliceblue;

        #covertitle {
            font-size: 60px;
            font-weight: bold;
            font-family: "Raleway", "Noto Sans JP";
        }

        #progresswrap {
            border-color: aliceblue;

            progress {
                width: calc((100vw) - 100px);
                appearance: none;
                -webkit-appearance: none;
                -moz-appearance: none;
                background-color: aliceblue;
                border: 1px solid aliceblue;

                &::-webkit-progress-bar {
                    background-color: blue;
                }

                &::-webkit-progress-value {
                    background-color: aliceblue;
                }
            }
        }

        #loadingModelName {
            p {
                margin: 0;
            }
        }
    }
}

@keyframes notice {
    0% {
        transform: scale(0.8);
        opacity: 0;
        background-color: rgba(0, 0, 0, 0);
        z-index: -1;
    }

    25% {
        opacity: 1;
        transform: scale(1);
        background-color: blue;
        z-index: 100;
    }

    75% {
        opacity: 1;
        transform: scale(1);
        background-color: blue;
        z-index: 100;
    }

    100% {
        transform: scale(0.8);
        opacity: 0;
        background-color: rgba(0, 0, 0, 0);
        z-index: -1;
    }
}

.hideform {
    animation: notice 2.0s cubic-bezier(0.83, 0, 0.17, 1);
}

.hide {
    animation: fadeout 0.6s cubic-bezier(0.87, 0, 0.13, 1) forwards;
}

@keyframes fadeout {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    99% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 0;
        transform: translateY(100%);
        display: none;
    }
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 767px) {

    .inner {
        margin: 5vh 0 0 0 !important;
        width: 80vw !important;
    }

    header {
        margin: 30px 15px !important;
        width: calc(100vw - 30px) !important;
    }

    #navwrap {
        justify-content: start !important;
    }

    .hd {
        font-size: 10px !important;
        margin: 0 !important;
    }

    .title {
        font-size: 20px !important;
        margin: 0 !important;
    }

    #canvas1 {
        height: 75vh !important;
    }

    h2 {
        font-size: 18px !important;
        line-height: 12px !important;
        margin: 0 !important;
    }

    .nonpenetration {
        padding: 10px 10px !important;
        gap: 8px !important;
    }

    #scrollcap {
        display: none !important;
    }

    #speed {
        display: none !important;
    }

    .pages {
        justify-content: center !important;
    }

    #biowrapper {
        p {
            font-size: 11.5px !important;
        }
    }

    .worksCover {
        display: none !important;
    }

    #modalImgWrapper {
        display: none !important;
    }

    #modalTitle {
        margin-bottom: 10px !important;
    }

    #darkmodeSwitchWrap {
        /* height: 30px !important; */
        margin: 0 0 0 0 !important;
        padding: 5px 0 0 0 !important;
        i {
            margin: 0 !important;
            padding: 0 10px !important;
        }
    }
}