/*===========================================================================*/
/*  mv  */
/*===========================================================================*/
.p-topMv {
    padding: 3rem 4rem 21.4rem;
    position: relative;
    background: url('../img/top/mv-bg.webp') no-repeat center center/cover;
}
.p-topMv::before {
    background: url('../img/top/mv-deco.webp') no-repeat center center/cover;
    content: '';
    height: 20.6rem;
    left: 0;
    position: absolute;
    bottom: -.1rem;
    width: 100%;
}

.p-topMv__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.p-topMv__left {
    position: sticky;
    top: 3rem;
    width: 46.2rem;
    height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 75.6rem;
}

.p-topMv__descEn {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.46;
    padding-top: 10rem;
}

.p-topMv__imgs {
    position: relative;
    overflow: hidden;
    aspect-ratio: 462/298;
}

.p-topMv__img {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 0;
    overflow: hidden;
    transition: opacity 1.5s ease;
}
.p-topMv__img.is-standby {
    opacity: 1;
    z-index: 1;
}
.p-topMv__img.is-active {
    opacity: 1;
    z-index: 2;
}
.p-topMv__img.is-leaving {
    opacity: 0;
    z-index: 3;
}

.p-topMv__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 5s linear;
}
.p-topMv__img.is-active img {
    transform: scale(1);
}
.p-topMv__img.is-leaving img {
    transform: scale(1);
}

.p-topMv__imgs--bar {
    position: absolute;
    width: 100%;
    z-index: 10;
    bottom: 0;
    left: 0;
    height: .3rem;
    overflow: hidden;
}
.p-topMv__imgs--bar::before {
    background-color: #fff;
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    bottom: 0;
    width: 0;
}
.p-topMv__imgs--bar.is-run::before { 
    animation: topMvBar 4.8s linear forwards;
}

@keyframes topMvBar { 
    from {
        width: 0;
    }
    to {width: 100%;
    }
}

.p-topMv__right {
    width: 79.9rem;
}

.p-topMv__right--upper {
    height: calc(100vh + 3.1rem);
    padding-bottom: 8rem;
    border-bottom: #fff solid .1rem;
    display: flex;
    align-items: flex-end;
    min-height: 80.6rem;
}

.p-topMv__head {
    width: 101.2%;
}

.p-topMv__txts {
    position: relative;
    padding-top: 7.5rem;
}

.p-topMv__txts--headEn {
    position: absolute;
    right: 0;
    top: 8.4rem;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.p-topMv__txts--head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.6;
}
.p-topMv__txts--head.sp-only {
    display: none;
}

.p-topMv__txts--head .--bg {
    position: relative;
    z-index: 2;
    padding: 0 .6rem;
}

.p-topMv__txts--head .--bg::before {
    background-color: #fff;
    content: '';
    height: calc(100% - 1.4rem);
    left: 0;
    position: absolute;
    top: .9rem;
    width: 100%;
    z-index: -1;
}

