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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 238px;
  --side: 252px;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.66;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

img {
  max-width: 100%;
}

/* ---------- 骨架 ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  align-items: start;
}

.col {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  gap: 8px 48px;
  padding: 40px 40px 64px;
  align-items: start;
}

.main {
  min-width: 0;
}

/* ---------- 左侧固定栏 ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.brand .mark {
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  position: relative;
}

.brand .mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--ink);
}

.rail-nav {
  flex: 1 1 auto;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease;
}

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

.rail-foot a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: opacity 0.18s ease;
}

.rail-foot a:hover,
.rail-foot a:focus-visible {
  opacity: 0.82;
}

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

section {
  counter-reset: sec;
}

section > article {
  position: relative;
  margin: 0 0 20px;
  padding: 34px 40px;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  scroll-margin-top: 24px;
}

section > article + article {
  counter-increment: sec;
}

section > article:not(.hero) {
  padding-right: 74px;
}

section > article:not(.hero)::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.4);
}

section h2,
section h3 {
  margin: 0 0 14px;
  line-height: 1.28;
}

section h2 {
  font-size: clamp(22px, 2.2vw, 30px);
}

section h3 {
  font-size: 20px;
  margin-top: 28px;
}

section h2 > span,
section h3 > span {
  display: block;
}

section p {
  margin: 0 0 16px;
  max-width: 66ch;
}

section ul,
section ol {
  margin: 0 0 16px;
  padding-left: 22px;
  max-width: 66ch;
}

section li {
  margin: 0 0 8px;
}

section a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

section strong {
  font-weight: 700;
}

section blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ink);
  max-width: 66ch;
}

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

.hero {
  min-height: 45vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 56px 24px 52px;
}

.hero .glyph {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  border: 1.5px solid var(--ink);
  position: relative;
}

.hero .glyph::before,
.hero .glyph::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.hero .glyph::before {
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  transform: translateX(-50%);
}

.hero .glyph::after {
  top: 50%;
  left: 6px;
  right: 6px;
  height: 1.5px;
  transform: translateY(-50%);
}

.hero-kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: 0.18em;
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.12;
}

.hero-lead {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  max-width: 44ch;
  font-size: 17px;
}

.hero-num {
  position: absolute;
  right: -0.04em;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  font-size: clamp(140px, 26vw, 330px);
  line-height: 0.78;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

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

.side {
  position: sticky;
  top: 40px;
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.side-title {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: 0.2em;
}

.side-title > span {
  display: block;
}

.side-list {
  list-style: none;
  counter-reset: side;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-list li {
  counter-increment: side;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.side-list li::before {
  content: counter(side, decimal-leading-zero);
  font-size: 16px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.42);
}

.side-list a {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  font-size: 16px;
  text-decoration: none;
}

.side-list a:hover,
.side-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.foot {
  margin-top: auto;
  padding: 40px;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--ink);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}

.foot-row address {
  font-style: normal;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

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

.foot-links a:hover,
.foot-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-brand {
  margin: 24px 0;
  font-size: clamp(34px, 8vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.foot-brand > span {
  display: block;
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.foot-copy {
  margin: 0;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

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

/* ---------- 入场 ---------- */

.js section > article,
.js .side {
  opacity: 0;
  transform: translateY(16px);
}

.js section > article.in,
.js .side.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

  .js section > article,
  .js .side {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail-nav a,
  .to-top,
  .rail-foot a {
    transition: none;
  }
}

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

@media (max-width: 1080px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 28px 24px 48px;
  }

  .side {
    position: static;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .side-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
  }

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

  .side-list a {
    min-height: 40px;
  }

  .foot {
    padding: 28px 24px;
  }

  section > article {
    padding: 28px 24px;
  }

  section > article:not(.hero) {
    padding-right: 56px;
  }
}

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

  .rail {
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .brand {
    grid-column: 1;
  }

  .rail-foot {
    grid-column: 2;
  }

  .rail-foot a {
    min-height: 40px;
    padding: 0 18px;
  }

  .rail-nav {
    grid-column: 1 / -1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px 2px;
  }

  .rail-nav ul {
    flex-direction: row;
    gap: 8px;
  }

  .rail-nav a {
    white-space: nowrap;
    padding: 6px 14px;
  }

  section > article {
    scroll-margin-top: 134px;
    padding: 24px 20px;
  }

  section > article:not(.hero) {
    padding-right: 52px;
  }

  section > article:not(.hero)::before {
    top: 20px;
    right: 18px;
  }

  .hero {
    min-height: 40vh;
    padding: 40px 20px 40px;
    scroll-margin-top: 134px;
  }

  .foot-brand {
    font-size: clamp(30px, 12vw, 64px);
  }
}

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