/* ==========================================================================
   城市页统一衔接：背景图下移 → 主视觉 → 100–140px 渐变 → 暖米白城市概览
   作用于所有 .cd-page（15 个城市页，敦煌为老版结构单独处理）
   ========================================================================== */

/* ---------- ① 主视觉：背景图层下移，避开导航与书法标题打架 ---------- */
body.cd-page .cd-hero {
    --hero-shift: clamp(48px, 6vw, 86px);
    background: #17211d;
    min-height: clamp(520px, 74vh, 760px);
    aspect-ratio: auto;
    max-height: none;
    padding: 9.2rem 0 9rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}
body.cd-page .cd-hero::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: calc(-1 * var(--hero-shift));
    bottom: 0;
    z-index: -2;
    background-image: var(--hero-img);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    transform: translateZ(0);
}
body.cd-page .cd-hero .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 3;
}
body.cd-page .navbar .brand__name,
body.cd-page .navbar .nav__link { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
body.cd-page .cd-hero__box {
    max-width: 34rem;
    padding: 1.6rem 1.8rem 1.7rem;
    border-radius: .95rem;
    background: linear-gradient(180deg, rgba(16, 24, 21, .62), rgba(16, 24, 21, .46));
    border: 1px solid rgba(216, 180, 116, .26);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 18px 46px rgba(10, 16, 13, .28);
}
body.cd-page .cd-hero__tagline {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
    font-size: clamp(1.15rem, 1.7vw, 1.42rem);
    letter-spacing: .1em;
    color: #f3e2bd;
    margin: .1rem 0 .55rem;
}
body.cd-page .cd-hero__desc { font-size: .9rem; line-height: 1.9; color: rgba(255, 255, 255, .82); }
body.cd-page .cd-hero__actions { margin-top: 1.15rem; }

/* 底部长渐变：直接叠在图片上，淡出到概览底色 */
body.cd-page .cd-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: clamp(100px, 9vw, 140px);
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(248, 243, 233, 0) 0%,
        rgba(248, 243, 233, .35) 42%,
        rgba(248, 243, 233, .82) 74%,
        #F8F3E9 100%);
}

/* ---------- ② 城市概览：暖米白 + 边缘淡装饰 ---------- */
body.cd-page #about {
    position: relative;
    overflow: hidden;
    background: #F8F3E9;
    padding-top: clamp(48px, 5vw, 64px);
    padding-bottom: clamp(30px, 3vw, 42px);
    margin-top: -1px;
}
body.cd-page #about::before,
body.cd-page #about::after {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background: url('../img/city-paper.jpg') no-repeat;
    background-size: cover;
}
body.cd-page #about::before {
    left: -8%; bottom: -12%;
    width: min(46%, 620px); height: 260px;
    opacity: .16;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .35) 62%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .35) 62%, transparent 100%);
}
body.cd-page #about::after {
    right: -10%; top: -6%;
    width: min(40%, 540px); height: 220px;
    opacity: .12;
    -webkit-mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, .3) 58%, transparent 100%);
    mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, .3) 58%, transparent 100%);
}
body.cd-page #about .container { position: relative; z-index: 1; max-width: 1200px; }
body.cd-page #about .cd-head { margin-bottom: 1.5rem; }

