/* 全局暗黑文艺重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #161514; /* 极深暖灰，接近宣纸泛黑 */
    color: #dcd3c6; /* 岁月褪色的骨白色 */
    font-family: "Songti SC", "STSong", "Kaiti", "SimSun", serif; /* 强制宋体/楷体营造历史感 */
    line-height: 2;
    overflow-x: hidden;
}

/* ---------------- 首屏视差 ---------------- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(22, 21, 20, 0.7), rgba(22, 21, 20, 0.9)),
                url('280a6cb95d2c6a21e1fd1da33b6ea319.webp') center/cover fixed;
}

.hero-title {
    writing-mode: vertical-rl; /* 竖向排版，极具国风文艺感 */
    text-orientation: upright;
    font-size: 3.5rem;
    letter-spacing: 20px;
    color: #dcd3c6;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeIn 2s ease-out;
}

.hero-title span {
    color: #8c3a3a; /* 沉香红 */
    font-size: 1.5rem;
    letter-spacing: 10px;
    margin-right: 30px;
}

/* ---------------- 沉浸式图文滚动区 ---------------- */
.story-chapter {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15vh 8vw;
    border-bottom: 1px solid rgba(220, 211, 198, 0.1);
}

/* 左侧文字：使用 Sticky 悬停在视口 */
.text-panel {
    width: 35%;
    position: sticky;
    top: 35vh; /* 停留在屏幕中上部 */
    padding-right: 40px;
}

.text-panel h2 {
    font-size: 2rem;
    color: #8c3a3a;
    margin-bottom: 20px;
    font-weight: normal;
    border-left: 3px solid #8c3a3a;
    padding-left: 15px;
}

.text-panel p {
    font-size: 1.1rem;
    color: #a39b90;
    text-align: justify;
    letter-spacing: 1.5px;
}

/* 右侧图片：砖石画廊布局 */
.gallery-panel {
    width: 60%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding-bottom: 10vh;
}

.gallery-panel img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background-color: #2a2826; /* 占位底色 */
    border-radius: 2px;
    filter: grayscale(20%) contrast(110%);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-panel img:hover {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* 特殊跨列图片，打破死板的网格 */
.img-span-2 {
    grid-column: span 2;
    height: 450px !important;
}

/* ---------------- 页脚 ---------------- */
footer {
    text-align: center;
    padding: 8vh 0;
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 移动端适配 ---------------- */
@media (max-width: 900px) {
    .story-chapter {
        flex-direction: column;
        gap: 40px;
        padding: 10vh 6vw;
    }

    .text-panel {
        width: 100%;
        position: static;
        padding-right: 0;
    }

    .gallery-panel {
        width: 100%;
    }

    .hero-title {
        font-size: 2.4rem;
        letter-spacing: 12px;
    }

    .hero-title span {
        margin-right: 18px;
    }
}
