@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --ink: #0d0d0d;
  --pur: #8000ff;
  --mag: #ff00ff;
  --txt: #ece7f6;
  --dim: #a79ebc;
  --line: rgba(128, 0, 255, 0.3);
  --card: rgba(255, 255, 255, 0.028);
  --rail: 252px;
}

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

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

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.012em;
  color: var(--txt);
  background:
    radial-gradient(1200px 620px at 92% -12%, rgba(128, 0, 255, 0.22), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, rgba(255, 0, 255, 0.14), transparent 60%),
    #0d0d0d;
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

[hidden] {
  display: none !important;
}

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

img {
  max-width: 100%;
}

::selection {
  background: var(--mag);
  color: #fff;
}

/* ---------- 左侧固定竖排栏 ---------- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 20px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #130016 0%, #0d0d0d 62%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand .mark,
.fbrand .mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 4px;
  border: 1px solid var(--mag);
  background: linear-gradient(135deg, var(--pur), var(--mag));
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.5);
}

.brand img.mark {
  object-fit: cover;
}

.brand:hover {
  color: var(--mag);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

.railsearch {
  position: relative;
  flex: 0 0 auto;
}

.railsearch input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.railsearch input::placeholder {
  color: var(--dim);
}

.railsearch input:focus {
  border-color: var(--mag);
  box-shadow: 0 0 0 2px rgba(255, 0, 255, 0.2);
}

.railnav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 600;
  color: var(--txt);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(128, 0, 255, 0.08);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pill:hover,
.pill:focus-visible {
  color: #fff;
  background: var(--pur);
  border-color: var(--mag);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.45);
  transform: translateX(2px);
}

.pill.on {
  color: #fff;
  background: linear-gradient(90deg, var(--pur), var(--mag));
  border-color: var(--mag);
}

.stagewrap {
  margin-left: var(--rail);
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100svh;
  padding: 44px 34px 34px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(620px 320px at 100% 0%, rgba(255, 0, 255, 0.18), transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 780px;
}

.badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 15px;
  font-size: 16px;
  font-weight: 600;
  color: #ffdaff;
  border: 1px solid var(--mag);
  border-radius: 999px;
  background: rgba(255, 0, 255, 0.1);
  box-shadow: 0 0 22px rgba(255, 0, 255, 0.35);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5.2vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 255, 0.55), 0 0 64px rgba(128, 0, 255, 0.45);
  animation: glitch 6.5s infinite steps(1, end);
}

@keyframes glitch {
  0%, 90%, 100% { transform: none; }
  91% { transform: skewX(-1.8deg) translateX(-4px); }
  93% { transform: skewX(1.5deg) translateX(4px); }
  95% { transform: none; }
}

.lede {
  max-width: 58ch;
  margin: 18px 0 0 auto;
  color: var(--dim);
  font-size: 17px;
}

.hero-media {
  position: relative;
  margin-top: auto;
  min-height: 34vh;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(128, 0, 255, 0.32), rgba(255, 0, 255, 0.14));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 34vh;
  min-height: 34vh;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(13, 13, 13, 0.24) 0 2px, transparent 2px 4px);
}

/* ---------- 正文骨架 ---------- */

main {
  display: block;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 34px 72px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 34px;
  align-items: start;
}

.doc {
  min-width: 0;
  counter-reset: sec;
}

.doc > article {
  position: relative;
  margin: 0 0 24px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  scroll-margin-top: 96px;
  counter-increment: sec;
}

.doc > article::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mag);
  opacity: 0.55;
}

.doc > article:last-child {
  margin-bottom: 0;
}

.doc > article:nth-child(even) {
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.doc h2 {
  margin: 0.1em 0 0.62em;
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 16px rgba(128, 0, 255, 0.55);
}

.doc h2 > span,
.doc h3 > span {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 2px solid rgba(255, 0, 255, 0.55);
}

.doc h3 {
  margin: 1.5em 0 0.5em;
  font-size: 19px;
  font-weight: 700;
  color: #f4e9ff;
}

.doc p {
  margin: 0 0 1.05em;
  color: #d1c9e0;
}

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

.doc a {
  color: var(--mag);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 255, 0.45);
  transition: background 0.15s ease, color 0.15s ease;
}

