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

:root {
  --pink: #ff0080;
  --mag: #ff00ff;
  --ink: #26171f;
  --fg: #f7edf6;
  --muted: #d3bcca;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.14);
  --r: 10px;
  --maxw: 1120px;
  --head: "Russo One", "Chakra Petch", ui-sans-serif, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  color: var(--fg);
  font-family: "Chakra Petch", ui-sans-serif, system-ui, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.2px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 20%, rgba(255, 0, 128, 0.62), transparent 62%),
    radial-gradient(42% 46% at 84% 14%, rgba(255, 0, 255, 0.5), transparent 60%),
    radial-gradient(52% 54% at 64% 84%, rgba(96, 0, 255, 0.48), transparent 66%),
    conic-gradient(from 210deg at 50% 50%, rgba(255, 0, 128, 0.34), rgba(255, 0, 255, 0.16), rgba(40, 0, 120, 0.34), rgba(255, 0, 128, 0.34));
  filter: blur(46px) saturate(140%);
  opacity: 0.68;
  animation: drift 28s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.17) 1px, transparent 1.5px),
    linear-gradient(rgba(38, 23, 31, 0.6), rgba(38, 23, 31, 0.86));
  background-size: 22px 22px, 100% 100%;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1.06); }
  to { transform: translate3d(3%, 2%, 0) scale(1.16); }
}

a { color: var(--fg); text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 3px;
  border-radius: 6px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding: 8px 10px 8px 0;
  min-height: 44px;
  font-family: var(--head);
  font-size: 18px;
  letter-spacing: 0.6px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.brand-mark--dot {
  background: conic-gradient(from 120deg, var(--pink), var(--mag), #6a00ff, var(--pink));
  box-shadow: 0 0 16px rgba(255, 0, 128, 0.55);
}

.brand-txt {
  background: linear-gradient(92deg, #ffffff, #ffc2e6 55%, var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menu-btn,
.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.contact-btn {
  border-color: transparent;
  background: linear-gradient(96deg, var(--pink), var(--mag));
  color: #1a0d13;
  font-weight: 700;
}

.menu-btn:hover,
.contact-btn:hover { transform: translateY(-1px); }
.menu-btn:hover { border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 0, 128, 0.4); }

/* ---------- 下拉分组菜单 ---------- */
.drawer {
  position: absolute;
  right: 16px;
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - 32px));
  display: none;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(58, 30, 48, 0.94), rgba(30, 18, 26, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
}

.drawer.open { display: grid; }

.drawer .grp { display: grid; gap: 2px; }

.grp-t {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--mag);
}

.drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  font-size: 16px;
  transition: background 0.18s, border-color 0.18s;
}

.drawer a:hover {
  background: var(--glass-2);
  border-left-color: var(--pink);
}

/* ---------- 粘性锚点条 ---------- */
.anchorbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(30, 17, 25, 0.78);
  backdrop-filter: blur(12px);
}

.anchor-nav {
  display: flex;
  gap: 2px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-nav::-webkit-scrollbar { display: none; }

.anchor-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.anchor-nav a:hover {
  color: #fff;
  border-bottom-color: var(--pink);
}

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  padding: 30px 16px 34px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  max-width: 880px;
}

.hero-art {
  flex: 0 0 auto;
  width: 104px;
  filter: drop-shadow(0 0 22px rgba(255, 0, 255, 0.5));
}

.hero-svg { width: 104px; height: 104px; animation: spin 22s linear infinite; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero-img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.hero-copy { flex: 1 1 340px; min-width: 0; }

h1 {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(29px, 6.2vw, 48px);
  line-height: 1.18;
  letter-spacing: 0.5px;
  background: linear-gradient(96deg, #ffffff, #ffb3e2 46%, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 0, 128, 0.25);
}

.lead {
  margin: 12px auto 0;
  max-width: 44ch;
  font-size: 17px;
  color: #f0dcea;
}

/* ---------- 主区：侧栏在左 ---------- */
main { display: block; }

.wrap {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 26px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 16px 60px;
}

.rail {
  align-self: start;
  position: sticky;
  top: 78px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.rail h2 {
  margin: 0;
  font-family: var(--head);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0.4px;
}

.subtitle {
  margin: 4px 0 12px;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--mag);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rail-list li + li { border-top: 1px dashed rgba(255, 255, 255, 0.1); }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 16px;
  color: var(--muted);
  transition: color 0.18s, padding-left 0.18s;
}

.rail-list a:hover {
  color: #fff;
  padding-left: 10px;
}

/* ---------- 正文 ---------- */
.content { min-width: 0; }

.doc > section {
  position: relative;
  overflow: hidden;
  margin: 0 0 20px;
  padding: 24px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032));
  backdrop-filter: blur(10px);
  scroll-margin-top: 96px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.doc > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--mag) 46%, transparent);
  opacity: 0.75;
}

.doc > section:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 0, 128, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.doc h2 {
  margin: 0 0 12px;
  font-family: var(--head);
  font-size: clamp(21px, 3.6vw, 28px);
  line-height: 1.3;
  letter-spacing: 0.4px;
  color: #fff;
}

.doc h2 + p {
  margin-top: -4px;
  color: var(--mag);
  font-size: 16px;
}

.doc h3 {
  margin: 20px 0 8px;
  font-size: 18px;
  line-height: 1.45;
  color: #ffd8ee;
}

.doc p { margin: 0 0 14px; }

.doc ul,
.doc ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc li { margin-bottom: 8px; }

.doc li::marker { color: var(--pink); }

.doc a {
  color: #ffb3e0;
  border-bottom: 1px solid rgba(255, 0, 128, 0.55);
}

.doc a:hover { color: #fff; border-bottom-color: var(--mag); }

.doc strong { color: #fff; }

.doc blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--mag);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 0, 255, 0.09);
}

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

/* ---------- 滚动显现 ---------- */
.js .doc > section.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .doc > section.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.9fr;
  gap: 22px;
  margin-top: 10px;
  padding: 34px 16px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 12, 17, 0.35), rgba(15, 9, 13, 0.85));
}

.foot > section {
  max-width: 460px;
  min-width: 0;
}

.foot > section:nth-child(1) { justify-self: start; margin-left: calc((100% - var(--maxw)) / 2 + 0px); }

.f-col { padding-bottom: 22px; }

.fbrand {
  margin: 0;
  font-family: var(--head);
  font-size: 19px;
  line-height: 1.4;
  color: #fff;
}

.foot-nav dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
  margin: 0;
}

.foot-nav dt,
.foot-nav dd { margin: 0; }

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 2px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.foot-nav a:hover {
  color: #fff;
  border-bottom-color: var(--pink);
}

.f-contact {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 16px;
}

.f-contact:hover { border-color: var(--mag); }

.fkey {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.fbar {
  grid-column: 1 / -1;
  padding: 14px 16px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.fbar p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; gap: 20px; }
  .rail { position: static; order: 2; }
  .content { order: 1; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > section:nth-child(1) { margin-left: 0; }
  .f-meta { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .hero { min-height: 45vh; padding: 22px 16px 26px; }
  .hero-art { width: 76px; }
  .hero-svg,
  .hero-img { width: 76px; height: 76px; }
  .doc > section { padding: 20px 16px 16px; }
  .foot { grid-template-columns: 1fr; }
  .foot-nav dl { grid-template-columns: 1fr; }
  .f-meta { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  .hero-svg { animation: none; }
  .doc > section,
  .menu-btn,
  .contact-btn { transition: none; }
  .js .doc > section.reveal { opacity: 1; transform: none; }
}

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