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

:root {
  --c1: #6514ff;
  --c2: #bf00ff;
  --ink: #1c1726;
  --bg: #0d0817;
  --panel: #17102a;
  --line: rgba(191, 0, 255, 0.34);
  --txt: #f4efff;
  --dim: #b6a9ce;
  --rail: 250px;
  --font: 'Plus Jakarta Sans', '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%;
}

body {
  margin: 0;
  padding-left: var(--rail);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.78;
  color: var(--txt);
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -60px;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(191, 0, 255, 0.17) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
  animation: drift 16s linear infinite;
}

@keyframes drift {
  to {
    background-position: 26px 26px;
  }
}

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

a {
  color: #cdb4ff;
}

/* ---------- 左轨 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #1b0f30, #120a20 58%, #0d0817);
  border-right: 2px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 6px;
  color: var(--txt);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  border-radius: 10px;
}

.brand img {
  border-radius: 8px;
  flex: none;
}

.brand:hover .brand-name {
  color: #d9c2ff;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  color: var(--txt);
  background: rgba(101, 20, 255, 0.28);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.rail-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

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

.nav-list a {
  display: block;
  padding: 11px 12px;
  min-height: 44px;
  font-size: 16px;
  color: var(--txt);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(101, 20, 255, 0.26);
  border-color: var(--line);
  color: #fff;
  transform: translateX(4px);
}

.nav-break {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.17);
}

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(120deg, #c9b0ff, #f0e6ff);
  border-radius: 10px;
  border: 2px solid #f0e6ff;
  transition: background 0.22s ease, transform 0.22s ease;
}

.rail-cta:hover {
  background: linear-gradient(120deg, var(--c2), var(--c1));
  color: #fff;
  border-color: var(--c2);
  transform: translateY(-2px);
}

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

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px clamp(20px, 5vw, 76px);
  overflow: hidden;
  isolation: isolate;
}

.hero-fig {
  margin: 0;
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.05);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 76% 26%, rgba(191, 0, 255, 0.5), transparent 56%),
    linear-gradient(100deg, rgba(13, 8, 23, 0.95) 14%, rgba(13, 8, 23, 0.66) 52%, rgba(101, 20, 255, 0.45));
}

.hero::after {
  content: '';
  position: absolute;
  right: -8vw;
  bottom: -16vh;
  z-index: -1;
  width: 48vw;
  height: 48vw;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  opacity: 0.26;
  border-radius: 38% 62% 58% 42% / 44% 38% 62% 56%;
  filter: blur(4px);
  animation: morph 13s ease-in-out infinite;
}

@keyframes morph {
  50% {
    border-radius: 62% 38% 40% 60% / 56% 62% 38% 44%;
    transform: translate3d(-2vw, -3vh, 0) rotate(8deg);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  margin: 0 0 30px;
  max-width: 44ch;
  font-size: 18px;
  color: #ddd2f3;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 34px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--c1), var(--c2));
  border: 2px solid #e6d9ff;
  border-radius: 10px;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.hero-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

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

.stream {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  max-width: 1290px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 56px) 84px;
}

.stream > article {
  grid-column: 1;
  scroll-margin-top: 96px;
  padding-block: 46px;
  border-top: 2px solid rgba(255, 255, 255, 0.09);
}

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

.stream h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.stream h3 {
  margin: 28px 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.stream p {
  margin: 0 0 16px;
  max-width: 68ch;
}

.stream ul,
.stream ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
}

.stream li {
  margin: 7px 0;
}

.stream figure {
  margin: 24px 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}

.stream blockquote {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-left: 5px solid var(--c2);
  border-radius: 0 10px 10px 0;
  background: rgba(191, 0, 255, 0.1);
}

.stream table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 16px;
}

.stream th,
.stream td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.stream th {
  background: rgba(101, 20, 255, 0.22);
}

hr {
  border: 0;
  height: 3px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--c2), rgba(101, 20, 255, 0));
}

/* ---------- 侧栏 ---------- */

.side {
  grid-column: 2;
  grid-row: 1 / span 60;
  align-self: start;
  position: sticky;
  top: 92px;
  padding-block: 0 !important;
  border-top: 0 !important;
  scroll-margin-top: 96px;
}

.side-card {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 18px 16px;
  background: rgba(101, 20, 255, 0.11);
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: 0.22em;
  color: #e9dcff;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: sd;
}

.side-list li {
  counter-increment: sd;
}

.side-list a {
  display: block;
  padding: 8px 6px;
  min-height: 40px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.side-list li:last-child a {
  border-bottom: 0;
}

.side-list a:hover {
  color: #fff;
  padding-left: 12px;
}

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

.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  padding: 58px clamp(20px, 4vw, 56px) 30px;
  border-top: 2px solid var(--line);
  background: #100a1c;
}

.foot-mark {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.foot address {
  font-style: normal;
  color: var(--dim);
  font-size: 16px;
  max-width: 34ch;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 2px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot-links a:hover {
  color: #fff;
  border-bottom-color: var(--c2);
}

.foot-copy {
  grid-column: 1 / -1;
  margin: 26px 0 0;
  padding-top: 16px;
  font-size: 15px;
  color: var(--dim);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: #ded0ff;
  border: 2px solid #fff;
  border-radius: 10px;
  opacity: 0.9;
}

.to-top:hover {
  opacity: 1;
  background: var(--c2);
  color: #fff;
  border-color: var(--c2);
}

/* ---------- 进场 ---------- */

.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---------- 断点 ---------- */

@media (max-width: 1080px) {
  :root {
    --rail: 220px;
  }

  .stream {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 36px;
  }
}

@media (max-width: 880px) {
  body {
    padding-left: 0;
    padding-top: 66px;
  }

  .rail {
    width: 100%;
    right: 0;
    bottom: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    padding: 4px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .rail-cta {
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
  }

  .rail-nav {
    order: 3;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  body.nav-open .rail-nav {
    max-height: 68vh;
    overflow: auto;
    padding-bottom: 10px;
  }

  .hero {
    min-height: calc(100svh - 66px);
    padding: 56px 20px 64px;
  }

  .hero::after {
    width: 72vw;
    height: 72vw;
    right: -18vw;
    bottom: -8vh;
  }

  .hero-sub {
    font-size: 17px;
  }

  .stream {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 40px 18px 60px;
  }

  .stream > article {
    padding-block: 34px;
    scroll-margin-top: 92px;
  }

  .side {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 44px 18px 26px;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
  }
}

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

  body::before,
  .hero::after {
    animation: none;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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