/* ----------------------------------------------------------------- */
/*                             Variables                             */
/* ----------------------------------------------------------------- */

:root {
    /* テーマカラー */
    --primary-color: #003264;
    --bg-color: #F8F8F8;
    --accent-color: #D1A600;
    --text-color: #111;
    --white-color: #fff;

    /* コンテンツ幅(デザイン準拠) */
    --inner-lg: 1200px;
    --inner-md: 1000px;
    --inner-sm: 800px;

    --font-en: 'Roboto', sans-serif;
    --font-ja: 'Local Noto Sans JP', 'Noto Sans JP', sans-serif;

    /* コンテンツ幅内側の余白 */
    --inner-padding: 2.5rem;

    /* Laptop */
    @media (width <=1024px) {
        --inner-padding: 2rem;
    }

    /* Tablet */
    @media (width <=800px) {
        --inner-padding: 1.5rem;
    }

    /* Mobile(SP) */
    @media (width <=600px) {
        --inner-padding: 1rem;
    }
}

/* ----------------------------------------------------------------- */
/*                           Global Styles                           */
/* ----------------------------------------------------------------- */

@font-face {
    font-family: 'Local Noto Sans JP';
    src: local('Noto Sans JP');
}

html {
    scroll-behavior: smooth;
    scroll-padding: 5rem;
}

body {
    font-family: var(--font-ja);
    /* 標準のフォントサイズはSP:14px〜PC:16px */
    font-size: clamp(0.875rem, 0.698rem + 0.47vw, 1rem);
    font-weight: 400;
    color: var(--text-color);
}

