@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

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

:root {
  --ink: #0d0d0d;
  --panel: #131017;
  --violet: #8000ff;
  --magenta: #ff00ff;
  --txt: #e9e3f1;
  --dim: #a495bb;
  --line: rgba(128, 0, 255, 0.38);
  --line2: rgba(255, 0, 255, 0.28);
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --serif: "EB Garamond", "Songti SC", "STSong", Georgia, serif;
  --sans: "Lato", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vw 58vw at 10% -12%, rgba(128, 0, 255, 0.24), transparent 70%),
    radial-gradient(48vw 48vw at 94% 6%, rgba(255, 0, 255, 0.15), transparent 70%);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--magenta);
  color: #0d0d0d;
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip:focus { top: 0; }

/* 顶栏 */
.hud {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(11, 10, 14, 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.hud::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--magenta), transparent);
  opacity: 0.85;
}

.hud-l,
.hud-r {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hud-l { justify-self: start; }
.hud-r { justify-self: end; }

.dock {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.18s, background 0.18s, text-shadow 0.18s;
}

.dock:hover {
  color: #fff;
  background: rgba(128, 0, 255, 0.2);
  text-shadow: 0 0 12px var(--magenta);
}

/* 抽屉菜单 */
.drawer { position: relative; }

.drawer summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 13px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--magenta);
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: rgba(255, 0, 255, 0.07);
  transition: background 0.18s, box-shadow 0.18s;
}

.drawer summary::-webkit-details-marker { display: none; }

.drawer summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--magenta);
  box-shadow: 0 0 9px var(--magenta);
}

.drawer summary:hover,
.drawer[open] summary {
  background: rgba(255, 0, 255, 0.22);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.38);
}

.drawer menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 25;
  margin: 0;
  padding: 6px;
  min-width: 196px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.72), 0 0 24px rgba(255, 0, 255, 0.18);
}

.drawer menu li a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 15px;
  color: var(--txt);
  text-decoration: none;
}

.drawer menu li a:hover {
  background: rgba(128, 0, 255, 0.32);
  color: #fff;
}

/* 品牌 */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  color: var(--txt);
  text-decoration: none;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--violet);
  box-shadow: 0 0 12px var(--violet);
}

.logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.logo-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.45);
}

/* 搜索 */
.scan {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #100d15;
}

.scan input {
  width: 112px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
}

.scan input::placeholder { color: var(--dim); }

.scan button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: rgba(128, 0, 255, 0.28);
  color: var(--magenta);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.scan button:hover {
  background: var(--magenta);
  color: #0d0d0d;
}

/* 主体 */
main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 246px;
  gap: 22px;
  align-items: start;
  margin: 22px 0 10px;
}

.hero {
  position: relative;
  margin: 0;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a0f2b, #0e0b14 55%, #24062c);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 54px));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.12) contrast(1.05);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(198deg, rgba(13, 13, 13, 0.12) 0%, rgba(13, 13, 13, 0.55) 46%, rgba(13, 13, 13, 0.95) 100%);
}

.hero--empty .hero-media {
  background:
    repeating-linear-gradient(90deg, rgba(128, 0, 255, 0.18) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(255, 0, 255, 0.13) 0 1px, transparent 1px 44px);
}

.hero-ghost {
  position: absolute;
  left: -0.03em;
  top: -0.12em;
  z-index: 1;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(110px, 24vw, 280px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 0, 255, 0.4);
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin: 0 0 0 auto;
  padding: 0 26px 62px;
  max-width: 94%;
  text-align: right;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.01em;
  font-size: clamp(27px, 4.6vw, 56px);
  text-shadow: 0 0 16px rgba(255, 0, 255, 0.55), 0 0 62px rgba(128, 0, 255, 0.72), 0 2px 8px #000;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.14), rgba(13, 13, 13, 0.2));
}

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

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 6px;
  border-bottom: 1px dashed rgba(128, 0, 255, 0.22);
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
}

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

.rail-list a:hover {
  color: #fff;
  background: rgba(255, 0, 255, 0.12);
}

.rail-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--magenta);
}

/* 正文区块 */
main > div[id] {
  position: relative;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 108px;
}

main h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.01em;
  font-size: clamp(22px, 2.8vw, 33px);
  color: #f6f0ff;
}

main h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--magenta);
  transform: translateY(-4px) skewX(-18deg);
  box-shadow: 0 0 12px var(--magenta);
}

main h2 + hr {
  border: 0;
  height: 1px;
  margin: 10px 0 22px;
  background: linear-gradient(90deg, var(--magenta), var(--violet) 42%, transparent);
}

main h3 {
  margin: 26px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  color: #f0e8ff;
}

main hr {
  border: 0;
  height: 1px;
  margin: 14px 0 20px;
  background: linear-gradient(90deg, var(--line2), transparent);
}

main p {
  margin: 0 0 14px;
  color: #dad3e7;
}

main a { color: var(--magenta); }

main ul,
main ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #dad3e7;
}

main li { margin: 0 0 8px; }
main li::marker { color: var(--violet); }

main blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 2px solid var(--magenta);
  background: rgba(128, 0, 255, 0.1);
  color: #efe9f7;
}

main strong { color: #fff; }

main img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 16px;
}

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

main th { background: rgba(128, 0, 255, 0.16); }

main figure { margin: 0 0 18px; }

/* 页脚 */
.base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--line);
  background: #0a090d;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

.base-mark a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--txt);
  font-family: var(--serif);
  font-size: 16px;
  text-decoration: none;
}

.base-nav {
  flex: 1 1 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  justify-content: center;
}

.base-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.18s, text-shadow 0.18s;
}

.base-nav a:hover {
  color: var(--magenta);
  text-shadow: 0 0 10px var(--magenta);
}

.base-copy { white-space: nowrap; }

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

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

.flash { animation: flash 0.9s ease 2; }

@keyframes flash {
  0%, 100% { background: transparent; }
  50% { background: rgba(255, 0, 255, 0.1); }
}

@media (max-width: 980px) {
  .intro { grid-template-columns: minmax(0, 1fr) 212px; }
  .dock { padding: 0 6px; }
  .scan input { width: 92px; }
}

@media (max-width: 860px) {
  .hud {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "menu brand"
      "links links";
    row-gap: 6px;
    padding: 6px 12px;
  }
  .hud-l { grid-area: menu; }
  .hud-c { grid-area: brand; justify-self: start; }
  .hud-r {
    grid-area: links;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .scan { margin-left: auto; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .hero { min-height: 56vh; }
  .logo-word { font-size: 17px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { min-height: 50vh; }
  .hero-copy { padding: 0 18px 54px; max-width: 100%; }
  .hero-ghost { font-size: clamp(90px, 30vw, 150px); }
  .dock { font-size: 12px; }
  .scan input { width: 86px; }
  .base { justify-content: flex-start; }
  .base-nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  *,
  *::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}
