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

:root {
  --ink: #0A0A0C;
  --sand: #D8C3A5;
  --copper: #B36A4A;
  --paper: #EDE7DD;
  --muted: rgba(216, 195, 165, 0.62);
  --line: rgba(216, 195, 165, 0.16);
  --glass: rgba(216, 195, 165, 0.06);
  --r: 18px;
  --head-h: 112px;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(179, 106, 74, 0.16), transparent 68%),
    radial-gradient(900px 540px at 4% 22%, rgba(216, 195, 165, 0.07), transparent 70%),
    var(--ink);
  color: var(--paper);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 600;
}

::selection {
  background: var(--copper);
  color: #0A0A0C;
}

section[id] {
  scroll-margin-top: calc(var(--head-h) + 18px);
}

/* ---------- 顶栏：品牌一行，菜单一行 ---------- */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 12px clamp(16px, 4vw, 44px) 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.94), rgba(10, 10, 12, 0.6) 72%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.4s ease;
}

.site-top.scrolled {
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 1);
}

.brand-row {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
}

.mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-t {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.menu-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}

.burger,
.ov-x {
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--sand);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.burger:hover,
.ov-x:hover {
  background: rgba(179, 106, 74, 0.28);
  color: var(--paper);
}

/* ---------- 全屏菜单 ---------- */
.ov {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 20px clamp(16px, 4vw, 44px) 48px;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  transform: translateY(-101%);
  visibility: hidden;
  overflow-y: auto;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.6s;
}

.ov.open {
  transform: none;
  visibility: visible;
}

.ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ov-t {
  font-size: 16px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.ov-list {
  list-style: none;
  counter-reset: ov;
  margin: 26px 0 0;
  padding: 0;
  max-width: 780px;
  width: 100%;
}

.ov-list li {
  counter-increment: ov;
  border-bottom: 1px solid rgba(216, 195, 165, 0.08);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 45ms);
}

.ov.open .ov-list li {
  opacity: 1;
  transform: none;
}

.ov-list a {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 12px 0;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.ov-list a::before {
  content: counter(ov, decimal-leading-zero);
  font-size: 0.5em;
  letter-spacing: 0.1em;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
}

.ov-list a:hover {
  color: var(--sand);
}

/* ---------- 主体 ---------- */
main {
  padding-top: calc(var(--head-h) + 6px);
}

.hero {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 30px) clamp(16px, 4vw, 44px) clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  min-height: 45vh;
}

.layers {
  position: absolute;
  inset: -14% -8%;
  z-index: 0;
  pointer-events: none;
}

.layers i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  will-change: transform;
}

.layers i:nth-child(1) {
  width: 44vmax;
  height: 44vmax;
  top: -12%;
  right: -10%;
  background: radial-gradient(circle, rgba(179, 106, 74, 0.5), transparent 62%);
}

.layers i:nth-child(2) {
  width: 32vmax;
  height: 32vmax;
  bottom: -18%;
  left: -8%;
  background: radial-gradient(circle, rgba(216, 195, 165, 0.26), transparent 64%);
}

.layers i:nth-child(3) {
  width: 20vmax;
  height: 20vmax;
  top: 40%;
  left: 46%;
  opacity: 0.32;
  background: radial-gradient(circle, rgba(179, 106, 74, 0.34), transparent 60%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 66px);
  letter-spacing: -0.05em;
  line-height: 1.06;
  text-wrap: balance;
}

.lede {
  margin: 18px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-fig {
  position: relative;
  z-index: 1;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(179, 106, 74, 0.36), rgba(216, 195, 165, 0.07));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--sand);
  background: rgba(10, 10, 12, 0.58);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- 正文 + 右侧栏 ---------- */
.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 50px) clamp(16px, 4vw, 44px) 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: clamp(28px, 5vw, 62px);
  align-items: start;
}

.doc-body {
  min-width: 0;
}

.doc-body > section {
  padding: clamp(26px, 4vw, 54px) 0;
  border-top: 1px solid var(--line);
}

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

.doc-body h2 {
  font-size: clamp(23px, 3vw, 31px);
  margin: 0 0 10px;
  text-wrap: balance;
}

.doc-body h2 + hr,
.side h2 + hr {
  width: 66px;
  height: 2px;
  margin: 0 0 22px;
  border: 0;
  background: linear-gradient(90deg, var(--copper), rgba(179, 106, 74, 0));
}

.doc-body h3 {
  font-size: 20px;
  margin: 26px 0 8px;
}

.doc-body h3 + hr {
  width: 44px;
  height: 1px;
  margin: 0 0 14px;
  border: 0;
  background: var(--line);
}

.doc-body p {
  margin: 0 0 16px;
  max-width: 66ch;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
  max-width: 66ch;
}

.doc-body li {
  margin: 6px 0;
}

.doc-body li::marker {
  color: var(--copper);
}

.doc-body a {
  color: var(--sand);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 3px;
}

.doc-body figure {
  margin: 24px 0;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.doc-body figure img {
  width: 100%;
  border-radius: 12px;
}

.doc-body figcaption {
  font-size: 16px;
  color: var(--muted);
  padding-top: 10px;
}

.doc-body blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 2px solid var(--copper);
  background: rgba(216, 195, 165, 0.045);
  border-radius: 0 12px 12px 0;
  color: rgba(237, 231, 221, 0.86);
}

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

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 20px 0;
}

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

.doc-body th {
  color: var(--sand);
  font-weight: 500;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: calc(var(--head-h) + 18px);
  padding: 22px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.side h2 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--sand);
  margin: 0 0 10px;
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid rgba(216, 195, 165, 0.08);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

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

.side-list a:hover {
  color: var(--sand);
  padding-left: 6px;
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 60px) clamp(16px, 4vw, 44px) 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: clamp(18px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.foot section {
  min-width: 0;
}

.f-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.f-brand strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.foot dl {
  margin: 0;
}

.foot dt a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--muted);
  transition: color 0.25s ease;
}

.foot dt a:hover {
  color: var(--sand);
}

.foot dd {
  margin: 0;
}

.f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  color: var(--sand);
  background: var(--glass);
  transition: background 0.3s ease;
}

.f-top a:hover {
  background: rgba(179, 106, 74, 0.26);
}

.foot-bar {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: rgba(216, 195, 165, 0.5);
}

.foot-bar small {
  font-size: 16px;
}

/* ---------- 滚动显现 ---------- */
.rv {
  opacity: 0;
  transform: translateY(22px);
  will-change: transform, opacity;
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 断点 ---------- */
@media (max-width: 960px) {
  :root {
    --head-h: 108px;
  }

  .doc {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: static;
    order: 2;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 22px;
  }

  .hero-fig {
    aspect-ratio: 16 / 10;
  }

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

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

  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-bar {
    margin-top: 0;
  }

  .ov-list a {
    font-size: 22px;
  }

  .hero-fig {
    aspect-ratio: 4 / 3;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

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

  .layers i {
    transform: none !important;
  }
}

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