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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --gap: 1rem;
  --gutter: 1.25rem;
  --widest: 1240px;
  --rule: 1px solid #000000;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  padding-bottom: 9.5rem;
}

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

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

img {
  max-width: 100%;
}

/* ---------- 底部固定导航条 ---------- */
.topbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  background: var(--paper);
  border-top: var(--rule);
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  max-width: var(--widest);
  margin: 0 auto;
}

.nav-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}

.nav-side--r {
  justify-content: flex-end;
}

.nav-side a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.72rem;
  border: var(--rule);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s linear, color 0.15s linear, transform 0.15s linear;
}

.nav-side a:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.nav-side a.cta {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

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

.brand {
  padding: 0.4rem 0.7rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
  border-bottom: var(--rule);
}

.hero-media {
  position: relative;
  overflow: hidden;
  border-right: var(--rule);
  background: var(--paper);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#000 1px, transparent 1px),
    linear-gradient(90deg, #000 1px, transparent 1px);
  background-size: 2rem 2rem;
  opacity: 0.16;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 1.25rem;
  text-align: right;
  padding: 2.5rem var(--gutter) 7rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-desc {
  margin: 0;
  max-width: 36ch;
  padding-top: 0.9rem;
  border-top: var(--rule);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- 正文骨架 ---------- */
.main {
  max-width: var(--widest);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
}

.sheet {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem 1rem;
  align-items: start;
}

.sheet-body {
  grid-column: 1 / 9;
  min-width: 0;
  counter-reset: sec;
}

.sheet-body > article {
  counter-increment: sec;
  padding: 1.4rem 0 2.6rem;
  border-top: var(--rule);
  scroll-margin-top: 2rem;
  scroll-margin-bottom: 9rem;
}

.sheet-body > article::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1;
}

.sheet-body h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.4rem, 3.1vw, 2rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.sheet-body h3 {
  margin: 1.7rem 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sheet-body h2 span,
.sheet-body h3 span {
  display: inline;
}

.sheet-body p {
  margin: 0 0 1rem;
}

.sheet-body a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.sheet-body a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration-color: var(--paper);
}

.sheet-body ul,
.sheet-body ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.sheet-body li {
  margin: 0.35rem 0;
}

.sheet-body blockquote {
  margin: 1.4rem 0;
  padding: 0.55rem 0 0.55rem 1rem;
  border-left: 5px solid var(--ink);
  font-weight: 600;
}

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

.sheet-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.2rem 0;
  border: var(--rule);
}

.sheet-body figure {
  margin: 1.2rem 0;
}

.sheet-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

.sheet-body th,
.sheet-body td {
  border: var(--rule);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

/* ---------- 右栏 ---------- */
.rail {
  grid-column: 9 / 13;
  border-left: var(--rule);
  padding-left: 1rem;
  position: sticky;
  top: 1.5rem;
}

.rail-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
}

.rail-nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.2rem;
  border-bottom: var(--rule);
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
  transition: padding 0.15s linear, background 0.15s linear, color 0.15s linear;
}

.rail-nav a:last-child {
  border-bottom: 0;
}

.rail-nav a:hover,
.rail-nav a.is-current {
  background: var(--ink);
  color: var(--paper);
  padding-left: 0.55rem;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: var(--rule);
  display: grid;
  grid-template-columns: 1.3fr 2fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.7rem var(--gutter);
  margin: 0 auto;
  max-width: var(--widest);
}

.foot-brand {
  min-width: 0;
}

.foot-logo {
  display: inline-block;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0.35rem 0;
}

.foot-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 34ch;
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.84rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s linear;
}

.foot-nav a:hover {
  border-bottom-color: var(--ink);
}

.foot-copy {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1,
  .hero-desc {
    animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .hero-desc {
    animation-delay: 0.1s;
  }

  .sheet-body > article {
    animation: rise 0.5s ease-out both;
  }

  .sheet-body > article:nth-child(1) { animation-delay: 0.04s; }
  .sheet-body > article:nth-child(2) { animation-delay: 0.08s; }
  .sheet-body > article:nth-child(3) { animation-delay: 0.12s; }
  .sheet-body > article:nth-child(4) { animation-delay: 0.16s; }
  .sheet-body > article:nth-child(5) { animation-delay: 0.2s; }
  .sheet-body > article:nth-child(6) { animation-delay: 0.24s; }
  .sheet-body > article:nth-child(7) { animation-delay: 0.28s; }

  .rail-nav a:hover {
    transform: translateX(2px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 961px 以下 ---------- */
@media (max-width: 960px) {
  .sheet {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .rail {
    position: static;
    border-left: 0;
    border-top: var(--rule);
    padding-left: 0;
    padding-top: 1rem;
  }

  .rail-nav p {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }

  .rail-nav a {
    border-bottom: var(--rule);
  }
}

/* ---------- 780px 以下 ---------- */
@media (max-width: 780px) {
  body {
    padding-bottom: 14rem;
    font-size: 16px;
  }

  .nav {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .brand {
    order: -1;
    justify-self: center;
    font-size: 0.92rem;
  }

  .nav-side {
    justify-content: center;
    gap: 0.25rem;
  }

  .nav-side--r {
    justify-content: center;
  }

  .nav-side a {
    font-size: 0.76rem;
    padding: 0.3rem 0.55rem;
    min-height: 40px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-media {
    border-right: 0;
    border-bottom: var(--rule);
    min-height: 40vh;
  }

  .hero-copy {
    align-items: flex-start;
    text-align: right;
    padding: 1.6rem var(--gutter) 7rem;
    gap: 1rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.95rem, 9vw, 2.8rem);
  }

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

  .main {
    padding: 2rem var(--gutter) 3rem;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    align-items: start;
    padding: 1.4rem var(--gutter) 2rem;
  }

  .foot-copy {
    text-align: left;
    white-space: normal;
  }

  .foot-nav p {
    gap: 0 1rem;
  }
}

@media (max-width: 420px) {
  .rail-nav p {
    grid-template-columns: 1fr;
  }
}

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