body.cd-page .cd-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
body.cd-page .cd-head h2 {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    color: #22302b;
    margin: 0 0 .3rem;
}
body.cd-page .cd-head h2 small {
    font-size: .62rem; letter-spacing: .22em; color: #9a8b6f;
    margin-left: .5rem; font-family: inherit;
}
body.cd-page .cd-head p { margin: 0; font-size: .85rem; color: #6f7d74; letter-spacing: .06em; }
body.cd-page .cd-head__more {
    flex: none; white-space: nowrap; text-decoration: none;
    font-size: .82rem; color: #2f5348;
    border: 1px solid rgba(38, 61, 56, .18); border-radius: 9999px;
    padding: .42rem .95rem; background: rgba(255, 253, 248, .8);
    transition: border-color .2s ease, color .2s ease;
}
body.cd-page .cd-head__more:hover { border-color: #d8b474; color: #a95f45; }

body.cd-page #about .cd-about__copy p {
    color: #3d4b45;
    line-height: 2.02;
    font-size: .95rem;
}

/* 数据卡：微暖白 + 细边框 + 轻阴影 */
body.cd-page .cd-fact {
    background: #FFFDF8;
    border: 1px solid rgba(38, 61, 56, .10);
    border-radius: .7rem;
    box-shadow: 0 2px 10px rgba(30, 24, 16, .05);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: .8rem .85rem;
}
body.cd-page .cd-fact__v { color: #2c3a34; }
body.cd-page .cd-fact__ico { background: rgba(216, 180, 116, .16); color: #9a7534; }
body.cd-page .cd-fact__k { font-size: .74rem; letter-spacing: .08em; color: #8a7659; }

@media (min-width: 861px) {
    body.cd-page .cd-about__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
    body.cd-page .cd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    body.cd-page .cd-fact { min-height: 76px; align-items: center; }
}

/* 概览之后的板块顶端柔化，避免米白与水墨卷硬接 */
body.cd-page #spots { position: relative; padding-top: clamp(1.6rem, 2.6vw, 2.4rem); }
body.cd-page #spots::before {
    content: "";
    position: absolute; left: 0; right: 0; top: 0; height: 150px;
    background: linear-gradient(180deg, #F8F3E9 0%, rgba(248, 243, 233, .72) 42%, rgba(248, 243, 233, 0) 100%);
    pointer-events: none; z-index: 0;
}
body.cd-page #spots .container { position: relative; z-index: 1; }

/* 导航顶部压暗，亮壁纸上白字可读 */
body.cd-page .navbar::before {
    background: linear-gradient(180deg, rgba(8, 14, 12, .92) 0%, rgba(8, 14, 12, .64) 56%, rgba(8, 14, 12, .16) 86%, transparent 100%);
}

/* ---------- ③ 移动端 ---------- */
@media (max-width: 860px) {
    body.cd-page .cd-hero {
        --hero-shift: 46px;
        min-height: 0;
        padding: 6.6rem 0 5.4rem;
        align-items: flex-end;
    }
    body.cd-page .cd-hero .container { justify-content: flex-start; align-items: flex-end; }
    body.cd-page .navbar .brand__name,
body.cd-page .navbar .nav__link { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
body.cd-page .cd-hero__box {
        max-width: none;
        padding: 1.15rem 1.15rem 1.25rem;
        background: linear-gradient(180deg, rgba(16, 24, 21, .74), rgba(16, 24, 21, .6));
    }
    body.cd-page .cd-hero h1 {
        position: static; width: auto; height: auto; margin: 0 0 .15rem; padding: 0;
        overflow: visible; clip-path: none; white-space: normal; border: 0;
        font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
        font-size: 2.05rem; letter-spacing: .12em; color: #fdf6e6; line-height: 1.25;
        text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
    }
    /* 竖屏导航改为实底，保证白字在亮壁纸上可读 */
    body.cd-page .navbar { background: rgba(18, 32, 28, .94); }
    body.cd-page .navbar::before { display: none; }
    /* 竖屏取画面右侧，避开壁纸自带的竖排书法标题 */
    body.cd-page .cd-hero::before { background-position: 72% top; }
    body.cd-page .cd-hero::after { height: 110px; }
    body.cd-page #about { padding-top: 2.1rem; padding-bottom: 2.2rem; }
    body.cd-page #about::before { width: 78%; height: 180px; opacity: .14; }
    body.cd-page #about::after { display: none; }
    body.cd-page .cd-about__grid { grid-template-columns: 1fr; gap: 1.2rem; }
    body.cd-page .cd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    body.cd-page .cd-fact { min-height: 0; }
}
