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

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

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

body {
  margin: 0;
  font-family: 'Space Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #1a1a1a;
  background-color: #fafaf8;
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 26, 26, .045) 0 1px, transparent 1px 4px),
    radial-gradient(rgba(26, 26, 26, .07) 1px, transparent 1.4px);
  background-size: auto, 7px 7px;
  overflow-x: clip;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
h1, h2, h3 { font-weight: 700; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 10px;
  top: -80px;
  z-index: 95;
  background: #1a1a1a;
  color: #fafaf8;
  padding: 12px 16px;
  border-radius: 4px;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* ---------- 顶栏 ---------- */
.top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(14px, 4vw, 40px);
  border-bottom: 2px solid #1a1a1a;
  background: rgba(250, 250, 248, .93);
}

.logo {
  grid-column: 2;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(15px, 2.4vw, 21px);
  letter-spacing: .22em;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.logo:hover { border-bottom-color: #1a1a1a; }

.burger {
  position: absolute;
  left: clamp(10px, 3vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 44px;
  padding: 9px 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger__bar { display: block; width: 22px; height: 2px; background: #1a1a1a; }
.burger__word { font-size: 16px; letter-spacing: .2em; line-height: 1; }
.burger:hover .burger__bar:nth-child(2) { width: 14px; }

.rail { display: none; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.rail--l ol { justify-content: flex-end; }
.rail--r ol { justify-content: flex-start; }
.rail a {
  display: block;
  padding: 11px 9px;
  font-size: 16px;
  letter-spacing: .05em;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  min-height: 40px;
}
.rail a:hover { background: #1a1a1a; color: #fafaf8; }

/* ---------- 全屏抽屉 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: #1a1a1a;
  color: #fafaf8;
  padding: 84px clamp(20px, 7vw, 64px) 48px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .16s steps(3, end), transform .16s steps(3, end);
}
.drawer.is-open { visibility: visible; opacity: 1; transform: none; }

.drawer__x {
  position: absolute;
  top: 18px;
  right: clamp(16px, 5vw, 40px);
  min-height: 44px;
  padding: 10px 16px;
  background: none;
  border: 2px solid #fafaf8;
  border-radius: 4px;
  color: #fafaf8;
  cursor: pointer;
}
.drawer__nav ol { list-style: none; margin: 0; padding: 0; }
.drawer__nav a {
  display: block;
  padding: 14px 0;
  min-height: 48px;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(20px, 5vw, 32px);
  letter-spacing: .14em;
  text-decoration: none;
  border-bottom: 1px dashed rgba(250, 250, 248, .32);
}
.drawer__nav a:hover { color: #fafaf8; background: rgba(250, 250, 248, .1); }

/* ---------- 粘性锚点条 ---------- */
.tapebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  border-bottom: 2px dashed #4a4a4a;
  background: rgba(250, 250, 248, .96);
  backdrop-filter: blur(4px);
}
.tapebar__label {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 4px;
  font-size: 14px;
  letter-spacing: .12em;
  line-height: 48px;
  color: #4a4a4a;
}
.tapebar__list {
  flex: 1 1 auto;
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tapebar__list::-webkit-scrollbar { display: none; }
.tapebar__list a {
  display: block;
  padding: 12px 10px;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tapebar__list a:hover { border-bottom-color: #4a4a4a; }
.tapebar__list a.is-on { background: #1a1a1a; color: #fafaf8; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 62vh;
  overflow: hidden;
  background: #1a1a1a;
  background-image: repeating-linear-gradient(45deg, rgba(250, 250, 248, .06) 0 2px, transparent 2px 9px);
  border-bottom: 2px solid #1a1a1a;
}
.hero__frame { position: absolute; inset: -8% 0; z-index: 0; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.82);
  will-change: transform;
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(26, 26, 26, .55), rgba(26, 26, 26, .8));
}
.hero__ink { position: relative; z-index: 2; padding: 30px 20px; text-align: center; max-width: 840px; }
.hero__h1 {
  margin: 0;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(28px, 7vw, 60px);
  line-height: 1.16;
  letter-spacing: .13em;
  color: #fafaf8;
}
.hero__desc {
  margin: 16px auto 0;
  max-width: 30em;
  font-size: 16px;
  color: rgba(250, 250, 248, .84);
}

/* ---------- 主体 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(14px, 4vw, 32px);
}
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }

.sheet {
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(6px);
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  padding: clamp(18px, 3vw, 38px);
  box-shadow: 6px 6px 0 rgba(26, 26, 26, .1);
  transform: rotate(-.25deg);
}

.sheet div {
  padding: 26px 0;
  border-top: 1px dashed #4a4a4a;
  scroll-margin-top: 96px;
}
.sheet div:first-child { border-top: 0; padding-top: 4px; }

.sheet h2 {
  margin: 0 0 14px;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(19px, 3.2vw, 27px);
  line-height: 1.35;
  letter-spacing: .12em;
}
.sheet h2 span { display: inline-block; padding-bottom: 4px; border-bottom: 3px solid #1a1a1a; }
.sheet h3 {
  margin: 22px 0 8px;
  font-size: clamp(17px, 2.3vw, 20px);
  letter-spacing: .08em;
}
.sheet p { margin: 0 0 14px; }
.sheet ul, .sheet ol { margin: 0 0 14px; padding-left: 1.35em; }
.sheet li { margin: 6px 0; }
.sheet a { text-decoration: none; border-bottom: 1px solid #4a4a4a; }
.sheet a:hover { background: #1a1a1a; color: #fafaf8; border-bottom-color: #1a1a1a; }
.sheet strong { background: rgba(26, 26, 26, .1); padding: 0 3px; }
.sheet blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid #1a1a1a;
  background: rgba(26, 26, 26, .05);
}
.sheet figure { margin: 18px 0; }
.sheet img { border: 2px solid #1a1a1a; border-radius: 4px; }
.sheet figcaption { font-size: 14px; color: #4a4a4a; margin-top: 6px; }

/* ---------- 侧栏 ---------- */
.side { align-self: start; }
.side__card {
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(5px);
  padding: 16px;
  transform: rotate(.4deg);
  box-shadow: -4px 4px 0 rgba(26, 26, 26, .1);
}
.side__title {
  margin: 0 0 10px;
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: .2em;
}
.side__title span { display: inline-block; padding-bottom: 3px; border-bottom: 2px solid #1a1a1a; }
.side__ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.side__ol li { counter-increment: s; }
.side__ol a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 2px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dotted #4a4a4a;
}
.side__ol a::before { content: counter(s, decimal-leading-zero); font-size: 13px; color: #4a4a4a; }
.side__ol a:hover { background: #1a1a1a; color: #fafaf8; }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 44px;
  padding: 26px clamp(14px, 4vw, 40px) 40px;
  border-top: 2px solid #1a1a1a;
  background: #fafaf8;
}
.foot p { margin: 0; }
.foot__copy { font-size: 16px; color: #4a4a4a; }
.foot__big {
  font-family: 'Syncopate', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(22px, 6vw, 54px);
  line-height: 1.1;
  letter-spacing: .16em;
  text-align: left;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 2px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid #4a4a4a;
}
.foot__links a:hover { background: #1a1a1a; color: #fafaf8; }

/* ---------- 入场 ---------- */
.rv { opacity: 0; transform: translateY(10px); }
.rv.in { opacity: 1; transform: none; transition: opacity .2s steps(4, end), transform .2s steps(4, end); }

@media (min-width: 760px) {
  .foot { grid-template-columns: 1fr auto 1fr; gap: 20px; }
  .foot__big { text-align: center; }
  .foot__links { justify-content: flex-end; }
  .hero { min-height: 70vh; }
}

@media (min-width: 1140px) {
  .rail { display: block; }
  .rail--l { justify-self: end; }
  .rail--r { justify-self: start; }
}

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr) 232px; align-items: start; }
  .side { position: sticky; top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img { transform: none !important; }
  .rv { opacity: 1; transform: none; transition: none; }
  .drawer { transition: none; }
}

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