/* header */
.header-fixed {
    position: fixed;
    width: 120px;
    height: 100dvh;
    right: 30px;
    z-index: 100;
    padding-block: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.page-index .header-fixed {
    opacity: 0;
    translate: 30px 0;
}
.page-index.loaded .header-fixed {
    animation: 0.2s header-anim 2.2s ease forwards;
}
.header__logo {
    transition: 0.2s;
    &:hover {
        opacity: 0.6;
    }
}

.header__logo__img {
    height: 32px;
    width: auto;
    margin-inline: auto;
}
.header__btn {
    display: grid;
    gap: 8px;
    width: 50px;
    height: 19px;
    background: none;
    border: 0;
    padding: 0;
    margin-inline: auto;
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    &:hover {
        span:first-child {
            translate: 0 4px;
        }
        span:nth-child(2) {
            opacity: 0;
        }
        span:last-child {
            translate: 0 -4px;
        }
    }
}
.header__btn span {
    display: block;
    width: 100%;
    height: 1px;
    background: #fff;
    transition: 0.2s;
}
.header__nav {
    display: grid;
    margin-inline: 14px;
}
.header__nav__link {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-lato);
    line-height: 1.5;
    letter-spacing: 0.15em;
    white-space: nowrap;
    position: relative;
    &::before {
        content: "";
        display: inline-block;
        width: 10px;
        height: 1px;
        background: var(--bud-gradient);
        margin-right: 15px;
        position: absolute;
        left: 0;
        top: 50%;
        translate: 0 -1px;
        transform-origin: right;
        transition: 0.2s;
    }
    .text-front,
    .text-back {
        padding-left: 25px;
    }
}
.header__nav__link--btn {
    margin: 10px -14px 0;
    padding-block: 2px;
}

/* animation */
@keyframes header-anim {
    0% {
        opacity: 0;
        translate: 30px 0;
    }
    100% {
        opacity: 1;
        translate: 0;
    }
}
@keyframes header-anim--sp {
    0% {
        opacity: 0;
        translate: -50% 30px;
    }
    100% {
        opacity: 1;
        translate: -50%;
    }
}

