@charset "UTF-8";

/* block base */
.navigation {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 98;
    width: 55px;
}

/* toggle button */
.navigation__toggle {
    position: fixed;
    top: 45px;
    right: 70px;
    z-index: 100;
    width: 65px;
    height: 65px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    transition: transform .4s;
}

/* 下層ページ */
.navigation--low .navigation__toggle {
    top: 30px;
}

/* hamburger bars */
.navigation__bar {
    position: absolute;
    right: 0;
    left: 0;
    width: 55px;
    height: 2px;
    margin: auto;
    background-color: #fff;
    transition: transform .4s, opacity .4s, background-color .4s;
}

.navigation__bar:nth-of-type(1) {
    top: 10px;
}

.navigation__bar:nth-of-type(2) {
    top: 22px;
}

.navigation__bar:nth-of-type(3) {
    top: 34px;
}

/* label */
.navigation__label {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    font-size: 1.4rem;
    letter-spacing: .1rem;
}

.navigation__label::before {
    content: "MENU";
    letter-spacing: .2rem;
}

/* panel */
.navigation__panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    transform: translateX(100%);
    width: 100%;
    max-width: 500px;
    height: 100%;
    transition: transform .5s;
}

.navigation__inner {
    height: 100%;
    padding: 80px 10% 50px;
    overflow-y: auto;
    background: #000;
    -webkit-overflow-scrolling: touch;
}

.navigation__inner::-webkit-scrollbar {
    display: none;
}

/* menu & items */
.navigation__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation__item {
    padding: 10px 0;
    text-align: left;
}

.navigation__link {
    display: flex;
    align-items: center;
    padding: 5px 0;
    color: #fff;
    letter-spacing: .1em;
    text-decoration: none;
}

.navigation__link:hover {
    opacity: .6;
}

.navigation__text--en {
    display: block;
    color: #fff;
    font-size: 2rem;
    letter-spacing: .1em;
}

/* home mark */
.navigation__link--home::before {
    content: "";
    position: relative;
    top: 3px;
    width: .7em;
    height: 1px;
    background: #fff;
    margin-right: 15px;
    display: inline-block;
}

/* indicator for has-children */
.navigation__item--has-children>.navigation__link {
    position: relative;
    padding-right: 1.2em;
}

.navigation__item--has-children>.navigation__link::before {
    content: "";
    position: relative;
    top: 3px;
    width: .7em;
    height: .7em;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: translateY(-50%) rotate(45deg);
    transition: transform .2s ease;
    margin-right: 15px;
}

/* submenu */
.navigation__submenu {
    display: block;
    /* hidden属性で制御するため表示時はblock前提 */
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease;
    padding-left: 20px;
    /* インデント */
    list-style: none;
    margin: 0;
}

.navigation__submenu-item {
    padding: 10px;
}

.navigation__submenu-item:first-child {
    margin-top: 10px;
}

.navigation__submenu-link {
    color: #fff;
    text-decoration: none;
}

.navigation__submenu-link .navigation__text--en {
    font-size: 1.7rem;
    letter-spacing: .1em;
}

/* open states */
.navigation--open .navigation__panel {
    transform: translateX(0);
}

.navigation--open .navigation__label::before {
    content: "";
}

/* hamburger X */
.navigation--open .navigation__bar:nth-of-type(1) {
    transform: translateY(12px) rotate(-45deg);
}

.navigation--open .navigation__bar:nth-of-type(2) {
    opacity: 0;
}

.navigation--open .navigation__bar:nth-of-type(3) {
    transform: translateY(-12px) rotate(45deg);
}

/* submenu open */
.navigation__item--open>.navigation__submenu {
    max-height: 600px;
}

.navigation__item--open>.navigation__link::before {
    top: 5px;
    transform: translateY(-20%) rotate(225deg);
}

/* cover */
.navigation__cover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    width: 0;
    height: 0;
    background-color: rgba(0, 0, 0, .3);
    opacity: 0;
    transition: opacity .5s;
}

.navigation--open .navigation__cover {
    opacity: 1;
    width: 100%;
    height: 100%;
}

/* ≤600px */
@media (max-width: 600px) {
    .navigation {
        width: 40px;
    }

    .navigation__toggle {
        top: 15px;
        right: 20px;
        width: 50px;
        height: 40px;
    }

    /* 下層ページ */
    .navigation--low .navigation__toggle {
        top: 20px;
    }

    .navigation__bar {
        width: 40px;
    }

    .navigation__bar:nth-of-type(1) {
        top: 10px;
    }

    .navigation__bar:nth-of-type(2) {
        top: 17px;
    }

    .navigation__bar:nth-of-type(3) {
        top: 24px;
    }

    .navigation--open .navigation__bar:nth-of-type(1) {
        top: 5px;
        transform: translateY(8px) rotate(-45deg);
    }

    .navigation--open .navigation__bar:nth-of-type(3) {
        top: 20px;
        transform: translateY(-8px) rotate(45deg);
    }

    .navigation__label {
        display: none;
    }

    .navigation__inner {
        padding: 30px 5%;
    }

    .navigation__link {
        padding: 0;
        font-size: 1rem;
    }

    .navigation__text--en {
        font-size: 1.6rem;
    }

    .navigation__submenu-link .navigation__text--en {
        font-size: 1.5rem;
    }

    .navigation__submenu-item {
        padding: 10px;
    }
}