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

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

:root {
  --pink: #ff0080;
  --mag: #ff00ff;
  --ink: #26171f;
  --fg: #f7eef5;
  --muted: #c6abc0;
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.1);
  --pad: clamp(16px, 4vw, 34px);
  --r: 4px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding: 0;
  background: transparent;
  color: var(--fg);
  font-family: 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -35%;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(38% 42% at 22% 26%, rgba(255, 0, 128, 0.8), transparent 68%),
    radial-gradient(34% 44% at 78% 16%, rgba(255, 0, 255, 0.62), transparent 70%),
    radial-gradient(46% 40% at 62% 84%, rgba(118, 22, 196, 0.72), transparent 72%),
    radial-gradient(30% 34% at 10% 80%, rgba(255, 0, 128, 0.5), transparent 70%);
  filter: blur(70px) saturate(150%);
  opacity: 0.82;
  animation: aurora-a 26s ease-in-out infinite alternate;
}

body::after {
  background: conic-gradient(
    from 200deg at 50% 50%,
    rgba(255, 0, 255, 0.34),
    rgba(255, 0, 128, 0.2),
    rgba(84, 12, 160, 0.4),
    rgba(255, 0, 255, 0.34)
  );
  filter: blur(90px) hue-rotate(0deg);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: aurora-b 34s linear infinite;
}

@keyframes aurora-a {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate3d(4%, 3%, 0) scale(1.14) rotate(8deg);
  }
}

@keyframes aurora-b {
  0% {
    transform: rotate(0deg) scale(1.05);
    filter: blur(90px) hue-rotate(0deg);
  }
  50% {
    filter: blur(90px) hue-rotate(45deg);
  }
  100% {
    transform: rotate(360deg) scale(1.05);
    filter: blur(90px) hue-rotate(0deg);
  }
}

/* 顶部：品牌居中，菜单分列两侧 */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px var(--pad);
  background: rgba(38, 23, 31, 0.74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.menu {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.menu-l {
  justify-content: flex-start;
}

.menu-r {
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.pill:hover,
.pill:focus-visible {
  background: rgba(255, 0, 128, 0.2);
  border-color: var(--pink);
  color: #fff;
}

.pill.cta {
  background: var(--pink);
  border-color: var(--pink);
  color: #1b0a14;
  font-weight: 700;
}

.pill.cta:hover,
.pill.cta:focus-visible {
  background: var(--mag);
  border-color: var(--mag);
  color: #1b0a14;
}

.brand {
  position: relative;
  justify-self: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 2px;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 14px var(--mag);
  vertical-align: middle;
}

/* 主区：内容左、侧栏右 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--pad) 76px;
}

.hero {
  grid-column: 1 / -1;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding: clamp(40px, 10vh, 110px) 0 clamp(30px, 6vh, 70px);
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(102deg, #ffffff 8%, #ff9ed2 42%, #ff00ff 68%, #ff0080 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.72;
}

.col {
  min-width: 0;
}

.prose > section {
  padding: clamp(34px, 5vw, 62px) 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 96px;
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3.9vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #fff;
}

.prose h2 + hr {
  margin: 0 0 22px;
}

.prose h3 {
  margin: 30px 0 10px;
  font-size: clamp(1.12rem, 2.4vw, 1.45rem);
  line-height: 1.3;
  color: #ffe4f3;
}

.prose p {
  margin: 0 0 16px;
  line-height: 1.82;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  line-height: 1.8;
}

.prose li {
  margin: 7px 0;
}

.prose a {
  color: #ff62b3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #ffa7d4;
}

.prose strong {
  color: #fff;
}

.prose blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 0, 128, 0.09);
  border-radius: 0 var(--r) var(--r) 0;
  color: #f3e2ee;
}

.prose figure {
  margin: 24px 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
}

.prose figcaption {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 1px solid var(--line-soft);
  padding: 10px 12px;
  text-align: left;
}

.prose code {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 15px;
}

hr {
  border: 0;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, var(--pink), rgba(255, 0, 255, 0.4), transparent);
}

/* 右侧粘性锚点栏 */
.rail {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(38, 23, 31, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rail h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff;
}

.rail hr {
  margin: 10px 0 12px;
}

.rail ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  border-radius: var(--r);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rail a:hover,
.rail a:focus-visible {
  color: #fff;
  background: rgba(255, 0, 128, 0.13);
}

.rail a.on {
  color: #fff;
  border-left-color: var(--pink);
  background: rgba(255, 0, 128, 0.16);
}

/* 页脚：仅 p + small，两端分列 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px var(--pad) 44px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 16px;
}

.foot p {
  margin: 0;
}

.foot small {
  font-size: 16px;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.foot a:hover,
.foot a:focus-visible {
  border-color: var(--pink);
  color: #fff;
}

/* 入场 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 900px) {
  .top {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px var(--pad) 14px;
  }

  .brand {
    order: -1;
    flex: 0 0 100%;
    text-align: center;
    margin-bottom: 2px;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .pill {
    padding: 0 13px;
  }

  .wrap {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 48px;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 26px;
  }

  .rail {
    position: static;
  }

  .prose > section {
    scroll-margin-top: 20px;
  }
}

@media (max-width: 400px) {
  .pill {
    font-size: 16px;
    padding: 0 11px;
  }

  .brand {
    letter-spacing: 0.1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before,
  body::after {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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