html {
    scroll-behavior: smooth;
}

.logo,
.logo span {
    display: block;
}

.logo {
    font-weight: 700;
    font-family: 'BIZ UDPGothic', sans-serif;
    color: #585858;
}

.logo span {
    font-size: 2rem;
    line-height: 3.1rem;
}

.logo span:last-child {
    font-size: 3.8rem;
    letter-spacing: 0.2rem;
}

.header__flex,
.header__layout__flex,
.header__nav__flex {
    display: flex;
}

.header__nav__flex {
    gap: 3rem;
    align-items: center;
}

.header__flex {
    align-items: end;
    justify-content: space-between;
    padding: 2.5rem 4rem;
    position: fixed;
    z-index: 9999;
    inset: 0 0 auto;
    transition: translate 0.25s;
    translate: 0 0;
    background-color: #FFFFFF;
}

.header--hidden {
    translate: 0 -100%;
}

.header__layout__flex {
    gap: 2.3rem;
    align-items: center;
}

.header__layout__flex a {
    font-size: 1.6rem;
    font-family: 'Kosugi Maru', 'sans-serif';
    color: #555555;
}

/* ナビゲーションリンク - センターからラインが引かれるエフェクト (PC) */
.nav-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.current {
    color: #44986A;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -0.3rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 3.3rem;
    height: 0.2rem;
    background-color: #A9A9A9;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.current::before {
    transform: translateX(-50%) scaleX(1);
}

.header__img {
    width: 4.8rem;
    height: auto;
}

.header__margin__height {
    margin-top: 10.8rem;
}

@media screen and (max-width: 699.98px) {

    .header__margin__height {
        margin-top: 7rem;
    }

    .logo span {
        font-size: 1.2rem;
        line-height: 2.1rem;
        letter-spacing: 0.03rem;
    }

    .logo span:last-child {
        font-size: 2.4rem;
        letter-spacing: 0.09rem;
    }

    .header__flex {
        padding: 0.5rem 1rem 1.4rem;
        align-items: baseline;
    }

    .sp__background {
        position: absolute;
        top: 6rem;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: transparent;
        visibility: hidden;
        transition: background-color 0.3s, visibility 0.3s;
    }

    .sp__background.active {
        background-color: #ddddddb5;
        visibility: visible;
    }

    .header__layout__flex {
        width: 21rem;
        flex-flow: column;
        background-color: #44986A;
        padding: 1.7rem 1.7rem 3.3rem;
        margin-left: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .sp__background.active .header__layout__flex {
        transform: translateX(0);
    }

    .header__layout__flex li {
        width: fit-content;
        margin-right: auto;
    }

    .header__layout__flex a {
        color: #FFFFFF;
    }

    /* SP版ではラインエフェクト・色変更を無効化 */
    .nav-link::before {
        display: none;
    }

    .nav-link:hover,
    .nav-link.current {
        color: #FFFFFF;
    }

    .sp_layout_flex {
        display: flex;
        gap: 1.5rem;
    }


    .button_layout {
        width: 4rem;
        order: 2;
        background-color: #44986A;
        height: 4rem;
        border-radius: 100%;
    }

    .header__nav__flex {
        order: 1;
    }

    .header__img {
        width: 4rem;
        height: 4rem;
    }

    /*=============================
.btn_trigger - ハンバーガーメニュー
=============================*/
    .btn_trigger {
        position: relative;
        width: 2rem;
        height: 1.6rem;
        cursor: pointer;
        margin: 0 auto;
    }

    .btn_trigger span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 0.1rem;
        background-color: #FFF;
        border-radius: 0.4rem;
    }

    .btn_trigger,
    .btn_trigger span {
        display: inline-block;
        transition: all .5s;
        box-sizing: border-box;
    }

    .btn_trigger span:nth-of-type(1) {
        top: 0.4rem;
    }

    .btn_trigger span:nth-of-type(2) {
        top: 0.9rem;
    }

    .btn_trigger span:nth-of-type(3) {
        bottom: 0.1rem;
    }

    /*=============================
    #btn.active - ×アニメーション
    =============================*/
    #btn.active span:nth-of-type(1),
    #btn.active span:nth-of-type(3) {
        width: 1rem;
    }

    #btn.active span:nth-of-type(1) {
        -webkit-transform: translate(1.1rem, 0.55rem) rotate(45deg);
        transform: translate(1.1rem, 0.55rem) rotate(45deg);
        top: 0;
    }

    #btn.active span:nth-of-type(2) {
        opacity: 1;
        top: 0.9rem;
    }

    #btn.active span:nth-of-type(3) {
        -webkit-transform: translate(1.1rem, -0.55rem) rotate(-45deg);
        transform: translate(1.1rem, -0.55rem) rotate(-45deg);
        bottom: -0.3rem;
    }
}
