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

:root {
  --ink: #1f1726;
  --grape: #56228b;
  --grape-soft: #7b45b3;
  --ochre: #8b4513;
  --sand: #f5ece1;
  --sand-2: #ecdfcd;
  --paper: #fffaf4;
  --blob: 26px 9px 24px 11px;
  --blob-2: 10px 24px 12px 26px;
  --shadow: 0 16px 34px -30px rgba(31, 23, 38, .8);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-bottom: 106px;
  font-family: "Inter", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background:
    radial-gradient(58rem 24rem at 10% -8%, rgba(86, 34, 139, .14), transparent 70%),
    radial-gradient(42rem 22rem at 94% 16%, rgba(139, 69, 19, .13), transparent 72%),
    var(--sand);
}

img { border: 0; }
a { color: var(--grape); }

/* ---------- 底部固定条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(31, 23, 38, .93);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .1);
  transition: background .3s ease;
}
.bar.stuck { background: var(--ink); }

.barnav {
  max-width: 1120px;
  margin: 0 auto;
  padding: .35rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .2rem .5rem;
}

.grp {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.grp-a { justify-content: flex-end; }
.grp-b { justify-content: flex-start; }

.grp a {
  display: inline-block;
  padding: .68rem .58rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #e6d9f2;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.grp a:hover,
.grp a:focus-visible {
  color: #fff;
  background: rgba(123, 69, 179, .35);
}

.grp .cta-btn {
  margin-left: .35rem;
  padding: .68rem .95rem;
  background: var(--grape);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
}
.grp .cta-btn:hover { background: var(--grape-soft); }

.brand {
  display: inline-block;
  padding: .55rem .7rem;
  font-family: "Calistoga", "Songti SC", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  letter-spacing: .02em;
  border-radius: 10px;
}
.brand:hover { color: #d6bff0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(140deg, var(--grape), var(--ink));
  border-radius: 0 0 30px 12px;
  margin-bottom: 1.6rem;
}

.hero figure {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 122%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(31, 23, 38, .12) 0%, rgba(31, 23, 38, .82) 80%);
}

.ribbon {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 13px;
  background: var(--ochre);
  transform: skewY(-1.3deg);
  transform-origin: left bottom;
  z-index: 3;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 2.4rem;
  color: #fff;
}

.hero h1 {
  margin: 0 0 .55rem;
  font-family: "Calistoga", "Songti SC", Georgia, serif;
  font-size: clamp(1.9rem, 5.6vw, 3.2rem);
  line-height: 1.16;
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(31, 23, 38, .45);
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 1rem;
  color: #ece0f7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 正文舞台 ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.band {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.rail {
  position: sticky;
  top: 1rem;
  padding: 1.1rem 1rem 1.15rem;
  background: var(--paper);
  border-radius: var(--blob);
  box-shadow: var(--shadow);
}
.rail small {
  display: block;
  font-size: .78rem;
  letter-spacing: .22em;
  color: var(--ochre);
  font-weight: 600;
}
.rail h2 {
  margin: .22rem 0 .7rem;
  font-family: "Calistoga", "Songti SC", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.3;
  color: var(--grape);
}
.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .12rem;
}
.rail a {
  display: block;
  padding: .55rem .35rem;
  min-height: 40px;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.rail a:hover { background: var(--sand-2); color: var(--grape); }
.rail::after {
  content: "";
  display: block;
  height: 30px;
  margin: .9rem .2rem 0;
  border-radius: 60% 40% 55% 45% / 52% 55% 45% 48%;
  background: linear-gradient(120deg, rgba(139, 69, 19, .2), rgba(86, 34, 139, .2));
}

/* ---------- 正文块 ---------- */
.prose > section {
  margin: 0 0 1.35rem;
  padding: 1.5rem 1.35rem;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow);
  scroll-margin-top: 1rem;
}
.prose > section:nth-child(even) { background: var(--sand-2); }
.prose > section:nth-child(3n) { border-radius: var(--blob-2); }

.prose h2 {
  margin: 0 0 .7rem;
  font-family: "Calistoga", "Songti SC", Georgia, serif;
  font-size: clamp(1.32rem, 3.4vw, 1.78rem);
  line-height: 1.3;
  color: var(--grape);
}
.prose h3 {
  margin: 1.2rem 0 .45rem;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ochre);
}
.prose p { margin: 0 0 .9rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--grape); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 .9rem; }
.prose li { margin-bottom: .35rem; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}
.prose figure { margin: 1rem 0; }
.prose blockquote {
  margin: 1rem 0;
  padding: .8rem 1.1rem;
  background: rgba(86, 34, 139, .08);
  border-radius: 4px 18px 4px 18px;
  color: #3d2f4c;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .92em;
  background: rgba(31, 23, 38, .07);
  padding: .1em .38em;
  border-radius: 4px;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 2.2rem;
  padding-top: 1.8rem;
  background: var(--ink);
  color: #e4d8ee;
  border-radius: 30px 12px 0 0;
}

.foot-top {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.35rem;
  background: linear-gradient(120deg, var(--grape), var(--ochre));
  border-radius: 22px 6px 22px 6px;
}
.cta-word {
  margin: 0;
  font-family: "Calistoga", "Songti SC", Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.25;
  color: #fff;
}
.btn {
  display: inline-block;
  padding: .82rem 1.3rem;
  min-height: 44px;
  background: #fff;
  color: var(--grape);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--sand); }

.cols {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.cols dl { margin: 0; }
.cols dt {
  font-size: .76rem;
  letter-spacing: .18em;
  color: #b6a1cc;
}
.cols dd {
  margin: .35rem 0 0;
  font-size: .95rem;
  line-height: 1.6;
  color: #fff;
  overflow-wrap: anywhere;
}
.cols dd a {
  display: inline-block;
  padding: .28rem 0;
  color: #fff;
  text-decoration: none;
}
.cols dd a:hover { color: #d6bff0; text-decoration: underline; }

.bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: .9rem 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem;
}
.bottom a {
  color: #e4d8ee;
  text-decoration: none;
  padding: .3rem 0;
}
.bottom a:hover { color: #fff; }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  body { padding-bottom: 150px; }
  .band { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .rail { position: static; border-radius: 20px 6px 20px 6px; }
  .rail::after { display: none; }
  .rail ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem; }

  .barnav {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: .3rem .55rem .5rem;
    gap: .1rem .3rem;
  }
  .brand {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: center;
    padding: .45rem .7rem;
  }
  .grp-a { grid-row: 2; grid-column: 1; justify-content: flex-start; }
  .grp-b { grid-row: 2; grid-column: 2; justify-content: flex-end; }
  .grp { overflow-x: auto; scrollbar-width: none; }
  .grp::-webkit-scrollbar { display: none; }
  .grp a { padding: .62rem .5rem; font-size: .95rem; }
  .grp .cta-btn { margin-left: .2rem; padding: .62rem .8rem; }

  .hero { min-height: 46vh; border-radius: 0 0 24px 10px; }
  .hero-copy { padding: 2rem 1rem 2.1rem; }
  .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
  .cols dt { letter-spacing: .1em; font-size: .72rem; }
}

@media (max-width: 420px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .cols dl { display: flex; align-items: baseline; gap: .6rem; }
  .cols dd { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { transform: none !important; }
  .btn:hover { transform: none; }
}

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