@import url("_reset.css");

:root {
    --primary-color: #008898;
    --highlight-color: #9CE5F0;
    --base-font: "Gill Sans", "Lato", "Noto Sans JP", sans-serif;
}

html {
    background-color: var(--primary-color);
    scroll-behavior: smooth;
    font-size: 14px;
}

body {
    /* -webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale; */
    position: relative;
    font-family: var(--base-font);
    line-height: 1.75;
    letter-spacing: .1em;
    color: #fff;
    width: 100%;
    /* word-break: break-all; */
    overflow-wrap: anywhere;
    word-break: normal;
    line-break: strict;

    &.ready {
        overflow: hidden;
    }

    &.active {
        overflow: auto;

        .loading {
            pointer-events: none;
            opacity: 0;
            height: 0;
        }
    }
}

@keyframes loading {
    0% {
      /* transform: rotate(0deg); */
      rotate: 0deg;
    }
    100% {
      /* transform: rotate(360deg); */
      rotate: 360deg;
    }
  }
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 1;
    transition: opacity .5s linear, height 0s 1s;
    z-index: 10;

    &::after {
        content: '';
        position: absolute;
        z-index: 3;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        top: calc(50% - 15px);
        left: calc(50% - 15px);
        /* transform: translate(-50%, -50%); */
        display: block;
        border: 3px solid rgba(255,255,255, 0.6);
        /* box-sizing: border-box; */
        border-left-color: #fff;
        animation: loading .6s infinite linear;
    }
}

::selection {
    background-color: #fff;
    color: var(--primary-color);
    ;
}

a {
    color: inherit;
    text-decoration: underline;

    &:hover {
        text-decoration: none;
    }
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24
}

main {
    >section {

        &::after {
            content: '';
            width: 100%;
            height: 100svh;
            display: block;
        }

        .sectionTitle {
            font-weight: normal;
            font-size: 14px;
            letter-spacing: .35em;
            position: relative;
            line-height: 1;
            margin-bottom: 30px;

            &::after {
                content: '';
                position: absolute;
                left: -10px;
                top: .5em;
                height: 1px;
                width: 5px;
                background-color: #fff;
                transform: translateX(-100%);
            }
        }

        &.animation {
            .sectionTitle {
                opacity: 0;
                transform: translateY(20px);
                transition: all .8s;
            }
        }

        &.active {
            .sectionTitle {
                opacity: 1;
                transform: translateY(0);
            }
        }
    }

    .contents {
        height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-bottom: 80px;
        position: sticky;
        top: 0;

        @media (min-width:600px) {
            padding-bottom: 40px;
        }
    }

    .container {
        max-width: 840px;
        width: 100%;
        margin: 0 auto;
        padding: 0 40px;
    }
}

nav {
    position: fixed;
    left: 0;
    bottom: 0;
    padding: 0 20px 20px 20px;
    width: 100%;

    @media (min-width:600px) {
        left: auto;
        right: 30px;
        bottom: 50%;
        width: auto;
        padding: 0;
        transform: translateY(50%);
    }

    .navi {
        background-color: rgba(11, 85, 96, .9);
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        border-radius: 100vmax;
        padding: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, .15);

        @media (min-width:600px) {
            flex-direction: column;
            padding: 30px 15px;
        }

        li {
            text-align: center;
            flex: 1;

            @media (min-width:600px) {
                &:not(:last-child) {
                    margin-bottom: 35px;
                }
            }

            a {
                text-decoration: none;
                color: var(--highlight-color);
                display: flex;
                flex-direction: column;
                position: relative;

                @media (any-hover: hover) {
                    transition: color .4s;

                    &:hover {
                        color: #fff;

                        & label {
                            opacity: 1;
                            left: -5px;
                        }
                    }
                }
            }

            & label {
                font-size: 11px;
                /* line-height: 1.2; */
                letter-spacing: .25em;

                @media (min-width:600px) {
                    /* display: none; */
                    transition: opacity .4s, left .4s;
                    position: absolute;
                    left: 0;
                    top: 50%;
                    transform: translate(-100%, -50%);
                    width: max-content;
                    pointer-events: none;
                    opacity: 0;
                }
            }

            .icon {
                /* line-height: 1; */
                display: block;
                font-size: 22px;
            }
        }
    }
}