.p-topMv__txts--txt {
    margin-top: 4.5rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.p-topMv__txts--txt p {
    color: #fff;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.5;
}

.p-topMv__txts--txt p .u-color-red {
    position: relative;
    z-index: 2;
    margin-left: 1rem;
}

.p-topMv__txts--txt p .u-color-red::before {
    background-color: #fff;
    content: '';
    height: 3.8rem;
    left: -.4rem;
    position: absolute;
    top: .8rem;
    width: calc(100% + .6rem);
    z-index: -1;
}

.p-topMv__subHead {
    width: 70.4rem;
    margin-top: 5rem;
}

@media screen and (max-width: 900px) {
    .p-topMv {
        padding: 2rem 0 8.8rem;
        background: url('../img/top/mv-bg-sp.webp') no-repeat center center/cover;
    }
    .p-topMv::before {
        display: none;
    }

    .p-topMv__inner {
        display: block;
    }

    .p-topMv__left {
        position: relative;
        top: unset;
        width: 100%;
        height: auto;
        display: block;
        min-height: unset;
        padding: 0 2rem;
    }

    .p-topMv__logo {
        width: 21.6rem;
    }

    .p-topMv__descEn {
        font-size: 1rem;
        padding-top: 2.4rem;
    }

    .p-topMv__imgs {
        margin: 1.8rem 0 0 auto;
        width: 32.5rem;
    }

    .p-topMv__imgs--bar {
        height: .2rem;
    }

    .p-topMv__right {
        width: 100%;
        margin-top: 6.3rem;
    }

    .p-topMv__right--upper {
        height: auto;
        padding-bottom: 0;
        border-bottom: none;
        display: flex;
        align-items: flex-end;
        min-height: unset;
    }

    .p-topMv__head {
        width: 32.4rem;
        margin: 0 0 0 auto;
        padding-right: 1.6rem;
    }

    .p-topMv__txts {
        position: relative;
        padding: 3rem 1.2rem 0 5rem;
    }

    .p-topMv__txts--headEn {
        right: unset;
        left: -2rem;
        top: 7.3rem;
        font-size: 1.3rem;
        transform: rotate(90deg);
    }

    .p-topMv__txts--head {
        font-size: 2.6rem;
        line-height: 1.5;
    }
    .p-topMv__txts--head.sp-only {
        display: flex;
    }
    .p-topMv__txts--head.pc-only {
        display: none;
    }

    .p-topMv__txts--head .--bg {
        padding: 0 .2rem;
    }

    .p-topMv__txts--head .--bg::before {
        height: calc(100% - .9rem);
        top: .6rem;
    }

    .p-topMv__txts--txt {
        margin-top: 1.6rem;
        gap: 2.8rem;
    }

    .p-topMv__txts--txt p {
        font-size: 2rem;
    }

    .p-topMv__txts--txt p .u-color-red::before {
        height: 2.5rem;
        left: -.4rem;
        top: .4rem;
        width: calc(100% + .6rem);
        z-index: -1;
    }

    .p-topMv__subHead {
        width: 29rem;
        margin-top: 3rem;
    }
}

/*===========================================================================*/
/*  service  */
/*===========================================================================*/
.p-topService {
    padding-top: 10.2rem;
    padding-bottom: 12rem;
}

.p-topService__slide {
    overflow: hidden;
    display: flex;
}

.p-topService__slide--txt {
    flex-shrink: 0;
    padding-right: 7rem;
    animation: slideAnimation 38s linear infinite;
}

.p-topService__slide--txt .--txt {
    font-size: 24rem;
    font-weight: 700;
    line-height: .8;
    letter-spacing: -.02em;
    background: linear-gradient(126deg, #CC0700 0%, #EA684E 33.17%, #CC0700 66.83%, #EA684E 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    transform: skewX(-8.4deg);
}

@media (prefers-reduced-motion: reduce) {
    .p-topService__slide--txt {
        animation: none;
    }
}

.p-topService__content {
    margin-top: 14rem;
    position: relative;
}

.p-topService__content--num {
    position: relative;
    padding-left: 2.2rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}
.p-topService__content--num::before {
    background: url('../img/common/head-deco.webp') no-repeat center center/contain;
    content: '';
    height: .4rem;
    left: 0;
    position: absolute;
    top: .5rem;
    width: 1.4rem;
}

.p-topService__content--head {
    margin-top: 2rem;
    font-size: 8.8rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.p-topService__content--subHead {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    margin-top: 1.5rem;
}

.p-topService__content--txts {
    margin-top: 2.7rem;
    display: flex;
    gap: 9.9rem;
}

.p-topService__content--txts h4 {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.3;
}

.p-topService__content--txts p {
    width: 40.6rem;
    text-align: justify;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .02em;
}

.p-topService__content--img {
    position: absolute;
    width: 40.2rem;
    right: 0;
    bottom: -.9rem;
}

.p-topService__content02 {
    margin-top: 6.9rem;
    border-top: #c2c2c2 solid .1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.p-topService__content02--headEn {
    padding-top: 4rem;
    width: 32.7rem;
    color: #c2c2c2;
    font-size: 1.8rem;
    line-height: 1.1;
}

.p-topService__content02--headEn span {
    font-weight: 700;
}

.p-topService__content02--list {
    width: calc(100% - 32.7rem);
}

.p-topService__content02--list li {
    position: relative;
    padding: 4rem 0 4.3rem;
    border-bottom: #c2c2c2 solid .1rem;
}

.p-topService__content02--head {
    margin-top: 1.2rem;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.2;
}

.p-topService__content02--subHead {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    margin-top: 1.2rem;
}

.p-topService__content02--txts {
    width: 45.8rem;
    margin: -6.2rem 0 0 auto;
}

.p-topService__content02--icon {
    position: absolute;
    width: 6.3rem;
    left: 0;
    top: 4rem;
}

.p-topService__content02--txts h4 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
}

.p-topService__content02--txts p {
    margin-top: 1.2rem;
    text-align: justify;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .02em;
}

.p-topService__btn {
    margin-top: 4rem;
    text-align: right;
}

@media screen and (max-width: 900px) {
    .p-topService {
        padding-top: 4.5rem;
        padding-bottom: 5rem;
    }

    .p-topService__slide--txt {
        flex-shrink: 0;
        padding-right: 3.5rem;
        animation: slideAnimation 28s linear infinite;
    }

    .p-topService__slide--txt .--txt {
        font-size: 12rem;
    }

    .p-topService__content {
        margin-top: 6.5rem;
    }

    .p-topService__content--num {
        font-size: 1.2rem;
    }
    .p-topService__content--num::before {
        top: .3rem;
    }

    .p-topService__content--head {
        margin-top: 1.5rem;
        font-size: 4rem;
    }

    .p-topService__content--subHead {
        margin-top: 1.2rem;
    }

    .p-topService__content02--subHead {
        margin-top: 1rem;
    }

    .p-topService__content--txts {
        margin-top: 2.5rem;
        display: block;
        padding-left: 5.6rem;
    }

    .p-topService__content--txts h4 {
        font-size: 2rem;
    }

    .p-topService__content--txts p {
        width: 100%;
        font-size: 1.4rem;
        margin-top: .6rem;
    }

    .p-topService__content--img {
        position: relative;
        width: 100%;
        right: unset;
        bottom: unset;
        margin-top: 16px;
    }

    .p-topService__content02 {
        margin-top: 2.5rem;
        display: block;
    }

    .p-topService__content02--headEn {
        display: none;
    }

    .p-topService__content02--list {
        width: 100%;
    }

    .p-topService__content02--list li {
        padding: 2.5rem 0 3rem;
    }

    .p-topService__content02--head {
        margin-top: 1rem;
        font-size: 2.8rem;
    }

    .p-topService__content02--txts {
        width: 100%;
        margin: 1.8rem 0 0;
        padding-left: 5.6rem;
        position: relative;
    }

    .p-topService__content02--icon {
        width: 4rem;
        top: .5rem;
    }

    .p-topService__content02--txts h4 {
        font-size: 1.8rem;
    }

    .p-topService__content02--txts p {
        margin-top: .8rem;
        font-size: 1.2rem;
    }

    .p-topService__btn {
        margin-top: 2rem;
        text-align: center;
    }
}

/*===========================================================================*/
/*  story  */
/*===========================================================================*/
#page-top .c-story {
    padding-top: 15rem;
}

@media screen and (max-width: 900px) {
    #page-top .c-story {
        padding-top: 7rem;
    }
}

