@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root{
  --ink:#101014;
  --paper:#F3EEE5;
  --gold:#C89B4A;
  --line:#D9D0C0;
  --muted:#5C584F;
  --serif:'Cormorant',Georgia,'Songti SC','Noto Serif SC',serif;
  --sans:'Montserrat','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --head-h:96px;
}

*,*::before,*::after{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:1.0625rem;
  line-height:1.8;
  font-weight:400;
  letter-spacing:.01em;
}

img,svg{max-width:100%;display:block}
a{color:inherit}
h1,h2,h3,h4{font-weight:600}
p{margin:0 0 1.1rem}
p:last-child{margin-bottom:0}

main [id]{scroll-margin-top:120px}

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:99;
  background:var(--ink);
  color:var(--paper);
  padding:.8rem 1.2rem;
  text-decoration:none;
}
.skip:focus{left:0}

/* 顶部：品牌居中，菜单分列两侧，右侧主按钮 */
.site-head{
  position:sticky;
  top:0;
  z-index:50;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:1rem;
  padding:.7rem clamp(1rem,3vw,2.4rem);
  background:var(--ink);
  color:var(--paper);
  border-bottom:3px solid var(--gold);
}
.brand{
  grid-column:2;
  justify-self:center;
  font-family:var(--serif);
  font-size:1.45rem;
  font-weight:600;
  letter-spacing:.18em;
  color:var(--paper);
  text-decoration:none;
  white-space:nowrap;
  padding:.4rem .3rem;
}
.head-nav-l{grid-column:1}
.head-right{
  grid-column:3;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.7rem;
}
.menu{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.15rem;
  margin:0;
  padding:0;
  list-style:none;
}
.menu li{display:flex}
.menu a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem .85rem;
  border:1px solid transparent;
  border-radius:999px;
  color:var(--paper);
  font-size:1rem;
  line-height:1.4;
  text-decoration:none;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.menu a:hover,.menu a:focus-visible{
  background:var(--paper);
  color:var(--ink);
}
.cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 1.3rem;
  border-radius:999px;
  background:var(--gold);
  color:var(--ink);
  font-weight:600;
  font-size:1rem;
  letter-spacing:.04em;
  white-space:nowrap;
  text-decoration:none;
  transition:background .18s ease,color .18s ease;
}
.cta:hover,.cta:focus-visible{
  background:var(--paper);
  color:var(--ink);
}

/* 主体两栏 */
.shell{
  max-width:1180px;
  margin:0 auto;
  padding:0 clamp(1rem,3vw,2rem) 3.5rem;
  display:grid;
  grid-template-columns:minmax(0,1fr) 268px;
  gap:clamp(1.5rem,3vw,3rem);
  align-items:start;
}
.doc{min-width:0}

/* 紧凑主视觉 */
.hero{
  position:relative;
  min-height:44vh;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:1.1rem;
  text-align:center;
  padding:clamp(1.8rem,6vh,3.2rem) 0 clamp(2.4rem,7vh,3.6rem);
  border-bottom:2px solid var(--ink);
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:16px;
  background:var(--gold);
  clip-path:polygon(0 58%,100% 0,100% 100%,0 100%);
}
.hero-icon{
  width:74px;
  height:auto;
  color:var(--gold);
}
h1{
  margin:0;
  max-width:23ch;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.1rem,6.2vw,4.3rem);
  line-height:1.16;
  letter-spacing:.02em;
  text-wrap:balance;
}

/* 正文 */
.body{
  counter-reset:sec;
  padding-top:clamp(1.4rem,4vh,2.4rem);
}
.body > div{
  counter-increment:sec;
  position:relative;
  padding:clamp(1.4rem,4vh,2.2rem) 0 clamp(1.8rem,5vh,2.6rem);
  border-bottom:1px solid var(--line);
}
.body > div:last-child{border-bottom:0}
.body > div::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:76px;
  height:3px;
  background:var(--gold);
}
.body > div:last-child::after{display:none}

