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

:root {
  --bg: #000000;
  --fg: #ffffff;
  --mute: #8d8d8d;
  --soft: #c9c9c9;
  --line: #1c1c1c;
  --edge: #333333;
  --max: 1280px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

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

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

p {
  margin: 0 0 1.2rem;
}

::selection {
  background: #ffffff;
  color: #000000;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* 顶栏 */
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: #000000;
  border-bottom: 1px solid var(--line);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--edge);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mark:hover {
  border-color: #ffffff;
}

.menu-wrap {
  position: relative;
}

.menu-wrap summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.menu-wrap summary::-webkit-details-marker {
  display: none;
}

.menu-wrap summary i {
  position: relative;
  display: block;
  width: 15px;
  height: 2px;
  background: #ffffff;
}

.menu-wrap summary i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  transform: rotate(90deg);
  transition: transform 0.22s ease;
}

.menu-wrap[open] summary i::after {
  transform: rotate(0deg);
}

.menu-wrap menu {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  z-index: 40;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  min-width: min(76vw, 260px);
  max-width: calc(100vw - 24px);
  background: #000000;
  border: 1px solid var(--edge);
}

.menu-wrap menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  color: #e9e9e9;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid #161616;
}

.menu-wrap menu li:last-child a {
  border-bottom: 0;
}

.menu-wrap menu a:hover,
.menu-wrap menu a:focus-visible {
  background: #ffffff;
  color: #000000;
}

.cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  background: #ffffff;
  color: #000000;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.cta:hover {
  background: #d6d6d6;
}

/* 首屏 */
.hero {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(4.5rem, 12vw, 9rem) clamp(1.1rem, 5vw, 4rem);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: -12% 0 -12%;
  z-index: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.84) 0%,
    rgba(0, 0, 0, 0.58) 45%,
    rgba(0, 0, 0, 0.94) 100%
  );
}

.hero-num {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  margin: 0;
  transform: translate(-50%, -50%);
  font-size: clamp(8rem, 32vw, 24rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: min(1040px, 100%);
}

.eyebrow {
  margin: 0 0 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  color: #b8b8b8;
  text-indent: 0.26em;
}

.hero h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(2.5rem, 8.6vw, 7rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.05em;
  word-break: break-word;
}

.hero-sub {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(0.98rem, 2.2vw, 1.15rem);
  line-height: 1.75;
  color: #cfcfcf;
}

/* 锚点条 */
.rail {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  background: #000000;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(0.4rem, 2vw, 1.5rem);
  scrollbar-width: none;
}

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

.rail a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 50px;
  padding: 0.8rem 0.7rem;
  white-space: nowrap;
  color: #b9b9b9;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}

.rail a:hover,
.rail a:focus-visible {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.rail em,
.idx em {
  font-style: normal;
  font-size: 0.72rem;
  color: #5c5c5c;
  font-variant-numeric: tabular-nums;
}

/* 主体骨架 */
main {
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.stage {
  display: block;
}

@media (min-width: 900px) {
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
}

/* 正文 */
.prose {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(4rem, 9vw, 8rem);
}

.prose > article {
  padding: clamp(3rem, 7vw, 6.5rem) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 86px;
}

.prose > article:last-child {
  border-bottom: 0;
}

.prose h2 {
  margin: 0 0 1.3rem;
  font-size: clamp(1.85rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.prose h3 {
  margin: 2.6rem 0 0.9rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose p {
  max-width: 66ch;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.85;
  color: #e4e4e4;
}

.prose ul,
.prose ol {
  max-width: 66ch;
  padding-left: 1.25rem;
  line-height: 1.85;
  color: #e4e4e4;
}

.prose li {
  margin-bottom: 0.55rem;
}

.prose strong {
  color: #ffffff;
  font-weight: 600;
}

.prose a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  background: #ffffff;
  color: #000000;
  text-decoration: none;
}

.prose hr {
  height: 1px;
  margin: 0 0 2rem;
  border: 0;
  background: #262626;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 2px solid #ffffff;
  color: #d3d3d3;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.prose img {
  margin: 2rem 0;
  width: 100%;
  filter: grayscale(1);
}

.prose figure {
  margin: 2rem 0;
}

.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--mute);
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.prose code {
  font-size: 0.92em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

/* 侧栏 */
.side {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
  border-top: 2px solid #ffffff;
}

.side h2 {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.side hr {
  height: 1px;
  margin: 0 0 1.2rem;
  border: 0;
  background: #262626;
}

.side-note {
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--mute);
}

.idx {
  margin: 0;
  padding: 0;
  list-style: none;
}

.idx li {
  border-bottom: 1px solid var(--line);
}

.idx li:last-child {
  border-bottom: 0;
}

.idx a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.7rem 0;
  color: #cfcfcf;
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.35;
}

.idx a:hover,
.idx a:focus-visible {
  color: #ffffff;
}

@media (min-width: 900px) {
  .side {
    position: sticky;
    top: 82px;
    align-self: start;
  }
}

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.6rem;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.1rem, 5vw, 3rem) 2rem;
  border-top: 1px solid #ffffff;
}

.site-foot p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #9e9e9e;
}

.site-foot p strong {
  display: block;
  margin-bottom: 0.7rem;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.site-foot a {
  display: inline-block;
  padding: 0.6rem 0;
  color: #c7c7c7;
  text-decoration: none;
  line-height: 1.35;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-foot small {
  grid-column: 1 / -1;
  display: block;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #7c7c7c;
  text-align: center;
}

/* 进入动效 */
.rv {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

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

  .hero-media img {
    transform: none !important;
  }
}

@media (max-width: 880px) {
  .site-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-foot {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .hero {
    min-height: 88vh;
  }

  .prose > article {
    scroll-margin-top: 78px;
  }
}

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