@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

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

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

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
  border-radius: 6px;
}

.foot :focus-visible,
.hero :focus-visible {
  outline-color: #ffffff;
}

/* ---------- 顶部导航（aside 内的 nav） ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.mast {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.mast-nav {
  display: contents;
}

.brand {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}

.grp {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.grp.left {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.grp.right {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.grp > li {
  position: relative;
}

.grp > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.grp > li > a:hover,
.grp > li > a:focus-visible,
.grp > li.has-drop:focus-within > a {
  background: #000000;
  color: #ffffff;
}

.drop {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  min-width: 178px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 22px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
}

.grp > li:hover > .drop,
.grp > li:focus-within > .drop {
  display: flex;
}

.drop a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0.7rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 14px;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.6rem 1.25rem 0;
  background-color: #000000;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 18px 18px;
  color: #ffffff;
  overflow: hidden;
}

.hero-copy {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: right;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 700;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-desc {
  max-width: 46ch;
  margin: 0 0 1.6rem auto;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
  animation: rise 0.7s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-plate {
  margin-top: auto;
  min-height: 92px;
  height: 16vh;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0 1px,
    transparent 1px 42px
  );
  overflow: hidden;
}

.hero-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

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

/* ---------- 版面骨架：左侧 aside + main ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.6rem 1.25rem 3.4rem;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 0 3rem;
  align-items: start;
}

.rail {
  position: sticky;
  top: 5.4rem;
}

.rail-box {
  background: rgba(0, 0, 0, 0.032);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 28px;
  padding: 1.1rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rail-title {
  margin: 0 0 0.55rem;
  padding-left: 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rail-title span {
  box-shadow: inset 0 -0.42em 0 rgba(0, 0, 0, 0.12);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.25rem 0.55rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 14px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

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

.wrap {
  min-width: 0;
}

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

.prose {
  max-width: 70ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose > section {
  padding-top: 1.9rem;
  margin-bottom: 2.8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  scroll-margin-top: 6rem;
}

.prose > section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.prose h2,
.prose h3 {
  letter-spacing: -0.025em;
  line-height: 1.16;
  font-weight: 700;
}

.prose h2 {
  margin: 2.2rem 0 0.85rem;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
}

.prose h3 {
  margin: 1.7rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

.prose h2 > span,
.prose h3 > span {
  box-shadow: inset 0 -0.34em 0 rgba(0, 0, 0, 0.1);
}

.prose p {
  margin: 0 0 1.15rem;
}

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

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

.prose strong {
  font-weight: 700;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

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

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.35rem 0 0.35rem 1.25rem;
  border-left: 3px solid #000000;
  font-size: 1.22rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

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

.prose figure {
  margin: 1.7rem 0;
}

.prose figcaption {
  margin-top: 0.55rem;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 0.45rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 1rem;
}

.prose th,
.prose td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  padding: 0.55rem 0.6rem;
  text-align: left;
}

.prose th {
  background: rgba(0, 0, 0, 0.045);
  font-weight: 700;
}

.prose code {
  font-size: 0.95em;
  padding: 0.1em 0.35em;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
}

.prose > section:first-of-type > p:first-of-type::first-letter {
  float: left;
  font-size: 4.1rem;
  line-height: 0.8;
  font-weight: 700;
  padding: 0.12rem 0.5rem 0.05rem 0;
}

@media (min-width: 1000px) {
  .prose > section {
    column-count: 2;
    column-gap: 2.6rem;
  }

  .prose > section:first-of-type {
    column-count: 1;
  }

  .prose h2,
  .prose h3 {
    break-after: avoid;
  }

  .prose li,
  .prose figure,
  .prose blockquote,
  .prose table {
    break-inside: avoid;
  }
}

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

.foot {
  margin-top: 3rem;
  padding: 3rem 1.25rem 2.6rem;
  background: #000000;
  color: #ffffff;
  text-align: center;
}

.foot-brand {
  margin: 0 auto;
  font-size: clamp(2.3rem, 12vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 700;
  white-space: nowrap;
}

.foot-brand span {
  display: inline-block;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 1.5rem;
  margin: 1.7rem 0 1.1rem;
}

.foot-addr {
  font-style: normal;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.62);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.25rem 0.8rem;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.copy {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.03em;
}

/* ---------- 回到顶部 ---------- */

.totop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  color: #ffffff;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.totop.on {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 滚动显现 ---------- */

html.anim .prose > section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.anim .prose > section.in {
  opacity: 1;
  transform: none;
}

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

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

  html.anim .prose > section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 移动端 ---------- */

@media (max-width: 899px) {
  .mast {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.4rem 0.75rem 0.55rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .mast-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    grid-column: 1;
    grid-row: 2;
  }

  .grp {
    flex-wrap: wrap;
    justify-content: center;
  }

  .grp.left,
  .grp.right {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
  }

  .drop {
    display: none;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-desc {
    max-width: none;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem 0;
    padding: 1.8rem 1.1rem 2.6rem;
  }

  .rail {
    position: static;
  }

  .rail-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rail-list a {
    padding: 0.25rem 0.65rem;
  }

  .prose {
    font-size: 1.05rem;
  }
}

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