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

:root{
  --ink:#1f1726;
  --ink-soft:#2a1f36;
  --plum:#56228b;
  --plum-lite:#8a4fd0;
  --clay:#8b4513;
  --cream:#f5eef8;
  --muted:#c2b1d1;
  --line:rgba(245,238,248,.14);
  --r-lg:26px;
  --r-md:16px;
  --r-card:10px;
  --pad:clamp(16px,4vw,44px);
  --shadow:0 22px 48px -26px rgba(0,0,0,.85);
}

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

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  scrollbar-color:var(--plum) var(--ink);
}

body{
  margin:0;
  font-family:Inter,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  font-size:17px;
  line-height:1.7;
  color:var(--cream);
  background-color:var(--ink);
  background-image:
    radial-gradient(72% 52% at 94% -8%, rgba(86,34,139,.58), transparent 68%),
    radial-gradient(62% 46% at -10% 52%, rgba(139,69,19,.42), transparent 72%),
    radial-gradient(52% 42% at 62% 104%, rgba(86,34,139,.3), transparent 72%);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
p{margin:0 0 1em}
:focus-visible{outline:2px solid var(--plum-lite);outline-offset:3px;border-radius:10px}

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

/* ---------- 顶栏 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  padding:10px var(--pad);
  background:linear-gradient(180deg,rgba(31,23,38,.96),rgba(31,23,38,.74));
  border-bottom:1px solid var(--line);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding-right:8px;
  font-weight:800;
  font-size:17px;
  letter-spacing:.01em;
  white-space:nowrap;
}
.brand-mark{
  width:38px;height:38px;flex:none;
  display:grid;place-items:center;
  border-radius:62% 38% 55% 45%/48% 58% 42% 52%;
  background:linear-gradient(150deg,var(--plum),var(--clay));
  box-shadow:0 8px 20px -12px rgba(0,0,0,.9);
  font-size:17px;font-weight:800;color:var(--cream);
}
.brand-img{width:38px;height:38px;border-radius:50%;object-fit:cover}
.brand-text{max-width:52vw;overflow:hidden;text-overflow:ellipsis}

.nav{flex:1 1 auto;min-width:0}
.nav p{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  margin:0;
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:none;
  justify-content:flex-end;
}
.nav p::-webkit-scrollbar{display:none}
.nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 15px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:15px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
.nav a:hover,.nav a.on{
  background:rgba(86,34,139,.55);
  border-color:rgba(245,238,248,.2);
  color:var(--cream);
}

/* ---------- 主体栅格 ---------- */
main{
  display:grid;
  grid-template-columns:252px minmax(0,1fr);
  gap:clamp(22px,4vw,58px);
  max-width:1280px;
  margin:0 auto;
  padding:0 var(--pad) 72px;
}

/* ---------- 侧栏 ---------- */
.side{
  position:sticky;
  top:82px;
  align-self:start;
  margin-top:clamp(24px,4vw,52px);
  padding:20px 18px 22px;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  background:linear-gradient(170deg,rgba(86,34,139,.2),rgba(31,23,38,.5));
  box-shadow:var(--shadow);
}
.side-title{
  margin:0;
  font-size:19px;
  font-weight:800;
  letter-spacing:.02em;
}
.subtitle{
  margin:4px 0 16px;
  font-size:14.5px;
  line-height:1.5;
  color:var(--muted);
}
.side-list{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:s;
}
.side-list li{counter-increment:s}
.side-list li + li{border-top:1px solid rgba(245,238,248,.09)}
.side-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:6px 2px;
  font-size:15.5px;
  color:var(--muted);
  transition:color .2s ease,transform .2s ease;
}
.side-list a::before{
  content:counter(s,decimal-leading-zero);
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  color:rgba(245,238,248,.45);
  border-radius:8px;
  padding:2px 6px;
  background:rgba(139,69,19,.24);
}
.side-list a:hover{color:var(--cream);transform:translateX(3px)}

