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

:root{
  --ink:#000000;
  --paper:#ffffff;
  --muted:rgba(0,0,0,.6);
  --hair:rgba(0,0,0,.16);
  --rail:210px;
  --gut:clamp(1.1rem,4vw,3.2rem);
  --max:1280px;
  --sticky:52px;
}

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

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  background:var(--paper);
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:"Nunito Sans","Rubik",-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  font-weight:400;
  line-height:1.75;
  letter-spacing:.012em;
  overflow-x:hidden;
}

a{color:inherit}
img{max-width:100%;display:block}
p{margin:0 0 1.1em}

:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* ---------- 顶部 ---------- */
.mast{
  border-bottom:1px solid var(--ink);
  padding:.55rem var(--gut) .9rem;
}
.mast__inner{
  max-width:var(--max);
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:1.4rem;
}
.mast__nav{min-width:0}

.nav{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:.8rem;
}
.nav__col{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.1rem;
  margin:0;
  padding:0;
  list-style:none;
  min-width:0;
}
.nav__col--l{justify-content:flex-end}
.nav__col--r{justify-content:flex-start}
.nav__link{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  min-height:44px;
  padding:.5rem .6rem;
  font-size:.94rem;
  font-weight:600;
  letter-spacing:.02em;
  text-decoration:none;
  white-space:nowrap;
}
.nav__link .dot{
  width:5px;height:5px;
  background:var(--ink);
  border-radius:50%;
  flex:none;
}
.nav__link:hover .dot{box-shadow:0 0 0 3px rgba(0,0,0,.12)}
.nav__link:hover{text-decoration:underline;text-underline-offset:.36em;text-decoration-thickness:2px}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  min-height:44px;
  padding:.4rem .85rem;
  border-left:1px solid var(--ink);
  border-right:1px solid var(--ink);
  text-decoration:none;
  font-family:"Rubik","Nunito Sans",system-ui,sans-serif;
  font-weight:700;
  font-size:clamp(1rem,1.55vw,1.3rem);
  letter-spacing:-.03em;
  white-space:nowrap;
}
.brand__img{width:26px;height:26px;object-fit:contain}

.search{
  display:flex;
  align-items:center;
  gap:.35rem;
  border:1px solid var(--ink);
  border-radius:4px;
  padding:.15rem .15rem .15rem .7rem;
  background:var(--paper);
}
.search__label{
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.16em;
  white-space:nowrap;
}
.search__input{
  border:0;
  outline:0;
  background:transparent;
  font:inherit;
  font-size:.94rem;
  color:var(--ink);
  width:8.5rem;
  min-width:0;
  min-height:40px;
  padding:0;
}
.search__btn{
  border:0;
  background:var(--ink);
  color:var(--paper);
  font:inherit;
  font-size:.84rem;
  font-weight:700;
  letter-spacing:.1em;
  padding:.5rem .95rem;
  min-height:40px;
  border-radius:4px;
  cursor:pointer;
}
.search__btn:hover{background:#222}

/* ---------- 粘性锚点条 ---------- */
.anchors{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--paper);
  border-bottom:1px solid var(--ink);
  padding:0 var(--gut);
}
.anchors__nav{max-width:var(--max);margin:0 auto}
.anchors__list{
  display:flex;
  align-items:stretch;
  gap:.05rem;
  margin:0;
  padding:0;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
}
.anchors__list::-webkit-scrollbar{display:none}
.anchors__list li{flex:none}
.anchors__list a{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  min-height:var(--sticky);
  padding:.35rem .7rem;
  font-size:.84rem;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}
.anchors__num{
  font-family:"Rubik",system-ui,sans-serif;
  font-size:.68rem;
  letter-spacing:.1em;
  color:var(--muted);
}
.anchors__list a:hover,
.anchors__list a:focus-visible{
  background:var(--ink);
  color:var(--paper);
  outline-offset:-2px;
}
.anchors__list a:hover .anchors__num,
.anchors__list a:focus-visible .anchors__num{color:rgba(255,255,255,.62)}

/* ---------- 主区 ---------- */
.main{
  max-width:var(--max);
  margin:0 auto;
  padding:0 var(--gut) 4.5rem;
  display:grid;
  grid-template-columns:var(--rail) minmax(0,1fr);
  column-gap:clamp(1.5rem,4vw,3.5rem);
}

