@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --paper: #f4fffa;
  --card: #ffffff;
  --soft: #e6fff5;
  --muted: #4a6b5c;
  --edge: 3px solid var(--ink);
  --edge-fat: 4px solid var(--ink);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --inner: inset -3px -3px 10px rgba(23, 38, 32, .10), inset 3px 3px 10px rgba(255, 255, 255, .8);
  --drop: 0 6px 0 rgba(23, 38, 32, .16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  background:
    radial-gradient(circle at 12% 4%, var(--mint), transparent 58%),
    radial-gradient(circle at 86% 2%, var(--sky), transparent 52%),
    var(--paper);
  background-repeat: no-repeat;
  background-size: 100% 900px, 100% 900px, auto;
}

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

a {
  color: inherit;
}

a:focus-visible,
input:focus-visible {
  outline: 3px solid #0b3a2b;
  outline-offset: 3px;
  border-radius: 12px;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding-bottom: 8px;
}

/* 头部：品牌独占一行，菜单行在下 */
.masthead {
  padding: clamp(16px, 3vw, 28px) clamp(14px, 4vw, 40px) 0;
}

.brandRow {
  display: flex;
  align-items: center;
  padding-bottom: clamp(12px, 2vw, 18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 8px;
  border: var(--edge-fat);
  border-radius: 22px;
  background: linear-gradient(150deg, #ffffff, var(--soft));
  text-decoration: none;
  box-shadow: var(--inner), var(--drop);
  transition: transform .25s var(--bounce), box-shadow .25s ease-out;
}

.brand:hover {
  transform: translateY(-3px) rotate(-.6deg);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.brandName {
  font-family: 'Calistoga', 'Inter', serif;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  letter-spacing: .01em;
  line-height: 1.15;
}

.menuRow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: var(--edge-fat);
}

.siteNav {
  flex: 1 1 auto;
  min-width: 0;
}

.siteNav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.siteNav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 17px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--card);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .10), 0 4px 0 rgba(23, 38, 32, .18);
  transition: transform .2s var(--bounce), background .2s ease-out, box-shadow .2s ease-out;
}

.siteNav a:hover {
  background: var(--mint);
  transform: translateY(-3px);
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .1), 0 7px 0 rgba(23, 38, 32, .18);
}

.siteNav a:active {
  transform: translateY(1px);
  box-shadow: inset -1px -1px 4px rgba(23, 38, 32, .18), 0 2px 0 rgba(23, 38, 32, .18);
}

.searchBox {
  flex: 0 1 220px;
}

.searchBox input {
  width: 100%;
  min-height: 44px;
  padding: 4px 18px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .10), inset 2px 2px 6px rgba(255, 255, 255, .9);
}

.searchBox input::placeholder {
  color: var(--muted);
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 48px);
  padding-top: clamp(56px, 10vw, 110px);
  overflow: hidden;
  border-bottom: var(--edge-fat);
  border-radius: 0 0 44px 44px;
}

.heroFig {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
  background: linear-gradient(155deg, var(--sky), var(--mint) 58%, #ecfff8);
}

.heroImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  will-change: transform;
}

.heroTxt {
  position: relative;
  z-index: 1;
  max-width: min(760px, 100%);
  padding: clamp(18px, 3vw, 34px);
  border: var(--edge-fat);
  border-radius: 32px;
  background: rgba(244, 255, 250, .93);
  box-shadow: inset -4px -4px 14px rgba(23, 38, 32, .09), inset 4px 4px 14px rgba(255, 255, 255, .85), 10px 10px 0 rgba(23, 38, 32, .18);
}

.heroTxt h1 {
  margin: 0 0 .45em;
  font-family: 'Calistoga', 'Inter', serif;
  font-size: clamp(1.95rem, 5.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.012em;
}

.lede {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  color: #23402f;
}

/* 正文区：左侧栏 + 长文 */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 62px) clamp(14px, 4vw, 36px) 56px;
}

.rail {
  position: sticky;
  top: 18px;
  padding: 18px 16px;
  border: var(--edge);
  border-radius: 28px;
  background: var(--card);
  box-shadow: inset -3px -3px 12px rgba(23, 38, 32, .07), inset 3px 3px 12px rgba(255, 255, 255, .9);
}

.rail small {
  display: block;
  margin-bottom: .3em;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--muted);
}

.rail h2 {
  margin: 0 0 .65em;
  font-family: 'Calistoga', 'Inter', serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}

.railList {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rail;
}

.railList a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: .94rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background .18s ease-out, transform .18s var(--bounce);
}

.railList a:hover {
  background: var(--mint);
  transform: translateX(3px);
}

.prose {
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.78;
}

