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

:root{
  --ink:#1c1726;
  --ink2:#150f1f;
  --vio:#6514ff;
  --mag:#bf00ff;
  --line:rgba(255,255,255,.13);
  --serif:'Cormorant Garamond','Songti SC','Noto Serif SC',serif;
  --body:'Libre Baskerville','Songti SC','Noto Serif SC',serif;
}

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

html{scroll-behavior:smooth}

body{
  margin:0;
  overflow-x:hidden;
  background:var(--ink);
  color:#ece4fb;
  font-family:var(--body);
  font-size:17px;
  line-height:1.7;
  -webkit-text-size-adjust:100%;
}

body::before{
  content:"";
  position:fixed;
  inset:-20%;
  z-index:0;
  pointer-events:none;
  background-image:repeating-linear-gradient(115deg,rgba(101,20,255,.18) 0 2px,transparent 2px 30px);
  background-size:200% 200%;
  animation:drift 24s linear infinite;
}

@keyframes drift{
  from{background-position:0 0}
  to{background-position:340px 340px}
}

img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--mag);outline-offset:3px}
hr{border:0;height:2px;margin:.5rem 0 1.4rem;background:linear-gradient(90deg,var(--mag),var(--vio) 45%,transparent)}

.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.skip{
  position:fixed;top:.4rem;left:.4rem;z-index:60;
  padding:.6rem 1rem;border-radius:999px;
  background:var(--mag);color:#fff;font-size:.9rem;
  transform:translateY(-250%);transition:transform .2s;
}
.skip:focus{transform:none}