.hero{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1.02fr .98fr;
  align-items:center;
  gap:var(--gut);
  min-height:45vh;
  padding:clamp(1.8rem,4.5vw,3.6rem) 0;
}
.hero__text{order:2;text-align:right;min-width:0}
.hero__h1{
  margin:0;
  font-family:"Rubik","Nunito Sans",system-ui,sans-serif;
  font-weight:700;
  font-size:clamp(2.6rem,7.2vw,6.4rem);
  line-height:.94;
  letter-spacing:-.05em;
  text-wrap:balance;
  overflow-wrap:anywhere;
}
.hero__art{
  order:1;
  margin:0;
  position:relative;
  aspect-ratio:16/10;
  border:1px solid var(--ink);
  border-radius:4px;
  overflow:hidden;
  background-color:var(--paper);
  background-image:radial-gradient(rgba(0,0,0,.34) 1px,transparent 1.2px);
  background-size:14px 14px;
}
.hero__img{width:100%;height:100%;object-fit:cover}

.rail{
  grid-column:1;
  grid-row:2;
  align-self:start;
  position:sticky;
  top:calc(var(--sticky) + 14px);
  padding:clamp(2rem,5vw,3.4rem) 0 0;
}
.rail__h2{
  margin:0 0 .55rem;
  font-family:"Rubik","Nunito Sans",system-ui,sans-serif;
  font-size:clamp(1.25rem,1.9vw,1.6rem);
  font-weight:700;
  line-height:1.1;
  letter-spacing:-.035em;
}
.rail__sub{
  margin:0 0 1.2rem;
  font-size:.92rem;
  line-height:1.65;
  color:var(--muted);
  max-width:26ch;
}
.rail__top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.12em;
  text-decoration:none;
  border-bottom:1px solid var(--ink);
}

/* ---------- 正文区块 ---------- */
.main > div:not(.hero){
  grid-column:2;
  padding:clamp(2.2rem,5.5vw,4.2rem) 0;
  border-top:1px solid var(--ink);
  scroll-margin-top:calc(var(--sticky) + 10px);
}
.main > div:not(.hero):last-child{padding-bottom:1rem}

.main > div:not(.hero) h2{
  margin:0 0 .7rem;
  font-family:"Rubik","Nunito Sans",system-ui,sans-serif;
  font-size:clamp(1.55rem,3.3vw,2.5rem);
  font-weight:700;
  line-height:1.02;
  letter-spacing:-.045em;
  text-wrap:balance;
}
.main > div:not(.hero) h3{
  margin:1.8rem 0 .5rem;
  font-family:"Rubik","Nunito Sans",system-ui,sans-serif;
  font-size:clamp(1.1rem,1.9vw,1.35rem);
  font-weight:700;
  letter-spacing:-.02em;
}
.subtitle,.subhead,.lead{
  font-size:1.02rem;
  line-height:1.7;
  color:var(--muted);
  max-width:64ch;
}
.main > div:not(.hero) > p{max-width:64ch}
.main > div:not(.hero) ul,
.main > div:not(.hero) ol{
  max-width:64ch;
  margin:0 0 1.2em;
  padding-left:1.35em;
}
.main > div:not(.hero) li{margin:.35em 0}
.main > div:not(.hero) a{
  text-underline-offset:.28em;
  text-decoration-thickness:1.5px;
}
.main > div:not(.hero) strong{font-weight:700}

.main > div:not(.hero) figure{
  margin:1.6rem 0;
  padding:0;
  border:1px solid var(--ink);
  border-radius:4px;
  overflow:hidden;
  max-width:64ch;
}
.main > div:not(.hero) figure img{width:100%;height:auto}
.main > div:not(.hero) figcaption{
  font-size:.84rem;
  color:var(--muted);
  padding:.55rem .8rem;
  border-top:1px solid var(--hair);
}

.main > div:not(.hero) blockquote{
  margin:1.6rem 0;
  padding:.2rem 0 .2rem 1.1rem;
  border-left:3px solid var(--ink);
  max-width:62ch;
  font-size:1.05rem;
  letter-spacing:-.01em;
}
.main > div:not(.hero) blockquote p:last-child{margin-bottom:0}

