@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-2: #150f1b;
  --plum: #56228b;
  --rust: #8b4513;
  --glow: #c9a8f5;
  --amber: #e0b98d;
  --paper: #efe6f2;
  --dim: #b6a7c4;
  --line: rgba(201, 168, 245, .22);
  --maxw: 1120px;
  --font: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--ink-2);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.78;
  color: var(--paper);
  overflow-x: hidden;
  background:
    radial-gradient(960px 640px at 8% -10%, rgba(86, 34, 139, .48), transparent 62%),
    radial-gradient(760px 520px at 96% 4%, rgba(139, 69, 19, .30), transparent 64%),
    radial-gradient(900px 900px at 50% 108%, rgba(86, 34, 139, .26), transparent 70%),
    var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .45;
  mix-blend-mode: screen;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 4px 4px;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; }

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

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

/* ---------- 顶部两行 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, rgba(21, 15, 27, .97), rgba(21, 15, 27, .84));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 44px) 8px;
}

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

.brand img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 52% 48% 60% 40% / 46% 54% 44% 56%;
  border: 1px solid rgba(224, 185, 141, .5);
}

.brand span {
  background: linear-gradient(100deg, #fff, var(--glow) 70%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menubar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 44px) 9px;
}

.burger {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 62px;
  min-height: 44px;
  padding: 10px 14px;
  background: rgba(86, 34, 139, .26);
  border: 1px solid var(--line);
  border-radius: 16px 24px 18px 22px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--glow);
  transition: transform .3s ease, width .3s ease, opacity .3s ease;
}

.burger span:nth-child(2) { width: 16px; }
.burger span:nth-child(3) { width: 20px; }

.burger.is-open span:nth-child(1) { width: 22px; transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { width: 22px; transform: translateY(-8px) rotate(-45deg); }

/* ---------- 全屏遮罩菜单 ---------- */
.menu-aside {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  padding: clamp(96px, 15vh, 140px) clamp(18px, 5vw, 56px) 44px;
  background:
    radial-gradient(700px 500px at 88% 12%, rgba(139, 69, 19, .34), transparent 66%),
    rgba(21, 15, 27, .975);
  visibility: hidden;
  opacity: 0;
  transition: opacity .34s ease, visibility .34s ease;
}

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

.menu-aside nav { max-width: 660px; margin: 0 auto; }

.menu-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.menu-aside li {
  border-bottom: 1px solid rgba(201, 168, 245, .13);
}

.menu-aside a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--paper);
  font-size: clamp(19px, 4.6vw, 27px);
  font-weight: 600;
  line-height: 1.4;
  border-radius: 18px 26px 20px 24px;
  transition: background .25s ease, color .25s ease;
}

.menu-aside a:hover,
.menu-aside a:focus-visible {
  background: rgba(86, 34, 139, .48);
  color: #fff;
}

.menu-aside .idx {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--amber);
  padding-top: 4px;
}

body.menu-open .menu-aside li {
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 42ms + 70ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  max-width: var(--maxw);
  min-height: 45vh;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 46px) clamp(18px, 4vw, 48px) clamp(38px, 5vw, 58px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -160px;
  left: -140px;
  width: 430px;
  height: 430px;
  border-radius: 48% 52% 43% 57% / 52% 44% 56% 48%;
  background: radial-gradient(circle at 42% 42%, rgba(86, 34, 139, .62), rgba(139, 69, 19, .20) 62%, transparent 74%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(29px, 6.1vw, 54px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: .005em;
  background: linear-gradient(118deg, #fff 8%, var(--glow) 58%, var(--amber) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0;
  max-width: 44ch;
  color: var(--dim);
  font-size: 16.5px;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-collage {
  position: relative;
  z-index: 1;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 200px;
}

.hero-collage img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(201, 168, 245, .24);
}

.hero-a {
  border-radius: 26px 96px 26px 26px / 46px 60px 40px 60px;
  transform: translateY(14px);
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, .85);
}

.hero-b {
  border-radius: 96px 26px 74px 26px / 60px 44px 56px 40px;
  transform: translateY(-14px);
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, .85);
}

.hero-blob {
  position: absolute;
  z-index: 0;
  right: -34px;
  bottom: -34px;
  width: 178px;
  height: 178px;
  border-radius: 52% 48% 60% 40% / 45% 55% 45% 55%;
  background: linear-gradient(140deg, rgba(139, 69, 19, .58), rgba(86, 34, 139, .32));
  filter: blur(3px);
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--plum), var(--rust) 52%, var(--plum));
  transform: skewY(-1.1deg);
  transform-origin: left bottom;
}