#works {

    .swiper {
        width: 100%;
        margin-bottom: 10px;
        /* visibility: hidden; */
        /* &.swiper-initialized{
            visibility: visible;
            border: 1px solid #f00;
        } */
        .swiper-wrapper {
            transition-timing-function: linear;
            /* イージングの指定　オプションはない？ */
        }
    }

    &.animation {
        .swiper {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity .8s .1s, transform .8s .1s;

            &.swiper2 {
                transition-delay: .2s;
            }
        }
    }

    &.active {
        .swiper {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.works {

    /* display: flex;
    gap: 7px; */
    /* width: 100vw;
    margin-inline: calc(50% - 50vw); */
    >li {
        width: 260px;
        aspect-ratio: 2 / 1;
        position: relative;
        overflow: hidden;

        &::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: #28ACBF;
            z-index: 1;
            transition: background-color .7s;
        }

        @media (min-width:600px) {
            width: 420px;
        }

        @media (any-hover: hover) {
            &:hover {
                &::after {
                    background-color: #05262B;
                }

                & img {
                    scale: 1.05;
                }

                .info {
                    opacity: 1;
                }
            }
        }

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: relative;
            z-index: 2;
            mix-blend-mode: multiply;
            transition: scale .7s;
        }

        & a {
            position: relative;
            display: block;

            .icon {
                position: absolute;
                color: #fff;
                color: var(--highlight-color);
                top: 5px;
                right: 5px;
                font-size: 16px;
                z-index: 4;
                /* text-shadow: 0 0 5px rgba(0,0,0,.5); */
                /* @media (min-width:600px) {
                    top: 8px;
                    right: 8px;
                    font-size: 20px;
                } */
            }

            &::after {
                content: '';
                position: absolute;
                top: 0;
                right: 0;
                width: 0;
                height: 0;
                border-style: solid;
                border-color: transparent rgba(11, 85, 96, .95) transparent transparent;
                border-width: 0px 46px 46px 0px;
                z-index: 3;
            }
        }

        .info {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            padding: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5;
            opacity: 0;
            transition: opacity .6s;
            pointer-events: none;
        }

        .tag {
            font-size: 0;

            >li {
                background-color: rgba(62, 118, 129, .5);
                color: #fff;
                font-size: 11px;
                padding: 5px 10px;
                border-radius: 100vmax;
                display: inline-block;
                margin: 3px;
            }
        }
    }
}

#profile {
    &.animation {
        .profile {

            .name,
            .occupation,
            .links {
                opacity: 0;
                transform: translateY(20px);
                transition: opacity .8s .2s, transform .8s .2s;
            }

            .occupation {
                transition-delay: .3s;
            }

            .links {
                transition-delay: .4s;
            }
        }
    }

    &.active {
        .profile {

            .name,
            .occupation,
            .links {
                opacity: 1;
                transform: translateY(0);
            }
        }
    }
}


.profile {
    .name {
        font-size: 32px;
        letter-spacing: .15em;
        font-weight: normal;
        line-height: 1.3;

        & span {
            display: inline-block;
            margin-right: 20px;
        }

        & small {
            text-align: center;
            display: block;
            font-size: 10px;
            font-weight: normal;
            letter-spacing: .3em;
            line-height: 1.3;
            opacity: .9;
        }
    }

    .occupation {
        font-size: 18px;
        letter-spacing: .25em;
        margin-top: 30px;
    }

    .links {
        margin-top: 30px;

        >li {
            &:not(:last-child) {
                margin-bottom: 2px;
            }
        }

        a {
            color: var(--highlight-color);
            text-decoration: none;
            display: flex;
            /* width: max-content; */
            width: fit-content;
            align-items: center;
            /* font-weight: 300; */
            letter-spacing: .2em;
            transition: opacity .4s;

            &:hover {
                opacity: .6;
            }

            &.jp {
                font-size: 12px;
                /* line-height: 1; */
            }

            .icon {
                width: 18px;
                display: block;
                margin-right: 5px;
            }

            .iconfont {
                font-size: 17px;
                margin-right: 8px;
            }
        }
    }
}


#contact {
    &.animation {
        .contactForm,
        .submitButton {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity .8s .2s, transform .8s .2s;
        }

        .submitButton {
            transition-delay: .4s;
        }
    }

    &.active {
        .contactForm,
        .submitButton {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.contact {
    .contactForm {
        @media (min-width:600px) {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;

            .textfield {
                width: calc(50% - 7px);
            }
        }
    }

    .textfield {
        margin-bottom: 15px;
    }

    .textarea {
        width: 100%;
    }

    input[type=text],
    input[type=email],
    textarea {
        background-color: rgba(255, 255, 255, .1);
        border: none;
        padding: 15px;
        border-radius: 3px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
        /* appearance: none; */
        outline: none;

        &::placeholder {
            font-size: 14px;
            color: #000;
            opacity: .4;
            letter-spacing: .25em;
        }
    }

    input:is(:-webkit-autofill, :autofill) {
        /* -webkit-background-clip: text; */
        -webkit-text-fill-color: #ffffff;
        transition: background-color 5000s ease-in-out 0s;
    }

    textarea {
        height: 10em;
        @media (min-width:600px) {
            height: 15em;
        }
    }

    button[type=submit] {
        appearance: none;
        background-color: #1A4E57;
        line-height: 1;
        /* font-size: 16px; */
        font-weight: normal;
        color: #fff;
        border: none;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 150px;
        margin: 20px auto 0;
        padding: 15px 0 15px 15px;
        border-radius: 100vmax;
        box-shadow: 0 0 10px rgba(0, 0, 0, .2);
        cursor: pointer;
        transition: background-color .4s, color .4s;

        @media (any-hover: hover) {
            &:hover {
                background-color: #fff;
                color: var(--primary-color);
            }
        }

        .icon {
            font-size: 18px;
            margin-left: 10px;
        }
    }

    .error {
        margin-top: 3px;
        color: #00faff;
    }
}

.notfound {
    margin-bottom: 30px;

    em {
        font-size: 80px;
        /* font-weight: bold; */
        font-style: normal;
        margin-right: 10px;
        display: inline-block;
        line-height: 1;
    }

    span {
        display: inline-block;
        font-size: 16px;
        letter-spacing: .25em;
    }
}