/* ================================================================
   主题 16 / shiku 石窟佛龛 —— 大同
   结构语言：崖壁分层导航 · 中央尖拱大龛+对称龛列首屏 ·
            莲瓣尖拱产品格 · 开凿进度工序 · 窟檐案例带 · 崖面龛格城市 ·
            碑刻手记 · 须弥座页脚
   配色：砂岩 #C9A87C / 佛青 #3D5A80 / 石绿 #6E8B74 / 米 #F2EBDD / 崖深 #35302A
   与庆阳(gongquan 圆拱窑洞)刻意区分：尖拱+对称龛阵+崖层横带
   ================================================================ */
:root {
  --sand: #C9A87C;
  --sand-d: #A88756;
  --foc: #3D5A80;
  --foc-d: #2C4260;
  --sgreen: #6E8B74;
  --paper: #F2EBDD;
  --paper-2: #EAE0CC;
  --rock: #35302A;
  --ink: #332C24;
  --ink-2: #6B6052;
  --ink-3: #9C917F;
  --line: #D5C6A8;
  --kai: 'Kaiti SC', 'KaiTi', '楷体', serif;
  --song: 'Songti SC', 'SimSun', '宋体', serif;
  --mono: 'SF Mono', 'Consolas', monospace;
  --wrap: 1240px;
  --gut: clamp(18px, 3.4vw, 40px);
  --sec-y: clamp(58px, 8vw, 104px);
}

html { background: var(--paper); }
body.t-shiku {
  font-family: var(--song);
  color: var(--ink);
  background: var(--paper);
  font-size: 16.5px;
  line-height: 1.8;
}
.t-shiku ::selection { background: var(--foc); color: #fff; }
.t-shiku img { display: block; max-width: 100%; }
.t-shiku h1, .t-shiku h2, .t-shiku h3 { font-weight: 600; letter-spacing: .05em; }

/* ---------------- 崖壁分层导航 ---------------- */
.cnav {
  position: sticky; top: 0; z-index: 60;
  background: var(--rock);
  box-shadow: 0 4px 18px -8px rgba(53, 48, 42, .6);
}
.cnav-in {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gut); height: 70px;
}
.cnav-brand { display: flex; align-items: center; gap: 11px; color: var(--paper); text-decoration: none; flex: none; }
.cnav-brand > svg { width: 36px; height: 36px; flex: none; }
.cnav-brand span { display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; }
.cnav-brand b { font-size: 15.5px; letter-spacing: .14em; font-family: var(--kai); }
.cnav-brand i { font-style: normal; font-size: 9px; letter-spacing: .26em; color: rgba(242, 235, 221, .5); font-family: var(--mono); }

.cnav-links { display: flex; margin-left: auto; align-items: stretch; height: 70px; }
.cnav-links a {
  display: inline-flex; align-items: center; padding: 0 16px;
  color: rgba(242, 235, 221, .78); text-decoration: none;
  font-size: 14.5px; letter-spacing: .16em;
  border-left: 1px solid rgba(242, 235, 221, .12);
  position: relative; transition: color .2s, background .2s;
}
.cnav-links a:last-child { border-right: 1px solid rgba(242, 235, 221, .12); }
.cnav-links a:hover { color: var(--sand); background: rgba(242, 235, 221, .05); }
.cnav-links a.on { color: var(--sand); }
.cnav-links a.on::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 26px; height: 3px; background: var(--sand);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.cnav-act { display: flex; align-items: center; gap: 12px; margin-left: 14px; flex: none; }
.cnav-act button { background: none; border: none; cursor: pointer; color: rgba(242, 235, 221, .8); display: inline-flex; padding: 6px; }
.cnav-act button:hover { color: var(--sand); }
.cnav-act .tel {
  font-family: var(--mono); font-size: 13.5px; font-weight: 700;
  color: var(--rock); text-decoration: none; letter-spacing: .02em;
  background: var(--sand); padding: 6px 13px;
}
.cnav-burger { display: none; }

.cdrawer {
  position: fixed; inset: 0; z-index: 90; background: var(--rock);
  opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s;
  display: flex; flex-direction: column; padding: 24px var(--gut); overflow-y: auto;
}
.cdrawer.on { opacity: 1; visibility: visible; }
.cdrawer-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid rgba(242, 235, 221, .2); }
.cdrawer-top b { font-family: var(--kai); letter-spacing: .16em; font-size: 17px; color: var(--paper); }
.cdrawer-top button { background: none; border: none; cursor: pointer; color: var(--paper); padding: 4px; }
.cdrawer nav { display: flex; flex-direction: column; padding-top: 10px; }
.cdrawer nav a {
  padding: 15px 6px; font-size: 16.5px; letter-spacing: .2em;
  color: rgba(242, 235, 221, .85); text-decoration: none;
  border-bottom: 1px solid rgba(242, 235, 221, .1);
}
.cdrawer nav a:hover { color: var(--sand); }
.cdrawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: rgba(242, 235, 221, .6); padding-top: 18px; }
.cdrawer-foot a { color: var(--sand); text-decoration: none; font-family: var(--mono); }
.cdrawer-foot button { align-self: flex-start; background: none; border: 1px solid var(--sand); padding: 8px 18px; cursor: pointer; font-family: var(--song); font-size: 14px; color: var(--paper); letter-spacing: .2em; }

