/* オープニングレイヤー（ヘッダーの下だけ覆う） */
#opening{
    position: fixed;
    left: 0;
    /*top: 80px;*/
    width: 100%;
    height: calc(100% - 80px);
    z-index: 1; 
    overflow: hidden;
    animation: openingHide 4s ease-out 5s forwards;
}

@keyframes openingHide {
    0%{
        opacity: 1;
        transform: scale(1);
    }
    100%{
        opacity: 0;
        transform: scale(2);
    }
}

.mv{
    position : relative;
    height : 70vh;
    min-height : 480px;
    background-size : cover;
    background-position : center;
    display : flex;
    align-items : center;
    justify-content : center;
    overflow : hidden;
}
.mv-inner{
    position : relative;
    width : 90%;
    margin: auto;
    height : auto;
}
.mv-title{
    position : absolute;
    left : 50%;
    top : 50%;
    transform : translate(-50%,-40%);
    max-width : 80%;
    width: 650px;
}
.mv-sub{
    position : absolute;
    left : 50%;
    top : 50%;
    transform : translate(-50%,-65%) scale(1.3); /* 1.3倍に拡大 */
    height : auto;
    clip-path : inset(0 100% 0 0);
    animation : mvSubWrite 2.4s ease-out 1.6s forwards,mvSubShrink 0.8s ease-in 3.0s forwards;
}

.mv-glow{
    position : absolute;
    left : 40%;
    top : 50%;
    width : 150px;
    height : 150px;
    transform : translate(-140%,-100%) scale(0.2);
    pointer-events : none;
    opacity : 0;
    background : radial-gradient(circle,rgba(255,255,255,0.9) 0,rgba(255,255,255,0.0) 60%);
    mix-blend-mode : screen;
    animation : mvGlow 1.0s ease-out 3.8s forwards;
}
@keyframes mvTitleIn{
    0%{
        opacity : 0;
        transform : translate(-50%,-30%);
    }
    60%{
        opacity : 1;
        transform : translate(-50%,-50%);
    }
    100%{
        opacity : 0.85;  /* ← 最終状態を少し透過させる */
        transform : translate(-50%,-50%);
    }
}
@keyframes mvSubWrite{
    0%{
        clip-path : inset(0 100% 0 0);
    }
    100%{
        clip-path : inset(0 0 0 0);
    }
}

@keyframes mvSubShrink{
    0%{
        transform : translate(-50%,-65%) scale(1.3); /* .mv-sub の transform と同じ */
    }
    100%{
        transform : translate(-50%,-65%) scale(0.9); /* 好きな縮小率に調整可 */
    }
}

@keyframes mvGlow{
    0%{
        opacity : 0;
        transform : translate(-140%,-110%) scale(0.2);
    }
    60%{
        opacity : 1;
        transform : translate(-140%,-110%) scale(1.0);
    }
    100%{
        opacity : 1;
        transform : translate(-140%,-110%) scale(1.0);
    }
}
@media screen and (max-width : 767px){
    .mv{
        height : 60vh;
        min-height : 360px;
    }
    .mv-inner{
        width : 90%;
    }
    .mv-title{
        max-width : 90%;
    }
    .mv-sub{
        max-width : 80%;
    }
    .mv-glow{
        width : 90px;
        height : 90px;
    }
}

html.is-opening,
body.is-opening{
    overflow:hidden;
    height:100%;
    position:fixed;
    width:100%;
}
#opening.is-hidden{
    display:none;
}
.top-slider{
    position:relative;
    height:70vh;
    min-height:480px;
    overflow:hidden;
}
.top-slider__slide{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    opacity:0;
    transition:opacity 0.8s ease;
}
.top-slider__slide.is-active,
.top-slider__slide:first-child{
    opacity:1;
}
.top-slider__slide{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}
.top-slider__slide h2{
    color:#fff;
    font-size: 1.8em;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}
