@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

:root {
  --ink: #0d0d0d;
  --panel: #14111b;
  --panel-2: #1b1626;
  --purple: #8000ff;
  --magenta: #ff00ff;
  --lime: #39ff9d;
  --text: #efe9f7;
  --dim: #a89fba;
  --line: rgba(128, 0, 255, .38);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --dock-h: 64px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: calc(var(--dock-h) + 22px);
  background-color: var(--ink);
  background-image:
    radial-gradient(62vw 58vh at 88% -12%, rgba(128, 0, 255, .26), transparent 70%),
    radial-gradient(52vw 50vh at -6% 26%, rgba(255, 0, 255, .13), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .035) 0 1px,
    transparent 1px 3px
  );
}

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

a {
  color: var(--magenta);
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease, background-color .18s ease;
}

a:hover, a:focus-visible { color: #fff; text-shadow: 0 0 12px var(--magenta); }

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

h1, h2, h3 {
  margin: 0 0 .6em;
  font-family: var(--mono);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: .01em;
}

/* ---- 底部固定终端条 ---- */
.dock-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--dock-h);
  padding: 0 clamp(12px, 4vw, 30px);
  background: rgba(13, 13, 13, .88);
  border-top: 1px solid rgba(128, 0, 255, .55);
  box-shadow: 0 -16px 42px rgba(128, 0, 255, .2);
  backdrop-filter: blur(10px);
}

.dock-bar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--magenta), var(--purple), transparent);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(128, 0, 255, .16);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 0 12px var(--purple);
}

.brand-mark img { width: 26px; height: 26px; border-radius: 2px; }

.dock-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(57, 255, 157, .5);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--lime);
  background: rgba(57, 255, 157, .08);
}

.dock-contact:hover { background: var(--lime); color: #0d0d0d; text-shadow: none; }

.docknav { position: relative; margin-left: auto; }

.dock { position: relative; }

.dock summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 0, 255, .55);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .18em;
  color: #fff;
  background: rgba(255, 0, 255, .13);
  cursor: pointer;
  user-select: none;
}

.dock summary::-webkit-details-marker { display: none; }

.dock summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--magenta);
}

.dock[open] summary {
  background: rgba(255, 0, 255, .26);
  box-shadow: inset 0 0 0 1px var(--magenta), 0 0 18px -4px var(--magenta);
}

.dock menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: min(78vw, 300px);
  max-height: 62vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(13, 13, 13, .98);
  box-shadow: 0 0 36px rgba(255, 0, 255, .28);
}

.dock menu li { list-style: none; }

.dock menu li + li { border-top: 1px solid rgba(128, 0, 255, .18); }

.dock menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 3px;
  color: var(--text);
  font-size: .96rem;
}

.dock menu a:hover { background: rgba(128, 0, 255, .22); color: #fff; }

/* ---- 首屏 ---- */
.hero {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: end;
  gap: 14px;
  min-height: min(70vh, 640px);
  padding: clamp(92px, 15vh, 156px) clamp(18px, 5vw, 64px) clamp(38px, 6vw, 68px);
  overflow: hidden;
  text-align: right;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(200deg, rgba(128, 0, 255, .22), transparent 62%),
    radial-gradient(70vw 50vh at 82% 10%, rgba(255, 0, 255, .18), transparent 70%);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  filter: saturate(1.15) contrast(1.06);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(270deg, rgba(13, 13, 13, .95), rgba(13, 13, 13, .6) 48%, rgba(13, 13, 13, .88)),
    linear-gradient(0deg, var(--ink) 4%, transparent 58%);
}

.hero > * { position: relative; }

.hero .badge {
  position: absolute;
  z-index: 3;
  top: clamp(20px, 5vh, 46px);
  left: clamp(18px, 5vw, 64px);
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--magenta);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  color: #fff;
  background: rgba(255, 0, 255, .16);
  text-shadow: 0 0 10px var(--magenta);
  box-shadow: 0 0 22px -6px var(--magenta);
}

.hero h1 {
  z-index: 2;
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.8rem, 5.4vw, 3.4rem);
  color: #fff;
  text-shadow:
    0 0 22px rgba(128, 0, 255, .95),
    2px 0 0 rgba(255, 0, 255, .5),
    -2px 0 0 rgba(57, 255, 157, .32);
  animation: glitch 7s infinite steps(1, end);
}

.hero .lede {
  z-index: 2;
  max-width: 46ch;
  margin: 0;
  font-size: .98rem;
  color: var(--dim);
}

@keyframes glitch {
  0%, 90%, 100% { transform: none; }
  91% { transform: skewX(-1.4deg) translateX(-2px); }
  93% { transform: skewX(1.6deg) translateX(2px); }
  96% { transform: skewX(-.7deg) translateX(-1px); }
}

