/* Opening Movie Styles */

/* クロスフェード時に動画を absolute 配置するための位置コンテキスト */
.l-contents {
    position: relative;
}

.c-opening-movie {
    position: relative;
    width: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.95);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.c-opening-movie.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* クロスフェード時: 動画を absolute にしてレイアウトから切り離し KV と重ねる */
.c-opening-movie.leaving {
    position: absolute;
    top: 184px; /* PC ヘッダー高さ */
    left: 0;
    width: 100%;
    z-index: 1;
}

@media screen and (max-width: 1024px) {
    .c-opening-movie.leaving {
        top: 64px; /* SP ヘッダー高さ */
    }
}

.c-opening-movie.hidden {
    display: none;
}

.c-opening-movie__container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6.8;
    /* overflow: hidden; */
}

.c-opening-movie__vimeo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.c-opening-movie__vimeo iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.c-opening-movie__vimeo--pc {
    display: block;
}

.c-opening-movie__vimeo--sp {
    display: none;
}

.c-opening-movie__skip {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #fff;
    padding: 12px 24px;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.c-opening-movie__skip:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.c-kv-1 {
    /* overflow: hidden; */
    height: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.c-kv-1.show {
    height: fit-content;
    opacity: 1;
}

/* スマートフォン対応 */
@media screen and (max-width: 1024px) {
    .c-opening-movie__container {
        aspect-ratio: 425 / 374;
        /* aspect-ratio: 16 / 6.8; */
    }

    .c-opening-movie__vimeo--pc {
        display: none;
    }

    .c-opening-movie__vimeo--sp {
        display: block;
    }

    .c-opening-movie__skip {
        bottom: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* 動画非表示時の初期状態調整 */
body.video-skipped .c-kv-1 {
    opacity: 1;
    visibility: visible;
    transition: none;
}

body.video-skipped .c-opening-movie {
    display: none;
}