/* ---------------- 尖拱大龛首屏 ---------------- */
.cliff {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}
.cliff::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, transparent 0 26px, rgba(53, 48, 42, .04) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 90px, rgba(53, 48, 42, .045) 90px 92px);
}
.cliff-in {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 6.2vw, 82px) var(--gut) clamp(44px, 6.4vw, 86px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(28px, 4.4vw, 60px); align-items: center;
}
.cliff-copy { position: relative; z-index: 2; }
.cliff-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .28em;
  color: var(--ink-3); margin-bottom: 16px;
}
.cliff-kicker::before {
  content: '朔'; width: 24px; height: 24px; display: inline-grid; place-items: center;
  background: var(--foc); color: var(--paper); font-family: var(--kai); font-size: 13px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
}
.cliff-copy h1 {
  margin: 0 0 20px; font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.42; color: var(--rock); text-wrap: balance;
}
.cliff-copy h1 em { font-style: normal; color: var(--foc); }
.cliff-sub { color: var(--ink-2); font-size: clamp(14.5px, 1.2vw, 16.5px); margin: 0 0 26px; max-width: 44em; }
.cliff-act { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.cliff-act .a1 {
  text-decoration: none; padding: 12px 26px; font-size: 15.5px; letter-spacing: .18em;
  background: var(--foc); color: #F4EFE3; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  padding-left: 34px; padding-right: 34px; transition: background .2s;
}
.cliff-act .a1:hover { background: var(--foc-d); }
.cliff-act .a2 {
  text-decoration: none; padding: 12px 30px; font-size: 15.5px; letter-spacing: .18em;
  color: var(--rock); border: 1px solid var(--ink-2); background: transparent;
  transition: border-color .2s, color .2s;
}
.cliff-act .a2:hover { border-color: var(--foc); color: var(--foc); }
.cliff-facts { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.cliff-facts span { padding: 10px 20px 0 0; margin-right: 16px; display: inline-flex; align-items: baseline; gap: 7px; }
.cliff-facts b { font-family: var(--mono); font-size: 19px; color: var(--foc); font-weight: 700; }

/* 龛阵：中央大尖拱 + 两侧小龛列 */
.niches { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(10px, 1.4vw, 18px); align-items: stretch; }
.niche-side { display: flex; flex-direction: column; gap: clamp(8px, 1.2vw, 14px); justify-content: center; }
.niche {
  width: clamp(52px, 5vw, 74px); aspect-ratio: 3 / 4.6;
  background: var(--rock); overflow: hidden; position: relative;
  clip-path: polygon(50% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  border: none; padding: 0;
}
.niche img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .25s; }
.niche:hover img { opacity: 1; }
.niche-main {
  position: relative; background: var(--rock); overflow: hidden;
  clip-path: polygon(50% 0, 100% 11%, 100% 100%, 0 100%, 0 11%);
  min-height: clamp(300px, 36vw, 460px);
}
.niche-main img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.niche-main::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 -70px 60px -40px rgba(53, 48, 42, .55);
  pointer-events: none;
}
.niche-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 16px 20px 14px; color: #F4EFE3;
  font-family: var(--kai); font-size: 14px; letter-spacing: .3em;
}
.niche-cap b { display: block; font-size: 19px; letter-spacing: .4em; }

/* ---------------- 节头 ---------------- */
.c-head { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.c-head .l { display: flex; align-items: baseline; gap: 16px; }
.c-head .no { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; color: var(--sand-d); border-bottom: 2px solid var(--sand-d); padding-bottom: 3px; }
.c-head h2 { font-size: clamp(1.4rem, 2.3vw, 1.95rem); margin: 0; letter-spacing: .1em; }
.c-head > p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 30em; }
.c-head a.more { color: var(--foc); text-decoration: none; font-size: 14px; letter-spacing: .12em; border-bottom: 1px solid var(--foc); padding-bottom: 2px; }
.c-head a.more:hover { color: var(--sand-d); border-color: var(--sand-d); }