.doc a:hover {
  color: #fff;
  background: rgba(255, 0, 255, 0.18);
}

.doc strong,
.doc b {
  color: #fff;
}

.doc ul,
.doc ol {
  margin: 0 0 1.05em;
  padding-left: 1.35em;
  color: #d1c9e0;
}

.doc li {
  margin: 0.35em 0;
}

.doc li::marker {
  color: var(--mag);
}

.doc blockquote {
  margin: 0 0 1.05em;
  padding: 12px 18px;
  border-left: 3px solid var(--mag);
  border-radius: 0 4px 4px 0;
  background: rgba(255, 0, 255, 0.08);
  color: #ebdff8;
}

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

.doc figure {
  margin: 0 0 1.05em;
}

.doc img {
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
}

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

.doc th,
.doc td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
}

.doc th {
  color: #fff;
  background: rgba(128, 0, 255, 0.18);
}

.doc code,
.doc pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  background: rgba(128, 0, 255, 0.18);
  border-radius: 4px;
}

.doc code {
  padding: 2px 5px;
}

.doc pre {
  padding: 13px 15px;
  overflow-x: auto;
}

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

.doc hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc time {
  color: var(--mag);
  font-size: 16px;
}

/* ---------- 右侧边栏 ---------- */

.side {
  position: sticky;
  top: 28px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.17), rgba(13, 13, 13, 0.7));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.side h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.side h2 > span {
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--mag);
}

.side ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 11px;
  font-size: 16px;
  color: var(--txt);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.side a:hover,
.side a:focus-visible {
  color: #fff;
  border-color: var(--mag);
  background: rgba(255, 0, 255, 0.16);
}

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

footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #100014 0%, #0d0d0d 70%);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 34px 40px;
  border-bottom: 1px solid var(--line);
}

.cta h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.cta h2 > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--mag);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 28px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pur), var(--mag));
  box-shadow: 0 0 28px rgba(255, 0, 255, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 38px rgba(255, 0, 255, 0.6);
}

.fcols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 34px;
}

.fcols nav dl,
.fcols .fdl {
  margin: 0;
}

.fcols dt {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--mag);
}

.fcols dd {
  margin: 0 0 2px;
}

.fcols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #cfc7de;
  text-decoration: none;
  transition: color 0.16s ease, text-shadow 0.16s ease;
}

.fcols a:hover,
.fcols a:focus-visible {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.8);
}

.fbrand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fbrand p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}

.copy {
  margin: 0;
  padding: 18px 34px 34px;
  text-align: center;
  font-size: 16px;
  color: var(--dim);
}

/* ---------- 滚动浮现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: static;
  }
}

@media (max-width: 900px) {
  .rail {
    position: static;
    width: auto;
    gap: 10px;
    padding: 14px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #130016, #0d0d0d);
  }

  .railnav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .pill {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 44px;
    transform: none;
  }

  .pill:hover {
    transform: none;
  }

  .stagewrap {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
    padding: 26px 18px 22px;
    gap: 18px;
  }

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

  .hero-media,
  .hero-media img {
    min-height: 32vh;
    height: 32vh;
  }

  .wrap {
    padding: 34px 18px 52px;
  }

  .doc > article {
    padding: 24px 17px;
    scroll-margin-top: 20px;
  }

  .cta {
    padding: 38px 18px 28px;
  }

  .fcols {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 30px 18px;
  }

  .copy {
    padding: 14px 18px 30px;
  }
}

@media (max-width: 520px) {
  .fcols {
    grid-template-columns: 1fr;
  }

  .doc > article::before {
    top: 9px;
    right: 11px;
    font-size: 16px;
    opacity: 0.45;
  }

  .cta h2 {
    font-size: 24px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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

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