/* ============================================================
   layout.css — 顶栏、左侧导轨、模块骨架、页脚
   刻意避开「居中大标题 + 三列卡片」：主标题左偏，正文走
   非对称双栏，章节编号固定在左导轨。
   ============================================================ */

/* ───── 顶栏 ───── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px var(--gut);
  background: linear-gradient(180deg, rgba(7, 9, 18, .94), rgba(7, 9, 18, .70) 70%, transparent);
  backdrop-filter: blur(9px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
}

.masthead__mark { display: flex; align-items: baseline; gap: 12px; min-width: 0; }

/* 印章：AI 生图徽章（透明底） */
.masthead__seal {
  width: 30px; height: 30px;
  flex: none;
  align-self: center;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(198, 161, 91, .35));
  animation: seal-spin 24s linear infinite;
}
@keyframes seal-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .masthead__seal { animation: none; }
}

.masthead__name {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .22em;
  color: var(--text);
}
.masthead__mark:has(.masthead__seal) .masthead__name { line-height: 30px; }

/* 顶部导航：罗马数字章节，横排 */
.topnav {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.topnav a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--text-3);
  border: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.topnav a i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold-lo);
  transition: color .3s var(--ease);
}
.topnav a:hover { color: var(--text); border-color: var(--line-soft); background: rgba(12, 17, 36, .5); }
.topnav a:hover i { color: var(--gold); }
.topnav a.is-active {
  color: var(--gold-hi);
  border-color: var(--line-gold);
  background: linear-gradient(180deg, rgba(198, 161, 91, .10), rgba(198, 161, 91, .02));
}
.topnav a.is-active i { color: var(--gold); }

/* 后端状态点 */
.masthead__dot {
  width: 9px; height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--text-4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
}
.masthead__dot.is-on { background: var(--wx-wood); box-shadow: 0 0 10px rgba(120, 169, 124, .8); }
.masthead__dot.is-off { background: var(--gold); box-shadow: 0 0 10px rgba(198, 161, 91, .6); }

/* ───── 外壳（导航已入顶栏，正文单列） ───── */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ───── 模块骨架 ───── */
.module {
  padding: 78px 0 12px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 76px;
}
.module:first-of-type { border-top: 0; }

.module__head {
  display: grid;
  grid-template-columns: 58px minmax(0, auto) minmax(0, 1fr);
  align-items: end;
  gap: 8px 22px;
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}
.module__head .module__lede { grid-column: 1 / -1; }
/* 罗马序号：实心金，不用描边空心 */
.module__idx {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(198, 161, 91, .35);
  letter-spacing: .04em;
}
.module__title {
  font-size: clamp(23px, 3.1vw, 34px);
  letter-spacing: .09em;
  color: var(--text);
}
.module__lede {
  max-width: 46ch;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-3);
  padding-bottom: 4px;
}

/* ───── HERO ───── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 40px 0 74px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(4, 5, 10, .96) 0%, rgba(4, 5, 10, .70) 34%, rgba(4, 5, 10, .12) 66%),
    linear-gradient(0deg, rgba(4, 5, 10, .92), transparent 42%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  padding-left: clamp(0px, 3vw, 46px);
}

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.eyebrow__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: .2em;
  padding: 3px 7px;
  border: 1px solid var(--line-gold);
}
.eyebrow__rule {
  width: 54px; height: 1px;
  background: linear-gradient(90deg, var(--gold-lo), transparent);
}
.eyebrow__en { font-size: 9px; color: var(--text-4); }.hero__title {
  margin: 0;
  line-height: 0;
}
/* 艺术字标题（混元生图，透明底） */
.hero__title-art {
  width: min(560px, 92%);
  height: auto;
  filter: drop-shadow(0 0 26px rgba(154, 120, 220, .28));
  animation: title-glow 5.5s ease-in-out infinite;
}
@keyframes title-glow {
  50% { filter: drop-shadow(0 0 40px rgba(198, 161, 91, .34)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title-art { animation: none; }
}

.hero__sub {
  margin-top: 26px;
  max-width: 47ch;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-2);
  border-left: 1px solid var(--line-gold);
  padding-left: 16px;
}

/* 免责警示条：进页面第一眼就要看到 */
.notice {
  margin-top: 26px;
  padding: 14px 18px;
  background: linear-gradient(120deg, rgba(198, 161, 91, .16), rgba(198, 161, 91, .05) 60%);
  border: 1px solid rgba(198, 161, 91, .55);
  border-left: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(198, 161, 91, .10), inset 0 0 18px rgba(198, 161, 91, .04);
}
.notice__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: .18em;
  color: var(--gold-hi);
  margin-bottom: 6px;
}
.notice__title::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  margin-right: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #0d0a05;
  background: var(--gold);
  border-radius: 50%;
  vertical-align: 1px;
}
.notice__body {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-1, #e8e4da);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

/* 数据滚动条 */
.ticker {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(7, 9, 18, .9), rgba(12, 17, 36, .55));
  padding: 9px 0;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track {
  display: inline-flex;
  gap: 46px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--text-3);
  padding-left: 100%;
  animation: ticker-run 64s linear infinite;
}
.ticker__track b { color: var(--gold); font-weight: 400; }
.ticker__track i { color: var(--amethyst); font-style: normal; }
@keyframes ticker-run {
  to { transform: translateX(-100%); }
}

/* ───── 页脚 ───── */
.orn {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  margin: 40px 0 -60px;
  opacity: .85;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.colophon {
  position: relative;
  z-index: 1;
  margin-top: 90px;
  padding: 46px var(--gut) 64px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(4, 5, 10, .7));
}
.colophon__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr);
  gap: 30px 44px;
  align-items: start;
}
.colophon__title {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: .28em;
  color: var(--text-2);
}
.colophon__note {
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--text-4);
  border-left: 1px solid var(--line-soft);
  padding-left: 16px;
}

/* ───── 响应式 ───── */
@media (max-width: 1080px) {
  .colophon__grid { grid-template-columns: 1fr; }
  .module__head { grid-template-columns: 44px minmax(0, 1fr); }
  .module__lede { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .topnav { gap: 0; }
  .topnav a { padding: 8px 9px; font-size: 12px; }
  .topnav a i { display: none; }
}
@media (max-width: 560px) {
  .masthead { flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; overflow-x: auto; }
  .hero__crystal { opacity: .2; }
}


/* ═══════════════ 整页切换（fullpage） ═══════════════ */
/* 滚动吸附：mandatory 保证不停在两节中间；stop: always 一次滚动只过一节 */
html {
  scroll-behavior: smooth;
}
section[id] {
  scroll-margin-top: 66px;    /* 翻页落点让位顶栏 */
  min-height: 100svh;
}
/* 触屏：无滚轮拦截，用原生吸附保证不停在中间 */
@media (pointer: coarse) {
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 66px;
  }
  section[id] {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}
@supports not (min-height: 100svh) {
  section[id] { min-height: 100vh; }
}
/* 减少动态：snap 保留，滚动改为瞬时 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* ───── 终端增强：统计行 / CRT 扫描线 / 水晶水印 ───── */
.term { position: relative; overflow: hidden; }
.term__body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
  z-index: 1;
}
.term__stats {
  margin: 0;
  padding: 7px 18px 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--text-4);
  text-align: right;
}