/* ---- 主体两栏 ---- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: clamp(20px, 4vw, 52px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 74px) clamp(16px, 4vw, 40px) clamp(32px, 5vw, 60px);
}

.stream {
  min-width: 0;
  display: grid;
  gap: clamp(22px, 3.4vw, 40px);
  counter-reset: sec;
}

.stream > section {
  position: relative;
  padding: clamp(22px, 3vw, 30px) clamp(18px, 3vw, 32px) clamp(24px, 3vw, 34px);
  border: 1px solid rgba(128, 0, 255, .22);
  border-bottom: 2px solid var(--magenta);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(27, 22, 38, .88), rgba(20, 17, 27, .62));
  box-shadow: 0 30px 64px -50px rgba(255, 0, 255, .95);
  counter-increment: sec;
  scroll-margin-top: 24px;
}

.stream > section::before {
  content: "0" counter(sec);
  position: absolute;
  top: -12px;
  left: 16px;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--magenta);
  background: var(--ink);
  text-shadow: 0 0 10px var(--magenta);
}

.stream h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.16rem, 2.5vw, 1.55rem);
  color: #fff;
}

.stream h2::before {
  content: "";
  flex: none;
  width: 6px;
  align-self: stretch;
  min-height: 1.1em;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--magenta), var(--purple));
  box-shadow: 0 0 14px rgba(255, 0, 255, .8);
}

.stream h2 > span { text-shadow: 0 0 16px rgba(128, 0, 255, .8); }

.stream h3 {
  font-size: 1.02rem;
  color: #ecdfff;
  display: flex;
  gap: 8px;
}

.stream h3 > span { text-shadow: 0 0 12px rgba(255, 0, 255, .55); }

.stream h3::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: .5em;
  border: 1px solid var(--lime);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(57, 255, 157, .8);
}

.stream p { margin: 0 0 1.05em; color: #ded7ea; }
.stream p:last-child { margin-bottom: 0; }

.stream ul, .stream ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.stream li { margin-bottom: .45em; }
.stream li::marker { color: var(--magenta); }

.stream strong { color: #fff; }
.stream em { color: var(--lime); font-style: normal; }

.stream a { border-bottom: 1px solid rgba(255, 0, 255, .45); }
.stream a:hover { border-bottom-color: #fff; }

.stream blockquote {
  margin: 0 0 1.1em;
  padding: 12px 16px;
  border-left: 2px solid var(--magenta);
  border-radius: 0 4px 4px 0;
  background: rgba(255, 0, 255, .08);
  color: #f1e8ff;
}

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

.stream table {
  display: block;
  width: 100%;
  margin-bottom: 1.1em;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .94rem;
}

.stream th, .stream td {
  padding: 9px 11px;
  border: 1px solid rgba(128, 0, 255, .3);
  text-align: left;
}

.stream th {
  background: rgba(128, 0, 255, .18);
  font-family: var(--mono);
  font-size: .84rem;
  color: #fff;
}

.stream img {
  margin-bottom: 1.1em;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.stream code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(128, 0, 255, .2);
  font-family: var(--mono);
  font-size: .9em;
}

.stream pre {
  margin: 0 0 1.1em;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0a0a0d;
  font-family: var(--mono);
  font-size: .9rem;
}

.stream pre code { padding: 0; background: none; }

.stream hr {
  height: 1px;
  margin: 1.4em 0;
  border: 0;
  background: linear-gradient(90deg, var(--magenta), transparent);
}

/* ---- 右侧索引栏 ---- */
.rail {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 16px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(20, 17, 27, .82);
  box-shadow: inset 0 1px 0 rgba(255, 0, 255, .18);
}

.rail h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: .74rem;
  letter-spacing: .24em;
  color: var(--dim);
}

.rail h2::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.rail h2 > span { color: #fff; text-shadow: 0 0 14px var(--purple); }

.rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: railc;
}

.rail li { counter-increment: railc; border-top: 1px dashed rgba(128, 0, 255, .24); }
.rail li:first-child { border-top: 0; }

.rail a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 9px 0;
  font-size: .89rem;
  color: #cec5dd;
}

.rail a::before {
  content: counter(railc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--purple);
}

.rail a:hover { color: #fff; }

/* ---- 页脚 ---- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(128, 0, 255, .12), rgba(13, 13, 13, 0));
}

.foot section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 40px);
}

.foot .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.foot .cta h2 {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, .65);
}

.foot .cta h2 > span { display: inline-block; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--magenta);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .84rem;
  letter-spacing: .12em;
  color: #fff;
  background: rgba(255, 0, 255, .16);
  box-shadow: 0 0 20px -8px var(--magenta);
}

.btn-alt { border-color: var(--purple); background: rgba(128, 0, 255, .2); }

.btn:hover { background: var(--magenta); color: #0d0d0d; text-shadow: none; }

.foot .legal {
  padding-block: 14px 22px;
  border-top: 1px solid rgba(128, 0, 255, .22);
  text-align: center;
}

.foot .legal p {
  margin: 0;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--dim);
}

/* ---- 动效 ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ---- 响应式 ---- */
@media (max-width: 880px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    padding-top: clamp(26px, 6vw, 44px);
  }

  .rail { position: static; order: 2; }
  .hero { min-height: 62vh; }
}

@media (max-width: 460px) {
  .hero { min-height: 58vh; padding-top: 96px; }
  .hero .lede { font-size: .93rem; }
  .dock-contact { padding: 0 11px; letter-spacing: .08em; }
  .dock summary { padding: 0 12px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none; }
  .hero-media { transform: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

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