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

:root {
  --v1: #6514ff;
  --v2: #bf00ff;
  --ink: #1c1726;
  --paper: #faf7ff;
  --soft: #efe7ff;
  --line: #ded2f3;
  --muted: #544769;
  --max: 1180px;
}

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

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

body {
  margin: 0;
  font-family: "Josefin Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px clamp(14px, 4vw, 34px);
  background: var(--ink);
  box-shadow: 0 2px 0 var(--v2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}

.brandmark {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--v1), var(--v2));
}

.branddot {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--v1), var(--v2));
  box-shadow: 6px 6px 0 rgba(191, 0, 255, 0.35);
}

.brandtxt {
  font-family: "Cinzel", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.toplink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 11px;
  font-size: 16px;
  color: #e3d8ff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 220ms ease, color 220ms ease;
}

.toplink:hover,
.toplink:focus-visible {
  background: var(--v1);
  color: #fff;
}

.call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 17px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: var(--v2);
  border-radius: 4px;
  transition: background 220ms ease, transform 220ms ease;
}

.call:hover,
.call:focus-visible {
  background: var(--v1);
  transform: translateY(-1px);
}

/* ---------- 头部区 ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: clamp(30px, 7vw, 84px) clamp(14px, 4vw, 34px);
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--line) 1.3px, transparent 1.3px),
    radial-gradient(rgba(101, 20, 255, 0.16) 1.3px, transparent 1.3px);
  background-size: 24px 24px, 68px 68px;
  background-position: 0 0, 12px 12px;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  to { background-position: 24px 24px, 80px 80px; }
}

.hero-in {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(22px, 5vw, 64px);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-txt {
  flex: 1 1 320px;
  min-width: 0;
}

.hero-txt::before {
  content: "";
  display: block;
  width: 74px;
  height: 12px;
  margin-bottom: 20px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--v1), var(--v2));
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 7.4vw, 72px);
  line-height: 1.06;
  letter-spacing: 0.005em;
  font-weight: 700;
  text-align: left;
  word-break: break-word;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
}

.hero-art {
  position: relative;
  flex: 0 0 auto;
  width: clamp(170px, 25vw, 268px);
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--v1), var(--v2));
  box-shadow: 14px 14px 0 rgba(101, 20, 255, 0.18);
  will-change: transform;
}

.hero-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  opacity: 0.92;
}

.blk { position: absolute; display: block; border-radius: 4px; }
.b1 { width: 44%; height: 44%; left: 11%; top: 11%; background: #fff; mix-blend-mode: screen; }
.b2 { width: 34%; height: 34%; right: 9%; bottom: 15%; background: var(--ink); }
.b3 { width: 22%; height: 22%; left: 19%; bottom: 11%; background: var(--v2); }

/* ---------- 主体 ---------- */
.main {
  padding: clamp(34px, 6vw, 76px) clamp(14px, 4vw, 34px) 64px;
  background:
    linear-gradient(180deg, rgba(239, 231, 255, 0.6), rgba(250, 247, 255, 0) 240px);
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 52px);
  max-width: var(--max);
  margin: 0 auto;
  align-items: start;
}

.body { min-width: 0; }

/* ---------- 正文排版 ---------- */
.prose { max-width: 72ch; }

.prose section {
  scroll-margin-top: 118px;
  padding-top: 6px;
}

.prose section + section {
  margin-top: 2.4em;
  padding-top: 2.2em;
  border-top: 2px dashed var(--line);
}

.prose h2 {
  margin: 0 0 0.55em;
  font-size: clamp(25px, 3.6vw, 35px);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 4px;
  background: var(--v2);
  vertical-align: 0.06em;
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--v1);
}

.prose p { margin: 0 0 1.05em; }

.prose a {
  color: var(--v1);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--v2); }

.prose ul,
.prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }

.prose li { margin: 0.35em 0; }

.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--soft);
  border-left: 6px solid var(--v2);
  border-radius: 0 4px 4px 0;
  color: var(--ink);
}

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

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

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

.prose th { background: var(--soft); font-weight: 700; }

.prose img { display: block; margin: 1.3em 0; border-radius: 4px; height: auto; }

.prose code,
.prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}

.prose pre {
  overflow-x: auto;
  padding: 14px 16px;
  background: var(--ink);
  color: #efe7ff;
  border-radius: 4px;
}

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

.prose > section > p:first-of-type { font-size: 18px; color: var(--muted); }

/* ---------- 侧栏 ---------- */
.side {
  background: var(--ink);
  color: #efe7ff;
  border-radius: 4px;
  padding: 20px 18px 22px;
  box-shadow: 10px 10px 0 rgba(191, 0, 255, 0.16);
}

.side h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.side .subtitle {
  margin: 5px 0 15px;
  font-size: 16px;
  color: #bda9f0;
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 9px;
  font-size: 16px;
  color: #e3d8ff;
  text-decoration: none;
  border-left: 3px solid #3a2e52;
  border-radius: 0 4px 4px 0;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease;
}

.side-list a:hover,
.side-list a:focus-visible {
  background: var(--v1);
  border-left-color: var(--v2);
  color: #fff;
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: #c6badf;
  padding: 38px clamp(14px, 4vw, 34px) 26px;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.foot dl { margin: 0; }

.foot dt {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: #fff;
}

.foot dd { margin: 0; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  font-size: 16px;
  color: #d5c9f2;
  text-decoration: none;
  transition: color 220ms ease;
}

.foot a:hover,
.foot a:focus-visible { color: #fff; text-decoration: underline; }

.cr {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 18px;
  font-size: 16px;
  text-align: center;
  color: #a294c0;
}

.cr + .cr {
  padding-top: 6px;
  margin-top: 16px;
  border-top: 1px solid #362a4d;
}

.totop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--v1);
  color: #fff !important;
  text-decoration: none;
}

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

/* ---------- 滚动显现 ---------- */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 280ms ease, transform 280ms ease;
}

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

/* ---------- 断点 ---------- */
@media (min-width: 920px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 282px; }
  .side { position: sticky; top: 96px; }
}

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: clamp(26px, 8vw, 48px); padding-bottom: clamp(26px, 8vw, 48px); }
  .hero-in { flex-direction: column; align-items: flex-start; }
  .hero-art { width: clamp(140px, 46vw, 200px); box-shadow: 10px 10px 0 rgba(101, 20, 255, 0.16); }
  .lede { font-size: 17px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .foot dt { margin-bottom: 2px; }
  .prose section { scroll-margin-top: 168px; }
}

@media (max-width: 760px) {
  .topnav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 1px;
  }
  .toplink { padding: 10px 9px; }
  .call { margin-left: auto; }
  .brandtxt { font-size: 16px; }
}

@media (max-width: 400px) {
  .toplink { font-size: 16px; padding: 10px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  *,
  *::before,
  *::after { transition-duration: 1ms !important; }
}
</style>

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