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

:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --ink-deep: #150f1f;
  --ink-soft: #2a2140;
  --paper: #f6f2ff;
  --dim: #c2b6dd;
  --r: 18px;
  --rail: 264px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--paper);
  background: var(--ink);
  overflow-wrap: break-word;
}

body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 26%, rgba(101, 20, 255, 0.42), transparent 42%),
    radial-gradient(circle at 82% 74%, rgba(191, 0, 255, 0.3), transparent 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 24px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1.05);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.16);
  }
}

a {
  color: #d3bdff;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px 24px;
  background: rgba(21, 15, 31, 0.94);
  border-right: 2px solid rgba(191, 0, 255, 0.34);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  text-decoration: none;
}

.brand-dot {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--violet), var(--magenta));
  box-shadow: 0 8px 22px rgba(101, 20, 255, 0.5);
}

.brand .mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.rail-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
}

.glab {
  display: block;
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--magenta);
}

.gttl {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

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

.navlist a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e8dfff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.navlist a:hover {
  background: linear-gradient(100deg, var(--violet), var(--magenta));
  color: #fff;
  transform: translateX(3px);
}

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 15px;
  background: linear-gradient(100deg, var(--violet), var(--magenta));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(101, 20, 255, 0.45);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.rail-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

/* 主体 */
.stage {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding: 26px clamp(16px, 4vw, 52px) 68px;
  max-width: 1120px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.6vw, 40px);
  min-height: 45vh;
  padding: 18px 0 34px;
  text-align: center;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff 25%, #cfbaff 62%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 auto;
  max-width: 44ch;
  color: var(--dim);
  font-size: 1.02rem;
}

.hero-media {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  width: 132px;
  height: 132px;
  border-radius: var(--r);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--violet), var(--magenta));
  box-shadow: 0 18px 42px rgba(101, 20, 255, 0.38);
}

.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: bob 6s ease-in-out infinite;
}

.blob.a {
  width: 58px;
  height: 58px;
  top: 14px;
  left: 16px;
}

.blob.b {
  width: 34px;
  height: 34px;
  right: 22px;
  bottom: 18px;
  background: rgba(28, 23, 38, 0.4);
  animation-delay: -3s;
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

/* 正文容器 */
.body-wrap {
  display: grid;
  gap: 48px;
  max-width: 860px;
}

.body-wrap > article {
  padding: clamp(20px, 3.4vw, 34px);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(101, 20, 255, 0.2), rgba(28, 23, 38, 0.62) 58%);
  scroll-margin-top: 24px;
}

.body-wrap h2 {
  margin: 0.2em 0 0.55em;
  font-size: clamp(1.5rem, 2.7vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.body-wrap h2::before {
  content: '';
  display: block;
  width: 56px;
  height: 6px;
  margin-bottom: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

.body-wrap h3 {
  margin: 1.3em 0 0.4em;
  font-size: 1.22rem;
  line-height: 1.3;
}

.body-wrap p {
  margin: 0 0 1em;
}

.body-wrap ul,
.body-wrap ol {
  padding-left: 1.3em;
}

.body-wrap li {
  margin-bottom: 0.4em;
}

.body-wrap blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(191, 0, 255, 0.16);
  color: #efe7ff;
}

.body-wrap figure {
  margin: 1.2em 0;
}

.body-wrap img {
  border-radius: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

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

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding: 52px clamp(16px, 4vw, 52px) 26px;
  background: var(--ink-deep);
  border-top: 2px solid rgba(191, 0, 255, 0.34);
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr;
  gap: 40px;
}

.f-cell {
  min-width: 0;
}

.f-brand {
  display: block;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #fff;
}

.f-note {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 0.92rem;
  word-break: break-word;
}

.f-ttl {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #fff;
}

.sub-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.sub-form input {
  flex: 1 1 140px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--ink-soft);
  color: var(--paper);
  font: inherit;
}

.sub-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--violet), var(--magenta));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.22s ease;
}

.sub-form button:hover {
  filter: brightness(1.14);
}

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

.f-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: #ddd1f6;
  text-decoration: none;
}

.f-list a:hover {
  color: #fff;
  text-decoration: underline;
}

.f-bottom {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid rgba(191, 0, 255, 0.22);
  text-align: center;
}

.f-bottom p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
}

.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 24px;
  background: var(--magenta);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.totop:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
  .navlist li {
    animation: pop 0.4s ease both;
  }
  .navlist li:nth-child(1) {
    animation-delay: 0.04s;
  }
  .navlist li:nth-child(2) {
    animation-delay: 0.08s;
  }
  .navlist li:nth-child(3) {
    animation-delay: 0.12s;
  }
  .navlist li:nth-child(4) {
    animation-delay: 0.16s;
  }
  .navlist li:nth-child(5) {
    animation-delay: 0.2s;
  }
  .navlist li:nth-child(6) {
    animation-delay: 0.24s;
  }
  .navlist li:nth-child(7) {
    animation-delay: 0.28s;
  }
}

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

@media (max-width: 999px) {
  .rail {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 2px solid rgba(191, 0, 255, 0.34);
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand-txt {
    display: none;
  }

  .rail-nav {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .glab,
  .gttl {
    display: none;
  }

  .navlist {
    flex-direction: row;
    gap: 6px;
    margin: 0;
    flex: 0 0 auto;
  }

  .navlist a {
    min-height: 44px;
    padding: 10px 12px;
    white-space: nowrap;
  }

  .navlist a:hover {
    transform: none;
  }

  .rail-cta {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .stage {
    margin-left: 0;
    padding: 18px 16px 56px;
  }

  .hero {
    flex-direction: column;
    min-height: 0;
    padding: 14px 0 28px;
    gap: 16px;
  }

  .hero-media {
    width: 104px;
    height: 104px;
  }

  .body-wrap {
    gap: 32px;
  }

  .body-wrap > article {
    scroll-margin-top: 78px;
  }

  .foot {
    margin-left: 0;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 38px 16px 22px;
  }

  .f-bottom {
    padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body::before,
  .blob,
  .navlist li {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

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