/* header__hbg */
.header__hbg {
    width: calc(100% - 30px);
    height: calc(100dvh - 30px);
    background: #fff;
    padding: 70px 50px 50px;
    border-radius: 32px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 400;
    visibility: hidden;
    opacity: 0;
    translate: 120px 0;
    user-select: none;
    pointer-events: none;
    transition: 0.2s;
    overflow: auto;
}
.header__hbg.show {
    visibility: visible;
    opacity: 1;
    translate: 0;
    user-select: auto;
    pointer-events: auto;
}
.header__hbg__inner {
    height: 100%;
    display: grid;
    grid-template-columns: 80px auto;
    grid-template-rows: auto auto 1fr;
    gap: 52px 20px;
}
.header__hbg__logo {
    max-width: 80px;
    grid-area: 1/1/2/2;
}
.header__hbg__nav {
    grid-area: 2/1/3/3;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 74.358%;
}
.header__hbg__nav__list {
    display: grid;
    place-content: start;
    gap: 15px 0;
}
.header__hbg__nav__list-heading {
    width: 100%;
    margin-bottom: -10px;
}
.header__hbg__nav__list-item {
    line-height: 1;
    margin-left: 25px;
}
.header__hbg__nav__list__items--index {
    display: inline-block;
    color: var(--background);
    font-size: 17px;
    font-family: var(--font-lato);
    line-height: 1.5;
    letter-spacing: 0.15em;
    white-space: nowrap;
    position: relative;
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
    &::before {
        content: "";
        display: inline-block;
        width: 10px;
        height: 1px;
        background: var(--bud-gradient);
        margin-right: 15px;
        position: absolute;
        left: 0;
        top: 50%;
        translate: 0 -1px;
        transform-origin: right;
        transition: 0.2s;
    }
    .text-front,
    .text-back {
        padding-left: 25px;
    }
}
.header__hbg__nav__list__items--sub {
    color: var(--background);
    font-size: 12px;
    letter-spacing: 0.1em;
    background: linear-gradient(to right, var(--gray-txt) 0%, var(--gray-txt) 100%) no-repeat left bottom 1px/0 1px;
    transition: 0.2s;
    &::before {
        content: '';
        display: inline-block;
        width: 6px;
        aspect-ratio: 1;
        margin-right: 8px;
        border-top: 1px solid var(--background);
        border-right: 1px solid var(--background);
        vertical-align: 1.5px;
        rotate: 45deg;
    }
    &:hover {
        background-size: 100% 1px;
    }
}
ul.header__hbg__sub-nav__list {
    padding-left: 16px;
    display: grid;
    gap: 5px 0;
    margin-top: 5px;
}
.header__hbg__sub-nav__list__items--sub {
    color: var(--gray-txt);
    font-size: 12px;
    letter-spacing: 0.1em;
    background: linear-gradient(to right, var(--gray-txt) 0%, var(--gray-txt) 100%) no-repeat left bottom 1px / 0 1px;
    transition: 0.2s;
    &::before {
        content: '';
        display: inline-block;
        width: 7px;
        height: 1px;
        margin-right: 5px;
        vertical-align: 4px;
        background-color: var(--gray-txt);
    }
    &:hover {
        background-size: 100% 1px;
    }
}
.header__hbg__banner-list {
    grid-area: 3/1/4/3;
    align-self: end;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    width: calc(100% - 146px);
}
.header__hbg__banner-list__link {
    transition: 0.2s;
    &:hover {
        opacity: 0.6;
    }
}
.header__hbg__contact-btns {
    grid-area: 1/2/2/3;
    display: grid;
    grid-template-columns: minmax(0, 200px);
    justify-self: end;
    &:has(.recruit-btn) {
        grid-template-columns: repeat(2, minmax(0, 200px));
        gap: 10px;
    }
}
.header__hbg__contact-btn {
    padding-block: 3px;
    &.recruit-btn {
        color: #000;
    }
}
.header__hbg__btn {
    display: block;
    width: 46px;
    height: 22px;
    background: none;
    padding: 0;
    border: 0;
    position: absolute;
    right: 60px;
    top: 50%;
    translate: 0 -50%;
    cursor: pointer;
    span {
        display: block;
        width: 50px;
        height: 1px;
        background: var(--gray);
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        transition: 0.2s;
        &:first-child {
            rotate: 25deg;
        }
        &:last-child {
            rotate: -25deg;
        }
    }
    &:hover span {
        rotate: 0deg;
    }
}
.mask {
    width: 100%;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    inset: 0;
    background: rgb(32 32 32/0.85);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    user-select: none;
    pointer-events: none;
    cursor: pointer;
    transition: 0.2s;
}
.header__hbg.show + .mask {
    opacity: 1;
    visibility: visible;
    user-select: auto;
    pointer-events: auto;
}

/* footer */
footer {
    background: var(--gray);
    padding-block: 100px 30px;
    position: relative;
    z-index: 200;
}
.footer__contact-btn {
    display: block;
    width: 91.66%;
    border: 2px solid var(--gray);
    background: var(--background);
    border-radius: 20px;
    padding: 133px 8.09% 129px;
    margin: -264px auto 86px;
    color: #fff;
    position: relative;
    &:hover {
        .footer__contact-btn__ico {
            scale: 1.46;
            &::after {
                scale: .685;
                background: url(/common/images/ico_arrow_footer-contact.png) no-repeat right -40px center/100% auto, url(/common/images/ico_arrow_footer-contact.png) no-repeat center/100% auto;
            }
        }
        .text-front {
            transform: rotateX(90deg);
        }
        .text-back {
            transform: translateY(-0.5lh) rotateX(0deg);
        }
        &::before {
            scale: 2 1;
        }
    }
}
.footer__contact-btn__ico {
    content: "";
    display: block;
    width: 65px;
    height: 65px;
    background: var(--bud-gradient);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    right: 11.03%;
    translate: 0 -50%;
    transition: 0.2s;
    &::after {
        content: "";
        display: block;
        width: 31px;
        height: 9px;
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        transition: 0.2s;
        background: url(/common/images/ico_arrow_footer-contact.png) no-repeat center/100% auto, url(/common/images/ico_arrow_footer-contact.png) no-repeat left -40px center/100% auto;
    }
}
.footer__contact-btn__inner {
    display: flex;
    align-items: center;
}
.footer__contact-btn__ttl-wrapper {
    padding-right: 40px;
    margin-right: 39px;
    border-right: 1px solid #fff;
}
.footer__contact-btn__ttl--en {
    display: block;
    font-size: 45px;
    font-weight: 700;
    font-family: var(--font-lato);
    line-height: 1;
    margin-block: -25px -20px;
}
.footer__contact-btn__ttl--ja {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.33;
}
.footer__contact-btn__txt {
    font-size: 14px;
    line-height: 1.86;
}

