@charset "utf-8";

:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --deep: #14101c;
  --text: #ece7f7;
  --muted: #b6a9d8;
  --line: rgba(191, 0, 255, 0.28);
  --rail: 248px;
  --ease: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Raleway", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
}

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

img { height: auto; border-radius: 4px; }

a { color: #d9b6ff; }

h1, h2, h3 {
  font-family: "Lora", Georgia, "Songti SC", serif;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

[hidden] { display: none !important; }

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

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

/* ---- 左侧固定导航 ---- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px 20px 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, #1c1726 0%, #221437 100%);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px;
  text-decoration: none;
  color: #fff;
  border-bottom: 3px solid var(--magenta);
}

.brand-mark { width: 36px; height: 36px; border-radius: 4px; }

.brand-name {
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.menu ol {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: rgba(101, 20, 255, 0.16);
  border: 1px solid rgba(101, 20, 255, 0.45);
  transition: background var(--ease), color var(--ease), transform var(--ease), border-color var(--ease);
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
  transform: translateX(5px);
}

.find {
  margin-top: 22px;
  display: flex;
  gap: 8px;
}

.find input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.find input::placeholder { color: #9587bb; }

.find button {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 46px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--magenta);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--ease);
}

.find button:hover { background: var(--violet); }

main { margin-left: var(--rail); }

/* ---- 首屏 ---- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  padding: 96px clamp(24px, 5vw, 80px) 120px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.22), transparent 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 24px),
    linear-gradient(152deg, #6514ff 0%, #9205f2 52%, #bf00ff 100%);
  background-size: auto, auto, auto;
  animation: drift 22s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 340px 340px, 0 0; }
}

.hero-copy {
  position: relative;
  z-index: 3;
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.04;
  color: #fff;
  text-shadow: 0 6px 30px rgba(28, 23, 38, 0.35);
}

.hero-lede {
  margin: 0 0 0 auto;
  max-width: 46ch;
  font-size: 1.06rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.94);
}

.hero-art {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 340px;
  will-change: transform;
}

.art-svg { display: block; width: 100%; height: auto; }

.hero-img {
  display: block;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(20, 16, 28, 0.5);
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(64px, 10vw, 120px);
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 2;
}

/* ---- 正文区 ---- */
.deck {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: 48px;
  padding: 72px clamp(20px, 5vw, 72px) 88px;
}

.toc {
  position: sticky;
  top: 24px;
  padding: 20px 18px 14px;
  background: rgba(101, 20, 255, 0.12);
  border: 1px solid var(--line);
  border-radius: 4px;
  border-bottom: 4px solid var(--magenta);
}

.toc small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--magenta);
  line-height: 1.6;
}

.toc h2 {
  margin: 4px 0 12px;
  font-size: 1.18rem;
  color: #fff;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed rgba(191, 0, 255, 0.22);
  transition: color var(--ease), border-color var(--ease), padding-left var(--ease);
}

.toc a:hover,
.toc a:focus-visible {
  color: #fff;
  border-color: var(--magenta);
  padding-left: 8px;
}

.story { min-width: 0; max-width: 920px; }

.story > div {
  padding: 4px 0 40px;
  margin: 0 0 44px;
  border-bottom: 2px solid rgba(191, 0, 255, 0.22);
  scroll-margin-top: 96px;
}

.story > div:last-of-type { margin-bottom: 0; }

.story small {
  display: block;
  margin: 6px 0 2px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--magenta);
  line-height: 1.7;
}

.story h2 {
  margin: 0 0 0.55em;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  color: #fff;
}

.story h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.22rem;
  color: #f4eeff;
}

.story p {
  margin: 0 0 1.1em;
  max-width: 68ch;
  color: #ddd5f0;
}

.story ul,
.story ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  color: #ddd5f0;
}

.story li { margin-bottom: 0.5em; }

.story a {
  color: #dcaaff;
  text-underline-offset: 3px;
}

.story blockquote {
  margin: 1.4em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--magenta);
  background: rgba(101, 20, 255, 0.12);
  border-radius: 4px;
  color: #ece2ff;
}

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

.story figure {
  margin: 1.6em 0;
  padding: 0 0 10px;
  border-bottom: 3px solid var(--magenta);
}

.story img { display: block; }

.story table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.96rem;
}

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

/* ---- 页脚 ---- */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 22px 48px;
  padding: 60px clamp(20px, 5vw, 72px) 40px;
  border-top: 4px solid var(--magenta);
  background: linear-gradient(140deg, #1c1726 0%, #2a1440 100%);
}

.foot-brand {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: #fff;
}

.foot-desc {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 16px;
}

.foot-links {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 0;
  color: #e7ddff;
  text-decoration: none;
  border-bottom: 1px solid rgba(191, 0, 255, 0.2);
  transition: color var(--ease), border-color var(--ease);
}

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

.foot-copy {
  grid-column: 1;
  grid-row: 3;
  align-self: center;
  font-size: 0.86rem;
  color: #948aad;
}

.foot-top {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  text-align: right;
}

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: rgba(191, 0, 255, 0.22);
  border: 1px solid var(--line);
  transition: background var(--ease);
}

.foot-top a:hover { background: var(--magenta); }

/* ---- 动效 ---- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---- 移动端 ---- */
@media (max-width: 900px) {
  .rail {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    z-index: 50;
    padding: 10px 14px 12px;
    gap: 2px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #1c1726;
  }

  .brand { padding: 2px 0 8px; border-bottom-width: 2px; }

  .brand-name { font-size: 1.18rem; }

  .menu ol {
    margin: 8px -14px 0;
    padding: 0 14px 8px;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .menu a {
    white-space: nowrap;
    padding: 10px 15px;
    background: rgba(101, 20, 255, 0.2);
  }

  .menu a:hover { transform: none; }

  .find { margin-top: 4px; }

  main { margin-left: 0; }

  .hero {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 56px 20px 84px;
  }

  .hero-copy { grid-column: 1; grid-row: 1; }

  .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }

  .hero-lede { font-size: 1rem; }

  .hero-art {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    max-width: 200px;
  }

  .deck {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 44px 20px 60px;
  }

  .toc { position: static; }

  .toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .story > div { scroll-margin-top: 132px; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 44px 20px 34px;
  }

  .foot-brand,
  .foot-desc,
  .foot-links,
  .foot-copy,
  .foot-top {
    grid-column: 1;
    grid-row: auto;
  }

  .foot-top { text-align: left; }
}

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

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

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

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