header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 32px 56px 22px;
    transition: background-color .5s;
}
header.active {
    background-color: rgba(229,220,211,.8);
}
header.active .contact_box {
    display: none;
}
header .logo {
    width: 20%;
    min-width: 200px;
    max-width: 300px;
    height: auto;
}
header .logo svg {
    width: 100%;
    height: auto;
    fill: var(--text-sub-color);
}
header .logo .logo_vertical {
    display: none;
}
header nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 24px;
}
header nav .menu {
    display: flex;
    align-items: center;
    gap: 40px;
}
header nav .menu li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}
header nav .menu li a span {
    display: block;
    color: var(--text-sub-color);
    font-size: 14px;
}
header nav .contact_box {
    display: flex;
    align-items: center;
}
header nav .contact_box a svg {
    width: 24px;
    height: auto;
    fill: none;
    stroke: var(--text-sub-color);
}
header nav .contact_box a:first-of-type {
    margin-right: 24px;
    padding-right: 24px;
    border-right: 1px solid var(--text-sub-color);
}
header .menu_toggle {
    display: none;
}

.contact_box.fixed {
    position: fixed;
    bottom: 20px;
    right: 32px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: .5s;
}
.contact_box.fixed.active {
    opacity: 1;
    pointer-events: all;
}
.contact_box.fixed a {
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact_box.fixed a svg {
    width: 24px;
    height: auto;
    fill: none;
    stroke: var(--text-sub-color);
}
.contact_box.fixed a:first-of-type {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--text-sub-color);
}


@media (hover: hover) and (pointer: fine) {
    header nav .menu li a:hover {
        background: linear-gradient(
            100deg,
            var(--text-color) 0%,
            var(--text-color) 35%,
            transparent 50%,
            var(--text-color) 65%,
            var(--text-color) 100%
        );
        background-size: 300% 100%;
        background-position: 100% 0;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: gradationTextAnimation .5s linear forwards;
    }
    header nav .menu li a:hover span {
        background: linear-gradient(
            100deg,
            var(--text-sub-color) 0%,
            var(--text-sub-color) 35%,
            transparent 50%,
            var(--text-sub-color) 65%,
            var(--text-sub-color) 100%
        );
        background-size: 300% 100%;
        background-position: 100% 0;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: gradationTextAnimation .5s linear forwards;
    }
}

@keyframes gradationTextAnimation {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

@media screen and (max-width: 1300px) {
    header nav .menu {
        gap: 32px;
    }
}
@media screen and (max-width: 1280px) {
    header {
        position: absolute;
        top: 0;
        left: 0;
        align-items: center;
        padding: 20px 5% 0;
    }
    header.active {
        background-color: transparent;
    }
    header .logo .logo_vertical {
        display: block;
        width: 112px;
        min-width: auto;
        max-width: auto;
    }
    header .logo .logo_beside {
        display: none;
    }
    header .menu_toggle {
        position: fixed;
        top: 45px;
        right: 5%;
        z-index: 50;
        display: block;
        width: 50px;
        height: 36px;
        cursor: pointer;
    }
    header .menu_toggle span {
        width: 100%;
        height: 1px;
        background: var(--text-color);
        transition: .3s;
    }
    header .menu_toggle span:nth-child(1) {
        position: absolute;
        top: 8px;
        left: 0;
        transform-origin: center;
    }
    header .menu_toggle span:nth-child(2) {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
    }
    header .menu_toggle span:nth-child(3) {
        position: absolute;
        bottom: 8px;
        left: 0;
        transform-origin: center;
    }
    header .menu_toggle.open span:nth-child(1) {
        top: 26px;
        transform: rotate(45deg);
    }
    header .menu_toggle.open span:nth-child(2) {
        display: none;
    }
    header .menu_toggle.open span:nth-child(3) {
        transform: rotate(-45deg);
    }
    header nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: -1;
        opacity: 0;
        flex-direction: column;
        align-items: center;
        justify-content: stretch;
        width: 100%;
        max-width: 500px;
        height: 100vh;
        padding: 5% 24px;
        background: var(--base-color);
        pointer-events: none;
        transition: .3s;
    }
    header nav.open {
        opacity: 1;
        pointer-events: all;
    }
    header nav::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 30vh;
        background-image: url('../img/img_nav_bg.png');
        background-size: cover;
        background-repeat: no-repeat;
    }
    header nav .menu {
        position: relative;
        z-index: 2;
        flex: 1;
        flex-direction: column;
        justify-content: center;
    }
    header nav .menu li a {
        font-size: 16px;
    }
    header nav .menu li a span {
        color: var(--text-color);
        text-align: center;
    }
    header .contact_box {
        position: relative;
        z-index: 2;
    }
    header nav .contact_box a svg {
        stroke: #fff;
    }
    header nav .contact_box a:first-of-type {
        margin-right: 12px;
        padding-right: 12px;
        border-right: none;
    }
    .contact_box.fixed {
        right: 5%;
    }
}
@media screen and (max-width: 600px) {
    header {
        padding: 20px 16px 0;
    }
    header .menu_toggle {
        right: 16px;
    }
    .contact_box.fixed {
        right: 16px;
    }
}