/* ---------------- 莲瓣尖拱产品格 ---------------- */
.grotto-sec { padding: var(--sec-y) 0; border-bottom: 1px solid var(--line); }
.cells { max-width: var(--wrap); margin: clamp(26px, 3.6vw, 44px) auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.cell {
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column;
  background: #FBF6EA; border: 1px solid var(--line); border-bottom: 3px solid var(--sand-d);
  transition: transform .22s, border-color .22s;
}
.cell:hover { transform: translateY(-4px); border-bottom-color: var(--foc); }
.cell-fig { position: relative; aspect-ratio: 3 / 3.4; overflow: hidden; background: var(--rock); clip-path: polygon(50% 0, 100% 12%, 100% 100%, 0 100%, 0 12%); margin-bottom: 6px; }
.cell-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cell:hover .cell-fig img { transform: scale(1.06); }
.cell-body { padding: 4px 14px 14px; }
.cell-no { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--ink-3); }
.cell-body h3 { margin: 5px 0 4px; font-size: 15.5px; letter-spacing: .08em; }
.cell-body p { margin: 0; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 开凿进度工序 ---------------- */
.carve-sec { padding: var(--sec-y) 0; background: var(--rock); color: #EFE8D8; }
.carve-sec .c-head h2 { color: #F4EFE3; }
.carve-sec .c-head .no { color: var(--sand); border-color: var(--sand); }
.carve-sec .c-head > p { color: rgba(239, 232, 216, .7); }
.carves { max-width: var(--wrap); margin: clamp(26px, 3.6vw, 44px) auto 0; padding: 0 var(--gut); }
.carve {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) minmax(0, 2fr); gap: clamp(14px, 2.4vw, 30px); align-items: center;
  padding: 20px 0; border-bottom: 1px solid rgba(239, 232, 216, .14);
  position: relative;
}
.carve:last-child { border-bottom: none; }
.carve .zi {
  font-family: var(--kai); font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  color: var(--sand); line-height: 1; text-align: center;
}
.carve h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: .14em; color: #F4EFE3; }
.carve h3 i { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .24em; color: rgba(239, 232, 216, .45); margin-left: 12px; }
.carve p { margin: 0; font-size: 14px; color: rgba(239, 232, 216, .75); }
.carve .depth {
  position: absolute; left: 88px; bottom: -1px; height: 2px; background: var(--sand);
  opacity: .55;
}
.carve:nth-child(1) .depth { width: 22%; }
.carve:nth-child(2) .depth { width: 46%; }
.carve:nth-child(3) .depth { width: 72%; }
.carve:nth-child(4) .depth { width: 96%; }

/* ---------------- 窟檐案例带 ---------------- */
.eave-sec { padding: var(--sec-y) 0; border-bottom: 1px solid var(--line); }
.eaves { max-width: var(--wrap); margin: clamp(26px, 3.6vw, 44px) auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.eave { text-decoration: none; color: var(--ink); position: relative; }
.eave-fig {
  position: relative; overflow: hidden; background: var(--rock);
  clip-path: polygon(50% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
}
.eave-fig img { width: 100%; aspect-ratio: 4 / 3.1; object-fit: cover; transition: transform .4s; }
.eave:hover .eave-fig img { transform: scale(1.05); }
.eave-fig::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(53, 48, 42, .5)); pointer-events: none; }
.eave-body { padding: 14px 4px 0; }
.eave-loc { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; color: var(--sand-d); }
.eave-body h3 { margin: 7px 0 6px; font-size: 16.5px; line-height: 1.55; letter-spacing: .05em; }
.eave:hover h3 { color: var(--foc); }
.eave-body p { margin: 0; font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eave .go { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--foc); letter-spacing: .14em; }
.eave:hover .go { color: var(--sand-d); }

/* ---------------- 崖面龛格城市 ---------------- */
.wall-sec { padding: var(--sec-y) 0; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.wall { max-width: var(--wrap); margin: clamp(26px, 3.6vw, 44px) auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.wall a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 4px; padding: 18px 6px 12px; text-decoration: none; color: var(--ink-2);
  background: linear-gradient(180deg, transparent 22%, rgba(201, 168, 124, .28) 100%);
  clip-path: polygon(50% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
  font-size: 14.5px; letter-spacing: .1em; transition: background .2s, color .2s;
}
.wall a i { font-style: normal; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: var(--ink-3); }
.wall a:hover { background: linear-gradient(180deg, transparent 10%, rgba(61, 90, 128, .3) 100%); color: var(--foc-d); }
.wall a.cur { background: var(--foc); color: #F4EFE3; }
.wall a.cur i { color: rgba(244, 239, 227, .6); }

/* ---------------- 碑刻手记 ---------------- */
.stele-sec { padding: var(--sec-y) 0; border-bottom: 1px solid var(--line); }
.steles { max-width: var(--wrap); margin: clamp(26px, 3.6vw, 44px) auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.stele { text-decoration: none; color: var(--ink); background: linear-gradient(180deg, #4A443C, #3A352E); color: #EFE8D8; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform .22s; }
.stele:hover { transform: translateY(-3px); }
.stele::before { content: ''; position: absolute; top: 8px; left: 8px; right: 8px; bottom: 8px; border: 1px solid rgba(239, 232, 216, .22); pointer-events: none; }
.stele .n { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--sand); }
.stele h3 { margin: 0; font-family: var(--kai); font-size: 16px; line-height: 1.65; letter-spacing: .06em; font-weight: 500; }
.stele time { font-family: var(--mono); font-size: 11px; color: rgba(239, 232, 216, .5); margin-top: auto; padding-top: 10px; }

/* ---------------- 须弥座页脚 ---------------- */
.cfoot { background: var(--rock); color: #EFE8D8; }
.cfoot-mold { height: 18px; background: repeating-linear-gradient(90deg, var(--sand-d) 0 34px, #997C4E 34px 40px, var(--sand) 40px 74px, #997C4E 74px 80px); opacity: .85; }
.cfoot-in {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 5vw, 58px) var(--gut) 26px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px);
}
.cfoot h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 17px; letter-spacing: .14em; font-family: var(--kai); }
.cfoot h3 svg { width: 32px; height: 32px; flex: none; }
.cfoot p { margin: 0 0 8px; font-size: 13.5px; color: rgba(239, 232, 216, .75); line-height: 2.05; }
.cfoot p b { font-weight: 600; color: #F4EFE3; margin-right: 4px; }
.cfoot p a { color: var(--sand); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.cfoot p a:hover { text-decoration: underline; }
.cfoot-links { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 14px; font-size: 13px; }
.cfoot-links a { color: rgba(239, 232, 216, .72); text-decoration: none; padding: 3px 0; margin-right: 18px; letter-spacing: .1em; }
.cfoot-links a:hover { color: var(--sand); }
.cfoot-links button { background: none; border: none; cursor: pointer; font-family: var(--song); font-size: 13px; color: rgba(239, 232, 216, .72); letter-spacing: .1em; padding: 3px 0; }
.cfoot-links button:hover { color: var(--sand); }
.cfoot-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.cfoot-motto { font-family: var(--kai); font-size: 15px; color: rgba(239, 232, 216, .55); letter-spacing: .5em; writing-mode: vertical-rl; height: 128px; border-right: 1px solid rgba(239, 232, 216, .25); padding-right: 16px; }
.cfoot-copy {
  max-width: var(--wrap); margin: 0 auto; padding: 16px var(--gut) 22px;
  border-top: 1px solid rgba(239, 232, 216, .18);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: rgba(239, 232, 216, .5); letter-spacing: .08em;
}

/* ---------------- 移动快捷条 ---------------- */
.mbar7 {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70; display: none;
  background: var(--foc-d); color: #F4EFE3;
}
.mbar7 a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 9px; text-decoration: none; color: inherit; font-size: 10px; letter-spacing: .2em; }
.mbar7 a b { font-size: 14px; font-weight: 500; font-family: var(--mono); letter-spacing: .04em; }
.mbar7 a.hot b { color: var(--sand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) {
  .cnav-links { display: none; }
  .cnav-burger { display: inline-flex; background: none; border: none; cursor: pointer; color: var(--paper); padding: 6px; }
  .cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfoot-in { grid-template-columns: 1fr; }
  .cfoot-right { align-items: flex-start; flex-direction: row; align-items: center; }
  .cfoot-motto { height: auto; writing-mode: horizontal-tb; border-right: none; padding-right: 0; border-bottom: 1px solid rgba(239, 232, 216, .25); padding-bottom: 12px; }
}
@media (max-width: 640px) {
  body.t-shiku { font-size: 15.5px; }
  .cnav-in { height: 60px; gap: 12px; }
  .cnav-act .tel { display: none; }
  .cliff-in { grid-template-columns: 1fr; padding-top: 34px; }
  .niches { grid-template-columns: 1fr; }
  .niche-side { flex-direction: row; order: 2; }
  .niche { flex: 1; width: auto; }
  .niche-main { order: 1; min-height: 300px; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carve { grid-template-columns: 64px minmax(0, 1fr); }
  .carve p { grid-column: 1 / -1; padding-top: 6px; }
  .carve .depth { display: none; }
  .eaves { grid-template-columns: 1fr; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steles { grid-template-columns: 1fr; }
  .mbar7 { display: flex; }
  body.t-shiku { padding-bottom: 58px; }
  .cfoot-copy { flex-direction: column; gap: 4px; }
}
