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

:root {
  --red: #ff0000;
  --vio: #8b00ff;
  --ink: #261717;
  --fg: #f7eef1;
  --dim: #cdb7c0;
  --glass: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.18);
  --r: 18px;
  --wide: "Syncopate", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, "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;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -12% -12% auto -12%;
  height: 132%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46vw 42vw at 86% 4%, rgba(255, 0, 0, 0.42), transparent 70%),
    radial-gradient(54vw 50vw at 0% 32%, rgba(139, 0, 255, 0.40), transparent 72%),
    radial-gradient(52vw 42vw at 48% 104%, rgba(255, 0, 0, 0.16), transparent 70%),
    linear-gradient(165deg, #1b0e12, #261717 52%, #140b0e);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 128px);
}

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

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

/* ── 左侧竖栏 ── */
.rail {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(38, 23, 23, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 2px;
  text-decoration: none;
  color: #fff;
  font-family: var(--wide);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.brand__mark { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.brand__txt { line-height: 1.2; }

.rail__nav { flex: 1 1 100%; order: 3; }
.rail__t { display: none; }

.rail__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 15px;
  text-decoration: none;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease, background 0.2s ease;
}

.rail__list a:hover,
.rail__list a:focus-visible,
.rail__list a.on { color: #fff; background: rgba(255, 255, 255, 0.15); }

.rail__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  text-decoration: none;
  color: #fff;
  font-family: var(--wide);
  font-size: 14px;
  letter-spacing: 0.1em;
  background: linear-gradient(100deg, var(--red), var(--vio));
  box-shadow: 0 10px 26px rgba(255, 0, 0, 0.26);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.rail__cta:hover { transform: translateY(-2px); filter: brightness(1.12); }

/* ── 主体 ── */
.shell { display: block; }

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 0 16px 40px;
}

/* ── 首屏 ── */
.hero {
  position: relative;
  grid-column: 1 / -1;
  margin: 0 -16px;
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px 18px 34px;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(255, 0, 0, 0.5), transparent 62%),
    linear-gradient(200deg, rgba(139, 0, 255, 0.5), rgba(20, 11, 14, 0.34) 42%, rgba(20, 11, 14, 0.94) 90%);
}

.hero__band {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: 34px;
  height: 42px;
  z-index: -1;
  transform: skewY(-7deg);
  opacity: 0.85;
  background: linear-gradient(90deg, var(--red), var(--vio) 72%, transparent);
}

.hero__inner { position: relative; text-align: right; }

.hero__h1 {
  margin: 0;
  font-family: var(--wide);
  font-weight: 700;
  font-size: clamp(27px, 8vw, 54px);
  line-height: 1.18;
  letter-spacing: 0.04em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.hero__cue {
  display: inline-block;
  margin-top: 12px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
  animation: bob 1.9s ease-in-out infinite;
}

@keyframes bob { 50% { transform: translateY(7px); } }

/* ── 正文 ── */
.doc { min-width: 0; }

.doc > article {
  position: relative;
  margin: 0 0 18px;
  padding: 24px 18px;
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  scroll-margin-top: 18px;
  transition: background 0.35s ease, transform 0.35s ease;
}

.doc > article:hover { background: rgba(255, 255, 255, 0.1); }

.doc h2 {
  margin: 0 0 14px;
  font-family: var(--wide);
  font-weight: 700;
  font-size: clamp(20px, 5.2vw, 28px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fff;
}

.doc h2 span { position: relative; }

.doc h2 span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 0.72em;
  margin-right: 10px;
  vertical-align: -0.06em;
  border-radius: 3px;
  transform: skewX(-14deg);
  background: linear-gradient(180deg, var(--red), var(--vio));
}

.doc h3 {
  margin: 24px 0 10px;
  font-family: var(--wide);
  font-size: 19px;
  line-height: 1.35;
  color: #ffe9ee;
}

.doc p { margin: 0 0 14px; color: #e9dee3; }
.doc strong { color: #fff; }
.doc a { color: #ffb3c0; text-underline-offset: 3px; text-decoration-color: rgba(255, 0, 0, 0.5); }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 1.25em; }
.doc li { margin: 0.35em 0; }

.doc blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 0, 0, 0.09);
}

.doc img { margin: 6px 0 14px; border-radius: 14px; }
.doc figure { margin: 0 0 16px; }
.doc code { font-size: 15px; background: rgba(0, 0, 0, 0.35); padding: 1px 6px; border-radius: 6px; }

/* ── 右侧栏 ── */
.side {
  align-self: start;
  padding: 18px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.side__t {
  margin: 0 0 12px;
  font-family: var(--wide);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: #fff;
}

.side__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 12px;
  padding: 0;
}

.side__list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px;
  font-size: 15px;
  text-decoration: none;
  color: var(--dim);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.side__list a:hover { color: #fff; padding-left: 8px; }

.side__top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.side__top:hover { background: rgba(255, 255, 255, 0.22); }

/* ── 页脚 ── */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding: 20px 16px 30px;
  background: rgba(38, 23, 23, 0.5);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.foot__cta { flex: 1 1 100%; margin: 0; }

.foot__cta a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  font-family: var(--wide);
  font-size: 16px;
  letter-spacing: 0.14em;
  background: linear-gradient(100deg, rgba(255, 0, 0, 0.88), rgba(139, 0, 255, 0.88));
  box-shadow: 0 14px 34px rgba(139, 0, 255, 0.24);
  transition: filter 0.2s ease;
}

.foot__cta a:hover { filter: brightness(1.14); }

.foot__meta { color: var(--dim); font-size: 14px; }
.foot__meta a { color: var(--dim); text-decoration: none; }
.foot__meta a:hover { color: #fff; }

/* ── 滚动显现 ── */
.js .doc > article,
.js .side,
.js .foot {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1), background 0.35s ease;
}

.js .doc > article.in,
.js .side.in,
.js .foot.in { opacity: 1; transform: none; }

.js .doc > article.in:hover { transform: translateY(-3px); }

.lead { padding: 26px 2px 6px; }
.lead__h1 {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.2;
  color: #fff;
}

/* ── 宽屏 ── */
@media (min-width: 900px) {
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 22px;
    padding: 30px 22px 26px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .rail__nav { order: 0; flex: 1 1 auto; }
  .rail__t { display: block; margin: 0 0 10px; font-family: var(--wide); font-size: 12px; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.5); }
  .rail__list { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .rail__list a { min-height: 44px; padding: 0 12px 0 14px; background: transparent; border-left: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0 11px 11px 0; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .rail__list a:hover, .rail__list a.on { transform: translateX(3px); border-left-color: var(--red); }
  .rail__cta { margin-top: auto; align-self: stretch; }

  .shell { margin-left: 264px; }

  main { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 30px; padding: 0 30px 60px; }

  .hero { margin: 0 -30px; min-height: 100vh; padding: 40px 34px 54px; border-radius: 0; }
  .hero__h1 { font-size: clamp(38px, 4.6vw, 66px); }

  .doc > article { padding: 34px 34px 28px; }
  .doc p { max-width: 66ch; }

  .side { position: sticky; top: 26px; }

  .foot { padding: 22px 30px 34px; }
  .foot__cta { flex: 0 0 auto; min-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .doc > article, .js .side, .js .foot { opacity: 1; transform: none; transition: none; }
  .hero__cue { animation: none; }
  .rail__cta:hover, .js .doc > article.in:hover { transform: none; }
}

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