@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --paper: #f6fdf9;
  --deep: #0c5540;
  --line: 3px solid var(--ink);
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 14px;
  --clay: 6px 6px 0 rgba(23, 38, 32, .2), inset -3px -3px 9px rgba(23, 38, 32, .12), inset 4px 4px 10px rgba(255, 255, 255, .85);
  --clay-soft: 4px 4px 0 rgba(23, 38, 32, .15), inset -2px -2px 7px rgba(23, 38, 32, .1), inset 3px 3px 8px rgba(255, 255, 255, .8);
  --font-h: 'Cormorant Garamond', 'Cinzel', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --font-b: system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(180, 253, 225, .55), transparent 52%),
    radial-gradient(circle at 92% 2%, rgba(173, 216, 230, .5), transparent 48%),
    radial-gradient(rgba(23, 38, 32, .1) 1.4px, transparent 1.5px) 0 0 / 22px 22px,
    var(--paper);
  padding-bottom: 116px;
}

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

/* ---------- 底部黏贴条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  width: calc(100% - 20px);
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, #ffffff, var(--mint) 78%, var(--sky));
  box-shadow: 0 -5px 16px rgba(23, 38, 32, .14), inset -2px -2px 8px rgba(23, 38, 32, .12), inset 3px 3px 9px #fff;
}

.mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: var(--line);
  border-radius: 50%;
  background: linear-gradient(150deg, #fff, var(--sky));
  box-shadow: var(--clay-soft);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 700;
  transition: transform .2s ease-out;
}

.mark:hover, .mark:focus-visible { transform: translateY(-2px); }

.mark-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
}

.dock-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.dock-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease-out, border-color .18s ease-out;
}

.dock-nav a:hover,
.dock-nav a:focus-visible,
.dock-nav a.is-active {
  background: #fff;
  border-color: var(--ink);
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .1);
}

.cta {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  min-height: 42px;
  padding: 6px 16px;
  border: var(--line);
  border-radius: 99px;
  background: linear-gradient(160deg, var(--sky), #fff);
  box-shadow: var(--clay-soft);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}

.cta:hover, .cta:focus-visible { transform: translateY(-2px); }

/* ---------- 版面 ---------- */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 14px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

main { min-width: 0; }

article > section {
  position: relative;
  margin: 0 0 20px;
  padding: 22px 18px;
  border: var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--clay);
  scroll-margin-top: 18px;
}

article > section:nth-of-type(even) {
  background: linear-gradient(180deg, #fff, #f0fbf6);
}

/* ---------- 首屏 ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 45vh;
  padding: 26px 18px 20px;
  text-align: center;
  background: linear-gradient(165deg, #ffffff, var(--mint) 58%, var(--sky));
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 38, 32, .16) 1.6px, transparent 1.7px);
  background-size: 16px 16px;
  pointer-events: none;
}

.hero > * { position: relative; }

.hero h1 {
  margin: 0;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(30px, 7.4vw, 56px);
  line-height: 1.14;
  letter-spacing: .01em;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, .9);
}

.hero .lead {
  margin: 0 auto;
  max-width: 48ch;
  font-size: 17px;
  line-height: 1.7;
}

.hero-img {
  width: 100%;
  max-height: 34vh;
  object-fit: cover;
  border: var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--clay-soft);
}

/* ---------- 正文排版 ---------- */
article h2 {
  margin: 0 0 6px;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(23px, 4.4vw, 34px);
  line-height: 1.26;
  letter-spacing: .01em;
}

article h3 {
  margin: 20px 0 6px;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: clamp(20px, 3.6vw, 26px);
  line-height: 1.3;
}

article p { margin: 0 0 14px; }
article p:last-child { margin-bottom: 0; }

article ul,
article ol { margin: 0 0 14px; padding-left: 24px; }
article li { margin: 6px 0; }

article a {
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

article blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #f2fffa, var(--mint));
  box-shadow: var(--clay-soft);
}

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

article hr,
.rail hr {
  height: 6px;
  margin: 12px 0 16px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), var(--sky), var(--mint));
}

article img {
  max-width: 100%;
  height: auto;
  border: var(--line);
  border-radius: var(--r-md);
}

/* ---------- 右侧索引 ---------- */
.rail {
  align-self: start;
  padding: 18px 16px 20px;
  border: var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #ffffff, #ecfbf4);
  box-shadow: var(--clay);
}

.rail h2 {
  margin: 0;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}

.rail hr { margin: 8px 0 12px; }

.rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .08);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background .18s ease-out, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}

.rail a:hover,
.rail a:focus-visible,
.rail a.is-active {
  background: var(--mint);
  transform: translateX(-2px);
}

/* ---------- 页脚 ---------- */
footer {
  max-width: 1120px;
  margin: 26px auto 0;
  padding: 22px 16px 4px;
  text-align: center;
  border-top: 4px dotted rgba(23, 38, 32, .35);
}

footer p {
  margin: 0 0 4px;
  font-family: var(--font-h);
  font-size: 19px;
  font-weight: 600;
}

footer small {
  display: block;
  font-size: 16px;
  opacity: .78;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease-out, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mark:hover, .cta:hover, .rail a:hover { transform: none; }
}

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  .cta { display: inline-flex; }
  .dock { padding: 9px 14px; gap: 12px; }
  .dock-nav a { padding: 6px 12px; }
}

@media (min-width: 861px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 264px;
    padding: 24px 18px 0;
    gap: 22px;
  }

  article > section { padding: 28px 26px; }

  .rail { position: sticky; top: 20px; }

  body { padding-bottom: 120px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero { min-height: 48vh; padding: 22px 14px 16px; }
  .dock-nav a { padding: 6px 8px; }
}

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