.body h2{
  margin:0 0 .85rem;
  font-family:var(--serif);
  font-size:clamp(1.55rem,3.4vw,2.15rem);
  line-height:1.28;
  letter-spacing:.01em;
  text-wrap:balance;
}
.body h2::before{
  content:counter(sec,decimal-leading-zero);
  display:block;
  margin-bottom:.45rem;
  font-family:var(--sans);
  font-size:.95rem;
  font-weight:500;
  letter-spacing:.34em;
  color:var(--gold);
}
.body h3{
  margin:1.6rem 0 .6rem;
  font-size:1.2rem;
  line-height:1.5;
}
.body p{max-width:66ch}
.body ul,.body ol{
  margin:0 0 1.2rem;
  padding-left:1.35rem;
}
.body li{margin:.4rem 0}
.body a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-color:var(--gold);
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  transition:color .18s ease;
}
.body a:hover{color:var(--gold)}
.body strong,.body b{font-weight:600}
.body blockquote{
  margin:1.5rem 0;
  padding:.4rem 0 .4rem 1.15rem;
  border-left:4px solid var(--gold);
  font-family:var(--serif);
  font-size:1.2rem;
  line-height:1.65;
}
.body table{
  width:100%;
  margin:1.2rem 0;
  border-collapse:collapse;
  font-size:1rem;
}
.body th,.body td{
  border:1px solid var(--line);
  padding:.6rem .75rem;
  text-align:left;
  vertical-align:top;
}
.body th{background:#EAE3D6;font-weight:600}
.body img{
  margin:1.2rem 0;
  border:2px solid var(--ink);
}
.body hr{
  border:0;
  border-top:1px solid var(--line);
  margin:1.6rem 0;
}

/* 右侧栏 */
.rail{
  position:sticky;
  top:calc(var(--head-h) + 1rem);
  margin-top:clamp(1.6rem,5vh,2.6rem);
  padding-left:1.2rem;
  border-left:2px solid var(--ink);
}
.rail-title{
  margin:0;
  font-family:var(--serif);
  font-size:1.5rem;
  letter-spacing:.08em;
  line-height:1.3;
}
.rail-sub{
  margin:.3rem 0 1rem;
  color:var(--muted);
  font-size:1rem;
  line-height:1.65;
}
.rail-list{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:rail;
}
.rail-list li{
  counter-increment:rail;
  border-bottom:1px solid var(--line);
}
.rail-list li:last-child{border-bottom:0}
.rail-list a{
  display:flex;
  align-items:baseline;
  gap:.6rem;
  min-height:44px;
  padding:.6rem 0;
  font-size:1rem;
  line-height:1.5;
  text-decoration:none;
  transition:color .18s ease;
}
.rail-list a::before{
  content:counter(rail,decimal-leading-zero);
  font-family:var(--serif);
  font-size:.95rem;
  letter-spacing:.1em;
  color:var(--gold);
}
.rail-list a:hover{color:var(--gold)}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:60;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.6rem 1.05rem;
  border:2px solid var(--gold);
  border-radius:999px;
  background:var(--ink);
  color:var(--paper);
  font-size:1rem;
  text-decoration:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease,background .18s ease,color .18s ease;
}
.to-top.is-on{opacity:1;visibility:visible}
.to-top:hover{background:var(--gold);color:var(--ink)}

/* 页脚 */
.site-foot{
  margin-top:clamp(2rem,6vh,3.6rem);
  padding:clamp(1.8rem,5vw,3rem) clamp(1rem,4vw,2.4rem) 1.6rem;
  display:grid;
  grid-template-columns:1fr auto;
  gap:1rem;
  align-items:end;
  background:var(--ink);
  color:var(--paper);
  border-top:7px solid var(--gold);
}
.foot-brand{
  grid-column:1 / -1;
  margin:0;
  font-family:var(--serif);
  font-size:clamp(2.4rem,11vw,5.6rem);
  font-weight:600;
  line-height:.95;
  letter-spacing:.08em;
  color:var(--gold);
}
.foot-links{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:.2rem 1.1rem;
  font-size:1rem;
}
.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .18s ease,border-color .18s ease;
}
.foot-links a:hover{
  color:var(--gold);
  border-bottom-color:var(--gold);
}
.foot-copy{
  justify-self:end;
  font-size:1rem;
  line-height:1.6;
  opacity:.82;
}

/* 入场 */
@keyframes rise{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:none}
}
.hero-icon,.hero h1{animation:rise .5s ease both}
.menu li,.rail-list li{animation:rise .45s ease both}
.menu li:nth-child(1){animation-delay:.04s}
.menu li:nth-child(2){animation-delay:.08s}
.menu li:nth-child(3){animation-delay:.12s}
.menu li:nth-child(4){animation-delay:.16s}
.rail-list li:nth-child(1){animation-delay:.06s}
.rail-list li:nth-child(2){animation-delay:.1s}
.rail-list li:nth-child(3){animation-delay:.14s}
.rail-list li:nth-child(4){animation-delay:.18s}
.rail-list li:nth-child(5){animation-delay:.22s}
.rail-list li:nth-child(6){animation-delay:.26s}
.rail-list li:nth-child(7){animation-delay:.3s}

@media (max-width:1080px){
  :root{--head-h:230px}
  main [id]{scroll-margin-top:250px}
  .site-head{
    display:block;
    padding:.55rem 1rem .7rem;
    position:sticky;
  }
  .brand{
    display:block;
    text-align:center;
    padding:.35rem 0 .45rem;
  }
  .head-right{display:block}
  .menu{justify-content:center;gap:.1rem}
  .menu a{padding:.4rem .7rem}
  .cta{
    display:flex;
    justify-content:center;
    max-width:280px;
    margin:.45rem auto 0;
  }
  .shell{
    grid-template-columns:minmax(0,1fr);
    gap:1.25rem;
    padding-bottom:2.5rem;
  }
  .hero{
    min-height:34vh;
    padding:1.4rem 0 2rem;
  }
  .hero-icon{width:56px}
  .rail{
    position:static;
    margin-top:0;
    padding-left:0;
    padding-top:1.25rem;
    border-left:0;
    border-top:2px solid var(--ink);
  }
}

@media (max-width:560px){
  body{font-size:1rem}
  .site-head{position:sticky}
  .foot-brand{letter-spacing:.05em}
  .site-foot{grid-template-columns:1fr;gap:.5rem}
  .foot-copy{justify-self:start}
  .body h2::before{font-size:.9rem;letter-spacing:.3em}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation:none!important;
    transition:none!important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
