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

:root {
  --ink: #0d0d0d;
  --ink2: #141019;
  --purple: #8000ff;
  --magenta: #ff00ff;
  --paper: #ece7f5;
  --dim: #9c93ae;
  --line: rgba(128, 0, 255, 0.3);
  --max: 1180px;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(60% 42% at 50% 0, rgba(128, 0, 255, 0.2), rgba(13, 13, 13, 0) 70%),
    radial-gradient(45% 32% at 100% 62%, rgba(255, 0, 255, 0.12), rgba(13, 13, 13, 0) 72%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  opacity: 0.55;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px dashed var(--magenta);
  outline-offset: 3px;
}

/* 顶栏 */
.topline {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 22px;
  background: rgba(13, 13, 13, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  padding: 4px 2px;
  font-family: 'Libre Bodoni', Georgia, 'Songti SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 16px rgba(255, 0, 255, 0.5);
}

.brand img {
  flex: none;
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 255, 0.4);
}

.top-contact {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 0, 255, 0.55);
  border-radius: 999px;
  color: var(--magenta);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.top-contact:hover {
  background: rgba(255, 0, 255, 0.14);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.42);
}

/* 网格 */
.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 22px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 26px;
  align-items: start;
  min-width: 0;
}

.grid > main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
}

/* 侧栏目录 */
.hud {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 88px;
  align-self: start;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  border-bottom: 2px solid var(--magenta);
  background: rgba(20, 16, 25, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hud-label {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

.hud-title {
  margin: 0.1em 0 0.9em;
  font-family: 'Libre Bodoni', Georgia, 'Songti SC', serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  counter-reset: m;
  display: grid;
  gap: 5px;
}

.menu li {
  min-width: 0;
}

.menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.45;
  overflow-wrap: break-word;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu li a::before {
  flex: none;
  counter-increment: m;
  content: counter(m, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--magenta);
  opacity: 0.85;
}

.menu li a:hover,
.menu li a.on {
  background: rgba(255, 0, 255, 0.12);
  border-color: rgba(255, 0, 255, 0.55);
  transform: translateX(3px);
}

.contact-link {
  display: block;
  margin-top: 14px;
  padding: 13px 12px;
  border: 1px solid rgba(128, 0, 255, 0.6);
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  background: linear-gradient(90deg, rgba(128, 0, 255, 0.28), rgba(255, 0, 255, 0.22));
}

.contact-link:hover {
  box-shadow: 0 0 22px rgba(128, 0, 255, 0.55);
}

/* 首屏 */
div > article.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 0 28px;
  padding: 120px 22px 150px;
  overflow: hidden;
  text-align: center;
  background: #0a0a0c;
  border: 0;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 93%, 50% 100%, 0 93%);
  scroll-margin-top: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.55) brightness(0.5) contrast(1.15) hue-rotate(215deg) saturate(1.3);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.55), rgba(13, 13, 13, 0.78) 62%, rgba(128, 0, 255, 0.35)),
    repeating-linear-gradient(90deg, rgba(255, 0, 255, 0.06) 0 1px, rgba(0, 0, 0, 0) 1px 42px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 24ch;
  margin: 0 auto;
}

.hero h1 {
  position: relative;
  margin: 0;
  font-family: 'Libre Bodoni', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 7vw, 4.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  overflow-wrap: break-word;
  text-shadow: 0 0 26px rgba(255, 0, 255, 0.55), 0 0 64px rgba(128, 0, 255, 0.55);
}

.hero h1::before,
.hero h1::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
}

.hero h1::before {
  color: var(--magenta);
  clip-path: inset(0 0 54% 0);
  transform: translate(-2px, -2px);
  animation: glitchTop 7s steps(1) infinite;
  opacity: 0.85;
}

.hero h1::after {
  color: var(--purple);
  clip-path: inset(56% 0 0 0);
  transform: translate(2px, 2px);
  animation: glitchBottom 5.5s steps(1) infinite;
  opacity: 0.85;
}

.hero-lead {
  max-width: 34ch;
  margin: 20px auto 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #cec6db;
  overflow-wrap: break-word;
}

@keyframes glitchTop {
  0%, 92%, 100% { transform: translate(-2px, -2px); }
  93% { transform: translate(-6px, -3px) skewX(-6deg); }
  95% { transform: translate(3px, -1px); }
  97% { transform: translate(-4px, -4px) skewX(4deg); }
}