/*===========================================================================*/
/*  company  */
/*===========================================================================*/
/* story / company / contact を1つのシーンとして重ね、
   company の横スクロール中も上下のセクションを見切れさせて表示する。
   --peek = 上下に残す見切れ量。
   --exit = 横スクロール完了後、上の見切れを画面外へ送り切るための追加スクロール量。
            この区間を挟むことで company が押し上げられる前に上の要素が消え切る。 */
.p-topScene {
    --peek: 12vh;
    --exit: 12vh;
    position: relative;
    isolation: isolate; /* 内側の重なり順を外に漏らさない */
}

/* 上：story の下端だけを画面上部に残す（top の実値は JS が -(高さ - --peek) を代入） */
#page-top .p-topScene > .p-topScene__pin > .c-story {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 下：contact の上端だけを画面下部に先出しする（bottom の実値も JS が代入）。
   story セクション閲覧中は translateY で隠しておき、
   company が画面いっぱいになってから JS がスクロール連動で出し入れする。 */
#page-top .p-topScene > .c-contact {
    position: sticky;
    bottom: 0;
    z-index: 3;
    transform: translateY(var(--peek));
}

/* company の箱は上下の見切れ部分まで覆うので、そこはクリックを透過させる */
#page-top .p-topScene .p-topCompany {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

#page-top .p-topScene .p-topCompany__upper,
#page-top .p-topScene .p-topCompany__lower {
    pointer-events: auto;
}

.p-topCompany {
    height: calc(300vh + var(--exit, 0px));
}

.p-topCompany__content {
    height: 100vh;
    padding: var(--peek, 0px) 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: clamp(0rem, calc(100vh - var(--peek, 0px) * 2 - 57.6rem), 8rem);
    position: sticky;
    top: 0;
}

