/* =========================================================
   幻影平台主页 · 共享样式 /assets/site.css
   深空黑底 + 幻影紫路径 + 霓虹青高亮 + 暖纸色阅读面板
   ========================================================= */

:root {
  --ink: #06070D;
  --ink-2: #150E2B;
  --violet: #6C3BF4;
  --cyan: #35F0D0;
  --blue: #2E7CF6;
  --amber: #FF8A3D;
  --paper: #F4ECDC;
  --paper-2: #CFC4AC;
  --paper-ink: #16121F;
  --mute: #A6A2C0;
  --ok: #43D9A3;

  --line: rgba(166, 162, 192, 0.22);
  --line-soft: rgba(166, 162, 192, 0.12);
  --line-cyan: rgba(53, 240, 208, 0.36);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono",
    "Courier New", monospace;

  --shell: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 76px;
  --radius: 2px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--mute);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- 基础排版 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.prose { max-width: 72ch; }
.prose p { font-size: 16.5px; line-height: 1.85; color: var(--mute); max-width: 46ch; }
.prose p + p { margin-top: 1.15em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page-offset { padding-top: calc(var(--header-h) + clamp(32px, 5vw, 72px)); }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 140;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04140F;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(6, 7, 13, 0.78) 0%, rgba(6, 7, 13, 0) 100%);
  border-bottom: 1px solid transparent;
  transition: background 0.28s ease, border-color 0.28s ease;
}

.site-header[data-state="solid"] {
  background: rgba(6, 7, 13, 0.95);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-trace {
  position: absolute;
  right: 0;
  top: calc(100% + 22px);
  width: min(520px, 52vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(108, 59, 244, 0) 0%, rgba(108, 59, 244, 0.55) 45%, rgba(53, 240, 208, 0.35) 100%);
  transform: rotate(-12deg);
  transform-origin: right center;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.site-header[data-state="solid"] .header-trace { opacity: 0; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 12px;
  height: 12px;
  flex: none;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(108, 59, 244, 0.65);
}
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
}
.brand-badge {
  font-size: 11.5px;
  color: var(--cyan);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  padding: 3px 8px;
  white-space: nowrap;
}

/* nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.nav-toggle-label { font-weight: 500; }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.nav-toggle-bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* nav */
.site-nav { display: flex; align-items: center; }
.nav-pin-note { display: none; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(244, 236, 220, 0.72);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--paper); }
.nav-index {
  font-size: 10.5px;
  color: var(--blue);
  opacity: 0.85;
}
.nav-link--pinned {
  font-size: 19.5px;
  font-weight: 600;
  padding: 6px 12px;
  color: var(--paper);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  margin-right: 8px;
}
.nav-link[aria-current="page"] { color: var(--paper); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(53, 240, 208, 0.7);
}

/* progress */
.header-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--line-soft);
}
.header-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 10px rgba(53, 240, 208, 0.45);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 85% 0%, rgba(108, 59, 244, 0.22) 0%, rgba(108, 59, 244, 0) 55%),
    linear-gradient(180deg, #06070D 0%, #0B0A19 45%, #150E2B 100%);
  color: var(--mute);
  padding-top: clamp(56px, 7vw, 96px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(150px, 0.9fr) minmax(230px, 1.25fr) minmax(140px, 0.85fr);
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 5vw, 68px);
}

.footer-brand {
  font-size: 21px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: 0.01em;
}
.footer-version {
  display: inline-block;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--cyan);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  padding: 3px 8px;
}
.footer-caption {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(166, 162, 192, 0.82);
  max-width: 30ch;
}

.footer-heading {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-list li { margin-bottom: 11px; font-size: 14.5px; line-height: 1.7; }
.footer-list li:last-child { margin-bottom: 0; }
.footer-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: rgba(244, 236, 220, 0.78);
  transition: color 0.2s ease;
}
.footer-list a:hover { color: var(--cyan); }
.footer-label {
  flex: none;
  font-size: 10.5px;
  color: var(--blue);
  opacity: 0.9;
}
.footer-list--contact li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  color: rgba(244, 236, 220, 0.78);
}
.footer-legal a { color: rgba(244, 236, 220, 0.7); }
.footer-legal a:hover { color: var(--cyan); }

.footer-action {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--cyan);
  border-bottom: 1px solid rgba(53, 240, 208, 0.4);
  padding-bottom: 2px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: rgba(166, 162, 192, 0.85);
}
.footer-copy { font-size: 13px; }
.footer-icp { font-size: 13px; color: rgba(244, 236, 220, 0.72); }
.footer-region { font-size: 13px; }

/* =========================================================
   通用组件
   ========================================================= */