.prose > div {
  padding: clamp(26px, 4vw, 46px) 0;
  border-top: 3px dashed rgba(23, 38, 32, .2);
  scroll-margin-top: 92px;
}

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

.prose small {
  display: block;
  margin-bottom: .45em;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #2f6349;
}

.prose h2 {
  margin: .1em 0 .55em;
  font-family: 'Calistoga', 'Inter', serif;
  font-size: clamp(1.5rem, 3.2vw, 2.05rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.prose h3 {
  margin: 1.3em 0 .45em;
  font-family: 'Calistoga', 'Inter', serif;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.3;
}

.prose p {
  max-width: 66ch;
  margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
  max-width: 64ch;
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: .45em;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover {
  background: var(--mint);
}

.prose strong {
  font-weight: 700;
  background: linear-gradient(transparent 58%, var(--mint) 58%);
}

.prose img {
  margin: 1.1em 0;
  border: var(--edge);
  border-radius: 22px;
}

.prose figure {
  margin: 1.4em 0;
}

.prose figure img {
  margin: 0;
}

.prose figcaption {
  margin-top: .55em;
  font-size: .9rem;
  color: var(--muted);
}

.prose blockquote {
  max-width: 64ch;
  margin: 1.3em 0;
  padding: 14px 20px;
  border: var(--edge);
  border-radius: 0 22px 22px 0;
  background: var(--card);
  box-shadow: var(--inner);
}

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

.prose code,
.prose pre {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .92rem;
}

.prose code {
  padding: .1em .4em;
  border-radius: 8px;
  background: var(--soft);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 16px;
  border: var(--edge);
  border-radius: 20px;
  background: var(--card);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  height: 0;
  margin: 2em 0;
  border: 0;
  border-top: 3px dashed rgba(23, 38, 32, .2);
}

/* 页脚 */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 36px) 44px;
}

.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 38px);
  border: var(--edge-fat);
  border-radius: 36px;
  background: linear-gradient(140deg, #1d3329, var(--ink));
  color: #eafff6;
  text-decoration: none;
  box-shadow: inset -5px -5px 18px rgba(0, 0, 0, .3), inset 5px 5px 18px rgba(180, 253, 225, .12), 0 9px 0 rgba(23, 38, 32, .22);
  transition: transform .25s var(--bounce);
}

.cta:hover {
  transform: translateY(-4px) rotate(-.4deg);
}

.cta small {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: #9fe6c9;
}

.ctaText {
  flex: 1 1 auto;
  font-family: 'Calistoga', 'Inter', serif;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  line-height: 1.2;
}

.ctaArrow {
  font-size: 1.7rem;
  line-height: 1;
}

.footBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: var(--edge);
}

address {
  font-family: 'Calistoga', 'Inter', serif;
  font-size: 1.1rem;
  font-style: normal;
  line-height: 1.3;
}

.copy {
  margin: 4px 0 0;
  font-size: .86rem;
  color: var(--muted);
}

.footLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footLinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 16px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--card);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .1), 0 3px 0 rgba(23, 38, 32, .16);
  transition: background .18s ease-out, transform .18s var(--bounce);
}

.footLinks a:hover {
  background: var(--sky);
  transform: translateY(-2px);
}

.toTop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  padding: 12px 18px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--mint);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .14), 0 4px 0 rgba(23, 38, 32, .24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease-out, transform .2s var(--bounce);
}

.toTop.is-on,
.toTop:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* 断点 */
@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 26px;
  }

  .rail {
    position: static;
  }

  .railList {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .railList a {
    min-height: 40px;
    padding: 6px 14px;
    border: var(--edge);
    border-radius: 999px;
    background: var(--soft);
    font-size: .9rem;
  }

  .prose > div {
    scroll-margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .menuRow {
    gap: 10px;
  }

  .siteNav {
    flex: 1 1 100%;
    order: 2;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .siteNav ol {
    flex-wrap: nowrap;
    width: max-content;
  }

  .searchBox {
    flex: 1 1 auto;
    order: 1;
  }

  .hero {
    min-height: 88vh;
    min-height: 88svh;
    border-radius: 0 0 30px 30px;
  }

  .heroFig {
    border-radius: 0 0 26px 26px;
  }

  .heroTxt {
    border-radius: 24px;
    box-shadow: inset -3px -3px 10px rgba(23, 38, 32, .08), 6px 6px 0 rgba(23, 38, 32, .16);
  }

  .cta {
    border-radius: 26px;
  }

  .footBar {
    align-items: flex-start;
  }
}

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

  .brand,
  .siteNav a,
  .railList a,
  .footLinks a,
  .cta,
  .toTop {
    transition-duration: .01ms;
  }

  .heroImg {
    transform: none !important;
  }
}

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