/* ---------- 内容 + 侧栏 ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  align-items: start;
  gap: clamp(22px, 4vw, 52px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px) 64px;
}

.prose { min-width: 0; padding-bottom: 12px; }

.prose > section {
  position: relative;
  overflow: hidden;
  margin: 0 0 22px;
  padding: 26px clamp(16px, 3vw, 32px) 32px;
  border: 1px solid rgba(201, 168, 245, .13);
  border-radius: 28px;
  background: linear-gradient(168deg, rgba(86, 34, 139, .17), rgba(31, 23, 38, .38));
  scroll-margin-top: 112px;
}

.prose > section::after {
  content: "";
  position: absolute;
  left: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--plum), var(--rust));
}

.prose h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 3.3vw, 29px);
  line-height: 1.32;
  font-weight: 700;
  color: #fff;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--amber);
}

.subtitle,
.prose .subtitle,
.prose p.subtitle {
  margin: 0 0 16px;
  color: #cdbde0;
  font-size: 16px;
  line-height: 1.66;
}

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

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

.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--amber); }

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

.prose figure { margin: 0 0 16px; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--rust);
  border-radius: 4px 20px 20px 4px;
  background: rgba(139, 69, 19, .17);
  color: #e7dbee;
}

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

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(201, 168, 245, .18);
  text-align: left;
  vertical-align: top;
}

.prose th { color: var(--amber); font-weight: 600; }

.prose code {
  font-family: var(--mono);
  font-size: .92em;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(201, 168, 245, .14);
}

.prose hr {
  height: 1px;
  border: 0;
  margin: 22px 0;
  background: rgba(201, 168, 245, .2);
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 112px;
  margin-top: 26px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 26px 36px 28px 30px;
  background: linear-gradient(158deg, rgba(86, 34, 139, .26), rgba(31, 23, 38, .62));
}

.rail h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--glow);
}

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

.to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(201, 168, 245, .4);
  border-radius: 16px 24px 18px 22px;
  background: rgba(86, 34, 139, .55);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

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

/* ---------- 页脚 ---------- */
.site-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px) clamp(18px, 4vw, 48px) 32px;
  border-top: 1px solid var(--line);
}

.foot-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 34px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 40px 28px 44px 30px / 30px 40px 28px 44px;
  background: linear-gradient(122deg, rgba(86, 34, 139, .62), rgba(139, 69, 19, .48));
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, .9);
}

.foot-cta::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 54% 46% 62% 38% / 48% 58% 42% 52%;
  background: radial-gradient(circle at 40% 40%, rgba(224, 185, 141, .35), transparent 70%);
  pointer-events: none;
}

.foot-cta h2 {
  position: relative;
  margin: 0;
  font-size: clamp(23px, 4.2vw, 37px);
  line-height: 1.22;
  color: #fff;
}

.foot-cta .subtitle {
  position: relative;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .84);
  font-size: 16px;
}

.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 18px 26px 20px 24px;
  background: #fff;
  color: #3a1d5c;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 26px;
  padding-bottom: 26px;
}

address {
  font-style: normal;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.site-foot ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--dim);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5;
}

.site-foot ul a:hover { color: #fff; }

.copyright {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 168, 245, .15);
  font-size: 15px;
  color: #9d8dae;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

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

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 16px;
    margin-top: 4px;
    border-radius: 24px 32px 26px 28px;
  }
  .rail h2 { grid-column: 1; }
  .rail .subtitle { grid-column: 1; margin-bottom: 0; }
  .to-top { grid-column: 2; grid-row: 1 / span 2; width: auto; padding: 10px 18px; }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 18px;
    gap: 20px;
  }
  .hero-collage { min-height: 180px; }
  .hero-collage img { aspect-ratio: 1 / 1; }
  .hero-a { transform: translateY(8px); }
  .hero-b { transform: translateY(-8px); }
  .prose > section { border-radius: 24px; padding: 20px 16px 26px; scroll-margin-top: 104px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
  .foot-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  body { font-size: 16.5px; }
  .brand { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body.menu-open .menu-aside li { animation: none; }
  .menu-aside { transition: none; }
}

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