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

:root {
  --plum: #56228b;
  --clay: #8b4513;
  --ink: #1f1726;
  --linen: #f7f2e9;
  --sand: #e9dcc8;
  --moss: #3f5c42;
  --line: rgba(31, 23, 38, 0.17);
  --soft: rgba(31, 23, 38, 0.62);
  --card: rgba(255, 255, 255, 0.6);
  --r-card: 28px;
  --r-soft: 18px;
}

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

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

body {
  margin: 0;
  font-family: 'Montserrat', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--ink);
  font-weight: 400;
  background-color: var(--linen);
  background-image:
    radial-gradient(circle at 10% 4%, rgba(86, 34, 139, 0.13), transparent 40%),
    radial-gradient(circle at 92% 16%, rgba(139, 69, 19, 0.14), transparent 44%),
    radial-gradient(circle at 46% 92%, rgba(63, 92, 66, 0.12), transparent 52%),
    repeating-linear-gradient(92deg, rgba(31, 23, 38, 0.035) 0 1px, transparent 1px 5px);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--plum);
  letter-spacing: 0.01em;
}

p { margin: 0 0 1rem; }

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

img { max-width: 100%; }

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

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
  padding: 0.5rem 0.7rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: rgba(247, 242, 233, 0.95);
  backdrop-filter: blur(9px);
  border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 32px rgba(31, 23, 38, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-text {
  font-family: 'Cormorant', 'Songti SC', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--plum);
  letter-spacing: 0.02em;
}

.dock-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-list::-webkit-scrollbar { display: none; }

.dock-list li { flex: 0 0 auto; }

.dock-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.72rem;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.dock-list a:hover,
.dock-list a:focus-visible {
  background: rgba(86, 34, 139, 0.09);
  border-color: rgba(86, 34, 139, 0.28);
  color: var(--plum);
}

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  min-height: 45vh;
  padding: clamp(1.1rem, 3.4vw, 2.4rem) clamp(1rem, 5vw, 3.6rem) clamp(1.4rem, 4vw, 2.8rem);
}

.hero-word {
  position: absolute;
  right: 2%;
  top: -0.16em;
  z-index: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(5.5rem, 21vw, 14rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: rgba(86, 34, 139, 0.11);
  pointer-events: none;
  user-select: none;
}

.hero-art {
  position: relative;
  z-index: 1;
  aspect-ratio: 5 / 4;
  border-radius: 52% 48% 42% 58% / 46% 56% 44% 54%;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 24%, rgba(139, 69, 19, 0.3), transparent 62%),
    linear-gradient(150deg, var(--sand), rgba(86, 34, 139, 0.22));
  will-change: transform;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.95rem, 5vw, 3.35rem);
  line-height: 1.1;
  color: var(--plum);
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.lede {
  max-width: 33ch;
  margin: 0 0 0 auto;
  color: var(--soft);
  font-size: 1.02rem;
}

/* ---------- 主体骨架 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.6rem);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 214px) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  align-items: start;
  padding-block: clamp(1.4rem, 3.6vw, 2.8rem);
}

main section[id] { scroll-margin-top: 2.4rem; }

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 1.2rem;
  padding: 1rem 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 24px 24px 24px 8px;
  background: rgba(255, 255, 255, 0.55);
}

.rail small {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.24em;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.rail h2 {
  margin: 0 0 0.7rem;
  font-size: 1.28rem;
  color: var(--ink);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.12rem;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid rgba(139, 69, 19, 0.35);
  border-radius: 0 12px 12px 0;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: rgba(139, 69, 19, 0.09);
  border-left-color: var(--plum);
  color: var(--plum);
}

/* ---------- 正文 ---------- */
.prose { min-width: 0; }

.prose > section {
  position: relative;
  margin: 0 0 1.4rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

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

.prose > section:nth-of-type(2n) { border-radius: 8px var(--r-card) var(--r-card) var(--r-card); }
.prose > section:nth-of-type(3n) { border-radius: var(--r-card) var(--r-card) 8px var(--r-card); }

.prose small {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.24em;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.prose h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.24;
}

.prose h3 {
  margin: 1.6rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--clay);
}

