:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --bg: #08080f;
  --panel: rgba(26, 26, 46, 0.72);
  --line: rgba(255, 0, 110, 0.28);
  --text: #ecedf7;
  --muted: #9d9dbd;
  --radius: 28px;
  --glow-pink: 0 0 18px rgba(255, 0, 110, 0.5);
  --glow-red: 0 0 18px rgba(255, 0, 0, 0.45);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(255, 0, 110, 0.16), transparent 62%),
    radial-gradient(900px 520px at 92% 4%, rgba(255, 0, 0, 0.12), transparent 60%),
    var(--bg);
}

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

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

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

hr {
  height: 1px;
  border: 0;
  margin: 1.1rem 0;
  background: linear-gradient(90deg, var(--red), var(--pink), transparent);
  box-shadow: 0 0 10px rgba(255, 0, 110, 0.4);
}

/* ---------- 顶部：品牌行 + 菜单行 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 8, 15, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
}

.mark {
  flex: none;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: var(--glow-pink);
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--pink);
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-decoration: none;
  background: rgba(255, 0, 110, 0.12);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.35);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--pink);
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.75);
  transform: translateY(-1px);
}

.menu {
  display: flex;
  gap: 0.1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.menu .link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.menu .link:hover,
.menu .link:focus-visible {
  color: #fff;
  border-bottom-color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.7);
}

.pip {
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 3rem 1.25rem 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.grid-plane {
  position: absolute;
  inset: -22% -10% -10%;
  opacity: 0.55;
  background-image: radial-gradient(rgba(255, 0, 110, 0.55) 1px, transparent 1.4px);
  background-size: 26px 26px;
  transform: translateY(var(--py, 0));
  will-change: transform;
  -webkit-mask-image: radial-gradient(70% 58% at 28% 42%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 58% at 28% 42%, #000 0%, transparent 78%);
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-tag {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--pink);
  text-shadow: var(--glow-pink);
}

.hero-title {
  position: relative;
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.35rem, 8.4vw, 5.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.28),
    0 0 44px rgba(255, 0, 110, 0.5),
    6px 6px 0 rgba(255, 0, 0, 0.26);
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-title::before {
  color: var(--pink);
  opacity: 0.72;
  clip-path: polygon(0 8%, 100% 8%, 100% 38%, 0 38%);
  transform: translate(-2px, -2px);
  animation: glitch-a 5s steps(2, end) infinite;
}

.hero-title::after {
  color: var(--red);
  opacity: 0.6;
  clip-path: polygon(0 62%, 100% 62%, 100% 93%, 0 93%);
  transform: translate(2px, 2px);
  animation: glitch-b 4.4s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%, 86%, 100% { transform: translate(-2px, -2px); }
  88% { transform: translate(-9px, 2px) skewX(-6deg); }
  93% { transform: translate(6px, -3px); }
}

@keyframes glitch-b {
  0%, 84%, 100% { transform: translate(2px, 2px); }
  87% { transform: translate(9px, -2px) skewX(5deg); }
  91% { transform: translate(-7px, 3px); }
}

/* ---------- 主区：左侧栏 + 正文 ---------- */
main {
  position: relative;
  z-index: 1;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 218px) minmax(0, 1fr);
  gap: 2.6rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
}

.rail {
  position: sticky;
  top: 8.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.rail-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--pink);
  text-shadow: var(--glow-pink);
}

.rail hr {
  margin: 0.9rem 0 0.5rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.6rem 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.09);
  transition: color 0.2s ease, transform 0.2s ease;
}

.rail-nav a:last-child {
  border-bottom: 0;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #fff;
  transform: translateX(4px);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

.stage {
  min-width: 0;
}

.prose {
  max-width: 74ch;
}

.prose > section {
  margin: 0 0 2rem;
  padding: 1.5rem 1.4rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(26, 26, 46, 0.78), rgba(12, 12, 22, 0.62));
  scroll-margin-top: 9.5rem;
}

.prose > section:last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 0.1rem 0 0;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.42);
}

.prose h2 + hr {
  margin: 0.8rem 0 1.15rem;
}

.prose h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.prose p {
  margin: 0 0 1.05rem;
  color: #dcdeee;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--pink);
}

.prose strong {
  color: #fff;
}

.prose a {
  color: var(--pink);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 2px solid var(--red);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 0, 0, 0.07);
}

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

.prose code {
  padding: 0.08em 0.36em;
  border-radius: 6px;
  font-size: 0.92em;
  background: rgba(255, 0, 110, 0.14);
}

.prose [id] {
  scroll-margin-top: 9.5rem;
}

/* ---------- 页脚：单行 ---------- */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--line);
}

.f-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.5);
}

.f-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9rem;
  margin: 0;
}

.f-nav dt,
.f-nav dd {
  margin: 0;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.15rem 0;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.f-nav a:hover,
.f-nav a:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

.f-copy {
  color: rgba(157, 157, 189, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

/* ---------- 滚动显现 ---------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 2.6rem 1.15rem 3.5rem;
  }

  .rail {
    position: static;
    border-radius: 22px;
  }

  .rail-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 0.9rem;
  }

  .hero {
    min-height: 88svh;
    padding-top: 2rem;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .f-nav dl {
    gap: 0 1.1rem;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: clamp(2.05rem, 10.5vw, 3rem);
  }

  .prose > section {
    padding: 1.25rem 1.05rem 1.4rem;
    border-radius: 22px;
  }
}

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

  .hero-title::before,
  .hero-title::after {
    animation: none;
  }

  .grid-plane {
    transform: none;
  }

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

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