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

:root {
  --white: #ffffff;
  --gray: #f5f5f5;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: rgba(31, 31, 31, 0.1);
  --line-soft: rgba(31, 31, 31, 0.06);
  --glass: rgba(255, 255, 255, 0.72);
  --sh: 0 6px 22px rgba(31, 31, 31, 0.06);
  --sh-hi: 0 14px 40px rgba(31, 31, 31, 0.1);
  --r: 10px;
  --r-lg: 18px;
  --maxw: 1180px;
}

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

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

body {
  margin: 0;
  font-family: "DM Sans", "Space Grotesk", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background: var(--gray);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58vw 58vw at 6% -12%, rgba(31, 31, 31, 0.075), transparent 62%),
    radial-gradient(46vw 46vw at 102% 4%, rgba(31, 31, 31, 0.05), transparent 58%),
    radial-gradient(40vw 40vw at 50% 108%, rgba(31, 31, 31, 0.045), transparent 60%);
}

html.menu-open,
html.menu-open body {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

img {
  max-width: 100%;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px clamp(12px, 3vw, 28px);
  background: rgba(245, 245, 245, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  order: 1;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 4px;
}

.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--ink);
  box-shadow: inset 0 0 0 5px var(--white);
}

.brand-name {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

.search {
  order: 3;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 4px 3px 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.search-input {
  width: clamp(84px, 16vw, 168px);
  height: 34px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

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

.search-btn {
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  line-height: 34px;
}

.burger {
  order: 4;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  cursor: pointer;
}

.burger-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.18s ease;
}

html.menu-open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

html.menu-open .burger-line:nth-child(2) {
  opacity: 0;
}

html.menu-open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 全屏菜单 ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 88px 20px 40px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

html.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  text-align: center;
}

.menu-link {
  display: block;
  padding: 13px 30px;
  min-height: 44px;
  font-size: 1.22rem;
  font-weight: 500;
  border-radius: var(--r);
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-link:hover {
  background: var(--gray);
  transform: scale(1.02);
}

.menu-list li.hide,
.rail-list li.hide {
  display: none;
}

/* ---------- 版面 ---------- */

.layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 40px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 26px) clamp(14px, 3vw, 28px) 44px;
}

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

.rail {
  position: sticky;
  top: 88px;
  padding: 18px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.rail-title {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.rail-sub {
  margin: 6px 0 12px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

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

.rail-link {
  display: block;
  padding: 10px 11px;
  min-height: 40px;
  font-size: 0.9rem;
  border-radius: calc(var(--r) - 3px);
  border-left: 2px solid transparent;
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rail-link:hover {
  background: rgba(31, 31, 31, 0.05);
  border-left-color: var(--ink);
}

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

.main {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(20px, 4vw, 52px);
  min-height: 70vh;
  padding: clamp(6px, 2vw, 18px) 0 clamp(22px, 4vw, 44px);
}

.hero-figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--sh-hi);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
}

.hero-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, #ffffff 0%, #ececec 100%);
}

.hero-copy {
  text-align: right;
}

.hero-title {
  margin: 0 0 14px;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
}

.hero-sub {
  margin-bottom: 22px;
}

.hero-btn {
  display: inline-block;
  min-height: 46px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 22px;
  box-shadow: var(--sh);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-btn:hover {
  transform: scale(1.03);
  box-shadow: var(--sh-hi);
}

.main > div[id] {
  margin: 0 0 18px;
  padding: clamp(18px, 3vw, 30px);
  scroll-margin-top: 92px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: box-shadow 0.3s ease;
}

.main > div[id]:hover {
  box-shadow: var(--sh-hi);
}

.main > div[id]:nth-child(3n + 3) {
  margin-right: clamp(0px, 4vw, 58px);
}

.main > div[id]:nth-child(3n + 4) {
  margin-left: clamp(0px, 3vw, 40px);
}

html.js .main > div[id] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.3s ease;
}

html.js .main > div[id].in {
  opacity: 1;
  transform: none;
}

.main > div[id] > h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: clamp(1.32rem, 2.6vw, 1.72rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.main > div[id] > h2 + p {
  margin-top: -2px;
  color: var(--muted);
}

.main h3 {
  margin: 24px 0 8px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.main h4 {
  margin: 18px 0 6px;
  font-size: 1rem;
}

.main p {
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}

.main ul,
.main ol {
  margin: 0 0 14px;
  padding-left: 1.35em;
}

.main li {
  margin: 6px 0;
}

.main a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(31, 31, 31, 0.32);
  text-underline-offset: 3px;
}

.main a:hover {
  text-decoration-color: var(--ink);
}

.main img {
  height: auto;
  border-radius: var(--r);
}

.main figure {
  margin: 0 0 16px;
}

.main figcaption {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 6px;
}

.main blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(31, 31, 31, 0.04);
}

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

.main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 0 0 16px;
}

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

.main th {
  background: rgba(31, 31, 31, 0.05);
}

.main code {
  font-family: "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: rgba(31, 31, 31, 0.07);
  padding: 1px 5px;
  border-radius: 5px;
}

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

.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px) 36px;
}

.foot-cta {
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 40px);
  text-align: center;
  border-radius: var(--r-lg);
  background: var(--ink);
  box-shadow: var(--sh-hi);
}

.cta {
  display: inline-block;
  min-height: 46px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 22px;
  transition: transform 0.22s ease;
}

.cta:hover {
  transform: scale(1.03);
}

.foot-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin: 0;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.foot-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 2px;
  margin: 0;
  padding: 0;
}

.foot-link {
  display: inline-block;
  min-height: 40px;
  padding: 10px 9px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 20px;
}

.foot-link:hover {
  color: var(--ink);
}

.foot-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 移动端 ---------- */

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

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .rail {
    position: static;
    padding: 14px 12px;
  }

  .rail-sub {
    margin-bottom: 8px;
  }

  .rail-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .rail-list li {
    flex: 0 0 auto;
  }

  .rail-link {
    white-space: nowrap;
    border-left: 0;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    padding: 11px 14px;
  }

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

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

  .main > div[id]:nth-child(n) {
    margin-left: 0;
    margin-right: 0;
  }

  .foot-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 6px;
  }

  .foot-copy {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .search-input {
    width: 74px;
  }

  .search-btn {
    padding: 0 10px;
  }

  .menu-link {
    font-size: 1.1rem;
    padding: 12px 22px;
  }

  .hero-copy {
    text-align: right;
  }
}

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

  html.js .main > div[id] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu,
  .burger-line,
  .hero-btn,
  .cta,
  .menu-link {
    transition: none;
  }
}

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