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

:root {
  --ink: #1f1726;
  --ink-deep: #150e1e;
  --purple: #56228b;
  --purple-lt: #a469e8;
  --brown: #8b4513;
  --paper: #efe7f6;
  --body: #d8cde4;
  --muted: #bda9ce;
  --line: rgba(164, 105, 232, 0.24);
  --card: rgba(255, 255, 255, 0.038);
  --r: 18px;
  --head-h: 116px;
  --max: 1180px;
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background:
    radial-gradient(circle at 14% -8%, rgba(86, 34, 139, 0.55), transparent 56%),
    radial-gradient(circle at 88% 6%, rgba(139, 69, 19, 0.34), transparent 48%),
    linear-gradient(180deg, #1b1424 0%, #150f1d 58%, #120d19 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    radial-gradient(rgba(164, 105, 232, 0.05) 1px, transparent 1px);
  background-size: 27px 27px, 43px 43px;
  background-position: 0 0, 13px 17px;
}

::selection { background: rgba(139, 69, 19, 0.65); color: #fff; }

:focus-visible {
  outline: 2px solid var(--purple-lt);
  outline-offset: 3px;
  border-radius: 8px;
}

img { max-width: 100%; }

/* ---------- 顶部两行 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 10px clamp(14px, 4vw, 40px) 0;
  background: rgba(22, 15, 31, 0.84);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
}

.head-tools { display: flex; align-items: center; gap: 10px; }

.head-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: #f8f2fd;
  background: linear-gradient(135deg, var(--purple), #7a2f6f 65%, var(--brown));
  box-shadow: 0 12px 26px -16px rgba(86, 34, 139, 0.95);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.burger-bars,
.burger-bars::before,
.burger-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s ease, opacity 0.28s ease, background 0.28s ease;
}

.burger-bars { position: relative; }
.burger-bars::before,
.burger-bars::after { content: ""; position: absolute; left: 0; }
.burger-bars::before { top: -6px; }
.burger-bars::after { top: 6px; }

html.menu-open .burger-bars { background: transparent; }
html.menu-open .burger-bars::before { transform: translateY(6px) rotate(45deg); }
html.menu-open .burger-bars::after { transform: translateY(-6px) rotate(-45deg); }

.head-nav { padding-bottom: 6px; }

.head-nav p {
  display: flex;
  gap: 4px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.head-nav p::-webkit-scrollbar { display: none; }

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 16px;
  color: var(--muted);
}

.head-nav a:hover,
.head-nav a:focus-visible {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- 全屏遮罩菜单 ---------- */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: calc(var(--head-h) + 26px) clamp(18px, 6vw, 64px) 44px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  background:
    radial-gradient(circle at 80% 10%, rgba(139, 69, 19, 0.5), transparent 52%),
    radial-gradient(circle at 8% 92%, rgba(86, 34, 139, 0.62), transparent 56%),
    var(--ink-deep);
}

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

html.menu-open body { overflow: hidden; }

.panel-top {
  margin: 0 0 12px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.panel-links { display: flex; flex-direction: column; margin: 0; }

.panel-link {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--paper);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 5vw, 27px);
  border-bottom: 1px dashed rgba(164, 105, 232, 0.28);
}

.panel-link:hover { color: var(--purple-lt); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 70svh;
  display: grid;
  align-content: end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 9vw, 90px) clamp(16px, 5vw, 56px) clamp(34px, 6vw, 62px);
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  background:
    radial-gradient(ellipse 80% 70% at 78% 18%, rgba(86, 34, 139, 0.6), transparent 62%),
    radial-gradient(ellipse 70% 60% at 6% 88%, rgba(139, 69, 19, 0.55), transparent 60%);
}

.hero-media {
  position: absolute;
  inset: -12% 0 0;
  z-index: 0;
  will-change: transform;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    104deg,
    rgba(18, 12, 24, 0.95) 6%,
    rgba(31, 23, 38, 0.72) 52%,
    rgba(86, 34, 139, 0.44) 100%
  );
}

