@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root{
  --ink:#0d0d0d;
  --pri:#8000ff;
  --sec:#ff00ff;
  --txt:#ece6f8;
  --dim:#a89ac6;
  --line:rgba(128,0,255,.26);
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Courier New",monospace;
  --r:18px;
  --pad:clamp(1rem,4vw,2.4rem);
}

*{box-sizing:border-box}

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

body{
  margin:0;
  overflow-x:hidden;
  background-color:var(--ink);
  color:var(--txt);
  font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.72;
  background-image:
    radial-gradient(72vw 52vw at 84% -12%,rgba(255,0,255,.16),transparent 68%),
    radial-gradient(62vw 46vw at 4% 2%,rgba(128,0,255,.18),transparent 70%),
    repeating-linear-gradient(0deg,transparent 0 77px,rgba(128,0,255,.06) 77px 78px),
    repeating-linear-gradient(90deg,transparent 0 77px,rgba(128,0,255,.06) 77px 78px);
  background-attachment:fixed;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:80;
  pointer-events:none;
  opacity:.5;
  background:repeating-linear-gradient(180deg,rgba(0,0,0,.45) 0 1px,transparent 1px 3px);
}

img{max-width:100%}

::selection{background:rgba(255,0,255,.35);color:#fff}

a{color:#f0bcff}

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

section[id]{scroll-margin-top:110px}

/* ---------- 顶栏 ---------- */
.bar{
  position:sticky;
  top:0;
  z-index:70;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:.9rem;
  padding:.7rem var(--pad);
  background:rgba(13,13,13,.9);
  border-bottom:1px solid var(--line);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  transition:box-shadow .3s ease,border-color .3s ease;
}

.bar.stuck{border-bottom-color:rgba(255,0,255,.55);box-shadow:0 8px 30px rgba(255,0,255,.16)}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  min-height:44px;
  padding-right:.4rem;
  color:#fff;
  text-decoration:none;
  font-weight:700;
  letter-spacing:-.01em;
  font-size:1rem;
}

.brand-t{white-space:nowrap}

.mark{
  width:26px;
  height:26px;
  flex:0 0 auto;
  display:block;
  border-radius:7px;
  background:linear-gradient(135deg,var(--pri),var(--sec));
  clip-path:polygon(0 0,72% 0,100% 28%,100% 100%,28% 100%,0 72%);
  box-shadow:0 0 14px rgba(255,0,255,.75);
  object-fit:cover;
}

.pills{min-width:0}

.pills ol{
  display:flex;
  align-items:center;
  gap:.35rem;
  margin:0;
  padding:.2rem 0;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
}

.pills ol::-webkit-scrollbar{display:none}

.pills li{flex:0 0 auto}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 .86rem;
  border:1px solid rgba(255,0,255,.32);
  border-radius:999px;
  color:var(--dim);
  text-decoration:none;
  font-family:var(--mono);
  font-size:.82rem;
  letter-spacing:.01em;
  white-space:nowrap;
  transition:color .18s,border-color .18s,box-shadow .18s,background .18s;
}

.pill:hover,.pill.on{
  color:#fff;
  border-color:var(--sec);
  background:rgba(255,0,255,.12);
  box-shadow:0 0 14px rgba(255,0,255,.5);
  text-shadow:0 0 10px rgba(255,0,255,.85);
}

.find{display:flex}

.find input{
  width:clamp(112px,15vw,170px);
  height:40px;
  padding:0 .9rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(128,0,255,.1);
  color:var(--txt);
  font:inherit;
  font-size:.84rem;
  font-family:var(--mono);
}

.find input::placeholder{color:#7e719a}

.find input:focus{outline:none;border-color:var(--sec);box-shadow:0 0 14px rgba(255,0,255,.45)}

/* ---------- 主视觉 ---------- */
.hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,1fr);
  align-items:center;
  gap:clamp(1.2rem,4vw,3rem);
  min-height:70vh;
  max-width:1180px;
  margin:0 auto;
  padding:clamp(1.8rem,5vw,3.6rem) var(--pad);
}

.hero-num{
  position:absolute;
  right:-1.5vw;
  bottom:-3vh;
  z-index:0;
  font-family:var(--mono);
  font-weight:700;
  font-size:clamp(9rem,25vw,21rem);
  line-height:.76;
  letter-spacing:-.06em;
  color:transparent;
  -webkit-text-stroke:1px rgba(255,0,255,.3);
  pointer-events:none;
  user-select:none;
}

