@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --v: #6514ff;
  --p: #bf00ff;
  --ink: #1c1726;
  --paper: #ffffff;
  --wash: #f6f1ff;
  --wash2: #e9dcff;
  --line: #e0d3ff;
  --r: 18px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
}

a { color: var(--v); text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--p);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----------------------------------------------------------------- 顶栏 */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--v);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: background 0.24s ease;
}

.brand:hover { background: var(--p); }

.topnav {
  display: flex;
  gap: 2px;
  padding-left: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar { display: none; }

.topnav a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 11px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.24s ease, color 0.24s ease;
}

.topnav a:hover { background: var(--wash2); color: var(--v); }

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  min-height: calc(100svh - 62px);
  padding: 36px 22px 92px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(152deg, var(--v) 0%, #8a12ff 48%, var(--p) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-pattern {
  position: absolute;
  inset: -32%;
  z-index: 0;
  background: repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.1) 0 3px, transparent 3px 30px);
  animation: drift 26s linear infinite;
}

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

.hero-word {
  position: absolute;
  left: 12px;
  top: 26px;
  z-index: 0;
  writing-mode: vertical-rl;
  font-size: clamp(60px, 14vw, 148px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.19);
}

.hero-art {
  position: absolute;
  inset: -6% 0 -10% 0;
  z-index: 1;
  margin: 0;
  will-change: transform;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: right;
}

.hero h1 {
  max-width: 13em;
  margin: 0 0 0 auto;
  font-size: clamp(34px, 7.2vw, 82px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 30px rgba(28, 23, 38, 0.32);
}

/* ----------------------------------------------------------------- 主体 */

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 52px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 22px 84px;
}

.lead-t {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--v);
}

.lead-t > span {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--wash2);
}

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

.prose {
  max-width: 70ch;
  font-size: 17.5px;
  line-height: 1.85;
  color: #2d2540;
}

.prose > * { transition: opacity 0.3s ease, transform 0.3s ease; }
.ready .prose > * { opacity: 0; transform: translate3d(0, 16px, 0); }
.ready .prose > .in { opacity: 1; transform: none; }

.prose div { scroll-margin-top: 92px; }

.prose div + div {
  margin-top: 60px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.prose h2 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 24px;
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.26em;
  width: 11px;
  height: 0.88em;
  border-radius: 4px;
  background: var(--p);
  transform: skewY(-9deg);
}

.prose h2 > span { background: linear-gradient(transparent 62%, #e8dbff 62%); }

.prose h3 {
  margin: 30px 0 10px;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.5;
}

.prose h3 > span { border-bottom: 3px solid var(--wash2); }

.prose p { margin: 0 0 18px; }

.prose a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

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

.prose blockquote {
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 6px solid var(--v);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--wash);
  font-size: 16.5px;
}

.prose figure { margin: 26px 0; }
.prose img { border-radius: var(--r); }
.prose figcaption { font-size: 16px; color: #6b6180; }

/* ----------------------------------------------------------------- 侧栏 */

.rail {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 14px;
}

.rail-box {
  padding: 18px 14px 16px;
  border-radius: var(--r);
  background: var(--wash);
}

.rail h2 {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--v);
}

.rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: r;
}

.rail li { counter-increment: r; }

.rail li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 10px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  transition: background 0.24s ease, color 0.24s ease;
}

.rail li a::before {
  content: "0" counter(r);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--p);
}

.rail li a:hover { background: var(--v); color: #fff; }
.rail li a:hover::before { color: var(--wash2); }

.to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.24s ease;
}

.to-top:hover { background: var(--p); }

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

.foot { padding: 40px 22px 26px; background: var(--wash); }

.cta {
  max-width: 1180px;
  margin: 0 auto 26px;
  border-radius: var(--r);
  background: linear-gradient(122deg, var(--ink) 0%, #3a1d6e 100%);
  transition: background 0.26s ease;
}

.cta:hover { background: linear-gradient(122deg, var(--v) 0%, var(--p) 100%); }

.cta a {
  display: block;
  padding: 34px 26px;
  border-radius: var(--r);
  color: #fff;
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
  color: #4a3f5e;
}

.base-links { display: flex; flex-wrap: wrap; gap: 4px; }

.base-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 9px;
  color: #4a3f5e;
  font-weight: 600;
  transition: background 0.24s ease, color 0.24s ease;
}

.base-links a:hover { background: var(--wash2); color: var(--v); }

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

@media (max-width: 860px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    padding: 46px 18px 64px;
  }

  .rail { position: static; }

  .hero {
    padding: 30px 18px 74px;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  }

  .hero-word { left: 6px; top: 18px; }

  .hero h1 { max-width: 11em; }

  .foot { padding: 30px 18px 22px; }

  .cta a { padding: 26px 20px; }
}

@media (max-width: 460px) {
  body { font-size: 16.5px; }
  .prose { font-size: 17px; }
  .topnav a { padding: 12px 9px; font-size: 16px; }
  .base { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-pattern { animation: none; }
  .ready .prose > * { opacity: 1; transform: none; transition-duration: 0.01ms; }
}

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