/* ====================================
   下層ページ HERO
==================================== */

.sub-hero {
    position: relative;
    width: 100%;
    height: clamp(240px, 29vw, 360px);
    background: #fff;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    isolation: isolate;
}

/* ====================================
   背景タイル
==================================== */

.sub-hero-tiles {
    position: absolute;
    inset: 0;
    z-index: 0;

    display: grid;
    grid-template-columns: repeat(26, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));

    pointer-events: none;
}

.sub-hero-tile {
    background: #e60013;

    opacity: 0;
    transform: scale(0);

    animation: tileFill 0.48s
        cubic-bezier(0.2, 0.8, 0.2, 1) both;

    animation-delay: var(--delay);
}

@keyframes tileFill {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    75% {
        opacity: 1;
        transform: scale(1.08);
    }

    100% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* ====================================
   背景ロゴ
==================================== */

.sub-hero-logo {
    position: absolute;
    z-index: 1;

    left: 7%;
    top: 50%;

    width: clamp(220px, 30vw, 430px);
    height: auto;

    opacity: 0;

    filter: brightness(0) invert(1);

    transform: translateY(-50%);

    animation: logoReveal 0.65s ease-out 1.12s both;
}

@keyframes logoReveal {
    from {
        opacity: 0;
        translate: -24px 0;
    }

    to {
        opacity: 0.22;
        translate: 0 0;
    }
}

/* ====================================
   タイトル
==================================== */

.sub-hero-title {
    position: relative;
    z-index: 2;

    color: #fff;
    text-align: center;

    animation: titleReveal 0.7s ease-out 1.32s both;
}

.sub-hero-title h1 {
    margin: 0;

    font-size: clamp(40px, 6vw, 80px);
    font-weight: 900;
    line-height: 1.1;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

p.sub-hero-subtitle {
    color: var(--white);
    font-weight: 900;
    text-align: left;

    padding-left: 15px;
    margin-top: 15px;

    position: absolute;
}

p.sub-hero-subtitle::before {
    content: "";
    width: 3.5px;
    height: 50%;
    background-color: var(--white);

    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* ====================================
   動きを減らす設定
==================================== */

@media (prefers-reduced-motion: reduce) {

    .sub-hero {
        background: #e60013;
    }

    .sub-hero-tile {
        animation: none;
        opacity: 1;
        transform: scale(1.08);
    }

    .sub-hero-logo {
        animation: none;
        opacity: 0.22;
    }

    .sub-hero-title {
        animation: none;
    }

}


/* ====================================
   下層ページ ヘッダーカラー
==================================== */

/* 通常時：FV通過後 */
.site-header.is-sub-page {
    background: #fff;
    transition: background-color .3s ease;
}

.site-header.is-sub-page .site-header-nav a {
    color: var(--text);
    transition: color .3s ease;
}

/* FV表示中 */
.site-header.is-sub-page.is-fv-active {
    background: transparent;
}

.site-header.is-sub-page.is-fv-active .site-header-nav a {
    color: #fff;
}

.site-header.is-sub-page.is-fv-active .site-header-nav a::after {
    background: #fff;
}

/* CTA */
.site-header.is-sub-page.is-fv-active .site-header-cta > a {
    background: #fff;
    color: var(--base);
}

/* CTAアイコン */
.site-header.is-sub-page.is-fv-active .site-header-cta span {
    background: var(--base);
}

.site-header.is-sub-page.is-fv-active .site-header-cta img {
    filter: brightness(0) invert(1);
}

/* ロゴ */
.site-header.is-sub-page.is-fv-active .site-header-logo img {
    filter: brightness(0) invert(1);
}

.logo-area::before {
    opacity: 0;

    transition: opacity .3s ease,
                color .3s ease;
}

/* ====================================
   下層ページ ゲームズロゴ
==================================== */

/* 下層ページでは常に白色に固定 */
.site-header.is-sub-page .logo-area::before {
    opacity: 0;
    filter: brightness(0) invert(1);
    transition: opacity .3s ease;
}

.site-header.is-sub-page.is-fv-active .logo-area::before {
    opacity: 1;
}

/* ====================================
   HB出現時
==================================== */

@media(max-width:1350px) {
    .sub-hero-title {
        padding-bottom: 30px;
    }
}

/* ====================================
   タブレット
==================================== */

@media (max-width: 767px) {

    .sub-hero {
        height: 240px;
    }

    .sub-hero-logo {
        left: -8%;
        width: 260px;
    }

    .sub-hero-title h1 {
        font-size: 40px;
    }

}

@media (max-width: 701px) {
    .site-header.is-sub-page.is-fv-active .site-header-logo img {
        filter: none;
    }
    .site-header.is-sub-page.is-fv-active .logo-area::before {
        opacity: 0;
    }
}


/* ====================================
   スマートフォン
==================================== */

@media (max-width: 440px) {
    .site-header.is-sub-page.is-fv-active .site-header-logo img {
        filter: none;
    }
    .site-header.is-sub-page.is-fv-active .logo-area::before {
        opacity: 0;
    }
}


/* ====================================
   下層ページ共通 フェードアップ
==================================== */

.fade-sub {
    opacity: 0;
    transform: translateY(40px);

    transition:
        opacity .8s ease,
        transform .8s cubic-bezier(.2, .8, .2, 1);
}

.fade-sub.is-show {
    opacity: 1;
    transform: translateY(0);
}


/* ====================================
   パスワード保護ページ
==================================== */

.password-protected {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 20px 100px;
    box-sizing: border-box;
}

.password-protected form {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.password-protected form p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.password-protected input[type="password"] {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 100%;
}

.password-protected input[type="submit"] {
    padding: 12px 24px;
    background: #e60013;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity .3s ease;
}

.password-protected input[type="submit"]:hover {
    opacity: .7;
}