.hero-fig{
  position:relative;
  z-index:1;
  margin:0;
  aspect-ratio:4/3;
  border:1px solid rgba(255,0,255,.45);
  border-radius:var(--r);
  overflow:hidden;
  background:linear-gradient(155deg,rgba(128,0,255,.26),rgba(255,0,255,.09));
  box-shadow:0 0 0 1px rgba(128,0,255,.3),0 0 34px rgba(128,0,255,.36),inset 0 0 40px rgba(255,0,255,.12);
  clip-path:polygon(0 0,calc(100% - 18px) 0,100% 18px,100% 100%,18px 100%,0 calc(100% - 18px));
}

.hero-fig .hero-img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:contrast(1.08) saturate(1.06);
}

.hero-copy{position:relative;z-index:1;text-align:center}

.hero-copy h1{
  margin:0 0 1rem;
  font-size:clamp(1.85rem,4.8vw,3.1rem);
  line-height:1.15;
  letter-spacing:-.025em;
  color:#fff;
  text-shadow:0 0 22px rgba(255,0,255,.6),0 0 48px rgba(128,0,255,.5);
  animation:glitch 7s infinite steps(1);
}

@keyframes glitch{
  0%,91%,100%{transform:none}
  92%{transform:translate(-2px,1px) skewX(-2.5deg)}
  94%{transform:translate(2px,-1px) skewX(2.5deg)}
  96%{transform:translate(-1px,0) skewX(0)}
}

.hero-desc{
  max-width:34ch;
  margin:0 auto;
  color:var(--dim);
  font-size:1rem;
}

/* ---------- 版面网格 ---------- */
.shell{
  display:grid;
  grid-template-columns:212px minmax(0,1fr);
  align-items:start;
  gap:clamp(1.2rem,3.5vw,2.8rem);
  max-width:1180px;
  margin:0 auto;
  padding:0 var(--pad) 3rem;
}

.rail{
  position:sticky;
  top:96px;
  padding:.2rem 0 .2rem 1rem;
  border-left:2px solid var(--sec);
}

.rail-h{
  margin:0 0 .7rem;
  font-family:var(--mono);
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.2em;
  color:var(--sec);
  text-shadow:0 0 12px rgba(255,0,255,.7);
}

.rail-h span{display:inline-block}

.rail-list{
  counter-reset:r;
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:.1rem;
}

.rail-list li{counter-increment:r}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.2rem 0;
  color:var(--dim);
  font-size:.88rem;
  text-decoration:none;
  border-bottom:1px dashed rgba(128,0,255,.2);
  transition:color .18s,text-shadow .18s;
}

.rail-list a::before{
  content:counter(r,decimal-leading-zero);
  margin-right:.5rem;
  font-family:var(--mono);
  font-size:.68rem;
  color:rgba(255,0,255,.72);
}

