@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');

:root {
  --ink: #1c1726;
  --p1: #6514ff;
  --p2: #bf00ff;
  --bg: #120d1c;
  --fg: #f4eeff;
  --dim: #bdaadf;
  --line: #3a2b55;
  --r: 18px;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Baloo 2", "Comic Neue", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 520px at 88% -8%, rgba(191, 0, 255, 0.3), transparent 62%),
    radial-gradient(760px 460px at -6% 18%, rgba(101, 20, 255, 0.28), transparent 66%);
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
  background-image:
    repeating-linear-gradient(45deg, rgba(191, 0, 255, 0.11) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(-45deg, rgba(101, 20, 255, 0.12) 0 2px, transparent 2px 36px);
  animation: drift 26s linear infinite;
}

@keyframes drift {
  to {
    transform: translate3d(-84px, -84px, 0);
  }
}

img {
  max-width: 100%;
}

a {
  color: #d9a6ff;
}

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

/* ---------- 顶部 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px clamp(14px, 3vw, 34px);
  background: rgba(18, 13, 28, 0.95);
  border-bottom: 3px solid var(--p1);
}

.brand {
  position: relative;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--p1), var(--p2));
}

.brand:hover .brand-txt {
  color: #e8ccff;
}

.cta {
  position: relative;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: linear-gradient(120deg, var(--p1), var(--p2));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.burger {
  position: relative;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 44px;
  padding: 9px 12px;
  border: 3px solid var(--fg);
  border-radius: 12px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.burger:hover {
  background: var(--p2);
  border-color: var(--p2);
  color: #fff;
}

.burger-off {
  display: none;
}

body.menu-open .burger-on {
  display: none;
}

body.menu-open .burger-off {
  display: inline;
}

body.menu-open {
  overflow: hidden;
}

/* 全屏遮罩菜单 */

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 20px 40px;
  overflow-y: auto;
  background:
    radial-gradient(700px 420px at 82% 8%, rgba(191, 0, 255, 0.55), transparent 60%),
    linear-gradient(160deg, #1c1726 0%, #2a1160 60%, #6514ff 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0.26s ease;
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu p {
  margin: 0;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-a {
  display: block;
  min-height: 48px;
  padding: 13px 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  font-size: clamp(20px, 4.6vw, 27px);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-a:hover,
.menu-a:focus-visible {
  background: #fff;
  color: var(--ink);
  transform: translateX(8px);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: 100svh;
  padding: clamp(26px, 5vw, 64px) clamp(16px, 4vw, 56px) clamp(48px, 7vw, 88px);
  border-bottom: 3px solid var(--p2);
  scroll-snap-align: start;
}

.hero-copy {
  order: 2;
  min-width: 0;
  text-align: right;
}

.hero-h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 6.2vw, 74px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 4px 4px 0 rgba(101, 20, 255, 0.6);
}

.hero-lead {
  margin: 0 0 26px auto;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.75;
  color: #e2d7f6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 3px solid #fff;
  border-radius: 16px;
  background: var(--p2);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-cta:hover {
  transform: translate(-3px, -3px);
  background: var(--p1);
}

.hero-art {
  position: relative;
  order: 1;
  width: 100%;
  max-width: 540px;
  margin: 0;
  aspect-ratio: 1 / 1;
  justify-self: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 9% 11%;
  border-radius: 30px;
  background: linear-gradient(140deg, var(--p1), var(--p2) 72%);
  opacity: 0.55;
  transform: rotate(-4deg);
}

.hero-img {
  position: absolute;
  display: block;
  width: 60%;
  object-fit: cover;
  border: 4px solid var(--fg);
  border-radius: var(--r);
  filter: saturate(1.18) contrast(1.06);
}

.hero-img-a {
  top: 3%;
  left: 0;
  height: 68%;
  z-index: 1;
  transform: rotate(-5deg);
}

.hero-img-b {
  right: 0;
  bottom: 3%;
  height: 62%;
  z-index: 2;
  transform: rotate(4deg);
}

.badge {
  position: absolute;
  z-index: 3;
  padding: 9px 15px;
  border: 3px solid var(--fg);
  border-radius: 999px;
  background: var(--p1);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: bob 6.5s ease-in-out infinite;
}

.badge-a {
  top: 7%;
  right: 4%;
  background: var(--p2);
}

.badge-b {
  bottom: 13%;
  left: 1%;
  animation-delay: -3s;
}

@keyframes bob {
  50% {
    transform: translateY(-12px) rotate(-3deg);
  }
}

/* ---------- 正文区 ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) clamp(16px, 4vw, 40px) 72px;
}

.prose {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17.5px;
}

.prose > div {
  margin: 0 0 52px;
  padding: 0 0 42px;
  border-bottom: 2px dashed var(--line);
  scroll-margin-top: 100px;
}

.prose > div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.1vw, 34px);
  line-height: 1.22;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 30px 0 12px;
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
}

.prose p {
  margin: 0 0 18px;
  color: #e5dcf7;
}

.prose strong,
.prose b {
  color: #fff;
}

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

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
}

.prose li {
  margin: 0 0 8px;
}

.prose blockquote {
  margin: 0 0 22px;
  padding: 16px 20px;
  border-left: 6px solid var(--p2);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(191, 0, 255, 0.12);
}

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

.prose img {
  height: auto;
  border: 3px solid var(--line);
  border-radius: var(--r);
}

.prose table {
  width: 100%;
  margin: 0 0 22px;
  border-collapse: collapse;
  font-size: 15.5px;
}

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

.prose th {
  background: rgba(101, 20, 255, 0.22);
  color: #fff;
}

.prose hr {
  height: 0;
  margin: 30px 0;
  border: 0;
  border-top: 2px dashed var(--line);
}

/* 右侧锚点栏 */

.rail {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 16px;
}

.rail-card {
  padding: 18px;
  border: 3px solid var(--p1);
  border-radius: var(--r);
  background: rgba(101, 20, 255, 0.12);
}

.rail-h {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1.3;
  color: #fff;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dim);
}

.rail-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.rail-a {
  display: block;
  min-height: 40px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #ece1fb;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rail-a:hover,
.rail-a:focus-visible {
  border-color: var(--p2);
  background: rgba(191, 0, 255, 0.2);
  color: #fff;
}

/* ---------- 页脚 ---------- */

.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px 30px;
  max-width: 1180px;
  margin: 24px auto 0;
  padding: clamp(28px, 5vw, 46px) clamp(16px, 4vw, 40px) 44px;
  border-top: 3px solid var(--p1);
  background: linear-gradient(180deg, rgba(28, 23, 38, 0.25), rgba(28, 23, 38, 0.95));
}

.foot-brand {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 4px;
  margin: 0;
}

.foot-a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.foot-a:hover,
.foot-a:focus-visible {
  background: rgba(191, 0, 255, 0.22);
  color: #fff;
}

.foot-copy {
  grid-column: 1 / -1;
  display: block;
  padding-top: 14px;
  border-top: 2px dashed var(--line);
  font-size: 14px;
  color: var(--dim);
}

/* ---------- 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  min-height: 44px;
  padding: 11px 17px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--p2);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

body.scrolled .to-top {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- 滚动显现 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 26px;
    text-align: left;
  }

  .hero-copy {
    order: 1;
    text-align: left;
  }

  .hero-lead {
    margin-left: 0;
  }

  .hero-art {
    order: 2;
    max-width: 420px;
  }

  .stage {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .rail {
    position: static;
    order: -1;
  }

  .rail-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .rail-a {
    padding: 9px 12px;
    border-color: var(--line);
  }

  .foot {
    grid-template-columns: 1fr;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }

  .hero-h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .brand-txt {
    font-size: 16px;
  }

  .cta {
    font-size: 14px;
    padding: 9px 13px;
  }

  .prose {
    font-size: 16.5px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

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

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