h2,
h3,
p,
li,
dd,
dt {
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.en {
    font-family: var(--font-en);
}

.bg__gray {
    background-color: var(--bg-color);
}

/* ----------------------------------------------------------------- */
/*                                Layout                             */
/* ----------------------------------------------------------------- */

.inner__s {
    max-width: min(calc(var(--inner-sm) + var(--inner-padding) * 2), 100%);
    margin-inline: auto;
    padding: 0 var(--inner-padding);
}

.inner__m {
    max-width: min(calc(var(--inner-md) + var(--inner-padding) * 2), 100%);
    margin-inline: auto;
    padding: 0 var(--inner-padding);
}

.inner__l {
    max-width: min(calc(var(--inner-lg) + var(--inner-padding) * 2), 100%);
    margin-inline: auto;
    padding: 0 var(--inner-padding);
}

.alignleft {
    text-align: left;
}

.aligncenter {
    text-align: center;
}

.alignright {
    text-align: right;
}

.br-sp {
    display: none;
}

.br-pc {
    display: inline;
}

@media screen and (width <=600px) {
    .br-sp {
        display: inline;
    }

    .br-pc {
        display: none;
    }
}

/* ----------------------------------------------------------------- */
/*                             Button                                */
/* ----------------------------------------------------------------- */

.button {
    --button-icon-size: 2rem;
    width: fit-content;
    min-width: 18.8rem;
    padding: 1.3rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-align: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    transition-property: background-color;


    &:hover {
        background-color: #002147;
    }

    &::before {
        content: '';
        display: block;
    }

    &::after {
        content: '';
        display: inline-block;
        margin-left: 0.5rem;
        background-image: url(../assets/images/common/btn-icon--blue.svg);
        width: var(--button-icon-size);
        aspect-ratio: 1;
        background-size: contain;
        background-repeat: no-repeat;
        justify-self: end;
    }

    &.--yellow {
        background-color: var(--accent-color);

        &:hover {
            background-color: #b38900;
        }

        &::after {
            background-image: url(../assets/images/common/btn-icon--yellow.svg);
        }
    }

    @media screen and (width <=800px) {
        --button-icon-size: 1.5rem;
        font-size: 1rem;
        padding: 1rem 2rem;
        max-width: 16.25rem;
        min-width: auto;
        width: 100%;
    }
}

/* ----------------------------------------------------------------- */
/*                           Section Title                           */
/* ----------------------------------------------------------------- */

.section-title {
    --font-color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;

    .en {
        font-size: clamp(2rem, 0.585rem + 3.77vw, 3rem);
        font-weight: 700;
        color: var(--font-color);
        letter-spacing: 0.1em;
        text-transform: uppercase;
        line-height: 1;
    }

    .ja {
        font-size: clamp(1.125rem, 0.877rem + 0.66vw, 1.3rem);
        font-weight: 500;
        color: var(--font-color);
        letter-spacing: 0.1em;
        margin-left: 1.5rem;
    }

    &::after {
        content: '';
        display: block;
        flex-grow: 1;
        height: 1px;
        background-color: var(--font-color);
        max-width: 144px;
    }

    &.--white {
        --font-color: var(--white-color);
    }

    @media screen and (width <=800px) {
        display: grid;
        grid-template-columns: auto 1fr;
        row-gap: 0;

        .en {
            grid-column: 1 / 3;
            grid-row: 1 / 2;
            text-align: left;
        }

        .ja {
            grid-column: 1/ 2;
            grid-row: 2/ 3;
            margin-left: 0;
        }

        &::after {
            grid-column: 2 / 3;
            grid-row: 2 / 3;
            align-self: center;
            height: 1px;
            max-width: none;
        }
    }
}

.section-title__lg {
    --font-color: var(--white-color);
    display: flex;
    flex-direction: column;
    align-items: center;

    .en {
        font-size: clamp(3.75rem, -1.557rem + 14.15vw, 7.5rem);
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        line-height: 1;
        color: var(--font-color);
        opacity: 0.2;
    }

    .ja {
        font-size: clamp(1.125rem, 0.594rem + 1.42vw, 1.5rem);
        font-weight: 500;
        letter-spacing: 0.1em;
        color: var(--font-color);
        margin-top: -2.5rem;
    }

    @media screen and (width <=800px) {
        .ja {
            margin-top: -2rem;
        }
    }

}

/* ----------------------------------------------------------------- */
/*                           Animation                               */
/* ----------------------------------------------------------------- */


.hover-effect--moveright {
    transform: translateX(0);
    transition-property: transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;

    &:hover {
        transform: translateX(0.5rem);
    }
}

.hover-effect--moveleft {
    transform: translateX(0);
    transition-property: transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;

    &:hover {
        transform: translateX(-0.5rem);
    }
}

.hover-effect--opacity {
    opacity: 1;
    transition: opacity 0.3s ease;

    &:hover {
        opacity: 0.7;
    }
}

/* ----------------------------------------------------------------- */
/*                           Header                                  */
/* ----------------------------------------------------------------- */

.site-header {
    background-color: var(--white-color);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    align-content: center;

    .site-header__inner {
        /* padding: 0.75rem; */
        padding: 1rem;
        padding-left: 2.5rem;
        padding-right: 4rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }

    .site-header__title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-color);
        margin: 0;
    }

    .site-header__title img {
        display: block;
        width: auto;
        /* height: 2.5rem; */
        height: 3rem;
        object-fit: contain;
    }

    .site-header__nav ul {
        display: flex;
        gap: clamp(2rem, calc(-0.123rem + 5.66vw), 3.5rem);
        /* min: 32px, max: 56px */
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .site-header__nav li {
        position: relative;
    }

    /* サブメニューがある項目に矢印インジケーターを追加 */
    .site-header__nav li.menu-item-has-children>a::after {
        content: '';
        display: inline-block;
        width: 0.5em;
        height: 0.5em;
        border-right: 2px solid var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        transform: rotate(45deg) translate(-0.1em, -0.25em);
        margin-left: 0.5em;
        transition: transform 0.3s ease;
    }

    .site-header__nav li .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background-color: var(--white-color);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        padding: 0.5rem 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        z-index: 10;
    }

    /* ホバー時とopen状態の両方でサブメニュー表示 */
    .site-header__nav li:hover .sub-menu,
    .site-header__nav li.submenu-open .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-header__nav .sub-menu li {
        list-style: none;
        font-size: 0.875rem;
    }

    .site-header__nav .sub-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
        white-space: nowrap;
        transition: background-color 0.2s ease;
    }

    .site-header__nav .sub-menu a:hover {
        background-color: rgba(0, 50, 100, 0.05);
    }

    .site-header__menu-button {
        display: none;
        width: 1rem;
        height: 100%;
        padding: 0;
        border: none;
        cursor: pointer;

        span {
            display: block;
            width: 100%;
            height: 3px;
            background-color: var(--primary-color);
            border-radius: 0.15rem;
        }

        span:first-child {
            width: 120%;
        }

        span:nth-child(3) {
            width: 80%;
        }
    }

    .site-header__nav__sp {
        display: none;
    }

    @media screen and (width <=1024px) {
        .site-header__inner {
            padding: 1rem 2rem;
        }
    }

    @media (width <=600px) {
        height: 3rem;

        .site-header__inner {
            padding: 0 1rem;
        }

        .site-header__title img {
            height: 1.5rem;
        }

        .site-header__nav {
            display: none;
        }

        .site-header__menu-button {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 4px;
        }

        .site-header__nav__sp {
            display: block;
            position: fixed;
            inset: 0;
            z-index: 9999;
            width: 100%;
            /* max-width: 25rem; */
            height: 100dvh;
            background-color: var(--primary-color);
            padding: 1rem;
            transform: translateX(100%);
            transition:
                transform 0.3s ease,
                opacity 0.3s ease;
            opacity: 0;

            .site-header__nav__sp__inner {
                height: 100%;
                background-color: var(--white-color);
                padding: 1rem 0.75rem;
                overflow-y: scroll;
            }

            .site-header__nav__sp__header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 1rem;
            }

            .site-header__nav__sp__logo {
                display: block;
                height: auto;

                img {
                    height: 2rem;
                }
            }

            .site-header__nav__sp__close-button {
                width: 1.25rem;
                aspect-ratio: 1;
                padding: 0;
                border: none;
                cursor: pointer;
                position: relative;

                span {
                    display: block;
                    width: 100%;
                    height: 3px;
                    background-color: var(--primary-color);
                    border-radius: 0.15rem;
                    position: absolute;
                    top: 50%;
                    left: 0;
                    transform-origin: center;
                }

                span:first-child {
                    transform: rotate(45deg);
                }

                span:last-child {
                    transform: rotate(-45deg);
                }
            }

            .site-header__nav__sp-list {
                margin-top: 1.75rem;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;

                >li>a {
                    display: block;
                    padding: 0.75rem 0;
                    border-bottom: 1px solid var(--primary-color);
                    line-height: 2;
                    font-size: 1.125rem;
                    font-weight: 500;
                }
            }

            .site-header__nav__sp-list .sub-menu {
                list-style: "- ";
                padding-left: 2.5rem;
                padding-bottom: 1rem;
                margin-top: 0.75rem;
                border-bottom: 1px solid var(--primary-color);

                >li>a {
                    display: inline-block;
                    letter-spacing: 0.1em;
                    margin-top: 0.25rem;
                }
            }

            .site-header__nav__sp__cta {
                margin-top: 2rem;

                .site-header__nav__sp__button.--yellow {
                    margin-top: 1rem;
                }

                .tel-container {
                    margin: 1.5rem 0;
                    letter-spacing: 0.1em;

                    .tel-container__link {
                        font-size: 2rem;
                        line-height: 1.5;
                        font-weight: 600;
                        font-family: var(--font-en);
                        text-decoration: none;
                        display: flex;
                        align-items: center;

                        &::before {
                            content: '';
                            display: inline-block;
                            width: 2rem;
                            aspect-ratio: 1;
                            background-image: url(../assets/images/common/tel-icon--white.png);
                            background-size: contain;
                            background-repeat: no-repeat;
                            margin-right: 0.5rem;
                            filter: invert(1);
                        }
                    }

                    small {
                        font-size: 0.875rem;
                        display: block;
                    }
                }
            }
        }
    }


    .site-header__nav__sp.open {
        transform: translateX(0);
        opacity: 1;
    }

}

