:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: #e8e8e8;
  --soft: #9a9a9a;
  --r: 18px;
  --shadow: 0 4px 6px rgba(0, 0, 0, .05), 0 12px 28px rgba(0, 0, 0, .04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

[id] {
  scroll-margin-top: 132px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

.shell {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  border-radius: 12px;
}

.mark-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}

.mark-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .25s ease, background .25s ease;
}

.cta:hover {
  transform: translateY(-1px);
  background: #000;
}

.anchors {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 8px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchors::-webkit-scrollbar {
  display: none;
}

.anchors ol {
  display: flex;
  gap: 4px;
  min-width: max-content;
}

.anchors a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  color: #4d4d4d;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.anchors a:hover {
  background: var(--mist);
  color: var(--ink);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 128px 24px 56px;
  background: var(--ink);
  color: var(--paper);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(195deg, rgba(31, 31, 31, .2) 0%, rgba(31, 31, 31, .55) 55%, rgba(31, 31, 31, .95) 100%);
}

.hero-num {
  position: absolute;
  left: 10px;
  top: 88px;
  z-index: 1;
  font-size: clamp(96px, 26vw, 280px);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.05em;
  color: rgba(255, 255, 255, .13);
}

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 660px;
  text-align: right;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5.6vw, 64px);
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.hero p {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .8);
}

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

.wrap {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 24px;
  align-items: start;
}

.read {
  min-width: 0;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento > div {
  grid-column: span 2;
  background: var(--paper);
  border: 1px solid #eee;
  border-radius: var(--r);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}

.bento > div:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 8px 14px rgba(0, 0, 0, .07), 0 22px 44px rgba(0, 0, 0, .06);
}

.bento > div:nth-child(7n + 1) {
  grid-column: span 4;
}

.bento > div:nth-child(7n + 4) {
  grid-column: span 3;
}

.bento > div:nth-child(7n + 5) {
  grid-column: span 1;
}

.bento > div:nth-child(7n + 6) {
  grid-column: span 4;
}

.bento small {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--soft);
}

.bento h2 {
  margin: 0 0 14px;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.32;
  letter-spacing: -.015em;
}

.bento h3 {
  margin: 22px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.bento p {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.85;
  color: #313131;
  max-width: 68ch;
}

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

.bento ul,
.bento ol {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: disc;
}

.bento ol {
  list-style: decimal;
}

.bento li {
  margin: 7px 0;
  line-height: 1.78;
  color: #313131;
}

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

.bento blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--ink);
  border-radius: 0 14px 14px 0;
  background: #fafafa;
}

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

.bento strong {
  font-weight: 700;
}

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

.rail {
  position: sticky;
  top: 132px;
  align-self: start;
  background: var(--paper);
  border: 1px solid #eee;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}

.rail small {
  display: block;
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--soft);
}

.rail h2 {
  margin: 6px 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 15px;
  color: #3d3d3d;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.rail-list a:hover {
  background: var(--mist);
  color: var(--ink);
}

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

.foot {
  margin-top: 48px;
  padding: 34px 20px 26px;
  background: var(--ink);
  color: var(--paper);
}

.foot-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot address {
  font-style: normal;
  font-weight: 700;
  font-size: clamp(28px, 7vw, 56px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  color: #c9c9c9;
  text-decoration: none;
  transition: color .2s ease;
}

.foot-links a:hover {
  color: var(--paper);
}

.copy {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: #8d8d8d;
}

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1000px) {
  .wrap {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .rail {
    position: static;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento > div,
  .bento > div:nth-child(7n + 1),
  .bento > div:nth-child(7n + 4),
  .bento > div:nth-child(7n + 5),
  .bento > div:nth-child(7n + 6) {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .hero {
    min-height: 90svh;
    padding: 104px 18px 40px;
  }

  .hero-num {
    top: 74px;
    left: 4px;
  }

  .hero-in {
    max-width: 100%;
  }

  .bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bento > div,
  .bento > div:nth-child(7n + 1),
  .bento > div:nth-child(7n + 4),
  .bento > div:nth-child(7n + 5),
  .bento > div:nth-child(7n + 6) {
    grid-column: span 1;
    padding: 22px 18px;
  }

  .bento > div:hover {
    transform: none;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .copy {
    text-align: left;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bento > div,
  .cta,
  .anchors a,
  .rail-list a,
  .foot-links a {
    transition: none;
  }
}

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