.prose h4 {
  margin: 1.2rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.prose p { color: var(--ink); }

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

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

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li { margin-bottom: 0.45rem; }

.prose li::marker { color: var(--clay); }

.prose strong { color: var(--plum); font-weight: 600; }

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.2rem;
  border-left: 3px solid var(--clay);
  border-radius: 4px var(--r-soft) var(--r-soft) 4px;
  background: rgba(139, 69, 19, 0.08);
  color: #3a2f42;
}

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

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.1rem 0;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.prose figure { margin: 1.2rem 0; }

.prose figcaption {
  font-size: 1rem;
  color: var(--soft);
  margin-top: 0.4rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  font-size: 1rem;
}

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

.prose th { background: rgba(86, 34, 139, 0.08); color: var(--ink); }

.prose hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 1.6rem 0;
}

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.95em;
  background: rgba(31, 23, 38, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: clamp(2rem, 5vw, 3.4rem);
  padding: clamp(1.6rem, 4vw, 2.6rem) 0 calc(7.6rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  color: var(--linen);
  border-radius: 40px 40px 0 0;
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.6rem);
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  align-items: start;
}

.foot-col { min-width: 0; }

.foot address { font-style: normal; }

.foot-brand {
  display: block;
  font-family: 'Cormorant', 'Songti SC', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--linen);
  margin-bottom: 0.35rem;
}

.foot-note {
  display: block;
  font-size: 1rem;
  color: rgba(247, 242, 233, 0.62);
  line-height: 1.6;
}

.sub label {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #d9c6a4;
  margin-bottom: 0.5rem;
}

.sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sub input {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--linen);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(247, 242, 233, 0.3);
  border-radius: 16px;
}

.sub input::placeholder { color: rgba(247, 242, 233, 0.5); }

.sub button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--plum), var(--clay));
  border: 0;
  border-radius: 16px;
  cursor: pointer;
}

.sub button:hover { filter: brightness(1.12); }

.foot-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.1rem;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(247, 242, 233, 0.86);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px dashed rgba(247, 242, 233, 0.24);
}

.foot-links a:hover { color: #fff; border-bottom-color: var(--sand); }

.foot-base {
  max-width: 1180px;
  margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
  padding: 1rem clamp(1rem, 4vw, 2.6rem) 0;
  border-top: 1px solid rgba(247, 242, 233, 0.16);
  text-align: center;
}

.foot-base p {
  margin: 0;
  font-size: 1rem;
  color: rgba(247, 242, 233, 0.58);
}

/* ---------- 回到顶部 ---------- */
.totop {
  position: fixed;
  right: 0.85rem;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: var(--plum);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(86, 34, 139, 0.3);
}

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

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .rail {
    position: static;
    order: 2;
    border-radius: var(--r-soft);
    background: rgba(255, 255, 255, 0.42);
  }

  .rail-list {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 0.2rem 0.6rem;
  }

  .rail-list a { border-left-width: 2px; }

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

@media (max-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 0.9rem;
    padding-top: 0.9rem;
  }

  .hero-art {
    order: -1;
    aspect-ratio: 16 / 10;
  }

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

  .lede { margin-left: 0; max-width: 100%; }

  .hero-word {
    font-size: clamp(4.2rem, 27vw, 7.5rem);
    top: auto;
    bottom: 0.1em;
    right: 1%;
  }

  .dock-list { flex: 1 1 100%; }

  .brand { padding-left: 0.2rem; }

  .totop { bottom: calc(126px + env(safe-area-inset-bottom, 0px)); }

  .foot { padding-bottom: calc(8.6rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 400px) {
  html { font-size: 100%; }

  .dock { gap: 0.25rem 0.4rem; }

  .dock-list a { padding-inline: 0.6rem; }

  .prose > section { padding: 1.1rem; }
}

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

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

  .hero-art { transform: none !important; }
}

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