:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --deep: #0e0e1e;
  --txt: #e9e9f5;
  --dim: #a3a3c8;
  --line: rgba(255, 0, 110, 0.26);
  --glow: 0 0 14px rgba(255, 0, 110, 0.55);
}

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

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

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  color: var(--txt);
  background-color: var(--deep);
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(255, 0, 110, 0.22), transparent 70%),
    radial-gradient(760px 520px at 100% 2%, rgba(255, 0, 0, 0.16), transparent 66%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

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

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

a {
  color: #ff8cb6;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* 顶部：品牌行 + 菜单行 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.96), rgba(14, 14, 30, 0.92));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brandbar {
  display: flex;
  align-items: center;
  padding: 10px clamp(16px, 4vw, 32px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 4px 6px 4px 0;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 17px;
}

.brand-tile,
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.brand-tile {
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.65);
}

.brand-mark {
  object-fit: contain;
}

.brand-name {
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.5);
}

.menubar {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
}

.menu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 26px);
}

.nav-list,
.sub,
.rail-list,
.foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
}

.nav-link,
.sub-link {
  display: flex;
  align-items: center;
  color: var(--dim);
  text-decoration: none;
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.nav-link {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
}

.sub-link {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link:focus-visible,
.sub-link:hover,
.sub-link:focus-visible {
  color: #fff;
  background: rgba(255, 0, 110, 0.16);
  box-shadow: inset 0 0 0 1px var(--line);
}

.has-sub > .nav-link::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
}

.sub {
  display: flex;
  flex-wrap: wrap;
  padding-left: 6px;
}

/* 首屏 */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 5vw, 48px);
  padding: clamp(28px, 6vw, 64px) 0 clamp(32px, 6vw, 64px);
}

.hero-text {
  max-width: 900px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.7rem, 10vw, 6.2rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.7), 0 0 64px rgba(255, 0, 0, 0.35);
}

.glitch {
  position: relative;
  display: inline-block;
}

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

.glitch::before {
  color: var(--pink);
  clip-path: inset(0 0 54% 0);
  animation: glitch-a 4.5s steps(2, end) infinite;
}

.glitch::after {
  color: #3ae8ff;
  clip-path: inset(56% 0 0 0);
  animation: glitch-b 5.6s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%, 90%, 100% { transform: translate(-2px, -2px); }
  92% { transform: translate(-7px, 1px); }
  95% { transform: translate(3px, -3px); }
  98% { transform: translate(-4px, 2px); }
}

@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(2px, 2px); }
  91% { transform: translate(6px, -1px); }
  94% { transform: translate(-3px, 3px); }
  97% { transform: translate(4px, -2px); }
}

.hero-visual {
  flex: 1 1 auto;
  min-height: 220px;
  display: grid;
  will-change: transform;
}

.hero-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 0 42px rgba(255, 0, 110, 0.28), 0 26px 60px rgba(0, 0, 0, 0.55);
  max-height: 46vh;
}

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

.hero-grid-art {
  border: 1px solid var(--line);
  border-radius: 4px;
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.22) 1px, transparent 1px);
  background-size: 44px 44px;
  box-shadow: inset 0 0 80px rgba(255, 0, 110, 0.2);
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.3));
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.3));
}

/* 正文舞台：内容 + 右侧栏 */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 48px;
}

.content {
  min-width: 0;
}

.content section {
  padding: clamp(24px, 4vw, 40px) 0;
  border-top: 1px dashed rgba(255, 0, 110, 0.3);
  scroll-margin-top: 140px;
}

.content section:first-child {
  border-top: 0;
  padding-top: 0;
}

.content h2 {
  margin: 0 0 0.6em;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.26;
  color: #fff;
  text-shadow: var(--glow);
  scroll-margin-top: 140px;
}

.content h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.13rem;
  line-height: 1.4;
  color: #ffd9e7;
}

.content h4 {
  margin: 1.2em 0 0.4em;
  font-size: 1rem;
  color: #ffd9e7;
}

.content p {
  margin: 0 0 1em;
  max-width: 74ch;
  color: #dcdcee;
}

.content ul,
.content ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: #dcdcee;
  max-width: 72ch;
}

.content li {
  margin: 0.32em 0;
}

.content figure,
.content blockquote,
.content pre {
  margin: 1.3em 0;
  border-radius: 4px;
}

.content figure,
.content blockquote {
  background: rgba(26, 26, 46, 0.72);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.content blockquote {
  border-left: 3px solid var(--pink);
}

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

.content figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--dim);
}

.content img {
  border-radius: 4px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3em 0;
  font-size: 0.96rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.content th,
.content td {
  border: 1px solid rgba(255, 0, 110, 0.24);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.content th {
  background: rgba(255, 0, 110, 0.13);
  color: #fff;
}

.content code,
.content pre {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.content pre {
  padding: 14px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
}

/* 右侧栏 */
.rail {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(20, 20, 40, 0.85);
  padding: 16px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.5);
}

.rail-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.55);
}

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

.rail-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 15px;
  color: var(--dim);
  text-decoration: none;
}

.rail-link:hover,
.rail-link:focus-visible {
  color: #fff;
  background: rgba(255, 0, 110, 0.16);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 20, 40, 0.92), rgba(9, 9, 20, 1));
  position: relative;
  z-index: 1;
}

.foot-cta {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 4vw, 34px);
  background: radial-gradient(120% 180% at 8% 0%, rgba(255, 0, 110, 0.2), transparent 62%);
  box-shadow: 0 0 44px rgba(255, 0, 110, 0.2), 0 24px 48px rgba(0, 0, 0, 0.45);
}

.cta-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.24;
  color: #fff;
  text-shadow: var(--glow);
}

.subtitle {
  margin: 0 0 18px;
  max-width: 70ch;
  color: var(--dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
}

.foot-col h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--pink);
}

.foot-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 15px;
  color: var(--dim);
  text-decoration: none;
}

.foot-link:hover,
.foot-link:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.7);
}

.foot-base {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 16px 0 26px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

.foot-base p {
  margin: 0;
}

@media (min-width: 700px) {
  .site-foot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 32px;
  }

  .foot-cta,
  .foot-base {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 6px;
    background: #141428;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  }

  .has-sub:hover .sub,
  .has-sub:focus-within .sub {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (min-width: 960px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) 268px;
  }

  .rail {
    position: sticky;
    top: 132px;
  }

  .rail-list {
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .nav-link {
    padding: 10px 9px;
    font-size: 14px;
  }

  .sub-link {
    padding: 8px 9px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }
}

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

  .glitch::before,
  .glitch::after {
    animation: none;
  }

  .btn {
    transition: none;
  }

  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}

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