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

:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --bg: #130c0f;
  --fg: #f6eef8;
  --dim: #c8b8cc;
  --line: rgba(255, 255, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --radius: 10px;
  --mono: 'Space Mono', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  background-color: var(--bg);
  background-image:
    radial-gradient(48vw 48vw at 4% -8%, rgba(255, 0, 0, 0.42), transparent 68%),
    radial-gradient(52vw 52vw at 102% 28%, rgba(139, 0, 255, 0.4), transparent 70%),
    radial-gradient(60vw 40vw at 46% 108%, rgba(255, 0, 0, 0.18), transparent 72%),
    linear-gradient(180deg, #150d11 0%, #130c0f 46%, #1a1016 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

a {
  color: #ffc0c0;
}

p {
  margin: 0 0 1em;
}

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

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

/* 顶栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 10px clamp(14px, 4vw, 44px);
  background: rgba(19, 12, 15, 0.56);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-right: 6px;
  color: var(--fg);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-txt {
  background: linear-gradient(92deg, #ffffff, #ffb8b8 60%, #c7a2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

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

.topnav a:hover,
.topnav a:focus-visible {
  color: #fff;
  background: var(--glass-2);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-height: 70vh;
  padding: clamp(20px, 5vw, 60px);
  padding-bottom: clamp(48px, 9vw, 110px);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--red), var(--violet)) 1;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(118deg, rgba(255, 0, 0, 0.42), rgba(139, 0, 255, 0.36) 58%, rgba(38, 23, 23, 0.94));
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(80% 70% at 88% 12%, rgba(255, 255, 255, 0.16), transparent 62%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  margin: 0;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  mix-blend-mode: luminosity;
  transform: scale(1.08);
  will-change: transform;
}

.hero-copy {
  position: relative;
  max-width: 760px;
  margin-left: auto;
  padding: clamp(18px, 3.4vw, 34px);
  text-align: right;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.hero h1 {
  margin: 0 0 0.4em;
  font-size: clamp(27px, 5.4vw, 54px);
  letter-spacing: 0.02em;
  word-break: break-word;
  text-shadow: 0 0 26px rgba(255, 0, 0, 0.35);
}

.lede {
  margin: 0;
  color: #f0e2f4;
  font-size: 16px;
  line-height: 1.75;
}

/* 主内容区 */
main {
  position: relative;
}

main div[id] {
  scroll-margin-top: 118px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(22px, 4vw, 52px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 72px) clamp(14px, 4vw, 44px);
}

.kicker {
  display: block;
  margin: 0 0 6px;
  color: #ff9d9d;
  font-size: 16px;
  letter-spacing: 0.3em;
  line-height: 1.4;
}

small + h2 {
  margin-top: 0;
}

.prose {
  min-width: 0;
}

.prose-h {
  font-size: clamp(20px, 2.6vw, 24px);
  color: #ffe4e4;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.prose div {
  margin: 0 0 clamp(16px, 2.6vw, 26px);
  padding: clamp(18px, 3vw, 30px);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 26px 60px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(15px) saturate(130%);
  backdrop-filter: blur(15px) saturate(130%);
}

.prose div:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.055);
}

.prose div > small {
  margin-bottom: 4px;
}

.prose h2 {
  font-size: clamp(21px, 3.1vw, 28px);
  color: #fff;
}

.prose h3 {
  font-size: 19px;
  color: #ffd9d9;
  margin-top: 1.3em;
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.45em;
}

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

.prose img {
  border-radius: 8px;
  margin: 1em 0;
  border: 1px solid var(--line);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--violet);
  background: rgba(139, 0, 255, 0.12);
  border-radius: 0 8px 8px 0;
  color: #ecdff2;
}

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

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: rgba(255, 255, 255, 0.1);
}

.prose code {
  font-family: var(--mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 15px;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 108px;
  align-self: start;
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.rail-h {
  font-size: 18px;
  margin-bottom: 0.7em;
  color: #fff;
}

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

.rail-list li {
  counter-increment: rail;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rail-list li:first-child {
  border-top: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
}

/* 尾部大块 */
.cta {
  max-width: 1180px;
  margin: 0 auto clamp(30px, 5vw, 60px);
  padding: clamp(24px, 4.6vw, 52px) clamp(18px, 4vw, 48px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background:
    linear-gradient(120deg, rgba(255, 0, 0, 0.3), rgba(139, 0, 255, 0.32)),
    rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  box-shadow: 0 40px 80px -50px rgba(255, 0, 0, 0.6);
}

.cta h2 {
  font-size: clamp(22px, 3.6vw, 34px);
  margin-bottom: 0.6em;
}

.cta-btn,
.foot-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover,
.foot-btn:hover,
.cta-btn:focus-visible,
.foot-btn:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 页脚 */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 30px;
  padding: clamp(26px, 5vw, 52px) clamp(14px, 4vw, 44px) 26px;
  border-top: 1px solid var(--line);
  background: rgba(19, 11, 15, 0.66);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.foot-cta {
  flex: 1 0 100%;
  padding: clamp(20px, 3.4vw, 34px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(255, 0, 0, 0.24), rgba(139, 0, 255, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.foot-cta h2 {
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 0.7em;
}

.foot-brand {
  flex: 0 1 300px;
  min-width: 0;
}

.foot-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.foot-desc {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
}

.foot-nav {
  flex: 1 1 320px;
  min-width: 0;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
}

.foot-nav dt {
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.foot-copy {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  color: #9d8ea2;
  font-size: 15px;
}

/* 动效 */
.motion .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.motion .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .motion .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-art img {
    transform: none;
  }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
    order: 2;
  }
  .rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    background-attachment: scroll;
  }
  .hero {
    min-height: 62vh;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 95%);
  }
  .hero-copy {
    max-width: none;
    margin: 0;
    text-align: left;
  }
  .topnav a {
    padding: 0 8px;
  }
  footer {
    gap: 16px;
  }
  .foot-brand,
  .foot-nav {
    flex: 1 0 100%;
  }
  .foot-copy {
    margin-left: 0;
    align-self: flex-start;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 16px;
  }
  .prose div {
    padding: 16px;
  }
}

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