/* .home .site-header {
    position: fixed;

    @media screen and (width <=600px) {
        position: sticky;
    }
} */


/* ----------------------------------------------------------------- */
/*                           Footer                                  */
/* ----------------------------------------------------------------- */

.site-footer {
    background-color: var(--primary-color);
    padding: 5rem 0 1rem;
    color: var(--white-color);

    .site-footer__inner {
        display: grid;
        grid-template-columns: 1fr 1.25fr;
        grid-template-rows: repeat(2, auto);
        row-gap: 2.5rem;
        column-gap: 2.5rem;
    }

    .site-footer__left {
        grid-area: 1 / 1 / 2 / 2;

        .site-footer__logo {
            background-color: var(--white-color);
            display: inline-block;
            padding: 1.25rem 1.75rem;

            img {
                display: block;
                width: auto;
                height: 4rem;
            }
        }

        .factory-list {
            margin-top: 2.5rem;
            list-style: none;
            padding: 0;
            line-height: 1.75;

            dt {
                font-weight: 500;
                letter-spacing: 0.05em;

                &:not(:first-of-type) {
                    margin-top: 1.5rem;
                }
            }

            dd {
                font-weight: 400;
                letter-spacing: 0.1em;

                small {
                    font-size: 0.7rem;
                }
            }
        }
    }

    .site-footer__right {
        grid-area: 1 / 2 / 2 / 3;

        .site-footer__nav {
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 1.5rem;
            column-gap: 4rem;
            height: 12rem;
            width: fit-content;

            .site-footer__nav-item {
                min-width: 11.25rem;
            }

            a {
                text-decoration: none;
                letter-spacing: 0.1em;
                line-height: 1.5;

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

        .site-footer__sub-nav {
            margin-top: 0.5rem;
            padding-left: 2rem;
            list-style: "-";

            li {
                margin-top: 0.5rem;
            }
        }

        .site-footer__button-container {
            margin-top: 3.5rem;
            display: flex;
            gap: 2.5rem 1rem;
            justify-content: space-between;
            flex-wrap: wrap;
        }

        .site-footer__button {
            border: 1px solid var(--white-color);
            min-width: auto;
        }
    }

    .site-footer__copyright {
        grid-area: 2 / 1 / 3 / 3;
        text-align: center;
        letter-spacing: 0.05em;
    }

    @media screen and (width <=800px) {
        .site-footer__right {
            .site-footer__nav {
                height: auto;
            }
        }
    }

    @media screen and (width <=600px) {
        .site-footer__inner {
            grid-template-columns: 1fr;
            grid-template-rows: auto auto auto;
            row-gap: 4rem;
        }

        .site-footer__left,
        .site-footer__right {
            grid-area: auto;
        }

        .site-footer__left {
            .site-footer__logo {
                width: 50%;
                padding: 0.75rem 1rem;

                img {
                    height: auto;
                }
            }

            .factory-list {
                margin-top: 2rem;

                dd small {
                    font-size: 0.625rem;
                }
            }
        }

        .site-footer__right {
            .site-footer__nav {

                .site-footer__nav-item {
                    min-width: auto;
                }

                a {
                    font-size: 1rem;
                }
            }

            .site-footer__sub-nav li {
                margin-top: 0.5em;
            }

            .site-footer__button-container {
                display: none;
            }
        }

        .site-footer__copyright {
            grid-area: auto;
            font-size: 0.625rem;
        }
    }
}

/* ----------------------------------------------------------------- */
/*                               CTA                                 */
/* ----------------------------------------------------------------- */

.cta-section {
    background-color: var(--primary-color);
    background-image: url(../assets/images/common/contact-bg.jpg);
    color: var(--white-color);
    background-size: cover;
    background-position: center;
    padding: 7.5rem 0;
    text-align: center;

    .cta-section-title {
        .en {
            font-size: clamp(3rem, 1.585rem + 3.77vw, 4rem);
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            line-height: 1;
        }

        .ja {
            font-size: clamp(1rem, 0.625rem + 1.25vw, 1.25rem);
            font-weight: 500;
            letter-spacing: 0.1em;
            margin-top: 0.25rem;
        }
    }

    .cta-section__tel {
        margin-top: 2rem;
        letter-spacing: 0.1em;
        width: fit-content;
        margin-inline: auto;

        .cta-section__tel__link {
            font-size: clamp(2rem, 0.939rem + 2.83vw, 2.75rem);
            font-weight: 600;
            font-family: var(--font-en);
            color: var(--white-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;

            &::before {
                content: '';
                display: inline-block;
                width: clamp(2.25rem, 1.189rem + 2.83vw, 3rem);
                aspect-ratio: 1;
                background-image: url(../assets/images/common/tel-icon--white.png);
                background-size: contain;
                background-repeat: no-repeat;
                margin-right: clamp(0.5rem, 0.263rem + 0.94vw, 0.75rem);
            }
        }

        small {
            font-size: clamp(0.875rem, 0.698rem + 0.47vw, 1rem);
            letter-spacing: 0.1em;
            display: block;
        }
    }

    .cta-section__button-container {
        margin-top: 3rem;
        display: flex;
        justify-content: space-around;
    }

    @media (width <=600px) {
        .cta-section__button-container {
            flex-direction: column;
            gap: 1.5rem;
            align-items: center;
        }
    }
}

/* ----------------------------------------------------------------- */
/*                               404                                 */
/* ----------------------------------------------------------------- */

.error-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 5rem 2rem;
}

.error-404__container {
    max-width: 600px;
    width: 100%;
}

.error-404__content {
    text-align: center;
}

.error-404__title {
    font-family: var(--font-en);
    font-size: clamp(6rem, 4rem + 5vw, 10rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin: 0;
    opacity: 0.2;
}

.error-404__subtitle {
    font-size: clamp(1.5rem, 1.25rem + 0.5vw, 2rem);
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 1rem;
    letter-spacing: 0.1em;
}

.error-404__text {
    font-size: clamp(1rem, 0.875rem + 0.25vw, 1.125rem);
    line-height: 2;
    color: var(--text-color);
    margin-top: 1.5rem;
}

.error-404__button-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}