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

:root {
  --ink: #1c1726;
  --ink-2: #251d36;
  --pur: #6514ff;
  --mag: #bf00ff;
  --paper: #f7f3ff;
  --line: rgba(247, 243, 255, 0.24);
  --soft: #cbb6ff;
  --rad: 28px;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Atkinson Hyperlegible', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: -60% -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    repeating-linear-gradient(45deg, rgba(101, 20, 255, 0.22) 0 22px, rgba(101, 20, 255, 0) 22px 82px),
    repeating-linear-gradient(-45deg, rgba(191, 0, 255, 0.14) 0 10px, rgba(191, 0, 255, 0) 10px 120px);
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(82px, 82px, 0); }
}

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

a { color: var(--soft); }

/* ---------- 顶部两行 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(28, 23, 38, 0.95);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(6px);
}

.brandrow {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand .mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid var(--line);
  object-fit: cover;
}

.menurow {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid #9b6bff;
  border-radius: 999px;
  background: var(--pur);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
}

.burger:hover { background: #7d34ff; transform: translateY(-2px); }

.bars {
  display: block;
  width: 20px;
  height: 14px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 6px / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 12px / 100% 2px no-repeat;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--mag);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.22s ease, transform 0.22s ease;
}

.cta:hover { background: #d33bff; transform: translateY(-2px); }

/* ---------- 全屏遮罩菜单 ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow-y: auto;
  padding: 22px 20px 44px;
  background: var(--ink);
  border-bottom: 3px solid var(--mag);
  visibility: hidden;
  transform: translateY(-102%);
  transition: transform 0.3s ease, visibility 0.3s ease;
}

html.menu-open .menu { transform: translateY(0); visibility: visible; }
html.menu-open { overflow: hidden; }

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.menu-brand { font-size: 20px; font-weight: 700; }

.menu-close {
  min-height: 44px;
  padding: 10px 20px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.menu-close:hover { background: var(--paper); color: var(--ink); }

.menu-nav ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.menu-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 20px;
  border: 2px solid var(--line);
  border-radius: 20px;
  color: var(--paper);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.menu-nav a:hover {
  background: var(--mag);
  border-color: var(--mag);
  transform: translateX(5px);
}

.menu-nav .idx {
  font-size: 16px;
  color: var(--soft);
  min-width: 26px;
}

.menu-nav a:hover .idx { color: #fff; }

/* ---------- 主体 ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
}

article { min-width: 0; }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 42vh;
  padding: 36px 30px 48px;
  border: 3px solid var(--mag);
  border-radius: var(--rad);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.18) 0 60px, rgba(255, 255, 255, 0) 61px),
    linear-gradient(135deg, #6514ff 0%, #8b0ddb 52%, #bf00ff 100%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5.6vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-sub {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 22px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--ink);
  border: 2px solid var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.24s ease, color 0.24s ease;
}

.hero-cta:hover { background: #fff; color: var(--ink); }

.hero-art {
  will-change: transform;
  transition: transform 0.2s linear;
}

.hero-art svg {
  display: block;
  width: clamp(58px, 11vw, 96px);
  height: auto;
}

.badge {
  position: absolute;
  right: 22px;
  bottom: 16px;
  padding: 6px 16px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--ink);
  font-size: 16px;
  font-weight: 700;
  transform: rotate(-4deg);
}

/* 段落标题 */
article > h2 {
  margin: 48px 0 10px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.24;
}

.subtitle {
  margin: 0 0 26px;
  color: var(--soft);
  font-size: 17px;
}

/* 正文块 */
article > div:not(.hero) {
  scroll-margin-top: 136px;
  margin: 0 0 40px;
  padding: 30px 26px;
  border: 2px solid var(--line);
  border-radius: var(--rad);
  background: rgba(37, 29, 54, 0.6);
}

article > div:not(.hero):nth-of-type(even) { border-color: rgba(191, 0, 255, 0.5); }
article > div:not(.hero):nth-of-type(odd) { border-color: rgba(101, 20, 255, 0.55); }

article h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; }
article h3 { margin: 22px 0 10px; font-size: 20px; line-height: 1.3; }
article p, article li, article dd { font-size: 17px; line-height: 1.68; }
article p { margin: 0 0 14px; }
article ul, article ol { padding-left: 22px; margin: 0 0 16px; }
article li { margin-bottom: 8px; }
article a { color: #dcc7ff; text-underline-offset: 3px; }
article a:hover { color: #fff; }
article img { border-radius: 18px; border: 2px solid var(--line); }
article blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--mag);
  background: rgba(191, 0, 255, 0.12);
  border-radius: 0 18px 18px 0;
}
article strong { color: #fff; }
article table { width: 100%; border-collapse: collapse; font-size: 16px; }
article th, article td { padding: 10px; border: 1px solid var(--line); text-align: left; }

/* 右栏 */
.rail {
  position: sticky;
  top: 132px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: var(--rad);
  background: rgba(37, 29, 54, 0.7);
}

.rail-brand {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--soft);
  word-break: break-word;
}

.totop {
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid var(--pur);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.24s ease;
}

.totop:hover { background: var(--pur); }

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  background: #161120;
  border-top: 3px solid var(--mag);
}

.foot-cols {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foot dl { margin: 0; }
.foot dt { margin-bottom: 8px; font-size: 16px; font-weight: 700; color: #bfa8ff; }
.foot dd { margin: 0 0 6px; }

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.22s ease, color 0.22s ease;
}

.foot dd a:hover { color: #e6d3ff; border-bottom-color: var(--mag); }

.foot-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 20px 40px;
  text-align: center;
  font-size: 16px;
  color: #a99bc4;
}

/* ---------- 断点 ---------- */
@media (min-width: 820px) {
  .menu-nav ul { grid-template-columns: 1fr 1fr; max-width: 900px; }
  .menu { padding: 30px 40px 60px; }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 20px 16px 48px;
  }
  .rail { position: static; }
  .hero {
    min-height: 0;
    padding: 28px 20px 46px;
    gap: 14px;
  }
  article > div:not(.hero) { scroll-margin-top: 150px; padding: 24px 18px; }
  .badge { right: 14px; font-size: 16px; }
}

@media (max-width: 420px) {
  .brandrow { padding: 10px 14px 4px; }
  .menurow { padding: 4px 14px 10px; }
  .foot-cols { gap: 12px; padding: 32px 14px 18px; }
  .foot dd a { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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