.footer__inner {
    width: 91.66%;
    margin-inline: auto;
}
.footer__col {
    display: grid;
    justify-content: space-between;
    margin-bottom: 100px;
}
.footer__company {
    grid-area: 1/1/2/2;
}
.footer__company__img {
    max-width: 100px;
    margin-bottom: 20px;
}
.footer__company__address {
    color: var(--gray-txt);
    font-size: 13px;
    line-height: 1.692;
}
.footer__nav {
    grid-area: 1/2/3/3;
    display: flex;
    gap: 50px;
}
.footer__nav__list li {
    line-height: 1;
    &:first-child {
        margin-bottom: 10px;
    }
    &:not(:first-child) {
        margin: 0 0 15px 25px;
    }
    &:last-child {
        margin-bottom: 0;
    }
}
.footer__nav__list__items--index {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-lato);
    line-height: 1.5;
    letter-spacing: 0.15em;
    white-space: nowrap;
    position: relative;
    &::before {
        content: "";
        display: inline-block;
        width: 10px;
        height: 1px;
        background: var(--bud-gradient);
        margin-right: 15px;
        position: absolute;
        left: 0;
        top: 50%;
        translate: 0 -1px;
        transform-origin: right;
        transition: 0.2s;
    }
    .text-front,
    .text-back {
        padding-left: 25px;
    }
}
.footer__nav__list__items--sub {
    color: var(--gray-txt);
    font-size: 12px;
    background: linear-gradient(to right, var(--gray-txt) 0%, var(--gray-txt) 100%) no-repeat left bottom 1px/0 1px;
    transition: 0.2s;
    &:hover {
        background-size: 100% 1px;
    }
}
footer .recruit-btn{
    grid-area: 2 / 1 / 3 / 2;
    align-self: end;
    padding-block: 8px;
}
.footer__bottom {
    display: flex;
    justify-content: space-between;
}
.footer__bottom__links {
    display: flex;
    gap: 30px;
    align-items: center;
    line-height: 1;
}
.footer__bottom__link {
    color: #fff;
    font-size: 12px;
    font-family: "Lato", "Noto Sans JP", sans-serif;
    background: linear-gradient(to right, #fff 0%, #fff 100%) no-repeat left bottom 1px/0 1px;
    transition: 0.2s;
    &:hover {
        background-size: 100% 1px;
    }
}
.footer__bottom__link--facebook::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url(/common/images/ico_facebook.png) no-repeat center/cover;
    margin-right: 10px;
    vertical-align: -4px;
}
.footer__copyright {
    color: #fff;
    font-size: 10px;
    font-family: var(--font-lato);
    line-height: 1;
}