.main > div:not(.hero) aside{
  margin:1.6rem 0;
  padding:1rem 1.1rem;
  border:1px solid var(--ink);
  border-radius:4px;
  max-width:64ch;
}
.main > div:not(.hero) aside p:last-child{margin-bottom:0}

.main > div:not(.hero) code,
.main > div:not(.hero) pre{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.9em;
}
.main > div:not(.hero) pre{
  overflow-x:auto;
  padding:.9rem 1rem;
  border:1px solid var(--ink);
  border-radius:4px;
}
.main > div:not(.hero) hr{
  border:0;
  border-top:1px solid var(--hair);
  margin:2rem 0;
}

.hit{outline:2px solid var(--ink);outline-offset:10px;border-radius:4px}

/* ---------- 页脚 ---------- */
.foot{
  border-top:1px solid var(--ink);
  padding:1.4rem var(--gut) 1.7rem;
  display:grid;
  grid-template-columns:auto 1fr 1fr auto;
  align-items:center;
  gap:1.2rem;
  max-width:var(--max);
  margin:0 auto;
}
.foot__brand .brand{border-left:0;padding-left:0}
.foot__nav{grid-column:2 / span 2}
.foot__list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.1rem 1rem;
  margin:0;
  padding:0;
  list-style:none;
}
.foot__list a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.2rem 0;
  font-size:.84rem;
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.foot__list a:hover{border-bottom-color:var(--ink)}
.foot__copy{justify-self:end}
.foot__copy p{
  margin:0;
  font-size:.8rem;
  color:var(--muted);
  text-align:center;
  white-space:nowrap;
}

/* ---------- 动效 ---------- */
.will-reveal{opacity:0;transform:translateY(18px);transition:opacity .55s ease,transform .55s cubic-bezier(.2,.7,.2,1)}
.will-reveal > *{opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease}
.will-reveal.in,
.will-reveal.in > *{opacity:1;transform:none}
.will-reveal.in > *:nth-child(2){transition-delay:.05s}
.will-reveal.in > *:nth-child(3){transition-delay:.1s}
.will-reveal.in > *:nth-child(4){transition-delay:.15s}
.will-reveal.in > *:nth-child(5){transition-delay:.2s}
.will-reveal.in > *:nth-child(n+6){transition-delay:.25s}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .will-reveal,.will-reveal > *{opacity:1;transform:none;transition:none}
}

/* ---------- 中屏 ---------- */
@media (max-width:980px){
  .mast__inner{grid-template-columns:1fr;gap:.6rem}
  .search{width:100%}
  .search__input{flex:1;width:auto}
  .nav{grid-template-columns:1fr;gap:.2rem}
  .nav__col--l,.nav__col--r{justify-content:center}
  .brand{order:-1;justify-self:center;border-left:0;border-right:0;padding:.3rem .5rem}
  .main{grid-template-columns:1fr;padding-bottom:3rem}
  .hero{grid-template-columns:1fr;min-height:0;padding:1.6rem 0 1.8rem;gap:1.2rem}
  .hero__text{order:1;text-align:left}
  .hero__art{order:2;aspect-ratio:16/9}
  .rail{
    grid-column:1;
    grid-row:auto;
    position:static;
    padding:1.4rem 0 1.6rem;
    border-top:1px solid var(--ink);
  }
  .rail__sub{max-width:52ch}
  .main > div:not(.hero){grid-column:1}
  .foot{grid-template-columns:1fr;justify-items:center;gap:.5rem;text-align:center}
  .foot__brand .brand{justify-self:center}
  .foot__nav{grid-column:1;width:100%}
  .foot__copy{justify-self:center}
}

/* ---------- 小屏 ---------- */
@media (max-width:560px){
  body{font-size:16px}
  .hero__h1{font-size:clamp(2.3rem,11vw,3.2rem)}
  .hero__art{aspect-ratio:3/2}
  .nav__link{font-size:.9rem;padding:.4rem .5rem}
  .anchors__list a{padding:.35rem .55rem;font-size:.8rem}
  .search__label{display:none}
  .foot__list{gap:.1rem .8rem}
  .main > div:not(.hero) h2{letter-spacing:-.035em}
}

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