@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: #f1f1f1;
  --mid: #6b6b6b;
  --hair: #d8d8d8;
  --u: 8px;
  --gut: 1rem;
  --max: 1280px;
  --display: 'Amatic SC', 'Cabin', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --text: 'Cabin', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-size: 16px;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* ---------- 顶部 ---------- */

.head {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.head-in {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px clamp(14px, 4vw, 48px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(17px, 3.6vw, 21px);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.brand-mark {
  display: block;
  height: 30px;
  width: auto;
}

.find {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.find input {
  border: 0;
  background: transparent;
  font-family: var(--text);
  font-size: 16px;
  color: var(--ink);
  padding: 0 10px;
  min-height: 42px;
  width: clamp(72px, 22vw, 190px);
  min-width: 0;
  outline-offset: -3px;
}

.find button {
  border: 0;
  border-left: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 16px;
  padding: 0 12px;
  min-height: 42px;
  cursor: pointer;
  letter-spacing: 0.06em;
}

.find button:hover {
  background: var(--paper);
  color: var(--ink);
}

.anchors {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.anchors-in {
  display: flex;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(6px, 2vw, 34px);
  overflow-x: auto;
  scrollbar-width: thin;
}

.anchors a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border-right: 1px solid var(--hair);
  letter-spacing: 0.02em;
  transition: background 0.16s linear, color 0.16s linear;
}

.anchors a:hover,
.anchors a:focus-visible,
.anchors a[aria-current='true'] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 主栅格 ---------- */

.wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--u) * 4);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 56px) clamp(16px, 4vw, 48px) 0;
}

.hero {
  order: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.body {
  order: 2;
}

.side {
  order: 3;
  border-top: 3px solid var(--ink);
  padding-top: 12px;
}

.side-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.side-title span {
  border-bottom: 3px solid var(--ink);
  padding-bottom: 4px;
  display: inline-block;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: side;
}

.side-list li {
  border-bottom: 1px solid var(--hair);
}

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 6px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.16s linear, color 0.16s linear;
}

.side-list a::before {
  counter-increment: side;
  content: counter(side, decimal-leading-zero);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
  color: var(--mid);
  min-width: 1.7em;
}

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

.side-list a:hover::before,
.side-list a:focus-visible::before {
  color: var(--paper);
}

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

.hero-in {
  position: relative;
  padding-top: clamp(12px, 3vw, 32px);
  text-align: right;
}

.hero-no {
  position: absolute;
  top: -0.24em;
  right: -0.05em;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(112px, 25vw, 300px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: #ececec;
  z-index: 0;
  pointer-events: none;
}

.hero-h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.hero-desc {
  position: relative;
  z-index: 1;
  margin: 14px 0 0 auto;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.6;
  color: #111111;
}

.hero-media {
  margin-top: auto;
  padding-top: clamp(18px, 4vw, 34px);
}

.hero-media img {
  display: block;
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}

/* ---------- 正文 ---------- */

.prose {
  min-width: 0;
  font-size: 17px;
  line-height: 1.75;
}

.prose article {
  padding: clamp(26px, 5vw, 52px) 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 96px;
}

.prose article:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.prose h2 span {
  display: inline-block;
  border-bottom: 4px solid var(--ink);
  padding-bottom: 6px;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
}

.prose h3 span {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 3px;
}

.prose p {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

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

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  background: var(--soft);
  border-left: 4px solid var(--ink);
}

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

.prose figure {
  margin: 1.4em 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 1px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
  word-break: break-word;
}

.prose th {
  background: var(--soft);
}

.prose code {
  background: var(--soft);
  padding: 1px 5px;
  font-size: 15px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 2em 0;
}

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

.foot {
  margin-top: clamp(36px, 7vw, 76px);
  border-top: 2px solid var(--ink);
}

.foot-cta {
  padding: clamp(24px, 5vw, 54px) clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--ink);
}

.cta-h2 {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--gut);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--ink);
}

.foot-cols dl {
  margin: 0;
}

.foot-cols dt {
  font-size: 16px;
  letter-spacing: 0.18em;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.foot-cols dd {
  margin: 0;
}

.foot-cols a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  word-break: break-word;
}

.foot-cols a:hover,
.foot-cols a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 22px;
  padding: 18px 16px 44px;
  text-align: center;
}

.foot-bar p {
  margin: 0;
  font-size: 16px;
  color: var(--mid);
}

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 桌面栅格 ---------- */

@media (min-width: 880px) {
  .wrap {
    grid-template-columns: 232px minmax(0, 1fr);
    column-gap: clamp(24px, 4vw, 64px);
    row-gap: clamp(24px, 4vw, 48px);
  }

  .side {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 78px;
    align-self: start;
  }

  .hero,
  .body {
    grid-column: 2;
  }

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

@media (min-width: 1180px) {
  .hero-desc {
    max-width: 52ch;
  }
}

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

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

  .hero-desc {
    animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) 0.08s both;
  }

  .side-list li {
    animation: rise 0.4s linear both;
  }

  .side-list li:nth-child(1) { animation-delay: 0.02s; }
  .side-list li:nth-child(2) { animation-delay: 0.05s; }
  .side-list li:nth-child(3) { animation-delay: 0.08s; }
  .side-list li:nth-child(4) { animation-delay: 0.11s; }
  .side-list li:nth-child(5) { animation-delay: 0.14s; }
  .side-list li:nth-child(6) { animation-delay: 0.17s; }
  .side-list li:nth-child(7) { animation-delay: 0.2s; }

  .foot-cols a:hover {
    transform: translateX(3px);
    transition: transform 0.15s linear;
  }
}

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

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

  .hero-h1,
  .hero-desc,
  .side-list li {
    animation: none;
  }
}

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

.anchors a:focus-visible,
.side-list a:focus-visible {
  outline-offset: -3px;
}

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