/* ---------- 正文 ---------- */
.doc{min-width:0;padding-top:clamp(18px,3vw,36px)}

.hero{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  text-align:right;
  min-height:100vh;
  min-height:100svh;
  padding:56px 0 72px;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background-image:radial-gradient(circle,rgba(245,238,248,.16) 1px,transparent 1px);
  background-size:24px 24px;
  -webkit-mask-image:radial-gradient(115% 85% at 88% 45%,#000 26%,transparent 76%);
  mask-image:radial-gradient(115% 85% at 88% 45%,#000 26%,transparent 76%);
}
.hero::after{
  content:"";
  position:absolute;
  z-index:0;
  left:-8%;
  bottom:6%;
  width:min(64vw,540px);
  aspect-ratio:1;
  border-radius:62% 38% 55% 45%/48% 58% 42% 52%;
  background:radial-gradient(circle at 38% 32%,rgba(86,34,139,.8),rgba(139,69,19,.38) 62%,transparent 74%);
  filter:blur(4px);
  animation:blob 24s ease-in-out infinite alternate;
}
@keyframes blob{
  from{border-radius:62% 38% 55% 45%/48% 58% 42% 52%;transform:translate3d(0,0,0) rotate(0deg)}
  to{border-radius:44% 56% 38% 62%/58% 44% 56% 42%;transform:translate3d(2%,-3%,0) rotate(6deg)}
}
.hero-h1{
  position:relative;
  z-index:1;
  margin:0;
  max-width:14ch;
  font-size:clamp(2.5rem,8.6vw,6.2rem);
  line-height:.99;
  font-weight:800;
  letter-spacing:-.045em;
  background:linear-gradient(158deg,#fbf6ff 34%,#c49cf0 68%,#e6b184);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.doc > section{
  padding:clamp(30px,5vw,58px) 0;
  scroll-margin-top:132px;
}
.doc > section + section{border-top:1px solid var(--line)}

.doc h2{
  margin:0 0 14px;
  font-size:clamp(1.45rem,3vw,2rem);
  line-height:1.24;
  font-weight:800;
  letter-spacing:-.02em;
}
.doc h3{
  margin:26px 0 10px;
  font-size:1.16rem;
  font-weight:700;
  color:#efdfF8;
}
.doc p,
.doc li{
  color:#e5d9ef;
  max-width:70ch;
  font-size:17px;
}
.doc ul,.doc ol{
  padding-left:1.25em;
  margin:0 0 1.1em;
}
.doc li{margin:.35em 0}
.doc li::marker{color:var(--plum-lite)}
.doc a{
  color:#d9bcf7;
  text-decoration:underline;
  text-decoration-color:rgba(217,188,247,.42);
  text-underline-offset:3px;
}
.doc a:hover{color:#fff;text-decoration-color:#fff}
.doc strong{color:#fff}
.doc blockquote{
  margin:1.2em 0;
  padding:16px 20px;
  border-left:3px solid var(--clay);
  border-radius:0 var(--r-md) var(--r-md) 0;
  background:rgba(139,69,19,.14);
}
.doc blockquote p:last-child{margin-bottom:0}
.doc figure{margin:1.4em 0}
.doc figcaption{font-size:14px;color:var(--muted);margin-top:8px}
.doc table{width:100%;border-collapse:collapse;font-size:15.5px;margin:1.2em 0}
.doc th,.doc td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:40px;
  padding:clamp(30px,5vw,58px) var(--pad) 22px;
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(86,34,139,.22),rgba(31,23,38,.98) 58%);
}
.foot-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px 34px;
  align-items:center;
  max-width:1200px;
  margin:0 auto clamp(26px,4vw,44px);
  padding:22px 24px;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  background:linear-gradient(150deg,rgba(86,34,139,.3),rgba(139,69,19,.18));
  box-shadow:var(--shadow);
}
.foot-brand{
  margin:0;
  font-size:clamp(1.25rem,2.6vw,1.7rem);
  font-weight:800;
  letter-spacing:-.02em;
}
.foot-form{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.foot-form input{
  flex:1 1 180px;
  min-height:48px;
  padding:0 16px;
  font:inherit;
  font-size:16px;
  color:var(--cream);
  background:rgba(31,23,38,.6);
  border:1px solid rgba(245,238,248,.22);
  border-radius:14px;
}
.foot-form input::placeholder{color:var(--muted)}
.foot-form button{
  flex:0 0 auto;
  min-height:48px;
  padding:0 24px;
  font:inherit;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(140deg,var(--plum),var(--clay));
  border:0;
  border-radius:999px;
  cursor:pointer;
  transition:filter .2s ease,transform .2s ease;
}
.foot-form button:hover{filter:brightness(1.12);transform:translateY(-1px)}

.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px 28px;
  max-width:1200px;
  margin:0 auto clamp(22px,4vw,36px);
}
.foot-cols dl{margin:0;min-width:0}
.foot-cols dt{
  margin-bottom:8px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.16em;
  color:rgba(245,238,248,.55);
}
.foot-cols dd{margin:0}
.foot-cols a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:15.5px;
  color:var(--muted);
  transition:color .2s ease,transform .2s ease;
}
.foot-cols a:hover{color:var(--cream);transform:translateX(3px)}

.foot-bottom{
  display:flex;
  flex-wrap:wrap;
  gap:10px 22px;
  align-items:center;
  justify-content:space-between;
  max-width:1200px;
  margin:0 auto;
  padding-top:18px;
  border-top:1px solid var(--line);
  font-size:14.5px;
  color:rgba(245,238,248,.6);
}
.foot-bottom p{margin:0}
.foot-links{display:flex;flex-wrap:wrap;gap:4px 18px}
.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--muted);
}
.foot-links a:hover{color:var(--cream)}

