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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --soft: #6a6a6a;
  --hair: #d8d8d8;
  --radius: 18px;
  --frame: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.68 Cabin, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}

/* 顶部细条 */
.topline {
  background: var(--ink);
  color: var(--paper);
}

.topline p {
  margin: 0 auto;
  max-width: var(--frame);
  padding: 9px 20px;
  font-size: 14px;
  letter-spacing: 0.42em;
}

/* 页头 */
.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 10px 20px;
}

.brandmark {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brandmark a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.anchors {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.anchor-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 8px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.22s ease, color 0.22s ease;
}

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

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  min-height: 45vh;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 34px 20px 44px;
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.fig-ph {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #000 0 14px, #fff 14px 28px);
}

.hero-tag {
  position: absolute;
  left: 38px;
  bottom: 56px;
  z-index: 3;
  margin: 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.hero-tag p {
  margin: 0;
}

.hero-tag a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14.5px;
  letter-spacing: 0.12em;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.22s ease, color 0.22s ease;
}

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

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-family: "Amatic SC", Cabin, sans-serif;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.lede {
  max-width: 34ch;
  margin: 0 auto 26px;
  font-size: 1.02rem;
}

.hero-cta {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background-color 0.22s ease, transform 0.22s ease;
}

.btn:hover,
.btn:focus-visible {
  background: #333;
  transform: translateY(-2px);
}

/* 正文 + 右栏 */
.body-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 44px;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 30px 20px 72px;
  border-top: 2px solid var(--ink);
}

.content {
  min-width: 0;
}

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-left: 20px;
  border-left: 1.5px solid var(--ink);
}

.rail h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
}

.rail hr {
  height: 0;
  margin: 10px 0 12px;
  border: 0;
  border-top: 1.5px solid var(--ink);
}

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

.rail-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 0.22s ease, border-color 0.22s ease;
}

.rail-link:hover,
.rail-link:focus-visible {
  padding-left: 8px;
  border-color: var(--ink);
}

/* 正文内部元素 */
.content > article {
  animation: rise 0.5s ease both;
}

.content > article:nth-child(2) { animation-delay: 0.05s; }
.content > article:nth-child(3) { animation-delay: 0.1s; }
.content > article:nth-child(4) { animation-delay: 0.15s; }
.content > article:nth-child(5) { animation-delay: 0.2s; }
.content > article:nth-child(6) { animation-delay: 0.25s; }
.content > article:nth-child(7) { animation-delay: 0.3s; }

.content > article + article {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1.5px solid var(--ink);
}

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

.content h2 {
  margin: 0 0 0;
  font-family: "Amatic SC", Cabin, sans-serif;
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.content h3 {
  margin: 30px 0 0;
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}

.content hr {
  height: 0;
  margin: 12px 0 22px;
  border: 0;
  border-top: 4px solid var(--ink);
}

.content p {
  max-width: 68ch;
  margin: 0 0 18px;
}

.content ul,
.content ol {
  margin: 0 0 20px;
  padding-left: 1.25em;
}

.content li {
  margin: 0 0 9px;
  max-width: 66ch;
}

.content a {
  text-underline-offset: 3px;
}

.content strong {
  font-weight: 700;
}

.content blockquote {
  margin: 0 0 22px;
  padding: 20px 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}

.content blockquote p {
  margin: 0;
}

.content figure,
.content aside {
  margin: 0 0 22px;
}

.content img {
  width: 100%;
  border-radius: var(--radius);
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 26px;
  padding: 56px clamp(20px, 6vw, 96px) 26px;
  background: var(--ink);
  color: var(--paper);
}

.foot-big {
  margin: 0;
  font-family: "Amatic SC", Cabin, sans-serif;
  font-size: clamp(2rem, 6.5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.foot-col {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.foot-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid #3a3a3a;
  transition: color 0.22s ease, padding-left 0.22s ease;
}

.foot-link:hover,
.foot-link:focus-visible {
  color: #b5b5b5;
  padding-left: 6px;
}

.foot-mark {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  align-self: start;
}

.foot-copy {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid #3a3a3a;
  font-size: 14px;
  letter-spacing: 0.06em;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 14.5px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.to-top.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* 移动端 */
@media (max-width: 860px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px 16px 0;
  }

  .anchor-row {
    justify-content: flex-start;
    padding: 6px 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 22px 16px 34px;
  }

  .hero-fig {
    aspect-ratio: 16 / 10;
  }

  .hero-tag {
    position: static;
    justify-self: start;
    margin-top: -46px;
    margin-left: 16px;
  }

  .body-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 24px 16px 56px;
  }

  .rail {
    position: static;
    order: 2;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1.5px solid var(--ink);
  }

  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 44px 16px 22px;
  }

  .foot-big {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .pill {
    padding: 0 12px;
    font-size: 14px;
  }
}

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

  .content > article {
    animation: none;
  }

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

  .btn:hover {
    transform: none;
  }
}

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