.section-head {
  max-width: 56ch;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  position: relative;
  padding-top: 18px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--paper);
}
.section-title::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px;
  height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(53, 240, 208, 0.5);
}

.paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 46px);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.paper .section-title { color: var(--paper-ink); }
.paper p { color: #16121F; }
.paper .prose p { color: #16121F; }
.paper .section-kicker { color: #4B2BD0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--primary {
  background: linear-gradient(120deg, var(--violet), #4B2BD0);
  border-color: transparent;
  color: #FFFFFF;
}
.btn--primary:hover { box-shadow: 0 0 0 6px rgba(108, 59, 244, 0.18); }
.btn--ghost {
  border-color: var(--line-cyan);
  color: var(--cyan);
}
.btn--ghost:hover { background: rgba(53, 240, 208, 0.09); }
.btn--amber {
  background: var(--amber);
  border-color: transparent;
  color: #1B0F05;
}
.btn--amber:hover { box-shadow: 0 0 0 8px rgba(255, 138, 61, 0.2); }
.btn--block { width: 100%; }

.link-list { border-top: 1px solid var(--line); }
.link-list__item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: rgba(244, 236, 220, 0.8);
  transition: color 0.2s ease, background 0.2s ease;
}
.link-list__item:hover { color: var(--cyan); background: rgba(108, 59, 244, 0.06); }
.link-list__index {
  flex: none;
  font-size: 12px;
  color: var(--blue);
}

.breadcrumb { margin-bottom: clamp(20px, 3vw, 32px); }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(166, 162, 192, 0.85);
}
.breadcrumb-item { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(166, 162, 192, 0.45);
}
.breadcrumb-item a:hover { color: var(--cyan); }
.breadcrumb-item[aria-current="page"] { color: var(--paper); }

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(108, 59, 244, 0.26) 0%, rgba(108, 59, 244, 0) 62%),
    linear-gradient(160deg, #0B0A18, #150E2B 70%, #0B0A18);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 13, 0) 55%, rgba(6, 7, 13, 0.55) 100%);
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame__caption {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(166, 162, 192, 0.85);
}

.note {
  border-left: 1px solid var(--line-cyan);
  padding: 4px 0 4px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: rgba(166, 162, 192, 0.9);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(46, 124, 246, 0.7);
}
.status--ok::before { background: var(--ok); box-shadow: 0 0 8px rgba(67, 217, 163, 0.7); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 236, 220, 0.75);
}

.guide-rail {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.guide-rail::before {
  content: "";
  position: absolute;
  left: 64%;
  top: -12%;
  width: 1px;
  height: 132%;
  background: linear-gradient(180deg, rgba(108, 59, 244, 0) 0%, rgba(108, 59, 244, 0.5) 35%, rgba(53, 240, 208, 0.34) 70%, rgba(53, 240, 208, 0) 100%);
  transform: rotate(12deg);
  transform-origin: top center;
}

/* 垂直时间轴：步骤序号 */
.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 64px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--mute);
  opacity: 0.4;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease, color 0.24s ease;
}
.timeline-item.is-visible .timeline-index {
  opacity: 1;
  transform: translateY(-6px);
  color: var(--cyan);
}
.timeline-body { max-width: 52ch; }
.timeline-body h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}
.timeline-body p { font-size: 15.5px; line-height: 1.8; color: var(--mute); }

/* ---------- 显现动效（无 JS 时默认可见） ---------- */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 40px;
  }
  .footer-caption { max-width: 46ch; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .brand-badge { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: block;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 12px var(--gutter) 28px;
    background: rgba(8, 7, 18, 0.98);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-pin-note {
    display: block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.16em;
    color: var(--cyan);
    padding: 6px 2px 16px;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
  }
  .nav-item { border-bottom: 1px solid var(--line-soft); }
  .nav-link {
    display: flex;
    justify-content: flex-start;
    padding: 15px 2px;
    font-size: 16px;
  }
  .nav-index { font-size: 11px; }
  .nav-link--pinned {
    font-size: 22px;
    margin: 8px 0;
    padding: 14px 14px;
    border: 1px solid var(--line-cyan);
  }
  .nav-link[aria-current="page"]::after {
    left: 2px;
    right: auto;
    bottom: 8px;
    width: 34px;
  }
  .nav-link--pinned[aria-current="page"]::after {
    left: 14px;
    bottom: 10px;
    width: 40px;
  }
}

/* ---------- 手机 ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-name { font-size: 16px; }
  .nav-toggle-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-list--contact li { grid-template-columns: 40px 1fr; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 0;
  }
  .timeline-index { font-size: 20px; }
  .header-trace { display: none; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js-ready [data-reveal] { opacity: 1; transform: none; }
  .timeline-index { opacity: 1; transform: none; color: var(--cyan); }
}
