/* =================================
   blog14 専用スタイルシート
   ================================= */

/* Google Fonts: Noto Serif JP (SemiBold 600) の読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@600&display=swap');

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: #000;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #000;
    color: white;
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    line-height: 2.2;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ページ全体のフェードイン */
.blog-post {
    max-width: 1000px; /* 修正：800pxから1000pxに拡張 */
    margin: 0 auto;
    opacity: 0;
    animation: fadeInPage 1s ease-in-out forwards;
}

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

/* 段落のコンテナ：高さを150vhに広げ、中央に留まる時間を長くする */
.p-wrapper {
    height: 150vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 各段落のスタイル：sticky で中央に固定 */
.p-wrapper p {
    position: -webkit-sticky;
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    text-align: center;
    margin: 0;
    width: 100%;
    padding: 0 20px; /* 修正：左右の余白を少し詰めて横幅を広く使う */
    box-sizing: border-box;
    
    /* 初期状態：ぼかしを廃止し、透明度のみで制御 */
    transition: opacity 0.6s ease, transform 0.6s ease;
    opacity: 0.1;
    transform: translateY(-50%) scale(0.95);
    
    will-change: opacity, transform;
}

/* 中央に来たときのアニメーション（JSで active クラスを付与） */
.p-wrapper p.active {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1) !important;
}

/* 戻るボタン */
.blog-back-button {
    display: block;
    width: 30%;
    max-width: 200px;
    margin: 0 auto 15vh;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 8px;
    background-color: transparent;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-family: sans-serif;
    text-decoration: none;
}

.blog-back-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #00aaff;
}

footer {
    padding: 10vh 20px;
    text-align: center;
    font-family: sans-serif;
    opacity: 0.4;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .p-wrapper p {
        font-size: 1.4rem;
        padding: 0 20px;
    }
    .blog-back-button {
        width: 60%;
    }
}