.top-slider__slide .homebtn{
    color: #fff;
    background-color: #d40000;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.arrow-right{
    width:0;
    height:0;
    border-top:8px solid transparent;
    border-bottom:8px solid transparent;
    border-left:12px solid #fff;
}
.top-slider::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:50px;
    pointer-events:none;
    background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,0.4) 100%);
}
.section-title-overlay{
    text-align: center;
    position: relative;
    z-index: 1;
}
.section-title-overlay img{
    height: auto;
    max-width: 80%;
}
#section-title-business{
    margin-top: -42px;
}
.section-title-sub{
    text-align: center;
    margin: 16px 0 32px;
    font-size: 1.5em;
    font-weight: bold;
}

.business-section{

}
.business-grid{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}
.business-card{
    display: block;
    text-decoration: none;
    color: #000;
}
.business-image{
    position: relative;
    width: 100%;
    padding-top: 80%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.business-card-min .business-image{
    padding-top: 40%;
}
.business-logo{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    max-width: 60%;
}
.business-text{
    font-size: 14px;
    line-height: 1.5;
}
.business-text--over{
    position: absolute;
    left: 50%;
    bottom: 0px;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    padding: 0;
    width: 100%;
}
.business-text--below{
    margin-top: 8px;
    text-align: center;
}

.quarity-section{
    margin: 0 auto;
    width: 100%;
    height: 60vh;
    background-image: url("/img/home/Generated2.jpg");
    background-size: cover;
    background-position: 65% center;
    position: relative;
    overflow: hidden;
}
.quarity-section::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/img/home/CAD_image2.jpg");
    background-size: cover;
    background-position: left center;
    mask-image: linear-gradient(105deg, #000 50%, transparent 50%);
    -webkit-mask-image: linear-gradient(105deg, #000 50%, transparent 50%);
}
#section-title-quarity{
    margin-top: 70px;
    margin-bottom: -15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.2) 100%) 0 -30px / 100% calc(100% + 15px) no-repeat;
}
#section-title-sub-quarity{
    color: #fff;
}
.quarity-section{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.quarity-section > *{
    position: relative;
    z-index: 1;
}
.quarity-section .section-title-sub{
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.quarity-section h3{
    text-align: center;
    color: #fff;
    font-size: 1.8em;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}
.quarity-section ul{
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    text-align: center;
}
.quarity-section ul li{
    display: inline-block;
    color: #fff;
    background-color: #d40000;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
}

#section-title-staff{
    margin-top: -50px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
}
#section-title-staff img{
    transform: translateY(6px);    
}
.staff-section{
    background-color: #C9CACA;
    position: relative;
    padding: 80px 10px 120px;
    box-sizing: border-box;
}
.staff-section .section-title-sub {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}
.staff-section #staff-catch span{
    color: #d40000;
    font-weight: bold;
}

.staff-loop{
    width: 100%;
    overflow: hidden;
    padding: 60px 0 30px;
}
.staff-track{
    display: flex;
    width: max-content;
    animation: staffScroll 25s linear infinite;
}
@keyframes staffScroll{
    0%{
        transform: translateX(0);
    }
    100%{
        transform: translateX(-50%);
    }
}
.staff{
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    width: 26vw;
    min-width: 260px;
    max-width: 340px;
    height: 60vh;
    min-height: 360px;
    max-height: 460px;
    margin-right: 20px;
    border: 1px solid #d0d0d0;
    background: none;
}
/* 左：画像要素 */
.staff-img{
    flex: 0 0 70%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 右：説明。背景色なし */
.staff-info{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 15px;
    font-size: 0.8rem;
    line-height: 1.7;
}
.staff-info.brown{
    border-left: 0.4rem solid #8c7b5a;
}
.staff-info.red{
    border-left: 0.4rem solid #c00;
}
/* メタ情報は横書き */
.staff-meta{
    writing-mode: horizontal-tb;
    margin-bottom: 1.2em;
}
.staff-meta .dept{
    font-size: 0.75rem;
    display: block;
}
.staff-meta .name{
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.3em;
    display: block;
}
.staff-meta .from{
    font-size: 0.7rem;
    color: #c00;
    margin-top: 0.3em;
    display: block;
}
/* 本文だけ縦書き */
.staff-text{
    margin: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.8rem;
    line-height: 1.9;
}


#section-title-oem{
    margin-top: -55px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.3) 100%);
}
#section-title-oem img{
    transform: translateY(11px);    
}
.oem-section{
    background-color: #d40000;
    position: relative;
    padding: 80px 10px 100px;
    box-sizing: border-box;
}
.oem-section .section-title-sub {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}
.oem-image{
    position: relative;
}
.oem-image img{
    display: block;
    width: 100%;
    height: auto;
}
.oem-image h4{
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    font-size: 1.4em;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}


