/* ==========================================================================
   局面を打開する日本史 - Professional Cinematic Style
   (Emblem 2s Pause & Refined Animation)
   ========================================================================== */

:root {
    --main-navy: #0A2A66;
    --light-blue: #E8F1FF;
    --accent-silver: #D1D9E6;
    --text-white: #F5F7FA;
    --bg-dark: #020617;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 背景：グリッド */
.grid-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(232, 241, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 241, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
}

header {
    background: rgba(10, 42, 102, 0.7);
    backdrop-filter: blur(15px);
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    /* エンブレムの演出が終わる頃に表示 */
    animation-delay: 3.8s; 
}

.logo a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 100;
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

header nav ul { display: flex; list-style: none; gap: 30px; }
header nav ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* メインビジュアル */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* ★エンブレム：2秒の静止時間を設けた新アニメーション */
.hero-emblem {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    max-width: 700px;
    z-index: 5;
    pointer-events: none;
    /* 全体を4.5秒に設定 */
    animation: emblemIntro 4.5s cubic-bezier(0.2, 0, 0.3, 1) forwards;
}

@keyframes emblemIntro {
    0% {
        width: 45vw;
        opacity: 0;
        filter: invert(100%) brightness(100%) contrast(100%) blur(5px);
    }
    /* 約1秒かけて中央に登場 */
    20% {
        width: 55vw;
        opacity: 1;
        filter: invert(100%) brightness(100%) contrast(100%) blur(0px);
    }
    /* ★ここから約2秒間（20%〜65%）、現状を維持して「静止」 */
    65% {
        width: 55vw;
        opacity: 1;
        z-index: 5;
        filter: invert(100%) brightness(100%) contrast(100%) blur(0px);
    }
    /* 最後の1.5秒強で、一気に背景へ退きながら発光・透過 */
    100% {
        width: 90vw;
        max-width: 1300px;
        opacity: 0.18;
        z-index: 0;
        filter: invert(100%) brightness(280%) contrast(140%) blur(2px);
    }
}

/* タイトルエリア：エンブレムが退き始めるタイミングで表示 */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: contentFadeUp 1.8s ease forwards;
    /* エンブレムの静止が終わる3秒後から浮上開始 */
    animation-delay: 3s;
}

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

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 500;
    letter-spacing: 0.35em;
    margin-bottom: 20px;
    color: var(--text-white);
    font-family: "HGS明朝E", "HGS Mincho E", serif;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
}

.vertical-caption {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-family: serif;
    font-size: 0.75rem;
    letter-spacing: 0.6em;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.2);
    padding-right: 10px;
}

.hero-sub {
    font-size: 0.9rem;
    letter-spacing: 0.5em;
    color: var(--accent-silver);
    margin-bottom: 50px;
    text-transform: uppercase;
}

.btn-outline {
    display: inline-block;
    padding: 18px 45px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: 0.5s;
}
.btn-outline:hover { background: var(--text-white); color: var(--main-navy); }

@keyframes fadeIn { to { opacity: 1; } }