.rail-list a:hover{color:#fff;text-shadow:0 0 12px rgba(255,0,255,.8)}

/* ---------- 正文 ---------- */
.flow{
  counter-reset:sec;
  min-width:0;
}

.flow > section{
  counter-increment:sec;
  padding:2.2rem 0 1rem;
  border-top:1px solid rgba(128,0,255,.24);
}

.flow > section:first-child{border-top:0;padding-top:.4rem}

.flow h2,
.flow h3{
  position:relative;
  color:#fff;
  line-height:1.28;
  letter-spacing:-.012em;
}

.flow > section > h2{
  margin:0 0 1rem;
  padding-left:3.1rem;
  font-size:clamp(1.32rem,3vw,1.8rem);
}

.flow > section > h2::before{
  content:counter(sec,decimal-leading-zero);
  position:absolute;
  left:0;
  top:.16em;
  padding:.06rem .36rem;
  border:1px solid rgba(255,0,255,.45);
  border-radius:6px;
  font-family:var(--mono);
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.06em;
  color:var(--sec);
  box-shadow:0 0 10px rgba(255,0,255,.35);
}

.flow h2 span,
.flow h3 span{
  display:inline-block;
  padding-bottom:.08em;
  background:linear-gradient(90deg,rgba(255,0,255,.32),rgba(128,0,255,.05) 78%,transparent);
  border-left:2px solid var(--pri);
  padding-left:.42em;
  transition:transform .2s ease;
}

.flow h2:hover span,
.flow h3:hover span{transform:skewX(-3deg)}

.flow h3{margin:1.4rem 0 .7rem;font-size:1.12rem}

.flow p{margin:0 0 1.05rem;max-width:68ch;color:#dad3ea}

.flow a{
  color:#f2bcff;
  text-underline-offset:3px;
  text-decoration-color:rgba(255,0,255,.55);
}

.flow a:hover{color:#fff;text-shadow:0 0 12px rgba(255,0,255,.8)}

.flow strong{color:#fff;font-weight:700}

.flow ul,
.flow ol{
  margin:0 0 1.1rem;
  padding-left:1.25rem;
  max-width:64ch;
}

.flow li{margin-bottom:.45rem}

.flow li::marker{color:var(--sec)}

.flow blockquote{
  margin:0 0 1.1rem;
  padding:.85rem 1.1rem;
  border-left:3px solid var(--sec);
  border-radius:0 var(--r) var(--r) 0;
  background:rgba(255,0,255,.07);
  color:#e5dcf6;
}

.flow blockquote p:last-child{margin-bottom:0}

.flow figure{
  margin:0 0 1.1rem;
  border:1px solid var(--line);
  border-radius:var(--r);
  overflow:hidden;
}

.flow img{display:block;width:100%;height:auto}

.flow code,
.flow pre{
  font-family:var(--mono);
  font-size:.9em;
  background:rgba(128,0,255,.16);
  border-radius:6px;
}

.flow code{padding:.1em .38em}

.flow pre{padding:.9rem 1rem;overflow-x:auto;border:1px solid var(--line)}

.flow hr{border:0;border-top:1px dashed rgba(255,0,255,.35);margin:1.6rem 0}

/* ---------- 页脚 ---------- */
.foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:.8rem;
  max-width:1180px;
  margin:0 auto;
  padding:1.4rem var(--pad) 1.8rem;
  border-top:1px solid var(--sec);
  box-shadow:inset 0 1px 0 rgba(255,0,255,.35);
  font-family:var(--mono);
  font-size:.8rem;
  color:var(--dim);
}

.foot p{
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}

.foot p a{
  color:#fff;
  text-decoration:none;
  padding:.35rem 0;
  min-height:40px;
  display:inline-flex;
  align-items:center;
}

.foot small{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.4rem;
  font-size:inherit;
}

.foot small a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 .62rem;
  border:1px solid rgba(128,0,255,.32);
  border-radius:999px;
  color:#e3d7f8;
  text-decoration:none;
  transition:color .18s,border-color .18s,box-shadow .18s;
}

.foot small a:hover{color:#fff;border-color:var(--sec);box-shadow:0 0 12px rgba(255,0,255,.5)}

/* ---------- 滚动揭示 ---------- */
.rv{opacity:0;transform:translateY(18px)}

.rv.in{
  opacity:1;
  transform:none;
  transition:opacity .55s ease,transform .55s cubic-bezier(.2,.75,.3,1);
}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  .bar{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"b f" "n n";
    row-gap:.5rem;
  }
  .brand{grid-area:b}
  .find{grid-area:f}
  .pills{grid-area:n}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
    gap:1.1rem;
    padding-top:1.3rem;
  }
  .hero-copy{order:-1}
  .hero-fig{aspect-ratio:16/10}
  .hero-num{
    top:.4rem;
    bottom:auto;
    right:0;
    font-size:clamp(6.5rem,32vw,12rem);
  }
  .hero-desc{max-width:46ch}

  .shell{grid-template-columns:1fr}

  .rail{
    position:static;
    border-left:0;
    border-bottom:1px solid var(--line);
    padding:0 0 .7rem;
  }
  .rail-h{margin-bottom:.5rem}
  .rail-list{
    display:flex;
    gap:.4rem;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list li{flex:0 0 auto}
  .rail-list a{
    min-height:40px;
    padding:0 .7rem;
    border:1px solid rgba(128,0,255,.32);
    border-radius:999px;
    white-space:nowrap;
  }
  section[id]{scroll-margin-top:150px}
}

@media (max-width:480px){
  body{font-size:16px}
  .foot{flex-direction:column;align-items:flex-start}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-copy h1{animation:none}
  .rv{opacity:1;transform:none;transition:none}
  .flow h2:hover span,
  .flow h3:hover span{transform:none}
  *{transition-duration:.01ms !important;animation-duration:.01ms !important}
}

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