/* シーン演出（100vh固定 + 上下の見切れ）を無効化するケース
   ・PC の極端な横長（縦に収まらないためのフォールバック）
   ・SP（手動の横スクロールに切り替える）
   JS 側は content / story が sticky でなくなった時点で
   インラインの transform・オフセットを自動で解除する。 */
@media (min-width: 901px) and (min-aspect-ratio: 5/2), screen and (max-width: 900px) {
    .p-topScene {
        --peek: 0px;
        --exit: 0px;
    }
    #page-top .p-topScene > .p-topScene__pin > .c-story,
    #page-top .p-topScene > .c-contact {
        position: static;
        transform: none;
    }
    #page-top .p-topScene .p-topCompany {
        pointer-events: auto;
    }
    .p-topCompany {
        height: auto;
    }
    .p-topCompany__content {
        height: auto;
        padding: 0;
        position: static;
    }
}

@media (min-width: 901px) and (min-aspect-ratio: 5/2) {
    .p-topCompany {
        padding: 5rem 0;
    }
    .p-topCompany__content {
        gap: 3rem;
    }
    .p-topCompany__lower {
        overflow: visible;
    }
    .c-pages__list {
        flex-direction: column;
        align-items: center;
    }
}

.p-topCompany__upper {
    top: 0;
    z-index: 2;
}

.p-topCompany__head  {
    font-size: 18rem;
    font-weight: 700;
    line-height: .8;
    letter-spacing: -.04em;
}

.p-topCompany__head .u-color-linear {
    padding-right: 1rem;
}

.p-topCompany__lower {
    overflow: hidden;
}

.p-topCompany__lower--inner {
    padding: 0 6rem;
}

@media screen and (max-width: 900px) {
    /* SP は固定せず、他セクションと同じ間隔で流す */
    .p-topCompany {
        padding: 7rem 0;
    }

    .p-topCompany__content {
        gap: 3rem;
    }

    .p-topCompany__head  {
        font-size: 6.6rem;
    }

    /* カードは指でなぞって送る手動スクロールにする */
    .p-topCompany__lower {
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .p-topCompany__lower::-webkit-scrollbar {
        display: none;
    }

    .p-topCompany__lower--inner {
        width: max-content; /* 末尾の余白もスクロール幅に含める */
        padding: 0 2rem;
    }
}

/*===========================================================================*/
/*  recruit  */
/*===========================================================================*/
.p-topRecruit {
    margin-top: 12rem;
    padding: 60.1rem 6rem 0;
    height: 86.7rem;
    position: relative;
    overflow: hidden;
}

@keyframes topRecruitBgSlide {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-176rem - .15rem)); }
}

.p-topRecruit__bg--slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    gap: .15rem;
    left: 0;
    top: 0;
    animation: topRecruitBgSlide 40s linear infinite;
}

.p-topRecruit__bg {
    width: 176rem;
    min-width: 176rem;
}

.p-topRecruit__logo {
    position: absolute;
    width: 21.2rem;
    top: 5.5rem;
    right: 6rem;
}

.p-topRecruit__head {
    width: 100.2rem;
    position: absolute;
    left: 6rem;
    bottom: 5rem;
    z-index: 2;
}

