:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --ink-deep: #120d1b;
  --text: #f5f0ff;
  --text-soft: #d0c5ea;
  --muted: #a294c4;
  --line: rgba(245, 240, 255, 0.15);
  --line-hard: rgba(245, 240, 255, 0.3);
  --tray-h: 76px;
  --serif: "Playfair Display SC", "Songti SC", "Times New Roman", Georgia, serif;
  --sans: Karla, "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-bottom: calc(var(--tray-h) + 48px);
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(101, 20, 255, 0.16) 0 2px, transparent 2px 38px),
    repeating-linear-gradient(135deg, rgba(191, 0, 255, 0.11) 0 2px, transparent 2px 52px);
  animation: drift 26s linear infinite;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(52px, 52px, 0);
  }
}

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

a {
  color: inherit;
}

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

/* 首屏 */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 70vh;
  padding: 112px clamp(18px, 5vw, 56px) clamp(44px, 7vw, 78px);
  border-bottom: 2px solid var(--line-hard);
  overflow: hidden;
  isolation: isolate;
}

.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -1;
  background: linear-gradient(115deg, var(--ink-deep) 0%, var(--violet) 62%, var(--magenta) 100%);
}

.hero-fig--void {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 3px, transparent 3px 42px),
    linear-gradient(115deg, var(--ink-deep) 0%, var(--violet) 65%, var(--magenta) 100%);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.06);
}

.hero-fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(18, 13, 27, 0.94) 6%, rgba(101, 20, 255, 0.62) 52%, rgba(191, 0, 255, 0.36) 100%);
}

.hero-copy {
  position: relative;
  max-width: 900px;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6.4vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.hero-title::after {
  content: "";
  display: block;
  width: clamp(72px, 22vw, 190px);
  height: 10px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

/* 主栅格 */

.cols {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) clamp(16px, 4vw, 32px) clamp(56px, 8vw, 104px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 24px;
  border: 2px solid var(--line-hard);
  border-bottom-color: var(--magenta);
  padding: 18px 14px 22px;
  background: rgba(18, 13, 27, 0.72);
}

.rail-head {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--text);
}

.rail-head > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--violet);
}

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

.rail-list li + li {
  border-top: 1px solid var(--line);
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 0.96rem;
  text-decoration: none;
  color: var(--text-soft);
  border-left: 4px solid transparent;
  padding-left: 10px;
  transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  border-left-color: var(--magenta);
  background: rgba(101, 20, 255, 0.2);
}

/* 正文 */

.prose {
  min-width: 0;
  max-width: 760px;
}

.prose article {
  padding: clamp(38px, 5vw, 64px) 0;
  border-top: 2px solid var(--line);
  scroll-margin-top: 28px;
}

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

.prose h2 {
  margin: 0 0 0.7em;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 4.3vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: 0.015em;
  text-wrap: balance;
}

.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  padding-bottom: 0.14em;
  border-bottom: 7px solid var(--magenta);
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 3vw, 1.6rem);
  line-height: 1.3;
}

.prose h4 {
  margin: 1.4em 0 0.4em;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.prose p {
  margin: 0 0 1.15em;
  color: var(--text-soft);
  font-size: 1.06rem;
}

.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -0.45em 0 rgba(191, 0, 255, 0.42);
}

.prose a {
  color: #e7d8ff;
  text-decoration: underline;
  text-decoration-color: var(--magenta);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #fff;
  background: rgba(101, 20, 255, 0.28);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  color: var(--text-soft);
}

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

.prose ul li::marker {
  color: var(--magenta);
  font-size: 1.1em;
}

.prose ol li::marker {
  color: var(--violet);
  font-weight: 700;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 8px solid var(--violet);
  background: rgba(101, 20, 255, 0.14);
  color: var(--text);
}

.prose blockquote p {
  color: var(--text);
}

.prose figure {
  margin: 1.6em 0;
}

.prose figure img {
  border: 2px solid var(--line-hard);
}

.prose img {
  border-radius: 0;
}

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

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

.prose th {
  background: rgba(191, 0, 255, 0.2);
  color: #fff;
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 2px dashed var(--line-hard);
}

/* 页脚 */

.foot {
  border-top: 2px solid var(--line-hard);
  background: linear-gradient(180deg, rgba(101, 20, 255, 0.16), rgba(18, 13, 27, 0.72));
  padding: clamp(48px, 7vw, 76px) clamp(16px, 4vw, 40px) 32px;
}

.foot-brand {
  margin: 0 0 clamp(30px, 5vw, 54px);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 9vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0.015em;
  word-break: break-word;
}

.foot-brand > span {
  background: linear-gradient(92deg, var(--violet) 8%, var(--magenta) 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px);
  max-width: 1140px;
  margin: 0 auto;
  padding-bottom: 34px;
}

.foot-addr {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  border-top: 6px solid var(--magenta);
  padding-top: 12px;
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 6px solid var(--violet);
  padding-top: 12px;
}

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 0.96rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.22s ease, transform 0.22s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
  transform: translateX(4px);
}

.foot-copy {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.94rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* 底部固定条 */

.tray {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 20px;
  padding: 10px clamp(12px, 3vw, 30px);
  background: rgba(18, 13, 27, 0.95);
  border-top: 2px solid var(--line-hard);
  backdrop-filter: blur(10px);
}

.tray-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--violet);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.22s ease, background-color 0.22s ease;
}

.tray-mark:hover,
.tray-mark:focus-visible {
  border-color: var(--magenta);
  background: rgba(191, 0, 255, 0.22);
}

.tray-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mark-glyph {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text);
}

.tray-nav {
  min-width: 0;
}

.tray-nav ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tray-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 11px;
  font-size: 0.94rem;
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tray-nav a:hover,
.tray-nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--magenta);
  background: rgba(101, 20, 255, 0.26);
}

.tray-nav a[aria-current="true"] {
  color: #fff;
  border-bottom-color: var(--violet);
}

.tray-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(92deg, var(--violet), var(--magenta));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.tray-cta:hover,
.tray-cta:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

/* 动效 */

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

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

/* 窄屏 */

@media (max-width: 900px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .rail {
    position: static;
  }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .rail-list li + li {
    border-top: 0;
  }

  .rail-list a {
    border: 1px solid var(--line-hard);
    border-left-width: 4px;
    padding: 6px 12px;
    background: rgba(18, 13, 27, 0.6);
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --tray-h: 118px;
  }

  .tray {
    grid-template-areas:
      "mark cta cta"
      "nav nav nav";
    grid-template-columns: auto 1fr auto;
    row-gap: 4px;
  }

  .tray-mark {
    grid-area: mark;
  }

  .tray-cta {
    grid-area: cta;
    justify-self: end;
  }

  .tray-nav {
    grid-area: nav;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .tray-nav ol {
    flex-wrap: nowrap;
    justify-content: flex-start;
    scroll-snap-type: x proximity;
  }

  .tray-nav li {
    scroll-snap-align: start;
  }

  .tray-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16.5px;
  }

  .hero {
    padding-top: 96px;
    min-height: 66vh;
  }

  .foot-grid {
    gap: 20px;
  }

  .prose p {
    font-size: 1.03rem;
  }
}

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

  body::before {
    animation: none;
  }

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

  .tray-cta:hover,
  .foot-links a:hover {
    transform: none;
  }
}

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