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

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --ash: #f5f5f5;
  --line: #dcdcdc;
  --sub: #5f5f5f;
  --maxw: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--ash);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

menu,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- 页头 ---------- */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 30px;
  height: 30px;
  display: block;
}

.topnav {
  flex: 1;
  min-width: 0;
}

.topnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.topnav a {
  display: block;
  padding: 13px 9px;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.15s linear, color 0.15s linear;
}

.topnav a:hover {
  background: var(--ink);
  color: var(--paper);
}

.drawer {
  display: none;
  position: relative;
  margin-left: auto;
}

.drawer > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  font-size: 16px;
  font-weight: 500;
}

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

.drawer > menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 208px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  z-index: 70;
  padding: 6px 0;
}

.drawer > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 16px;
  text-decoration: none;
}

.drawer > menu a:hover {
  background: var(--ash);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s linear;
}

.contact:hover {
  background: #000000;
}

/* ---------- 粘性锚点条 ---------- */

.anchorbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  border-bottom: 1px solid #000000;
}

.anchorbar > menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchorbar > menu::-webkit-scrollbar {
  display: none;
}

.anchorbar a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px;
  color: #e2e2e2;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s linear, border-color 0.15s linear;
}

.anchorbar a:hover,
.anchorbar a.is-on {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background: #141414;
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(158deg, rgba(12, 12, 12, 0.34), rgba(12, 12, 12, 0.84));
}

.hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  z-index: 1;
  background: repeating-linear-gradient(115deg, #1f1f1f 0 18px, #ffffff 18px 36px);
  clip-path: polygon(0 58%, 100% 0, 100% 100%, 0 100%);
  animation: band 22s linear infinite;
}

@keyframes band {
  to {
    background-position: 360px 0;
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 940px;
  padding: 0 24px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5.4vw, 64px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ---------- 主体 ---------- */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 20px;
  align-items: start;
  min-height: 40vh;
}

.content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}

.content > article {
  background: var(--paper);
  padding: 28px 26px;
  position: relative;
  scroll-margin-top: 84px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.content > article:first-child {
  grid-column: 1 / -1;
}

.content > article:hover {
  transform: scale(1.012);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.content h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.content h3 {
  margin: 22px 0 8px;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
}

.content h2 + p,
.content h2 + p.subtitle {
  margin-top: 0;
  color: var(--sub);
}

.content p {
  margin: 0 0 14px;
}

.content ul,
.content ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
  list-style: revert;
}

.content li {
  margin: 6px 0;
}

.content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.content a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.content img {
  display: block;
  height: auto;
  margin: 16px 0;
}

.content blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  background: var(--ash);
  border-left: 4px solid var(--ink);
}

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

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

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

.content strong {
  font-weight: 600;
}

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

.rail {
  background: var(--ink);
  color: #e6e6e6;
  padding: 26px 22px;
  position: sticky;
  top: 66px;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

.rail-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.rail .subtitle {
  margin: 0 0 16px;
  font-size: 16px;
  color: #a8a8a8;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  color: #e2e2e2;
  text-decoration: none;
  border-top: 1px solid #3a3a3a;
  transition: color 0.15s linear, padding-left 0.18s ease;
}

.rail-list a:hover {
  color: #ffffff;
  padding-left: 8px;
}

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

footer {
  background: var(--ink);
  color: #d5d5d5;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 26px;
  padding: 52px max(20px, calc((100% - 1200px) / 2 + 20px)) 26px;
}

footer article {
  min-width: 0;
}

footer .mark {
  width: 34px;
  height: 34px;
  display: block;
  margin-bottom: 12px;
}

footer .big {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
}

footer h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.03em;
}

footer article ul {
  display: grid;
  gap: 2px;
}

footer article a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 0;
  font-size: 16px;
  color: #c8c8c8;
  text-decoration: none;
  transition: color 0.15s linear;
}

footer article a:hover {
  color: #ffffff;
}

.f-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid #3a3a3a;
  font-size: 16px;
}

.f-bottom .copy {
  margin: 0;
  color: #a8a8a8;
}

.f-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: #d5d5d5;
  text-decoration: none;
}

.f-bottom a:hover {
  color: #ffffff;
}

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

@media (max-width: 1080px) {
  .topnav {
    display: none;
  }
  .drawer {
    display: block;
  }
  .contact {
    margin-left: 0;
  }
}

@media (max-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
    max-height: none;
  }
  footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }
  .content {
    grid-template-columns: minmax(0, 1fr);
  }
  .content > article {
    padding: 24px 20px;
  }
  .hero::before {
    height: 42px;
  }
  .masthead-in {
    gap: 12px;
    padding: 0 14px;
    min-height: 68px;
  }
  .brand {
    font-size: 18px;
  }
  .contact {
    padding: 10px 14px;
  }
}

@media (max-width: 560px) {
  footer {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }
  .shell {
    padding: 22px 14px 52px;
  }
  .anchorbar > menu {
    padding: 0 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
  }
  .content > article:hover {
    transform: none;
  }
}

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