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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --r: 28px;
  --gap: 16px;
  --pad: clamp(12px, 3vw, 40px);
  --head: 124px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 8px);
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, .brand, .foot-name, .rail-list a::before {
  font-family: "Space Grotesk", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

a { color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -140px;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  transition: top .2s ease;
}

.skip:focus { top: 12px; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 页头：品牌独占一行，菜单与搜索在下一行 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-icon { flex: 0 0 auto; }

.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li { flex: 0 0 auto; }

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-left: 1.5px solid var(--ink);
}

.menu li:first-child a { border-left: 0; padding-left: 0; }

.menu a:hover,
.menu a:focus-visible { background: var(--ink); color: var(--paper); }

.search {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}

.search input {
  width: 108px;
  min-width: 0;
  height: 40px;
  border: 0;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  background: transparent;
  color: var(--ink);
}

.search button {
  height: 40px;
  min-height: 40px;
  border: 0;
  padding: 0 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

/* ---------- 主网格 ---------- */

main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  padding-top: clamp(16px, 3vw, 34px);
}

/* ---------- Hero：右侧文案、左侧图标、点阵底纹 ---------- */

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
  min-height: 45vh;
  padding: clamp(20px, 4vw, 44px) 0 22px;
  border-bottom: 2px solid var(--ink);
  background-image: radial-gradient(var(--ink) 1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: -8px -8px;
}

.hero-fig {
  grid-column: 1 / span 3;
  margin: 0;
  align-self: end;
}

.hero-mark {
  width: clamp(76px, 9vw, 124px);
  height: auto;
  display: block;
}

.hero-img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
}

.hero h1 {
  grid-column: 4 / -1;
  margin: 0;
  text-align: right;
  font-size: clamp(34px, 6.4vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ---------- 左侧 aside ---------- */

.rail {
  grid-column: 1 / span 3;
  min-width: 0;
}

.rail-box {
  position: sticky;
  top: calc(var(--head) + 12px);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  padding: 18px 16px 16px;
  background: var(--paper);
}

.rail-title {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
  border-top: 1px solid var(--ink);
}

.rail-list li:first-child { border-top: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  text-decoration: none;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}

.rail-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 8px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

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

.content {
  grid-column: 4 / -1;
  min-width: 0;
}

.content > article {
  padding: clamp(28px, 5vw, 56px) 0;
  border-top: 2px solid var(--ink);
}

.content > article:first-child {
  border-top: 0;
  padding-top: 8px;
}

.content h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.content h3 {
  margin: 28px 0 12px;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.content h2 > span::before,
.content h3 > span::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--ink);
  margin-right: 0.36em;
  vertical-align: 0.06em;
}

.content p,
.content li { max-width: 64ch; }

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

.content ul,
.content ol { margin: 0 0 18px; padding-left: 24px; }

.content li { margin-bottom: 8px; }

.content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}

.content figure {
  margin: 24px 0;
  padding: 10px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
}

.content figure img { width: 100%; }

.content figcaption {
  font-size: 16px;
  margin-top: 10px;
  line-height: 1.5;
}

.content blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border: 1.5px solid var(--ink);
  border-left: 8px solid var(--ink);
  border-radius: var(--r);
}

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

.content hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 32px 0;
}

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

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

.content th {
  font-family: "Space Grotesk", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

.content code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 1px 5px;
}

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

.foot {
  margin-top: clamp(36px, 6vw, 76px);
  border-top: 2px solid var(--ink);
  padding: clamp(24px, 4vw, 48px) 0 26px;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--gap);
}

.foot-brand { font-style: normal; display: block; }

.foot-name {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.foot-desc {
  display: block;
  margin-top: 12px;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.6;
}

.foot-nav dl { margin: 0; }

.foot-nav dt {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  margin-top: 16px;
}

.foot-nav dt:first-child { margin-top: 0; }

.foot-nav dd { margin: 0; }

.foot-nav dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.foot-nav dd a:hover { background: var(--ink); color: var(--paper); }

.foot-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  text-align: center;
}

.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1.5px dashed var(--ink);
}

.copy {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}

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

.will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}

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

.will-stagger > * {
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .38s ease, transform .38s ease;
}

.will-stagger.is-in > * { opacity: 1; transform: none; }

.will-stagger.is-in > *:nth-child(1) { transition-delay: 0s; }
.will-stagger.is-in > *:nth-child(2) { transition-delay: .05s; }
.will-stagger.is-in > *:nth-child(3) { transition-delay: .1s; }
.will-stagger.is-in > *:nth-child(4) { transition-delay: .15s; }
.will-stagger.is-in > *:nth-child(5) { transition-delay: .2s; }
.will-stagger.is-in > *:nth-child(6) { transition-delay: .25s; }
.will-stagger.is-in > *:nth-child(7) { transition-delay: .3s; }
.will-stagger.is-in > *:nth-child(8) { transition-delay: .35s; }
.will-stagger.is-in > *:nth-child(9) { transition-delay: .4s; }

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

@media (max-width: 900px) {
  :root { --head: 128px; --r: 22px; }

  main { grid-template-columns: 1fr; }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
    padding-top: 18px;
  }

  .hero-fig { grid-column: 1 / -1; }

  .hero h1 {
    grid-column: 1 / -1;
    font-size: clamp(31px, 9.6vw, 52px);
  }

  .rail,
  .content { grid-column: 1 / -1; }

  .rail-box { position: static; }

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

@media (max-width: 560px) {
  .search input { width: 76px; padding: 0 10px; }
  .search button { padding: 0 11px; }
  .menu a { padding: 0 11px; }
  .rail-list a::before { font-size: 11px; }
}

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

  .will-reveal,
  .will-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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