@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --ink: #111827;
  --cy: #22D3EE;
  --yl: #FACC15;
  --bg: #080E19;
  --bg2: #0C1421;
  --fg: #E6EDF6;
  --mut: #93A6BE;
  --line: #1F2C3E;
  --line2: #2B3B52;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Fira Code', 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--yl);
  outline-offset: 2px;
}

.frame {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 0;
}

/* 顶部条 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--yl);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--cy);
  color: #061019;
  border-radius: 2px;
  font-weight: 700;
  line-height: 1;
}

.brand__text {
  font-size: 18px;
}

.menu {
  position: relative;
}

.menu__btn {
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--cy);
  border: 1px solid var(--line2);
  border-radius: 2px;
  letter-spacing: 0.1em;
  transition: background 0.15s ease, color 0.15s ease;
}

.menu__btn::-webkit-details-marker {
  display: none;
}

.menu__btn:hover {
  background: var(--cy);
  color: #061019;
  border-color: var(--cy);
}

.menu__list {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 216px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 4px;
}

details[open] > .menu__list {
  display: flex;
}

.menu__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.menu__list a:hover {
  background: var(--cy);
  color: #061019;
}

/* 粘性锚点条 */
.anchors {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: var(--bg);
  border-bottom: 2px solid var(--yl);
}

.anchors__label {
  flex: none;
  color: var(--yl);
  letter-spacing: 0.14em;
}

.anchors__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.anchors__track a {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--line2);
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.anchors__track a:hover {
  background: var(--cy);
  border-color: var(--cy);
  color: #061019;
}

/* 主栅格 */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.doc {
  min-width: 0;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 44px 0 48px;
}

.hero__copy {
  min-width: 0;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--yl);
  color: #061019;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero__title {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
}

.hero__desc {
  margin: 0;
  max-width: 46ch;
  color: var(--mut);
  border-left: 3px solid var(--cy);
  padding-left: 14px;
}

.hero__art {
  position: relative;
  border: 2px solid var(--cy);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
}

.hero__art svg,
.hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__svg {
  will-change: transform;
}

/* 正文 */
.doc > article {
  scroll-margin-top: 78px;
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.doc > article:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.doc h2 {
  margin: 0 0 0.25em;
  font-size: clamp(1.4rem, 4.4vw, 2rem);
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.01em;
}

.doc h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 14px;
  background: var(--yl);
}

.doc h3 {
  margin: 0 0 0.4em;
  font-size: 1.15rem;
  color: var(--cy);
}

.doc p {
  margin: 0 0 1.1em;
  max-width: 64ch;
}

.doc .subtitle,
.doc h2 + p {
  color: var(--mut);
}

.doc ul,
.doc ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.45em;
}

.doc strong {
  color: var(--yl);
}

.doc blockquote {
  margin: 0 0 1.3em;
  padding: 12px 16px;
  background: var(--bg2);
  border-left: 4px solid var(--yl);
  border-radius: 2px;
}

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

.doc img {
  display: block;
  height: auto;
  border-radius: 2px;
}

.doc hr {
  border: 0;
  border-top: 1px dashed var(--line2);
  margin: 2em 0;
}

/* 侧栏 */
.rail {
  min-width: 0;
  border-top: 2px solid var(--line2);
  padding-top: 18px;
}

.rail__title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--yl);
  letter-spacing: 0.12em;
}

.rail .subtitle {
  margin: 4px 0 14px;
  color: var(--mut);
  font-size: 16px;
}

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rail__list li {
  border-bottom: 1px solid var(--line);
  animation: rise 0.35s ease both;
}

.rail__list li:nth-child(2) {
  animation-delay: 0.04s;
}

.rail__list li:nth-child(3) {
  animation-delay: 0.08s;
}

.rail__list li:nth-child(4) {
  animation-delay: 0.12s;
}

.rail__list li:nth-child(5) {
  animation-delay: 0.16s;
}

.rail__list li:nth-child(6) {
  animation-delay: 0.2s;
}

.rail__list li:nth-child(7) {
  animation-delay: 0.24s;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 2px 4px 14px;
  color: var(--fg);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rail__list a:hover {
  border-left-color: var(--cy);
  color: var(--cy);
  background: var(--bg2);
}

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

/* 页脚 */
.foot {
  margin-top: 24px;
  padding: 40px 20px 24px;
  background: var(--bg2);
  border-top: 2px solid var(--cy);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto 36px;
  padding: 26px 22px;
  background: var(--ink);
  border: 2px solid var(--yl);
  border-radius: 4px;
}

.cta__word {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: var(--yl);
}

.cta__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--yl);
  color: #061019;
  text-decoration: none;
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.cta__btn:hover {
  background: var(--cy);
}

.foot__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto 26px;
}

.foot__name {
  margin: 0 0 6px;
  color: var(--cy);
  letter-spacing: 0.1em;
}

.foot__addr {
  font-style: normal;
  color: var(--mut);
}

.foot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 10px;
}

.foot__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.foot__list a:hover {
  color: var(--cy);
  border-color: var(--cy);
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line2);
}

.foot__copy {
  margin: 0;
  color: var(--mut);
}

.foot__top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--cy);
  text-decoration: none;
  border: 1px solid var(--line2);
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.foot__top:hover {
  background: var(--cy);
  color: #061019;
}

/* 断点 */
@media (min-width: 620px) {
  .hero__art {
    aspect-ratio: 3 / 4;
    max-height: 620px;
  }

  .foot__cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
  }
}

@media (min-width: 900px) {
  .menu__list {
    position: static;
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
  }

  details[open] > .menu__list {
    display: flex;
  }

  .menu__list a {
    padding: 0 9px;
    border-radius: 2px;
  }

  .menu {
    display: flex;
    align-items: center;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 52px;
    padding-bottom: 80px;
  }

  .rail {
    position: sticky;
    top: 80px;
    align-self: start;
    border-top: 2px solid var(--yl);
  }
}

@media (min-width: 1120px) {
  .hero__title {
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  }
}

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

  .rail__list li {
    animation: none;
  }

  .hero__svg {
    transform: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

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