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

:root {
  --ink: #172623;
  --ink-mid: #37524b;
  --ink-soft: #5c7269;
  --teal: #5cc6b0;
  --teal-deep: #2f7d6d;
  --sand: #d4c4a8;
  --sand-lite: #efe4d3;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --bg: #f6efe4;
  --bg-deep: #e6d6c0;
  --card: #fbf6ec;
  --line: rgba(23, 38, 35, .16);
  --line-soft: rgba(23, 38, 35, .09);
  --r: 28px;
  --shadow: 0 22px 44px -32px rgba(23, 38, 35, .55);
  --maxw: 1220px;
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: "Fira Sans", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .012em;
  font-weight: 400;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .34;
  mix-blend-mode: multiply;
  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='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

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

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

.masthead, .stage, .foot { position: relative; z-index: 1; }

/* ---------- 顶部 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 239, 228, .93);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}

.masthead-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px clamp(14px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(17px, 1.9vw, 22px);
  letter-spacing: .1em;
  white-space: nowrap;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 60% 60% 60% 4px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(92, 198, 176, .2);
  flex: none;
}

.masthead-in > .brand { display: none; }

.nav {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(4px, 1.4vw, 20px);
}

.nav-col {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 14px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-col--a { justify-content: flex-start; }
.nav-col--b { justify-content: flex-end; }

.nav-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-mid);
  font-size: 16px;
  text-decoration: none;
  transition: color .25s ease-out, background-color .25s ease-out, border-color .25s ease-out;
}

.nav-col a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--card);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #f8f3ea;
  font-size: 15px;
  letter-spacing: .14em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s ease-out;
}

.contact:hover { background: var(--teal-deep); }

/* ---------- 主体 ---------- */

.stage {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 2.6vw, 34px) clamp(14px, 3vw, 34px) 0;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 70vh, 660px);
  padding: clamp(26px, 5vw, 64px);
  background: linear-gradient(150deg, var(--sand-lite), var(--sand) 70%, var(--clay));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 54px), 0 100%);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .55;
  background-image: radial-gradient(circle, rgba(23, 38, 35, .3) 1px, transparent 1.4px);
  background-size: 18px 18px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(200deg, rgba(23, 38, 35, .04) 0%, rgba(23, 38, 35, .3) 45%, rgba(23, 38, 35, .74) 100%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: -8% 0 0;
  z-index: 0;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  display: block;
  filter: saturate(.9) contrast(1.03);
}

.hero-text {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: min(760px, 94%);
  text-align: right;
}

.hero-h1 {
  margin: 0 0 .34em;
  font-size: clamp(2.05rem, 6.2vw, 4.3rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: .01em;
  color: #fdf8f0;
  text-shadow: 0 12px 30px rgba(23, 38, 35, .38);
}

.hero-lede {
  margin: 0 0 0 auto;
  max-width: 36ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: rgba(253, 248, 240, .92);
  font-weight: 300;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: clamp(24px, 3.4vw, 54px);
  align-items: start;
  padding: clamp(24px, 4vw, 52px) 0 clamp(8px, 2vw, 22px);
}

/* ---------- 正文 ---------- */

.prose {
  min-width: 0;
  font-size: 17.5px;
  line-height: 1.85;
  color: #22322e;
  counter-reset: sec;
}

.prose > section {
  counter-increment: sec;
  position: relative;
  scroll-margin-top: 104px;
  padding: clamp(22px, 3.2vw, 40px) 0 clamp(22px, 3.2vw, 40px);
  border-top: 1px solid var(--line-soft);
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose > section:target {
  background: linear-gradient(90deg, rgba(92, 198, 176, .1), rgba(92, 198, 176, 0) 62%);
}

.prose h2 {
  margin: 0 0 .68em;
  font-size: clamp(1.42rem, 3vw, 2.02rem);
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: .005em;
  color: var(--ink);
}

.prose h2 > span {
  position: relative;
  display: inline-block;
  padding-bottom: .34em;
}

.prose h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--sand));
}

.prose h3 {
  margin: 1.6em 0 .5em;
  font-size: 1.14rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
}

.prose h3 > span { border-bottom: 2px solid rgba(92, 198, 176, .45); padding-bottom: .12em; }

