/* ===== 重置 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-main);
  background:
    radial-gradient(ellipse 80% 40% at 85% -5%, rgba(0, 255, 157, 0.07), transparent),
    radial-gradient(ellipse 60% 30% at 10% 35%, rgba(255, 106, 0, 0.05), transparent),
    var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink-main);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul,
ol {
  list-style: none;
}

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

a {
  color: var(--signal-green);
  text-decoration: none;
  transition: color 180ms ease;
}

a:hover {
  color: var(--data-green);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ===== 设计变量 ===== */
:root {
  --bg-deep: #0a0e27;
  --bg-overlay: #0d1230;
  --bg-panel: #12183a;
  --ink-main: #eef2ff;
  --ink-sub: #9aa7cc;
  --ink-faint: #6b7aa8;
  --line: #2a356b;
  --line-soft: #1e2852;
  --signal-green: #00ff9d;
  --signal-orange: #ff6a00;
  --data-green: #6bf7c4;
  --hint-orange: #ffb547;
  --font-head: 'Arial Black', 'Arial', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Consolas', 'Liberation Mono', Menlo, monospace;
  --header-h: 68px;
  --shell-max: 1200px;
  --shell-pad: clamp(16px, 4vw, 40px);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

::selection {
  background: var(--signal-green);
  color: var(--bg-deep);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-faint);
}

/* ===== 聚焦状态 ===== */
:focus-visible {
  outline: 2px solid var(--signal-green);
  outline-offset: 3px;
  border-radius: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ===== 无障碍跳转 ===== */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--signal-green);
  color: var(--bg-deep);
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 0;
}

/* ===== 头部命令栏 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 14, 39, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-header[data-scrolled] {
  background: rgba(10, 14, 39, 0.97);
  box-shadow: 0 10px 30px rgba(3, 5, 18, 0.4);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--signal-green) 0 8px,
    transparent 8px 16px,
    var(--hint-orange) 16px 20px,
    transparent 20px 30px
  );
  opacity: 0.45;
  pointer-events: none;
}

.header-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--signal-green), var(--signal-orange));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 5;
  pointer-events: none;
}

.header-shell {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

/* 品牌 */
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-cube {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--signal-green), #00cc7a);
  transform: skew(-6deg);
  border-radius: 3px 12px 3px 12px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  color: var(--bg-deep);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
  flex-shrink: 0;
}

.brand-cube-core {
  transform: skew(6deg);
  line-height: 1;
}

.brand-name-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink-main);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-top: 3px;
}

/* 导航 */
.cmd-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.cmd-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cmd-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-sub);
  border-left: 2px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.cmd-nav-link::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--signal-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.cmd-nav-link:hover {
  color: var(--ink-main);
  background: rgba(0, 255, 157, 0.05);
}

.cmd-nav-link:hover::before {
  transform: scaleX(1);
}

.cmd-nav-link[aria-current="page"] {
  color: var(--ink-main);
  background: rgba(0, 255, 157, 0.07);
  border-left-color: var(--signal-green);
}

.cmd-nav-link[aria-current="page"]::before {
  display: none;
}

.cmd-nav-link[aria-current="page"]::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--signal-orange);
  box-shadow: 0 0 8px var(--signal-orange);
  flex-shrink: 0;
}

.cmd-nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  transition: color 180ms ease;
}

.cmd-nav-link[aria-current="page"] .cmd-nav-index {
  color: var(--signal-green);
}

/* 头部行动区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 24, 58, 0.7);
  transition: border-color 180ms ease;
}

.nav-toggle:hover {
  border-color: var(--signal-green);
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-main);
  transition: transform 220ms var(--ease), opacity 180ms ease;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease,
    transform 180ms ease, box-shadow 180ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-icon {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 19px;
  line-height: 1;
}

.btn-label {
  display: inline-block;
  letter-spacing: 0.02em;
}

.btn-download {
  background: linear-gradient(135deg, var(--signal-orange), #ec5f00);
  color: var(--bg-deep);
  font-weight: 700;
  box-shadow: 0 2px 18px rgba(255, 106, 0, 0.3);
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 26px rgba(255, 106, 0, 0.4);
  color: var(--bg-deep);
}

.btn-primary {
  background: transparent;
  border-color: var(--signal-green);
  color: var(--signal-green);
}

.btn-primary:hover {
  background: rgba(0, 255, 157, 0.1);
  color: var(--signal-green);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.15);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-sub);
}

.btn-ghost:hover {
  border-color: var(--ink-faint);
  color: var(--ink-main);
}

/* ===== 主内容与容器 ===== */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.breadcrumb a {
  color: var(--ink-sub);
  transition: color 180ms ease;
}