/* 顶栏 */
.top{
  position:relative;z-index:30;
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;
  padding:.8rem clamp(1rem,4vw,3rem);
  border-bottom:1px solid var(--line);
  background:rgba(28,23,38,.72);
}
.brand{
  display:inline-flex;align-items:center;gap:.55rem;justify-self:center;
  font-family:var(--serif);font-size:1.5rem;font-weight:700;letter-spacing:.07em;color:#fff;white-space:nowrap;
}
.mark{width:.85rem;height:1.45rem;border-radius:2px;transform:skewX(-14deg);background:linear-gradient(160deg,var(--mag),var(--vio))}
.side ol{display:flex;flex-wrap:nowrap;gap:.2rem;margin:0;padding:0;list-style:none}
.side.left ol{justify-content:flex-end}
.side a{
  display:inline-flex;align-items:center;min-height:40px;padding:.3rem .7rem;
  font-size:.95rem;color:#d8cbf2;border-radius:999px;transition:background .22s,color .22s;
}
.side a:hover{background:rgba(191,0,255,.24);color:#fff}
.hright{display:flex;align-items:center;gap:.5rem;justify-self:start}
.pill{
  display:inline-flex;align-items:center;min-height:40px;padding:.35rem 1rem;
  border-radius:999px;background:linear-gradient(120deg,var(--vio),var(--mag));
  color:#fff;font-size:.95rem;font-weight:700;white-space:nowrap;
  transition:filter .2s,transform .2s;
}
.pill:hover{filter:brightness(1.18);transform:translateY(-1px)}

/* 首屏 */
.hero{
  position:relative;z-index:1;isolation:isolate;overflow:hidden;
  min-height:88vh;min-height:88svh;
  display:flex;align-items:center;justify-content:flex-end;
  padding:clamp(2rem,6vw,4rem) clamp(1.1rem,5vw,4rem) clamp(5rem,12vw,8rem);
  clip-path:polygon(0 0,100% 0,100% 86%,0 100%);
  background:linear-gradient(135deg,var(--vio),var(--mag) 68%,#2a0a4a);
}
.hero-art{position:absolute;inset:0;z-index:-1}
.hero-img{width:100%;height:100%;object-fit:cover;filter:grayscale(1) contrast(1.15);mix-blend-mode:luminosity;opacity:.85}
.hero-copy{max-width:34ch;text-align:right;text-shadow:0 2px 26px rgba(12,6,26,.8)}
.hero h1{
  margin:0 0 1rem;color:#fff;font-family:var(--serif);font-weight:700;
  font-size:clamp(2.4rem,7vw,5rem);line-height:1.04;letter-spacing:.01em;
}
.lede{margin:0 0 1.6rem auto;max-width:30ch;font-size:clamp(1rem,1.9vw,1.15rem);color:#f2e8ff}
.cta{
  display:inline-flex;align-items:center;min-height:44px;padding:.5rem 1.4rem;
  border-radius:999px;background:#fff;color:#2a0a4a;font-weight:700;letter-spacing:.05em;
  transition:transform .25s,background .25s,color .25s;
}
.cta:hover{transform:translateX(-5px);background:var(--ink);color:#fff}

/* 粘性锚点条 */
.anchors{
  position:sticky;top:0;z-index:40;display:flex;gap:.4rem;overflow-x:auto;
  padding:.5rem clamp(.8rem,4vw,3rem);
  background:rgba(21,15,31,.94);backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(191,0,255,.38);
  scrollbar-width:none;
}
.anchors::-webkit-scrollbar{display:none}
.anchors ol{display:flex;gap:.4rem;margin:0;padding:0;list-style:none}
.anchors a{
  display:inline-flex;align-items:center;min-height:40px;padding:.25rem .9rem;
  border:1px solid rgba(191,0,255,.45);border-radius:999px;white-space:nowrap;
  font-size:.9rem;color:#e5d6ff;transition:background .2s,color .2s,border-color .2s;
}
.anchors a:hover{background:var(--mag);border-color:transparent;color:#fff}

/* 主区 */
main{
  position:relative;z-index:1;
  display:grid;grid-template-columns:minmax(0,1fr) 19rem;
  gap:clamp(2rem,5vw,4rem);
  max-width:76rem;margin-inline:auto;
  padding:clamp(2.5rem,6vw,5rem) clamp(1.1rem,5vw,4rem);
}

.prose{min-width:0;font-size:1.03rem}
.prose > section{
  padding-block:clamp(2rem,5vw,3.4rem);
  border-top:1px solid var(--line);
  scroll-margin-top:5.6rem;
}
.prose > section:first-child{border-top:0;padding-top:0}
.prose h2{
  margin:0 0 .5rem;color:#fff;font-family:var(--serif);
  font-size:clamp(1.7rem,3.6vw,2.4rem);line-height:1.16;letter-spacing:.01em;
}
.prose h2::before{
  content:"";display:inline-block;width:.5em;height:.5em;margin-right:.45rem;
  border-radius:2px;transform:skewX(-12deg);
  background:linear-gradient(135deg,var(--mag),var(--vio));
}
.prose h3{margin:1.8rem 0 .4rem;font-family:var(--serif);font-size:1.4rem;color:#fff}
.prose p{margin:0 0 1.1rem;max-width:64ch;color:#ddd2f0}
.prose a{color:#efd9ff;text-decoration:underline;text-decoration-color:var(--mag);text-underline-offset:.22em}
.prose ul,.prose ol{max-width:62ch;padding-left:1.3rem;color:#ddd2f0}
.prose li{margin:.4rem 0}
.prose strong{color:#fff}
.prose blockquote{
  margin:1.6rem 0;padding:.2rem 0 .2rem 1.1rem;
  border-left:3px solid var(--mag);
  font-family:var(--serif);font-size:1.2rem;color:#fff;
}
.prose img{border-radius:10px;margin:1.2rem 0}

/* 侧栏 */
.rail{align-self:start;position:sticky;top:5.4rem;display:grid;gap:1.1rem}
.card{
  padding:1rem .95rem;border:1px solid var(--line);border-bottom:3px solid var(--mag);
  border-radius:10px;background:rgba(255,255,255,.05);
}
.card h2{margin:0 0 .35rem;font-family:var(--serif);font-size:1.35rem;color:#fff}
.toc{list-style:none;margin:0;padding:0;counter-reset:t}
.toc li{counter-increment:t;border-top:1px dashed rgba(255,255,255,.14)}
.toc li:first-child{border-top:0}
.toc a{display:flex;align-items:center;gap:.5rem;min-height:40px;font-size:.95rem;color:#d9c9f5}
.toc a::before{content:counter(t,decimal-leading-zero);font-family:var(--serif);font-size:.82rem;letter-spacing:.08em;color:var(--mag)}
.toc a:hover{color:#fff}
.rail-art{overflow:hidden;border-radius:8px;margin-bottom:.8rem}
.rail-art img{width:100%;aspect-ratio:4/3;object-fit:cover;filter:grayscale(.45)}
.ghost{
  display:inline-flex;align-items:center;min-height:40px;padding:.3rem 1rem;
  border:1px solid var(--vio);border-radius:999px;font-size:.95rem;color:#e6d8ff;
  transition:background .2s,color .2s;
}
.ghost:hover{background:var(--vio);color:#fff}

/* 页脚 */
.foot{
  position:relative;z-index:1;margin-top:clamp(2rem,6vw,4rem);
  padding:clamp(2.2rem,5vw,3.4rem) clamp(1.1rem,5vw,4rem) 1.4rem;
  background:var(--ink2);border-top:1px solid var(--line);
}
.foot-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:2rem;max-width:76rem;margin-inline:auto;
}
.foot dt{margin-bottom:.4rem;font-family:var(--serif);font-size:1.2rem;letter-spacing:.09em;color:var(--mag)}
.foot dd{margin:0}
.foot dd a{
  display:inline-flex;align-items:center;min-height:40px;font-size:.95rem;color:#cdbfe6;
}
.foot dd a:hover{color:#fff;text-decoration:underline;text-decoration-color:var(--mag)}
.sub h2{margin:0 0 .4rem;font-family:var(--serif);font-size:1.2rem;letter-spacing:.09em;color:var(--mag)}
.subform{display:flex;flex-wrap:wrap;gap:.5rem}
.subform input{
  flex:1 1 8rem;min-height:44px;padding:.5rem .8rem;border-radius:10px;
  border:1px solid var(--line);background:rgba(255,255,255,.06);
  color:#fff;font:inherit;font-size:.95rem;
}
.subform button{
  min-height:44px;padding:.5rem 1.2rem;border:0;border-radius:10px;
  background:linear-gradient(120deg,var(--vio),var(--mag));color:#fff;
  font:inherit;font-weight:700;cursor:pointer;transition:filter .2s;
}
.subform button:hover{filter:brightness(1.15)}
.foot-bar{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;
  max-width:76rem;margin:2rem auto 0;padding-top:1rem;
  border-top:1px solid var(--line);font-size:.85rem;color:#a99bc4;
}
.foot-bar p{margin:0;text-align:center}
.foot-bar a{justify-self:start;display:inline-flex;align-items:center;min-height:40px}
.foot-bar .host{justify-self:end;text-align:right;word-break:break-all}

/* 动效 */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .5s ease,transform .5s ease}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::before{animation:none}
  .reveal{opacity:1;transform:none;transition:none}
  .cta:hover,.pill:hover{transform:none}
}

/* 窄屏 */
@media (max-width:960px){
  .side{display:none}
  .top{padding:.7rem 1rem}
  .brand{font-size:1.35rem}
}

@media (max-width:880px){
  .hero{
    align-items:flex-end;justify-content:flex-start;
    min-height:76vh;min-height:76svh;
    padding-bottom:clamp(4rem,14vw,6rem);
    clip-path:polygon(0 0,100% 0,100% 92%,0 100%);
  }
  .hero-copy{text-align:left}
  .lede{margin-left:0}
  main{grid-template-columns:minmax(0,1fr);padding-top:2rem}
  .rail{position:static;grid-template-columns:minmax(0,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr;gap:1.6rem}
  .foot-bar{grid-template-columns:1fr;justify-items:center;text-align:center}
  .foot-bar a,.foot-bar .host{justify-self:center;text-align:center}
}

@media (max-width:560px){
  .foot-grid{grid-template-columns:minmax(0,1fr)}
  .prose h2::before{width:.45em;height:.45em}
}

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