.prose p { margin: 0 0 1.05em; }

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

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

.prose ul, .prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}

.prose li { margin: .34em 0; }

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

.prose strong, .prose b { color: var(--ink); font-weight: 600; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 16px 22px;
  border-left: 3px solid var(--teal);
  border-radius: 4px 18px 18px 4px;
  background: var(--card);
  color: var(--ink-mid);
  font-size: 16.5px;
}

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.prose figure { margin: 1.5em 0; }

.prose figcaption {
  margin-top: .6em;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.prose table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th, .prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th { background: var(--sand-lite); font-weight: 600; }

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

.prose code {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(23, 38, 35, .07);
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: .92em;
}

/* ---------- 侧栏 ---------- */

.rail {
  position: sticky;
  top: 96px;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r) var(--r) var(--r) 8px;
  background: var(--card);
}

.rail-h {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--ink-soft);
  font-family: "Fira Code", ui-monospace, monospace;
}

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

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

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 6px;
  border-radius: 12px;
  color: var(--ink-mid);
  font-size: 15.5px;
  text-decoration: none;
  transition: background-color .2s ease-out, color .2s ease-out;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--teal-deep);
  opacity: .8;
}

.rail-list a:hover { background: rgba(92, 198, 176, .16); color: var(--ink); }

.rail-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  color: var(--ink-soft);
  font-size: 14.5px;
  letter-spacing: .1em;
  text-decoration: none;
}

.rail-top:hover { color: var(--teal-deep); }

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 42px);
  margin-top: clamp(40px, 7vw, 92px);
  padding: clamp(30px, 5vw, 62px) max(clamp(16px, 4vw, 40px), calc((100vw - 1320px) / 2)) clamp(18px, 3vw, 30px);
  background: linear-gradient(180deg, var(--sand-lite), var(--bg-deep));
  border-top: 1px solid var(--line);
}

.foot-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: clamp(18px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.foot-h {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.25;
  color: var(--ink);
}

.foot-h > span {
  position: relative;
  display: inline-block;
}

.foot-h > span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 100%;
  height: 6px;
  border-radius: 50%;
  background: rgba(92, 198, 176, .45);
}

.foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: .14em;
  text-decoration: none;
  transition: background-color .25s ease-out, color .25s ease-out;
}

.foot-btn:hover { background: var(--ink); color: var(--bg); }

.foot-t {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--ink-soft);
  font-family: "Fira Code", ui-monospace, monospace;
}

.foot-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-mid);
  font-size: 15.5px;
  text-decoration: none;
}

.foot-list a:hover { color: var(--teal-deep); }

.foot-base {
  grid-column: 1 / -1;
  margin-top: clamp(18px, 3vw, 34px);
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  font-family: "Fira Code", ui-monospace, monospace;
}

/* ---------- 动效 ---------- */

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .72s cubic-bezier(.22, .72, .28, 1), transform .72s cubic-bezier(.22, .72, .28, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-art { transform: none !important; }
}

/* ---------- 断点 ---------- */

@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-col:last-of-type { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .masthead {
    position: static;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .masthead-in { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }

  .masthead-in > .brand { display: inline-flex; order: 1; margin-right: auto; }
  .masthead-in > .nav .brand--mid { display: none; }

  .contact { order: 2; padding: 0 16px; font-size: 14px; }

  .nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .nav-col { flex: 0 0 auto; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .nav-col a { padding: 0 12px; font-size: 15px; }

  .hero { align-items: flex-start; min-height: 60vh; padding: 26px 20px 54px; }
  .hero-text { max-width: 100%; }
  .hero-h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .hero-lede { max-width: 100%; font-size: 15.5px; }
  .prose > div { scroll-margin-top: 24px; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .prose { font-size: 16.5px; line-height: 1.85; }

  .stage { padding: 12px 12px 0; }
  .hero {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), 0 100%);
    min-height: 52vh;
  }

  .split { padding-top: 22px; gap: 26px; }
  .prose h2 { font-size: 1.35rem; }
  .prose h3 { font-size: 1.06rem; }

  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-col:last-of-type { grid-column: auto; }
  .foot-cta { flex-direction: column; align-items: flex-start; }
  .rail-list { grid-template-columns: minmax(0, 1fr); }
}

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