@keyframes glitchBottom {
  0%, 88%, 100% { transform: translate(2px, 2px); }
  89% { transform: translate(6px, 3px) skewX(5deg); }
  91% { transform: translate(-3px, 1px); }
  94% { transform: translate(4px, 4px) skewX(-4deg); }
}

/* 正文分段 */
div {
  min-width: 0;
  max-width: 100%;
}

div > article {
  position: relative;
  margin: 0 0 24px;
  padding: 40px 28px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 28px;
  border-bottom: 2px solid var(--magenta);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.1), rgba(13, 13, 13, 0.72));
  scroll-margin-top: 104px;
}

div > article::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 0, 255, 0.55), rgba(128, 0, 255, 0));
}

div h2 {
  margin: 0.15em 0 0.6em;
  font-family: 'Libre Bodoni', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.28;
  color: #fff;
  overflow-wrap: break-word;
  text-shadow: 0 0 22px rgba(128, 0, 255, 0.5);
}

div h3 {
  margin: 1.4em 0 0.5em;
  font-size: 1.1rem;
  line-height: 1.45;
  color: #fff;
  overflow-wrap: break-word;
}

div small {
  display: block;
  margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.55);
}

div p {
  max-width: 66ch;
  margin: 0 0 1.05em;
  color: #dcd6e8;
  overflow-wrap: break-word;
  word-break: break-word;
}

div p:last-child {
  margin-bottom: 0;
}

div ul,
div ol {
  max-width: 66ch;
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

div li {
  margin-bottom: 0.45em;
  color: #dcd6e8;
  overflow-wrap: break-word;
  word-break: break-word;
}

div li::marker {
  color: var(--magenta);
}

div strong {
  color: #fff;
}

div a {
  color: #ecb9ff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 255, 0.5);
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

div a:hover {
  color: var(--magenta);
}

div table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

div th,
div td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: break-word;
}

div pre {
  max-width: 100%;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
}

/* 页脚 */
.foot {
  margin-top: 42px;
  padding: 48px 22px 38px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.08), rgba(13, 13, 13, 0));
  display: grid;
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}

.foot-brand {
  margin: 0;
  font-family: 'Libre Bodoni', Georgia, 'Songti SC', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 11vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: transparent;
  overflow-wrap: break-word;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.7);
  text-shadow: 0 0 34px rgba(128, 0, 255, 0.35);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px dashed rgba(156, 147, 174, 0.28);
}

.foot address {
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  overflow-wrap: break-word;
}

.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--paper);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.foot-links a:hover {
  color: var(--magenta);
  border-color: rgba(255, 0, 255, 0.5);
}

.foot-copy {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--dim);
  overflow-wrap: break-word;
}

/* 滚动显影 */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero h1::before,
  .hero h1::after {
    animation: none;
  }
  .menu li a,
  .top-contact,
  .foot-links a {
    transition: none;
  }
}

@media (max-width: 880px) {
  .grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 16px 14px 4px;
    width: 100%;
  }

  .grid > main {
    width: 100%;
    min-width: 0;
  }

  .hud {
    order: -1;
    grid-column: auto;
    grid-row: auto;
    position: static;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
  }

  .hud-title {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .menu {
    display: flex;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .menu li {
    flex: 0 0 auto;
    min-width: 0;
  }

  .menu li a {
    padding: 12px 14px;
    white-space: nowrap;
    border: 1px solid rgba(128, 0, 255, 0.4);
    border-radius: 999px;
  }

  .menu li a:hover,
  .menu li a.on {
    transform: none;
  }

  .contact-link {
    margin-top: 4px;
  }

  .topline {
    padding: 10px 14px;
    gap: 10px;
  }

  .brand {
    font-size: 1.02rem;
  }

  .top-contact {
    padding: 10px 14px;
    letter-spacing: 0.1em;
  }

  div > article {
    padding: 28px 18px;
    border-radius: 20px;
    scroll-margin-top: 84px;
  }

  div > article.hero {
    padding: 100px 18px 128px;
    border-radius: 0;
    border-bottom: 0;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 50% 100%, 0 95%);
    scroll-margin-top: 0;
  }

  div > article::after {
    left: 18px;
    right: 18px;
  }

  .foot {
    padding: 40px 16px 32px;
  }

  .foot-brand {
    font-size: clamp(2rem, 13vw, 4rem);
  }
}

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