/* ---------- 动效 ---------- */
.rv [data-reveal]{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .62s ease,transform .62s cubic-bezier(.22,.7,.3,1);
  transition-delay:var(--d,0s);
  will-change:opacity,transform;
}
.rv [data-reveal].in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero::after{animation:none}
  .rv [data-reveal]{opacity:1;transform:none;transition:none}
}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  main{grid-template-columns:minmax(0,1fr);gap:0}
  .doc{order:1;padding-top:6px}
  .side{
    position:static;
    order:2;
    margin-top:38px;
  }
  .side-list a{min-height:46px}
  .hero{min-height:auto;padding:44px 0 52px;align-items:flex-start;text-align:left}
  .hero-h1{max-width:100%}
  .hero::before{mask-image:radial-gradient(120% 90% at 70% 40%,#000 20%,transparent 78%);
    -webkit-mask-image:radial-gradient(120% 90% at 70% 40%,#000 20%,transparent 78%)}
  .hero::after{width:min(78vw,420px);bottom:0;left:-14%}
  .doc > section{scroll-margin-top:150px}
}

@media (max-width:640px){
  body{font-size:16.5px}
  .top{gap:8px;padding:8px 16px 6px}
  .brand{font-size:16px}
  .nav{flex:1 0 100%;order:3}
  .nav p{justify-content:flex-start;padding-bottom:4px}
  .nav a{padding:0 13px;font-size:14.5px}
  .foot-top{grid-template-columns:minmax(0,1fr);padding:18px 16px}
  .foot-form{justify-content:stretch}
  .foot-form input{flex:1 1 100%}
  .foot-form button{flex:1 1 100%}
  .foot-cols{grid-template-columns:minmax(0,1fr);gap:6px 0}
  .foot-cols dl{padding-bottom:6px}
  .foot-cols dl + dl{border-top:1px solid rgba(245,238,248,.1);padding-top:8px}
  .foot-bottom{justify-content:flex-start}
  .doc h3{font-size:1.1rem}
}

@media (min-width:641px) and (max-width:900px){
  .nav p{justify-content:flex-end}
}

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