@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --plum: #56228b;
  --clay: #8b4513;
  --ink: #1f1726;
  --ink-soft: #4b3f57;
  --sand: #f7f1e7;
  --glass: rgba(255, 255, 255, 0.54);
  --line: rgba(86, 34, 139, 0.16);
  --shadow: 0 20px 44px -26px rgba(31, 23, 38, 0.48);
  --radius: 4px;
  --font-body: 'DM Sans', 'Nunito', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  --font-head: 'Nunito', 'DM Sans', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--sand);
  background-image: radial-gradient(1100px 720px at 8% -12%, rgba(86, 34, 139, 0.17), transparent 64%),
    radial-gradient(900px 640px at 96% 4%, rgba(139, 69, 19, 0.16), transparent 62%),
    radial-gradient(circle at 1px 1px, rgba(31, 23, 38, 0.05) 1px, transparent 0);
  background-size: auto, auto, 10px 10px;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.005em;
  margin: 0 0 0.45em;
}

p {
  margin: 0 0 1em;
}

img {
  max-width: 100%;
  height: auto;
}

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

.page-wrap {
  min-height: 100%;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px clamp(12px, 3vw, 30px);
  background: rgba(247, 241, 231, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid rgba(86, 34, 139, 0.13);
}

.logo-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  background: linear-gradient(148deg, var(--plum), var(--clay));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.logo-link:hover {
  transform: rotate(-9deg) scale(1.07);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.logo-glyph {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  color: #fff;
}

.topbar-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.nav-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(86, 34, 139, 0.16);
  background: rgba(255, 255, 255, 0.52);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.2), background 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 62% 38% 55% 45%;
  background: var(--clay);
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-chip:hover,
.nav-chip:focus-visible {
  background: #fff;
  color: var(--plum);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.nav-chip:hover .chip-dot {
  background: var(--plum);
  transform: scale(1.25);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
  min-height: 100svh;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 66px) clamp(16px, 4vw, 40px);
}

.hero-media {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  place-self: center;
  display: grid;
  place-items: center;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 62% 38% 47% 53% / 48% 52% 48% 52%;
}

.blob-a {
  inset: 0;
  background: linear-gradient(152deg, rgba(86, 34, 139, 0.9), rgba(139, 69, 19, 0.82) 72%, rgba(31, 23, 38, 0.85));
  box-shadow: 0 34px 66px -32px rgba(31, 23, 38, 0.62);
  animation: breathe 15s ease-in-out infinite;
}

.blob-b {
  right: -3%;
  bottom: 4%;
  width: 34%;
  height: 34%;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: bob 11s ease-in-out infinite reverse;
}

.hero-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 58% 42% 46% 54% / 46% 54% 46% 54%;
  box-shadow: 0 34px 66px -34px rgba(31, 23, 38, 0.6);
}

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

.hero-badge {
  position: absolute;
  top: 5%;
  left: -1%;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
  border: 1px solid #fff;
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  color: var(--plum);
  animation: bob 9s ease-in-out infinite;
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.7rem);
  background: linear-gradient(118deg, var(--plum), var(--clay) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--plum);
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5em;
}

.subtitle {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 正文 ---------- */
.reader {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) clamp(48px, 7vw, 92px);
}

.toc {
  position: sticky;
  top: 78px;
  padding: 18px 15px;
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.toc-title {
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--clay);
  margin: 0 0 8px;
}

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

.toc-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 9px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.toc-list a:hover,
.toc-list a:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  color: var(--plum);
  padding-left: 14px;
}

.content-body {
  min-width: 0;
}

.content-body article {
  position: relative;
  padding: clamp(24px, 3.6vw, 42px) clamp(18px, 3vw, 34px);
  margin-bottom: clamp(20px, 2.8vw, 32px);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 46px -36px rgba(31, 23, 38, 0.6);
  scroll-margin-top: 96px;
}

.content-body article::before {
  content: '';
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--plum), var(--clay));
  opacity: 0.55;
}

.content-body h2 {
  font-size: clamp(1.28rem, 2.1vw, 1.66rem);
  color: var(--ink);
}

.content-body h3 {
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: var(--plum);
  margin-top: 1.2em;
}

.content-body p.subtitle,
.content-body p.subhead,
.content-body p.desc,
.content-body p.lead {
  color: var(--clay);
  font-weight: 700;
  margin-bottom: 1em;
}

.content-body p {
  color: #2d2335;
}

.content-body a {
  color: var(--plum);
  text-underline-offset: 3px;
}

.content-body ul,
.content-body ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

.content-body li {
  margin-bottom: 0.35em;
}

.content-body figure {
  margin: 0 0 1.1em;
}

.content-body img {
  display: block;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.content-body blockquote {
  margin: 0 0 1.1em;
  padding: 12px 16px;
  border-left: 3px solid var(--clay);
  background: rgba(139, 69, 19, 0.07);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(86, 34, 139, 0.05), rgba(139, 69, 19, 0.14));
}

.foot-cta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
  padding: clamp(34px, 6vw, 66px) clamp(16px, 4vw, 40px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.cta-title {
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  color: var(--plum);
  max-width: 26em;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--plum), var(--clay));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.3), filter 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 0.9fr;
  gap: clamp(18px, 3vw, 34px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px) clamp(16px, 4vw, 40px);
}

.foot-brand {
  display: grid;
  align-content: start;
  gap: 10px;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  background: linear-gradient(148deg, var(--plum), var(--clay));
  text-decoration: none;
  box-shadow: var(--shadow);
}

.foot-brand-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  color: var(--ink);
}

.foot-dl {
  margin: 0;
  display: grid;
  gap: 2px;
}

.foot-dl dt {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.17em;
  color: var(--clay);
  margin-bottom: 6px;
}

.foot-dl dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
}

.foot-dl dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 3px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.foot-dl dd a:hover,
.foot-dl dd a:focus-visible {
  color: var(--plum);
  border-bottom-color: var(--plum);
}

.foot-bottom {
  border-top: 1px solid rgba(86, 34, 139, 0.14);
}

.foot-bottom p {
  margin: 0;
  padding: 18px 16px 26px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- 动效 ---------- */
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-11px);
  }
}

@keyframes breathe {
  0%,
  100% {
    border-radius: 62% 38% 47% 53% / 48% 52% 48% 52%;
  }
  50% {
    border-radius: 46% 54% 58% 42% / 55% 45% 55% 45%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.65s cubic-bezier(0.2, 0.75, 0.3, 1);
}

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

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

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .reader {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(22px, 5vw, 34px);
  }

  .hero-copy {
    order: -1;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
    max-height: 54svh;
  }

  .hero-badge {
    left: 2%;
  }
}

@media (max-width: 620px) {
  body {
    background-image: radial-gradient(760px 520px at 4% -8%, rgba(86, 34, 139, 0.16), transparent 62%),
      radial-gradient(700px 520px at 98% 2%, rgba(139, 69, 19, 0.15), transparent 60%);
    background-size: auto, auto;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .toc-list {
    grid-template-columns: 1fr 1fr;
  }

  .hero-badge {
    font-size: 15px;
    padding: 9px 13px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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