@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root {
  --grape: #56228b;
  --grape-soft: #7a45ad;
  --ochre: #8b4513;
  --ochre-soft: #b97a43;
  --ink: #1f1726;
  --ink-soft: #4c4155;
  --paper: #f7f2ea;
  --card: rgba(255, 255, 255, 0.62);
  --line: rgba(86, 34, 139, 0.16);
  --display: "Amatic SC", "Cabin", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "Cabin", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 720px at 88% -10%, rgba(86, 34, 139, 0.18), transparent 70%),
    radial-gradient(760px 620px at -6% 22%, rgba(139, 69, 19, 0.14), transparent 70%),
    radial-gradient(880px 700px at 68% 106%, rgba(86, 34, 139, 0.11), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

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

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

/* 品牌行 */
.masthead {
  position: relative;
  z-index: 3;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px clamp(14px, 4vw, 28px) 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding-right: 6px;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%;
  background: linear-gradient(140deg, var(--grape), var(--ochre));
  box-shadow: 0 6px 14px -8px rgba(31, 23, 38, 0.9);
}

.mark svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* 药丸导航 */
.pillnav {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(247, 242, 234, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.pillnav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto;
  max-width: 1080px;
  padding: 10px clamp(14px, 4vw, 28px) 12px;
}

.pillnav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--grape);
  text-decoration: none;
  border: 1px solid rgba(86, 34, 139, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.pillnav a:hover,
.pillnav a:focus-visible {
  background: var(--grape);
  color: #fff;
  transform: translateY(-2px);
}

/* 主体 */
.main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 28px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(16px, 4vw, 44px);
  align-items: center;
  min-height: 45vh;
  padding: clamp(18px, 4vw, 40px) 0 clamp(28px, 5vw, 46px);
  scroll-margin-top: 118px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--grape), var(--ochre-soft));
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.6vw, 3.9rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero-fig {
  position: relative;
  margin: 0;
  width: 100%;
}

.blob {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 30px rgba(86, 34, 139, 0.3));
  animation: bob 8s ease-in-out infinite alternate;
}

.hero-pic {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 52% 48% 42% 58% / 50% 46% 54% 50%;
  box-shadow: 0 24px 40px -22px rgba(31, 23, 38, 0.75);
}

@keyframes bob {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* 正文与侧栏 */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding-bottom: 20px;
}

.stream > section {
  margin: 0 0 26px;
  padding: clamp(20px, 3.2vw, 34px);
  scroll-margin-top: 118px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: var(--card);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  box-shadow: 0 20px 44px -30px rgba(31, 23, 38, 0.75);
}

.stream > section > *:first-child {
  margin-top: 0;
}

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

.stream h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: 0.03em;
  color: var(--grape);
}

.stream h2 + hr,
.rail h2 + hr {
  height: 3px;
  margin: 0 0 20px;
  border: 0;
  border-radius: 3px;
  background-image: repeating-linear-gradient(90deg, var(--ochre-soft) 0 11px, transparent 11px 20px);
}

.stream h3 {
  margin: 26px 0 8px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ochre);
}

.stream p {
  margin: 0 0 16px;
  font-size: 1.06rem;
}

.stream ul,
.stream ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.stream li {
  margin-bottom: 8px;
}

.stream li::marker {
  color: var(--grape-soft);
}

.stream strong {
  color: var(--grape);
  font-weight: 700;
}

.stream a {
  color: var(--grape);
  text-decoration: underline;
  text-decoration-color: rgba(86, 34, 139, 0.42);
  text-underline-offset: 3px;
}

.stream blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--ochre-soft);
  border-radius: 0 20px 20px 0;
  background: rgba(139, 69, 19, 0.08);
  color: var(--ink-soft);
}

.stream img {
  border-radius: 22px;
  box-shadow: 0 16px 32px -24px rgba(31, 23, 38, 0.8);
}

.stream figure {
  margin: 20px 0;
}

.stream hr {
  height: 2px;
  margin: 22px 0;
  border: 0;
  border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, rgba(86, 34, 139, 0.35) 0 8px, transparent 8px 16px);
}

.rail {
  position: sticky;
  top: 126px;
  padding: 20px 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -30px rgba(31, 23, 38, 0.8);
}

.rail h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  color: var(--grape);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rail-list a::before {
  content: counter(rail);
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ochre-soft);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: rgba(86, 34, 139, 0.1);
  color: var(--grape);
}

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 46px auto 0;
  padding: 30px clamp(14px, 4vw, 28px) 42px;
  border-top: 2px dashed rgba(86, 34, 139, 0.26);
}

.foot-brand {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(3rem, 11vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  background: linear-gradient(100deg, var(--grape), var(--ochre));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(86, 34, 139, 0.3);
  border-radius: 999px;
  color: var(--grape);
  text-decoration: none;
}

.foot-base a:hover,
.foot-base a:focus-visible {
  background: var(--grape);
  color: #fff;
}

/* 滚动揭示 */
.js .rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.32, 1);
}

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

@media (max-width: 900px) {
  .spread {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-fig {
    width: min(190px, 54%);
    margin-top: 4px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 104px;
  }

  .pillnav ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 10px;
  }

  .pillnav ol::-webkit-scrollbar {
    display: none;
  }

  .pillnav a {
    min-height: 40px;
    white-space: nowrap;
  }

  .stream > section {
    scroll-margin-top: 104px;
    border-radius: 24px;
  }

  .hero {
    scroll-margin-top: 104px;
  }
}

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

  .blob {
    animation: none;
  }

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

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