.breadcrumb a:hover {
  color: var(--signal-green);
}

.breadcrumb-sep {
  color: var(--ink-faint);
  opacity: 0.7;
}

/* ===== 内页首屏 ===== */
.page-hero {
  position: relative;
  padding: clamp(52px, 8vw, 96px) 0 clamp(32px, 5vw, 56px);
}

.page-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-green);
}

.page-hero-meta::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--signal-green);
  opacity: 0.7;
}

.page-title {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
  max-width: 900px;
}

.page-lead {
  margin-top: 16px;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-sub);
}

/* ===== 画板区块 ===== */
.section-panel {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  background: var(--bg-overlay);
  border: 1px solid rgba(42, 53, 107, 0.5);
  border-radius: var(--radius-lg);
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--signal-green);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

/* ===== 通用网格 ===== */
.grid-base {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== 正文排版 ===== */
.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-sub);
}

.prose p {
  margin-bottom: 1.1em;
}

.prose strong {
  color: var(--ink-main);
  font-weight: 600;
}

.prose a {
  color: var(--signal-green);
}

.prose a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== 图片容器 ===== */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.05), rgba(255, 106, 0, 0.04));
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}

.media-frame:hover img {
  transform: scale(1.03);
}

.media-frame-wide {
  aspect-ratio: 16 / 9;
}

.media-frame-tall {
  aspect-ratio: 3 / 4;
}

/* ===== 滚动显现 ===== */
html.js-animate [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms ease var(--reveal-delay, 0ms),
    transform 600ms ease var(--reveal-delay, 0ms);
}

html.js-animate [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  margin-top: auto;
  background: var(--bg-overlay);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--signal-green) 0%, transparent 40%, transparent 70%, var(--signal-orange) 100%);
  opacity: 0.35;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(140px, 0.7fr) minmax(150px, 0.8fr) minmax(220px, 1.1fr);
  gap: clamp(24px, 4vw, 48px);
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--shell-pad) 36px;
}

.footer-aside {
  max-width: 420px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  transition: opacity 180ms ease;
}

.footer-brand:hover {
  opacity: 0.85;
}

.brand-cube-sm {
  width: 30px;
  height: 30px;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink-main);
}

.footer-trust {
  margin-top: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-sub);
}

.footer-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(0, 255, 157, 0.35);
  border-radius: 999px;
  background: rgba(0, 255, 157, 0.07);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--data-green);
}

.footer-signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-green);
  animation: footer-pulse 2.4s ease-in-out infinite;
}

@keyframes footer-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--signal-green);
  }

  50% {
    opacity: 0.55;
    box-shadow: 0 0 16px var(--signal-green);
  }
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-green);
}

.footer-col-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  color: var(--hint-orange);
}

.footer-links li a {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-sub);
  transition: color 180ms ease, transform 180ms ease;
}

.footer-links li a:hover {
  color: var(--signal-green);
  transform: translateX(4px);
}

.footer-contact li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sub);
  word-break: break-all;
}

.footer-contact li:last-child {
  border-bottom: none;
}

.contact-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px var(--shell-pad);
}

.footer-legal {
  max-width: var(--shell-max);
  margin: 0 auto;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.legal-sep {
  margin: 0 8px;
  opacity: 0.6;
}

/* ===== 响应式 ===== */
@media (max-width: 1199px) {
  .cmd-nav-index {
    display: none;
  }
}

@media (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-aside {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 899px) {
  :root {
    --header-h: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .cmd-nav {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 150;
    display: block;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: rgba(13, 18, 48, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--shell-pad) 22px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
  }

  .cmd-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .cmd-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .cmd-nav-item + .cmd-nav-item {
    border-top: 1px solid rgba(42, 53, 107, 0.45);
  }

  .cmd-nav-link {
    padding: 13px 12px;
    font-size: 16px;
    border-radius: 0;
    border-left-width: 3px;
  }

  .cmd-nav-link::before {
    display: none;
  }

  .cmd-nav-link[aria-current="page"]::after {
    margin-left: auto;
  }
}

@media (max-width: 639px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand-cube {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub {
    display: none;
  }

  .header-shell {
    gap: 10px;
  }

  .btn-download {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }
}

/* ===== 动效弱化 ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js-animate [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .media-frame:hover img {
    transform: none;
  }
}