#section-title-news{
    margin-top: -50px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.3) 100%);
    margin-bottom: 20px;    
}
#section-title-news img{
    transform: translateY(11px);    
}
.news-section{
    position: relative;
    padding: 40px 10px 100px;
    box-sizing: border-box;
    color: #8c7b5a;
}
.news_flex{
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}
.news_flex .news_box{
    width: 45%;
    border: 1px solid #8c7b5a;
    border-radius: 20px;
    padding: 20px 30px;
    box-sizing: border-box;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}
.news_flex .news_box .thumb{
    background-size: cover;
    background-position: center;
    aspect-ratio: 6/4;
}
.news_flex .news_box .news_left{
    width: 50%;
}
.news_flex .news_box .news_right{
    width: 45%;
}
.news_flex .news_box .news_right p{
    margin: 0 0 10px;
}
.news-section #archive{
    margin-top: 30px;
}
.news-section #archive a{
    color: #8c7b5a;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.arrow-circle{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #8c7b5a;
    position: relative;
}
.arrow-circle::before{
    content: "";
    position: absolute;
    top: 50%;
    left: 45%;
    width: 6px;
    height: 6px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

@media screen and (max-width:767px){
    .top-slider{
        height:60vh;
        min-height:360px;
    }
    .top-slider__slide h2{
        font-size: 1.2em;
    }
    .section-title-overlay{
        margin-top: -40px;
    }

    .business-section{
        overflow: hidden;
        padding: 0;
    }
    .business-grid{
        display: flex;
        width: max-content;
        transition: transform 0.6s ease;
        gap: 0;
    }
    .business-col{
        display: flex;
        flex-direction: column;
        width: 46vw;
        padding: 2vw;
    }
    .business-card{
        width: 100%;
    }
    .business-card-min{
        margin-top: 20px;
    }
    .business-text--over{
        font-size: 0.8em;
        line-height: 1.2em;
        margin: 0 0 5px;
    }
    .business-text--below{
        font-size: 0.8em;
    }

    .section-title-sub {
        margin: 10px 0 25px;
        font-size: 1.1em;
    }
    #section-title-quarity{
        margin-top: 30px;
        margin-bottom: -10px;
        background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.2) 100%) 0 0 / 100% calc(100% + 1px) no-repeat;
    }
    .quarity-section{
        height: 50vh;
    }
    .quarity-section h3{
        font-size: 1.1em;
        margin: 0 0 20px;
    }
    .quarity-section ul li{
        padding: 2px 5px;
        font-size: 0.8em;
        margin: 0 2px;
    }

    .staff-section{
        padding: 60px 10px 100px;
    }
    #staff-catch{
        font-size: 0.8em;
    }
    .staff-loop{
        padding: 40px 0 0;
    }
    .staff-img{
        flex-basis: 65%;
    }

    #section-title-oem img,
    #section-title-news img{
        max-width: 40%;
    }
    .oem-section{
        padding: 60px 10px 80px;
    }
    .oem-image h4{
        font-size: 0.9em;
    }

    #section-title-news{
        margin-top: -30px;
    }
    .news-section{
        padding: 20px 10px 60px;
    }
    .news_flex{
        display: block;
    }
    .news_flex .news_box{
        width: 100%;
        padding: 15px 20px;
        margin-bottom: 20px;
    }
}

