body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #fff;
    font-family: "serif"; /* 高級感を出すために明朝体もおすすめ */
}

.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 30px; /* 余白を広めにとって高級感を出す */
    box-sizing: border-box;
    z-index: 100; /* アニメーションより上に表示 */
    background: #fffffffa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header ul {
    display: flex;
    align-items: center;
    margin: 0;
}

.site-header ul li {
    list-style-type: none;
}

.site-header ul li a {
    color: #000;
    text-decoration: none;
    padding: 20px 30px;
    display: inline-block;
}

.site-header ul li .header-btn {
    background: #e5ab38;
    border-radius: 50px;
    padding: 15px 35px;
}

.site-header ul li a:hover {
    color: #b68219;
}

.site-header ul li .header-btn:hover {
    background: #0f4e97;
    color: #fff;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #fff;
}

.logo img {
    height: 80px;
}

/* --- フッターのスタイル --- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 50px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between; /* ロゴとコピーを左右に振る */
    align-items: flex-end;
    z-index: 100;
}

.footer-logo {
    font-size: 1rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.footer-logo a {
    color: #fff;
    text-decoration: none;
}

.copyright {
    font-size: 0.7rem;
    color: #888;
    margin: 0;
}

.animation-wrapper {
    position: relative;
    width: 100%;
    text-align: center;
}

/* 通常のグループ（消える） */
.message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    animation: fadeAndOut 5s ease-in-out forwards; /* 5秒で消える */
}

.message p {
    font-size: 2.5rem;
    letter-spacing: 0.2em;
    margin: 0;
    font-weight: bold;
    padding: 0 10px;
    line-height: 1.8;
}
    
.message p span {
    font-size: 3rem;
    font-weight: bold;
}

/* 最後のグループ（消えずに残る） */
.last-group {
    animation: fadeInAndStay 3s ease-in-out forwards; /* 3秒で出て、そのまま */
}

/* タイミング調整 */
.group-1 { animation-delay: 0s; }
.group-2 { animation-delay: 5s; }
.group-3 { animation-delay: 10s; }
.group-4 { animation-delay: 15s; } /* 前の3つが終わった頃に登場 */

/* --- アニメーションの定義 --- */

/* 1〜3個目用：出て、少し止まって、消える */
@keyframes fadeAndOut {
    0% { opacity: 0; transform: translate(-50%, -45%); filter: blur(10px); }
    20%, 80% { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); }
    100% { opacity: 0; transform: translate(-50%, -55%); filter: blur(10px); }
}

/* 4個目用：出て、そのまま静止 */
@keyframes fadeInAndStay {
    0% { opacity: 0; transform: translate(-50%, -45%); filter: blur(10px); }
    100% { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); }
}

/* おまけ：最後に出るボタンの装飾 */
.scroll-btn {
    display: inline-block;
    margin: 70px auto 0;
    padding: 35px 30px;
    color: #b68219;
    text-decoration: none;
    letter-spacing: 0.2em;
    font-size: 1.5rem;
    transition: 0.3s;
    max-width: 400px;
    width: 100%;
    border-radius: 50px;
    background: #ffffff;
    font-weight: bold;
}
.scroll-btn:hover {
    background: #0f4e97;
    color: #fff;
}

h1 {
    margin: 0;
}

.only-sp{
    display: none;
}

/* Nextボタンのスタイル */
.next-button {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
    padding: 12px 35px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    z-index: 110;
    transition: 0.3s ease-in-out;
    letter-spacing: 0.1em;
}
.next-button:hover {
    background: #fff;
    color: #000;
}
/* 最後のグループでNextボタンを消す設定 */
.next-button.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ★【修正・追加】ボタンを押したときも「ふあーと」出現・消滅させる設定 */
.message.force-hide {
    animation: none !important;
    opacity: 0 !important;
    transform: translate(-50%, -55%) !important; /* スッと上に消えていく */
    filter: blur(10px) !important;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, filter 0.5s ease-in-out;
    pointer-events: none !important;
}
.message.force-show {
    animation: none !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) !important; /* 中央にフワッと現れる */
    filter: blur(0) !important;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out, filter 0.6s ease-in-out;
    pointer-events: auto !important;
}


/* レスポンシブ調整（スマホの時） */
@media (max-width: 768px) {
    .site-header {
        padding: 10px 20px;
    }
    .logo img {
        height: 60px;
    }
    .site-header ul li a {
        padding: 10px 20px;
    }
    .site-header ul li .header-btn {
        padding: 10px 25px;
    }
    .site-footer {
        padding: 20px;
    }
    .site-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .message p {
        font-size: 1.6rem;
    }

    .message p span {
        font-size: 1.8rem;
    }
    .scroll-btn {
        margin: 50px auto 0;
        padding: 25px 20px;
        font-size: 1.2rem;
        max-width: 260px;
    }
    .only-sp{
        display: block;
    }
    
    /* スマホ時のNextボタン位置 */
    .next-button {
        bottom: 140px; 
        font-size: 0.9rem;
        padding: 10px 25px;
    }
}

/* レスポンシブ調整（スマホの時） */
@media (max-width: 500px) {
    .site-header {
        padding: 5px 7px;
    }
    .site-header ul {
        padding-left: 10px;
    }
    .site-header ul li a {
        padding: 10px;
        font-size: 0.9rem;
    }
    .site-header ul li .header-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
}