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

:root {
  --void: #08080f;
  --ink: #1a1a2e;
  --red: #ff0000;
  --mag: #ff006e;
  --paper: #eceaf6;
  --dim: rgba(236, 234, 246, 0.68);
  --line: rgba(255, 0, 110, 0.32);
  --glass: rgba(26, 26, 46, 0.62);
  --font: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--paper);
  background-color: var(--void);
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.055) 1px, transparent 1px),
    radial-gradient(62% 46% at 14% 0%, rgba(255, 0, 110, 0.2), transparent 70%),
    radial-gradient(55% 40% at 88% 5%, rgba(255, 0, 0, 0.15), transparent 72%);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%;
  background-attachment: fixed, fixed, scroll, scroll;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  opacity: 0.6;
}

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

h1, h2, h3 { margin: 0; line-height: 1.22; letter-spacing: 0.01em; }

hr {
  border: 0;
  height: 1px;
  margin: 12px 0 20px;
  background: linear-gradient(90deg, var(--mag), rgba(255, 0, 110, 0));
}

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

/* ---------- 顶部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(8, 8, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.ticker {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 0, 110, 0.22);
  background: linear-gradient(90deg, rgba(255, 0, 110, 0.16), rgba(255, 0, 0, 0.06));
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 30px;
  padding: 7px 0 7px 18px;
  white-space: nowrap;
  font-size: 16px;
  color: rgba(236, 234, 246, 0.72);
  animation: crawl 30s linear infinite;
}

.ticker-track span::before {
  content: "\25c6";
  margin-right: 9px;
  font-size: 10px;
  color: var(--mag);
}

@keyframes crawl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px 0 0;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand .mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  border: 1px solid var(--mag);
  border-radius: 4px;
  background: rgba(255, 0, 110, 0.16);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.brand .mark svg { width: 18px; height: 18px; }

.brandname {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 0, 110, 0.75);
  white-space: nowrap;
}

.site-head nav { margin-left: auto; min-width: 0; }

.site-head nav p {
  display: flex;
  gap: 8px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-head nav p::-webkit-scrollbar { display: none; }

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--paper);
  background: rgba(255, 0, 110, 0.09);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}

.site-head nav a:hover,
.site-head nav a:focus-visible {
  color: #fff;
  background: rgba(255, 0, 110, 0.26);
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.6);
}

/* ---------- 主区 ---------- */
main { display: block; }

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: max(480px, calc(100svh - 130px));
  padding: clamp(46px, 9vh, 96px) 20px clamp(52px, 9vh, 100px);
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(255, 0, 110, 0.1));
  pointer-events: none;
}

.shard {
  position: absolute;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 0, 110, 0.28), rgba(26, 26, 46, 0.95));
  box-shadow: 0 0 36px rgba(255, 0, 110, 0.32);
  transform: rotate(var(--rot, 0deg)) translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

.shard img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.06); }

.shard-a {
  --rot: -4deg;
  width: clamp(140px, 24vw, 280px);
  aspect-ratio: 3 / 4;
  left: clamp(-34px, 3vw, 70px);
  top: 13%;
}

.shard-b {
  --rot: 3.5deg;
  width: clamp(120px, 19vw, 226px);
  aspect-ratio: 4 / 3;
  right: clamp(-28px, 3vw, 76px);
  bottom: 11%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 760px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(255, 0, 110, 0.14);
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.32);
}

.hero h1 {
  position: relative;
  font-size: clamp(2.1rem, 7.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 110, 0.6), 0 0 64px rgba(255, 0, 0, 0.36);
}

.hero h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--mag);
  opacity: 0.5;
  clip-path: inset(0 0 54% 0);
  pointer-events: none;
  animation: glitch 5s steps(2, end) infinite;
}

@keyframes glitch {
  0%, 70%, 100% { transform: translate(0, 0); opacity: 0.45; }
  73% { transform: translate(-3px, -2px); opacity: 0.85; }
  78% { transform: translate(3px, 1px); opacity: 0.5; }
  85% { transform: translate(-2px, 2px); opacity: 0.7; }
}

.lede {
  margin: 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.72;
  color: var(--dim);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(100deg, var(--red), var(--mag));
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.55), 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(255, 0, 110, 0.85); }

/* ---------- 正文 + 侧栏 ---------- */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 92px) 20px 0;
}

.prose { min-width: 0; }

.prose > div {
  scroll-margin-top: 170px;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 0, 110, 0.2);
}

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

.prose h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.5);
}

.prose h2 + hr,
.prose h3 + hr {
  margin: 10px 0 20px;
  background: linear-gradient(90deg, var(--mag), rgba(255, 0, 110, 0.05));
}

.prose h3 {
  margin-top: 26px;
  font-size: 1.18rem;
  color: #fff;
}

.prose p { margin: 0 0 16px; color: rgba(236, 234, 246, 0.84); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.35em; }
.prose li { margin: 6px 0; color: rgba(236, 234, 246, 0.84); }

.prose a {
  color: #ff7ba8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 110, 0.55);
  padding-bottom: 1px;
}

.prose a:hover { color: #fff; box-shadow: 0 1px 0 var(--mag); }

.prose figure {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(26, 26, 46, 0.6);
}

.prose blockquote {
  margin: 20px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--mag);
  color: var(--dim);
}

.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 16px; }
.prose th, .prose td { border: 1px solid rgba(255, 0, 110, 0.22); padding: 9px 11px; text-align: left; }
.prose th { background: rgba(255, 0, 110, 0.12); color: #fff; }

.rail {
  position: sticky;
  top: 150px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(9px);
  box-shadow: inset 0 0 24px rgba(255, 0, 110, 0.14), 0 10px 34px rgba(0, 0, 0, 0.4);
}

.rail h2 { font-size: 18px; letter-spacing: 0.06em; color: #fff; }

.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 16px;
  text-decoration: none;
  color: var(--dim);
  transition: background 0.2s, color 0.2s;
}

.rail a:hover,
.rail a:focus-visible {
  color: #fff;
  background: rgba(255, 0, 110, 0.18);
  text-shadow: 0 0 14px var(--mag);
}

/* ---------- 页脚 ---------- */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  max-width: 1180px;
  margin: clamp(48px, 7vw, 96px) auto 0;
  padding: 20px 20px 36px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

footer address {
  font-style: normal;
  color: var(--dim);
  letter-spacing: 0.03em;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

footer a:hover { color: #fff; border-bottom-color: var(--mag); }

/* ---------- 动效 ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .shard { opacity: 0.42; }
  .shard-a { left: -46px; top: 8%; }
  .shard-b { right: -40px; bottom: 7%; }
}

@media (max-width: 760px) {
  .masthead { flex-wrap: wrap; padding: 8px 14px 10px; }
  .site-head nav { margin-left: 0; width: 100%; }
  .prose > div { scroll-margin-top: 190px; }
  .hero { min-height: max(460px, calc(100svh - 170px)); }
  .hero h1 { font-size: clamp(1.95rem, 9.4vw, 2.8rem); }
  .shard { opacity: 0.34; }
  footer { flex-direction: column; align-items: flex-start; padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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