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

:root {
  --ink: #172623;
  --ink-soft: #46584f;
  --teal: #5cc6b0;
  --teal-deep: #16695c;
  --sand: #d4c4a8;
  --clay: #b8603f;
  --olive: #6b7b3c;
  --paper: #f8f2e6;
  --paper-2: #ece0cb;
  --line: rgba(23, 38, 35, 0.14);
  --glass: rgba(255, 255, 255, 0.55);
  --serif: "EB Garamond", Georgia, "Songti SC", "SimSun", serif;
  --sans: Lato, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(1100px 640px at 84% -10%, #f4e8d3 0%, rgba(244, 232, 211, 0) 58%),
    radial-gradient(880px 560px at 4% 8%, #e8f0e4 0%, rgba(232, 240, 228, 0) 60%),
    linear-gradient(180deg, #f9f3e8 0%, #f4ecdd 46%, #efe3d0 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}

/* 左侧立轴 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 216px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(248, 242, 230, 0.84);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

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

.mark-glyph {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--teal-deep);
}

.menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 -5px 0 var(--ink);
}

.menu[open] summary {
  border-color: var(--teal-deep);
  color: var(--teal-deep);
}

.menu[open] summary::before {
  background: var(--teal-deep);
  box-shadow: 0 5px 0 var(--teal-deep), 0 -5px 0 var(--teal-deep);
}

.menu menu {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.menu menu a {
  display: block;
  padding: 12px 12px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
}

.menu menu a:hover {
  background: rgba(92, 198, 176, 0.16);
  border-left-color: var(--teal-deep);
  color: var(--teal-deep);
}

.rail-end {
  margin-top: auto;
  display: grid;
  gap: 6px;
}

.rail-end .to-top {
  display: inline-block;
  padding: 12px 0;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-decoration: none;
}

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

.rail-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.stage {
  position: relative;
  z-index: 1;
  margin-left: 216px;
  min-height: 100vh;
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
  padding: 62px 48px 56px;
  border-bottom: 1px solid var(--line);
}

.hero-word {
  position: absolute;
  left: -3%;
  right: -3%;
  top: -5%;
  z-index: 0;
  text-align: center;
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: rgba(23, 38, 35, 0.075);
  pointer-events: none;
  will-change: transform;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6px 0;
}

.hero-copy::before {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 0 auto 20px;
  background: var(--teal);
}

.hero-eyebrow {
  margin: 0 0 18px;
  font-size: 15px;
  letter-spacing: 0.42em;
  color: var(--teal-deep);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.hero-fig {
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 22px 44px -26px rgba(23, 38, 35, 0.6);
  will-change: transform;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
}

/* 主体骨架 */
.wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.toc {
  position: sticky;
  top: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 34px -28px rgba(23, 38, 35, 0.9);
}

.toc h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.24em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc h2::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--teal-deep);
}

.toc h2 span,
.f-block h2 span {
  position: relative;
  padding-bottom: 4px;
}

.toc h2 span::after,
.f-block h2 span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--teal);
}

.toc ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  counter-reset: sec;
}

.toc li {
  counter-increment: sec;
}

.toc a {
  display: block;
  padding: 11px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed rgba(23, 38, 35, 0.16);
}

.toc a::before {
  content: counter(sec, decimal-leading-zero);
  margin-right: 8px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--clay);
}

.toc li:last-child a {
  border-bottom: 0;
}

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

.body {
  min-width: 0;
}

.prose {
  padding: 40px 40px 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 64px -52px rgba(23, 38, 35, 0.95);
}

.prose section {
  scroll-margin-top: 26px;
}

.prose section + section {
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.prose p {
  margin: 0 0 1.15em;
  font-size: 17px;
  line-height: 1.85;
}

.prose h2 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.35;
}

.prose h2 > span,
.prose h3 > span {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.prose h2 > span::after,
.prose h3 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), rgba(92, 198, 176, 0));
}

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

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

.prose li {
  margin-bottom: 0.45em;
  line-height: 1.78;
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--clay);
  border-radius: 0 4px 4px 0;
  background: rgba(212, 196, 168, 0.3);
}

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

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

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

.prose th {
  background: rgba(212, 196, 168, 0.34);
  font-weight: 700;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

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

.prose code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(23, 38, 35, 0.08);
  font-size: 0.95em;
}

/* 页脚 */
.site-foot {
  position: relative;
  z-index: 1;
  padding: 52px 32px 26px;
  border-top: 1px solid var(--line);
  background: rgba(233, 222, 203, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.f-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
}

.f-block h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.f-block address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.f-block address span {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  word-break: break-all;
}

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub input {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.75);
}

.sub button {
  min-height: 44px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.sub button:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
}

.f-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.f-block ul a {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}

.f-block ul a:hover {
  color: var(--teal-deep);
}

.f-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(23, 38, 35, 0.18);
  font-size: 15px;
  color: var(--ink-soft);
}

.f-base p {
  margin: 0;
}

.f-base a {
  display: inline-block;
  padding: 10px 0;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-decoration: none;
}

.f-base a:hover {
  color: var(--teal-deep);
}

/* 动效 */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-word,
  .hero-fig {
    will-change: auto;
  }
}

/* 移动端 */
@media (max-width: 900px) {
  .rail {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-end {
    margin-top: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .rail-brand {
    display: none;
  }

  .menu {
    position: relative;
  }

  .menu menu {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(249, 243, 232, 0.98);
    box-shadow: 0 22px 44px -26px rgba(23, 38, 35, 0.85);
  }

  .stage {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 22px;
    padding: 30px 20px 34px;
  }

  .hero-word {
    top: -2%;
    font-size: clamp(3.4rem, 19vw, 6.5rem);
  }

  .hero-copy::before {
    margin-bottom: 14px;
  }

  .hero-fig img {
    height: 210px;
  }

  .wrap {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 30px 18px 52px;
  }

  .toc {
    position: static;
  }

  .toc ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .prose {
    padding: 24px 20px 30px;
  }

  .f-top {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .site-foot {
    padding: 38px 18px 20px;
  }
}

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