:root {
  --ink: #172623;
  --ink-soft: #2c433c;
  --teal: #5cc6b0;
  --teal-deep: #2f8d7a;
  --sand: #d4c4a8;
  --sand-soft: #e9dfcd;
  --clay: #c2714f;
  --paper: #f6f1e6;
  --paper-2: #efe6d5;
  --line: rgba(23, 38, 35, 0.16);
  --rail: 296px;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 34%, var(--paper) 100%);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: 0.01em;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

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

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

/* ---------- 顶部双行导航 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 0 clamp(14px, 4vw, 44px);
  box-shadow: 0 12px 26px -22px rgba(23, 38, 35, 0.9);
}

.brandrow {
  display: flex;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid rgba(212, 196, 168, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.mark {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: var(--teal);
  object-fit: contain;
}

.primary {
  display: flex;
  padding: 0 0 2px;
}

.primary-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}

.primary-list::-webkit-scrollbar {
  height: 0;
}

.primary-list > li {
  flex: 0 0 auto;
}

.primary-list a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  color: var(--sand);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.07em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease-out, border-color 0.25s ease-out;
}

.primary-list a:hover,
.primary-list a:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* ---------- 骨架构图 ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

main {
  min-width: 0;
}

/* ---------- 首屏拼贴 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 45vh;
  padding: clamp(28px, 6vw, 56px) 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 15ch;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: clamp(27px, 5vw, 50px);
  line-height: 1.26;
  letter-spacing: 0.02em;
}

.collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  pointer-events: none;
}

.plate {
  position: absolute;
  display: block;
  overflow: hidden;
  background: var(--sand-soft);
  box-shadow: 0 22px 38px -26px rgba(23, 38, 35, 0.7);
}

.plate-a {
  left: -6%;
  top: 10%;
  width: 31%;
  aspect-ratio: 3 / 4;
  transform: rotate(-4deg);
}

.plate-b {
  right: -5%;
  bottom: 8%;
  width: 26%;
  aspect-ratio: 4 / 5;
  transform: rotate(3deg);
  background: var(--teal);
}

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

/* ---------- 正文区块 ---------- */

main > section:not(.hero) {
  padding: clamp(28px, 4.5vw, 48px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 130px;
}

main > section:not(.hero):last-child {
  border-bottom: 0;
}

main h2 {
  margin: 0 0 0.45em;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: clamp(23px, 3.4vw, 31px);
  line-height: 1.32;
  letter-spacing: 0.01em;
}

main h3 {
  margin: 1.5em 0 0.4em;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.4;
}

hr {
  display: block;
  border: 0;
  height: 2px;
  width: 56px;
  margin: 0 0 1.15em;
  background: var(--teal);
}

main p {
  margin: 0 0 1.05em;
  max-width: 68ch;
}

main ul,
main ol {
  margin: 0 0 1.15em;
  padding-left: 0;
  list-style: none;
  max-width: 68ch;
}

main ol {
  counter-reset: item;
}

main ul > li {
  position: relative;
  padding-left: 1.15em;
  margin: 0.4em 0;
}

main ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.76em;
  width: 7px;
  height: 7px;
  background: var(--clay);
}

main ol > li {
  position: relative;
  padding-left: 1.6em;
  margin: 0.4em 0;
  counter-increment: item;
}

main ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-deep);
  font-weight: 600;
}

main a {
  color: var(--teal-deep);
  text-underline-offset: 3px;
}

main figure {
  margin: 1.3em 0;
}

main blockquote {
  margin: 1.3em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--sand);
  color: var(--ink-soft);
}

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

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

main th {
  background: var(--paper-2);
  font-weight: 600;
}

/* ---------- 右侧边栏 ---------- */

.rail {
  position: sticky;
  top: 132px;
  background: var(--paper-2);
  border-top: 3px solid var(--teal);
  padding: 20px 20px 24px;
}

.rail-title {
  margin: 0 0 0.4em;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.05em;
}

.rail hr {
  width: 40px;
  margin: 0 0 10px;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid rgba(23, 38, 35, 0.09);
  transition: color 0.2s ease-out;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--teal-deep);
}

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

.foot {
  margin-top: clamp(32px, 5vw, 64px);
  padding: clamp(30px, 5vw, 54px) clamp(14px, 4vw, 44px) 0;
  background: var(--ink);
  color: var(--sand);
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.foot h3 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.foot-brand {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 21px;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.foot-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(212, 196, 168, 0.82);
}

.foot-addr {
  font-style: normal;
  display: grid;
  gap: 3px;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(212, 196, 168, 0.88);
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(212, 196, 168, 0.9);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease-out;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--teal);
}

.sub {
  display: grid;
  gap: 8px;
  max-width: 260px;
}

.sub-label {
  font-size: 16px;
  color: rgba(212, 196, 168, 0.8);
}

.sub-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: rgba(246, 241, 230, 0.08);
  border: 1px solid rgba(212, 196, 168, 0.38);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  border-radius: 0;
}

.sub-input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.sub-btn {
  min-height: 46px;
  padding: 10px 18px;
  background: var(--teal);
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s ease-out;
}

.sub-btn:hover {
  background: var(--sand);
}

.foot-bottom {
  max-width: 1180px;
  margin: clamp(24px, 4vw, 40px) auto 0;
  padding: 16px 0 24px;
  border-top: 1px solid rgba(212, 196, 168, 0.18);
  color: rgba(212, 196, 168, 0.7);
  font-size: 16px;
}

.foot-bottom p {
  margin: 0;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

  .rail {
    position: static;
    order: 2;
    margin-bottom: 8px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .brandrow {
    min-height: 56px;
  }

  .brand {
    font-size: 19px;
  }

  .primary-list a {
    padding: 0 10px;
  }

  .hero {
    min-height: 45vh;
    padding: 24px 0;
  }

  .hero-title {
    font-size: clamp(25px, 7.6vw, 34px);
    max-width: 12ch;
  }

  .plate-a {
    width: 38%;
    left: -9%;
    top: 6%;
  }

  .plate-b {
    width: 31%;
    right: -8%;
    bottom: 6%;
  }

  .plate-img {
    opacity: 0.8;
  }

  main > div:not(.hero) {
    scroll-margin-top: 124px;
  }

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

  .sub {
    max-width: none;
  }
}

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

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

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