.p-topRecruit__txt {
    color: #fff;
    text-align: right;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.p-topRecruit__link--wrap {
    margin-top: 7rem;
    text-align: right;
    position: relative;
    z-index: 2;
}

.p-topRecruit__link {
    display: inline-flex;
    align-items: center;
    gap: 1.8rem;
}

.p-topRecruit__link .c-moreBtn__txt {
    color: #fff;
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
    text-transform: uppercase;
}
.p-topRecruit__link .c-moreBtn__txt .h-txt-line::before {
    height: .2rem;
    background-color: #fff;
}

.p-topRecruit__link .c-moreBtn__arrow {
    width: 4rem;
    height: 4rem;
    background-color: #fff;
    border-radius: .3rem;
}

.p-topRecruit__link .c-moreBtn__arrow svg {
    width: 1.2rem;
    height: 1.2rem;
}

@media screen and (max-width: 900px) {
    .p-topRecruit {
        margin-top: 6rem;
        padding: 28.7rem 0 0;
        height: auto;
        position: relative;
        overflow: hidden;
    }
    .p-topRecruit::before {
        background: url('../img/top/carrer-deco.webp') no-repeat center center/contain;
        content: '';
        height: 26.6rem;
        left: 0;
        position: absolute;
        bottom: 0;
        width: 37.5rem;
        z-index: 1;
    }

    .p-topRecruit__bg--slide {
        height: 26rem;
        gap: .05rem;
        z-index: 0;
        animation-name: topRecruitBgSlideSp;
    }
    @keyframes topRecruitBgSlideSp {
        from { transform: translateX(0); }
        to   { transform: translateX(calc(-52.8rem - .05rem)); }
    }

    .p-topRecruit__bg {
        width: 52.8rem;
        min-width: 52.8rem;
    }

    .p-topRecruit__logo {
        width: 6.8rem;
        top: unset;
        bottom: 11.7rem;
        left: 2rem;
        right: unset;
    }

    .p-topRecruit__head {
        width: 34.7rem;
        left: 2rem;
        bottom: 14.7rem;
    }

    .p-topRecruit__txt {
        padding-right: 2rem;
        font-size: 1.4rem;
        line-height: 1.5;
    }

    .p-topRecruit__link--wrap {
        margin-top: 2rem;
        text-align: center;
        padding: 1.5rem 0;
        border-top: #fff solid .1rem;
    }

    .p-topRecruit__link {
        gap: 1rem;
    }

    .p-topRecruit__link .c-moreBtn__txt {
        font-size: 1.3rem;
    }

    .p-topRecruit__link .c-moreBtn__arrow {
        width: 1.8rem;
        height: 1.8rem;
        border-radius: .2rem;
    }

    .p-topRecruit__link .c-moreBtn__arrow svg {
        width: .6rem;
        height: .6rem;
    }

    .p-topRecruit__link .c-moreBtn__arrow svg path {
        fill: #DF4133;
    }
}

/*===========================================================================*/
/*  news  */
/*===========================================================================*/
.p-topNews {
    padding-top: 15rem;
    padding-bottom: 12rem;
}

.p-topNews__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.p-topNews__head {
    width: 45.7rem;
    font-size: 8rem;
    font-weight: 700;
    line-height: .8;
    letter-spacing: -.04em;
}

.p-topNews__content {
    width: calc(100% - 45.7rem);
}

.p-topNews__list li {
    padding: 3rem 0;
    border-bottom: #c2c2c2 solid .1rem;
}
.p-topNews__list li:nth-of-type(1) {
    padding-top: 0;
}

.p-topNews__list--link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-topNews__list--img {
    width: 17.8rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: .4rem;
    flex-shrink: 0;
}
.p-topNews__list--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s 0s cubic-bezier(.4,.53,.41,.95);
}

.p-topNews__list--txts {
    width: 65.5rem;
}

.p-topNews__list--date {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: .8;
    letter-spacing: -.03em;
}

.p-topNews__list--head {
    margin-top: 1.2rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .02em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.p-topNews__list--head span {
    display: inline;
    background-image: linear-gradient(#121212, #121212); 
    background-position: 0 100%;
    background-size: 0 .1rem;
    background-repeat: no-repeat;
    transition: all .6s 0s cubic-bezier(.4,.53,.41,.95);
}

.p-topNews__btn {
    margin-top: 4rem;
    text-align: right;
}

@media screen and (min-width: 901px) {
    .p-topNews__list--link:hover .p-topNews__list--img img {
        transform: scale(1.06);
    }

    .p-topNews__list--link:hover .p-topNews__list--head span {
        background-size: 100% .1rem; 
        color: #838383;
        background-image: linear-gradient(#838383, #838383);
    }
}

@media screen and (max-width: 900px) {
    .p-topNews {
        padding-top: 6rem;
        padding-bottom: 5rem;
    }

    .p-topNews__inner {
        display: block;
    }

    .p-topNews__head {
        width: 100%;
        font-size: 5.5rem;
    }

    .p-topNews__content {
        width: 100%;
        margin-top: 40px;
    }

    .p-topNews__list li {
        padding: 2rem 0;
    }

    .p-topNews__list--img {
        width: 12.7rem;
        aspect-ratio: 16 / 9;
        border-radius: .2rem;
    }

    .p-topNews__list--txts {
        width: 19rem;
    }

    .p-topNews__list--date {
        font-size: 1rem;
    }

    .p-topNews__list--head {
        margin-top: 1rem;
        font-size: 1.4rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .p-topNews__btn {
        text-align: center;
    }
}