.hero-mark {
  position: absolute;
  z-index: 1;
  top: clamp(4px, 2vw, 20px);
  right: -0.06em;
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(62px, 17vw, 190px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(164, 105, 232, 0.42);
  pointer-events: none;
}

.hero-ink { position: relative; z-index: 2; max-width: 760px; }

.hero h1 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(29px, 5.6vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.38);
}

.hero-sub {
  max-width: 52ch;
  margin: 0 0 22px;
  font-size: 17px;
  color: #d6c6e5;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--brown));
  box-shadow: 0 18px 32px -20px #000;
}

/* ---------- 主体 ---------- */
.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: clamp(20px, 3vw, 38px);
  max-width: var(--max);
  margin: clamp(28px, 5vw, 58px) auto;
  padding: 0 clamp(14px, 4vw, 40px);
}

.prose { min-width: 0; }

.prose > article {
  position: relative;
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(139, 69, 19, 0.26);
  border-radius: var(--r);
  background: var(--card);
  scroll-margin-top: calc(var(--head-h) + 24px);
  overflow: hidden;
}

.prose > article:nth-child(3n + 2) { border-radius: 28px 14px 24px 16px; }
.prose > article:nth-child(3n + 3) { border-radius: 14px 26px 16px 28px; }

.prose > article::after {
  content: "";
  position: absolute;
  left: clamp(18px, 3vw, 30px);
  right: clamp(18px, 3vw, 30px);
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--purple), var(--brown) 62%, transparent);
}

.prose > article > :last-child { margin-bottom: 0; }

.prose h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(21px, 2.8vw, 29px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
}

.prose h3 {
  margin: 22px 0 8px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: #f3e9fb;
}

.prose hr {
  height: 2px;
  margin: 20px 0;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.prose h2 + hr,
.prose h3 + hr {
  width: 58px;
  height: 2px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--purple-lt), rgba(139, 69, 19, 0.6));
}

.prose p,
.prose li,
.prose dd { margin: 0 0 14px; color: var(--body); }

.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }

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

.prose strong { color: #fff; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--brown);
  border-radius: 0 14px 14px 0;
  background: rgba(139, 69, 19, 0.14);
}

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

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose th { color: #fff; font-weight: 600; }

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: calc(var(--head-h) + 24px);
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(86, 34, 139, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rail h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 17px;
  letter-spacing: 0.18em;
  color: #eadff8;
}

.rail hr {
  width: 46px;
  height: 2px;
  margin: 0 0 12px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brown), transparent);
}

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

.rail-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(164, 105, 232, 0.26);
}

.rail-link:last-child { border-bottom: 0; }
.rail-link:hover { color: #fff; }

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  margin-top: clamp(28px, 6vw, 68px);
  padding: clamp(40px, 7vw, 78px) clamp(16px, 5vw, 56px) 34px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: radial-gradient(circle at 50% 0, rgba(139, 69, 19, 0.3), transparent 62%);
}

.foot-cta { margin: 0 0 16px; }

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 4px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(23px, 4.4vw, 40px);
  color: #fff;
  text-decoration: none;
  border-bottom: 3px solid var(--purple-lt);
}

.foot-cta a:hover { color: var(--purple-lt); }

.foot-brand {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.site-foot small { font-size: 16px; color: #9d8dae; }

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 0.68, 0.3, 1);
}

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

/* ---------- 断点 ---------- */
@media (max-width: 960px) {
  :root { --head-h: 112px; }

  .stage { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: static;
    order: 2;
    border-radius: 22px 16px 22px 16px;
  }
}

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

  .brand { font-size: 18px; }
  .head-cta { padding: 0 14px; }
  .burger { padding: 0 12px; }
  .burger-txt { display: none; }

  .hero { min-height: 74svh; }
  .hero-mark { -webkit-text-stroke-width: 1.5px; }
  .hero-sub { font-size: 16px; }

  .prose > article { padding: 18px 16px; border-radius: 20px 14px 20px 14px; }
  .prose > article::after { left: 16px; right: 16px; }

  .stage { padding: 0 14px; }
}

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

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

  .hero-media { transform: none !important; }
  .menu-panel,
  .burger-bars,
  .burger-bars::before,
  .burger-bars::after { transition: none; }
}

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