/* --- Layout Colors --- */
:root {
    --primary-blue: #01408C;
    --accent-red: #843B5C;
    --white: #fff;
}

/* --- Reset CSS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@property --gradient-color {
    syntax: '<color>';
    initial-value: var(--accent-red);
    inherits: false;
}

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

html, body{
    overflow: inherit;
}

#special_page{
    overflow: inherit;
    .mv{
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        .mv_inner{
            max-width: 645px;
            width: 90%;
            .head{
                clip-path: inset(0 100% 0 0);
                background-color: #fff;
                transition: .4s ease-out;
                &.is-active{
                    clip-path: inset(0% 0px 0px);
                }
                .imghead{
                    display: block;
                    clip-path: inset(0 100% 0 0);
                    transition: .4s ease-out;
                    &.is-active{
                        clip-path: inset(0% 0px 0px);
                    }
                }
            }
            .mv-fade-txt{
                display: inline-block;
                clip-path: inset(0 100% 0 0);
                transition: .4s ease-out 1s;
                &.is-active{
                    clip-path: inset(0% 0px 0px);
                }
            }
            .txt{
                margin-top: 16px;
                font-size: 18px;
                font-weight: 700;
                line-height: 2;
                letter-spacing: .04em;
                @media (max-width: 896px) {
                    font-size: 15px;
                }
            }
        }
    }
    .warpper {
        overflow: clip; /* 3Dのハみ出しによる横スクロール防止 */
    }

    /* 各セクションの全体の高さを 300vh にします。
    100vh分: omoteが見えるタメ
    100vh分: 回転する期間
    100vh分: uraが見えるタメ
    */
    .content {
        width: 100vw;
        height: 300vh; 
        position: relative;
    }

    /* 画面に固定されて回転アニメーションを行うコンテナ */
    .content-inner {
        position: sticky;
        top: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        perspective: 1000px; /* 3Dの奥行き */

        /* 回転する要素の共通設定 */
        .item {
            position: absolute;
            width: 100vw;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            font-weight: bold;
            border-radius: 10px;
            backface-visibility: hidden;
            will-change: transform, clip-path; /* clip-pathも最適化対象に */
            /* background-size: auto 100%; */
            background-size: cover;
            background-position: center;
            @media (max-width: 896px) {
                padding: 0 3%;
                background-size: auto 100%;
            }
        }

        /* 表側のスタイル */
        .item.omote {
            transform: rotateY(0deg);
            &.bg01{
                background-image: url(../../img/special/bg_omote01.webp);
            }
            &.bg02{
                background-image: url(../../img/special/bg_omote02.webp);
            }
            &.bg03{
                background-image: url(../../img/special/bg_omote03.webp);
            }
            &.bg04{
                background-image: url(../../img/special/bg_omote04.webp);
            }
            &.bg05{
                background-image: url(../../img/special/bg_omote05.webp);
            }
        }

        /* 裏側のスタイル */
        .item.ura {
            position: relative;
            transform: rotateY(180deg);
            clip-path: circle(0% at 50% 50%);
            &.bg01{
                background-image: url(../../img/special/bg_ura01.webp);
            }
            &.bg02{
                background-image: url(../../img/special/bg_ura02.webp);
            }
            &.bg03{
                background-image: url(../../img/special/bg_ura03.webp);
            }
            &.bg04{
                background-image: url(../../img/special/bg_ura04.webp);
            }
            &.bg05{
                background-image: url(../../img/special/bg_ura05.webp);
            }
            .copyarea{
                position: absolute;
                bottom: 64px;
                right: 96px;
                @media (max-width: 896px) {
                    bottom: 24px;
                    right: 5%;
                }
                &.is-active{
                    .bg-filler{
                        clip-path: inset(0% 0px 0px);
                    }
                    .text-wrapper{
                        .line{
                            clip-path: inset(0% 0px 0px);
                        }
                    }
                }
                .bg-filler{
                    clip-path: inset(0 100% 0 0);
                    transition: .4s ease-out;
                }
                .text-wrapper{
                    .text-content{
                        padding: 0px 6px;
                        transition: .4s ease-out;
                    }
                    .line{
                        clip-path: inset(0 100% 0 0);
                        transition: .5s ease-out .45s;
                    }
                    .highlight_txt{
                        background: linear-gradient(90deg, #003F8C, #D71918);
                        -webkit-background-clip: text;
                        background-clip: text;
                        -webkit-text-fill-color: transparent;
                        color: transparent;
                        font-size: 22px;
                        font-weight: 800;
                        -webkit-font-smoothing: initial;
                        @media (max-width: 896px) {
                            font-size: 18px;
                        }
                    }
                }
            }
        }
    }

    .epilogue{
        margin-top: 176px;
        @media (max-width: 896px) {
            margin-top: 88px;
        }
        .epilogue_textarea{
            max-width: 1136px;
            width: 90%;
            margin: auto;
            .copyarea{
                .w60{
                    @media (max-width: 896px) {
                        width: 68%;
                    }
                }
            }

            .txt{
                margin-top: 40px;
                font-size: 20px;
                font-weight: 700;
                line-height: 2;
                letter-spacing: .04em;
                @media (max-width: 896px) {
                    margin-top: 20px;
                    font-size: 15px;
                }
            }
        }
        .epilogue__content{
            margin-top: 260px;
            @media (max-width: 896px) {
                margin-top: 80px;
            }
            .head{
                position: relative;
                z-index: 2;
                max-width: 642px;
                margin: auto;
            }
            .inner{
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                max-width: 1128px;
                margin: auto;
                .txt{
                    width: calc(296/1128*100%);
                    margin: -28px -18px;
                    @media (max-width: 896px) {
                        width: calc(196 / 393 * 100%);
                        margin: -12px;
                    }
                }
            }
        }
    }

    .recruit_cta{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 236px;
        margin-top: 180px;
        background-image: url(../../img/special/bg_recruit.png);
        background-size: cover;
        background-position: center;
        @media (max-width: 896px) {
            height: 70vw;
            margin-top: 90px;
        }
        .head{
            font-size: 48px;
            font-weight: 700;
            line-height: 1.6;
            letter-spacing: .04em;
            text-align: center;
            @media (max-width: 896px) {
                font-size: 24px;
            }
        }
        .btn{
            position: relative;
            display: block;
            width: 284px;
            padding: 24px 20px;
            margin: 8px auto 0;
            background-color: #fff;
            border-radius: 50px;
            font-size: 18px;
            font-weight: 700;
            transition: .5s ease-out;
            @media (max-width: 896px) {
                padding: 16px 20px;
                margin-top: 12px;
            }
            &:hover{
                background: linear-gradient(90deg, #003F8C, #D71918);
                .highlight_txt{
                    background: transparent;
                    -webkit-background-clip: inherit;
                    background-clip: inherit;
                    -webkit-text-fill-color: #fff;
                    color: #fff;
                }
                .arrow{
                    background: #fff;
                    &:before{
                        background-image: url(../../img/common/icon_arrow_link_grad.svg);
                    }
                }
            }
            .highlight_txt{
                background: linear-gradient(90deg, #003F8C, #D71918);
                -webkit-background-clip: text;
                background-clip: text;
                -webkit-text-fill-color: transparent;
                color: transparent;
                font-weight: 700;
                transition: .5s ease-out;
            }
            .arrow{
                position: absolute;
                top: 50%;
                right: 10px;
                translate: 0 -50%;
                width: 52px;
                height: 52px;
                border-radius: 50%;
                background: linear-gradient(90deg, #003F8C, #D71918);
                transition: .5s ease-out;
                @media (max-width: 896px) {
                    width: 42px;
                    height: 42px;
                }
                &:before{
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    translate: -35% -50%;
                    width: 16px;
                    height: 16px;
                    background-image: url(../../img/common/icon_arrow_link.svg);
                    background-size: auto 100%;
                    background-position: center;
                    background-repeat: no-repeat;
                }
            }
        }
    }
}