@media (width<768px) {
    /* header */
    .header-fixed {
        width: calc(100% - 40px);
        height: auto;
        align-items: center;
        flex-direction: row;
        padding: 0;
        top: 30px;
        left: 50%;
        translate: -50%;
        z-index: 300;
    }
    .page-index.loaded .header-fixed {
        animation: 0.2s header-anim--sp 2.2s ease forwards;
    }
    .header__logo__img {
        height: 24px;
    }
    .header__btn {
        position: static;
        translate: 0;
        margin-inline: auto 0;
    }
    .header__nav__link::before {
        height: 2px;
    }

    /* header__hbg */
    .header__hbg {
        width: calc(100% - 30px);
        padding: 25px;
        border-radius: 16px;
    }
    .header__hbg__inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
        row-gap: 0;
    }
    .header__hbg__logo {
        width: fit-content;
        margin-bottom: 78px;
        img {
            width: auto;
            height: 24px;
        }
    }
    .header__hbg__nav {
        display: grid;
        gap: 0;
        width: 100%;
        margin-bottom: 70px;
    }
    .header__hbg__nav__group {
        border-bottom: 1px solid #efefef;
    }
    .header__hbg__nav__list__heading:not(.open) + .header__hbg__nav__list {
        display: none;
    }
    .header__hbg__nav__list {
        margin-bottom: 20px;
    }
    .header__hbg__nav__list__items--index {
        width: 100%;
        padding-block: 15px;
        line-height: 1;
        text-align: left;
        &::before {
            height: 2px;
        }
    }
    button.header__hbg__nav__list__items--index::after {
        content: '';
        display: inline-block;
        width: 6px;
        aspect-ratio: 1;
        position: absolute;
        top: 50%;
        right: 0;
        border-bottom: 1px solid var(--background);
        border-right: 1px solid var(--background);
        rotate: 45deg;
    }
    .header__hbg__nav__list__heading.open button.header__hbg__nav__list__items--index::after {
        rotate: -135deg;
    }
    .header__hbg__banner-list {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0 5px 30px;
        width: 100%;
    }
    .header__hbg__contact-btns {
        grid-area: 4/1/5/2;
        margin-inline: 5px;
        justify-self: unset;
        grid-template-columns: unset;
        &:has(.recruit-btn) {
            grid-template-columns: unset;
        }
    }
    .header__hbg__contact-btn {
        padding-block: 3px;
    }
    .header__hbg__btn {
        width: 50px;
        height: 22px;
        right: 14px;
        top: 16px;
        translate: 0;
        span {
            width: 54px;
        }
    }

    /* footer */
    footer {
        padding-block: 80px 30px;
    }
    .footer__contact-btn {
        width: calc(100% - 40px);
        padding: 37px 0 72px;
        margin: -242px auto 60px;
        &:hover {
            .footer__contact-btn__ico {
                scale: 1.46;
                &::after {
                    scale: 0.685;
                    background: url(/common/images/ico_arrow_footer-contact.png) no-repeat right -40px center/100% auto, url(/common/images/ico_arrow_footer-contact.png) no-repeat center/100% auto;
                }
            }
            .text-front {
                transform: rotateX(90deg);
            }
            .text-back {
                transform: translateY(-0.5lh) rotateX(0deg);
            }
            &::before {
                scale: 2 1;
            }
        }
    }
    .footer__contact-btn__ico {
        width: 42px;
        height: 42px;
        right: 28px;
        top: auto;
        bottom: 22px;
        translate: none;
        &::after {
            width: 18px;
            height: 5px;
            transition: 0.2s;
        }
    }
    .footer__contact-btn__inner {
        display: flex;
        flex-direction: column;
        width: fit-content;
        margin-inline: auto;
        align-items: center;
        gap: 26px;
    }
    .footer__contact-btn__ttl-wrapper {
        border: 0;
        padding: 0;
        margin: 0;
        text-align: center;
        position: relative;
        &::after {
            content: "";
            display: block;
            width: 68px;
            height: 1px;
            background: #fff;
            position: absolute;
            bottom: -13px;
            left: 50%;
            translate: -50%;
        }
    }
    .footer__contact-btn__ttl--en {
        font-size: 20px;
        margin-block: -10px;
    }
    .footer__contact-btn__ttl--ja {
        font-size: 10px;
        line-height: 1.6;
    }
    .footer__contact-btn__txt {
        font-size: 10px;
        line-height: 1.6;
    }
    .footer__inner {
        width: calc(100% - 40px);
    }
    .footer__col {
        margin-bottom: 40px;
    }
    .footer__company {
        margin-bottom: 80px;
    }
    .footer__company__img {
        max-width: 80px;
    }
    .footer__nav {
        grid-area: 2/1/3/2;
        display: flex;
        flex-direction: column-reverse;
        gap: 25px;
        margin-bottom: 80px;
    }
    .footer__nav__list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: calc(100% - 25px);
        margin-inline: auto 0;
        li {
            line-height: 1;
            &:first-child {
                width: 100%;
                margin: 0 0 -2px -25px;
            }
            &:not(:first-child),
            &:last-child {
                margin: 0;
            }
        }
    }
    .footer__nav__list--news {
        margin: 0;
    }
    .footer__nav__list__items--index {
        line-height: 1;
    }
    footer .recruit-btn{
        grid-area: 3 / 1 / 4 / 2;
    }
    .footer__bottom {
        display: grid;
        justify-content: unset;
        gap: 20px;
    }
    .footer__bottom__links {
        display: grid;
        gap: 15px;
    }
    .footer__bottom__link--facebook::before {
        width: 16px;
        height: 16px;
        margin-right: 8px;
        vertical-align: -4px;
    }
    .footer__copyright {
        text-align: right;
    }
}