/* ==========================================================================
   安博主站 · 共享样式表 /assets/site.css
   夜间信号站视觉体系：炭黑底 / 山地青翠 / 信号荧光绿 / 大圆角堆叠面板
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #0E1412;
  --ink-2: #132621;
  --ink-3: #0B1A2E;
  --moss: #1F7A5C;
  --signal: #7CFF6B;
  --mist: #C8FFB8;
  --track-orange: #FF6B2C;
  --amber: #FFD447;
  --fog: #F2F6F3;
  --scale: #8FA6A0;

  --rail-w: 104px;
  --radius-l: 28px;
  --radius-m: 20px;
  --radius-s: 14px;
  --pill: 999px;

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-editorial: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "DIN Alternate", "SFMono-Regular", "Roboto Mono", Consolas, ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-panel: 0 28px 70px -48px rgba(124, 255, 107, 0.55);
  --line-soft: rgba(124, 255, 107, 0.14);
  --line-strong: rgba(124, 255, 107, 0.32);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 680px at 88% -12%, rgba(31, 122, 92, 0.42), transparent 62%),
    radial-gradient(820px 620px at 6% 108%, rgba(11, 26, 46, 0.95), transparent 68%),
    radial-gradient(540px 420px at 32% 38%, rgba(124, 255, 107, 0.06), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 微噪点颗粒层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(rgba(242, 246, 243, 0.9) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
}

main,
.site-footer { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fog);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a {
  color: var(--mist);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

button { font-family: inherit; }

::selection {
  background: var(--signal);
  color: var(--ink);
}

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

/* ---------- 3. 通用工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--signal);
  text-shadow: 0 0 24px rgba(124, 255, 107, 0.45);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(124, 255, 107, 0.85);
  flex: 0 0 auto;
}

.section-head { margin: 0 0 28px; }

.section-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 4.4vw, 52px);
}

.lede {
  margin: 14px 0 0;
  max-width: 62ch;
  font-family: var(--font-editorial);
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: rgba(242, 246, 243, 0.78);
}

.panel {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  background: linear-gradient(160deg, rgba(19, 38, 33, 0.94), rgba(11, 26, 46, 0.86));
  box-shadow: var(--shadow-panel);
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: rgba(124, 255, 107, 0.08);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  background: rgba(124, 255, 107, 0.18);
  border-color: var(--signal);
  color: var(--fog);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  box-shadow: 0 0 0 0 rgba(124, 255, 107, 0.5);
}

.btn--signal:hover {
  background: var(--mist);
  border-color: var(--mist);
  color: var(--ink);
  box-shadow: 0 0 26px -4px rgba(124, 255, 107, 0.7);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(143, 166, 160, 0.45);
  color: var(--fog);
}

.btn--ghost:hover {
  background: rgba(143, 166, 160, 0.12);
  border-color: var(--mist);
}

/* ---------- 5. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--scale);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(143, 166, 160, 0.5);
}

.breadcrumbs a {
  color: var(--scale);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

.breadcrumbs [aria-current="page"] { color: var(--fog); }

/* ---------- 6. 可复用图片容器 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(31, 122, 92, 0.55), transparent 60%),
    linear-gradient(150deg, var(--ink-2), var(--ink-3));
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 20px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fog);
  background: linear-gradient(0deg, rgba(11, 26, 46, 0.9), rgba(11, 26, 46, 0));
}

/* ---------- 7. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--pill);
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--fog);
  outline-offset: 2px;
}

/* ---------- 8. 头部：信号刻度轨 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(14, 20, 18, 0.96);
  border-bottom: 1px solid var(--line-soft);
}

.rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 12px;
  width: 100%;
  padding: 10px 16px;
}

/* 品牌信标 */
.rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 4px;
  border-radius: var(--radius-s);
  color: var(--fog);
  text-decoration: none;
}

.rail__mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--signal);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(124, 255, 107, 0.45), transparent 72%);
}

.rail__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(124, 255, 107, 0.9);
  animation: anbo-beacon 2.4s ease-in-out infinite;
}

.rail__brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.rail__brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--scale);
  white-space: nowrap;
}

/* 移动开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: end;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: rgba(124, 255, 107, 0.07);
  color: var(--mist);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-toggle:hover {
  background: rgba(124, 255, 107, 0.16);
  border-color: var(--signal);
  color: var(--fog);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 14px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.site-header[data-open="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.site-header[data-open="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.site-header[data-open="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 导航（移动端为折叠抽屉） */
.nav {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s var(--ease);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 4px;
}

.nav__item { width: 100%; }

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px 10px 26px;
  border-radius: var(--radius-s);
  color: var(--scale);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav__link::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 3px;
  height: 10px;
  margin-top: -5px;
  border-radius: 2px;
  background: rgba(143, 166, 160, 0.45);
  transition: height 0.3s var(--ease), margin-top 0.3s var(--ease),
    background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--fog);
  background: rgba(124, 255, 107, 0.07);
}

.nav__link:hover::before,
.nav__link:focus-visible::before {
  height: 18px;
  margin-top: -9px;
  background: var(--mist);
}

.nav__link[aria-current="page"] {
  color: var(--fog);
  background: rgba(124, 255, 107, 0.1);
}

.nav__link[aria-current="page"]::before {
  height: 24px;
  margin-top: -12px;
  background: var(--signal);
  box-shadow: 0 0 14px rgba(124, 255, 107, 0.9);
  animation: anbo-tick 2s ease-in-out infinite;
}

/* 轨底状态与行动按钮 / 移动端也收纳进抽屉 */
.rail__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.32s var(--ease), padding 0.32s var(--ease);
}

.site-header[data-open="true"] .nav { max-height: 68vh; overflow-y: auto; }

.site-header[data-open="true"] .rail__foot {
  max-height: 160px;
  padding: 12px 0 6px;
  margin-top: 4px;
  border-top: 1px solid rgba(143, 166, 160, 0.18);
}

.rail__status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--scale);
  white-space: nowrap;
}

.rail__cta {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
}

/* 状态点 */
.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(124, 255, 107, 0.9);
  animation: anbo-dot 2.4s ease-in-out infinite;
}

/* 滚动信号线 */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 3px;
  background: rgba(143, 166, 160, 0.14);
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--moss), var(--signal));
  box-shadow: 0 0 12px rgba(124, 255, 107, 0.7);
}

@keyframes anbo-beacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.78); }
}

@keyframes anbo-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes anbo-tick {
  0%, 100% { opacity: 1; box-shadow: 0 0 14px rgba(124, 255, 107, 0.9); }
  50% { opacity: 0.72; box-shadow: 0 0 22px rgba(124, 255, 107, 1); }
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  margin-top: 56px;
  padding: 56px 20px 32px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(19, 38, 33, 0) 0%, #132621 24%, #0B1A2E 100%);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer__mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--fog);
}

.footer__tag {
  margin: 8px 0 0;
  font-family: var(--font-editorial);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(242, 246, 243, 0.7);
}

.footer__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--scale);
}

.footer__col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--scale);
  font-size: 15px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.22s var(--ease), transform 0.22s var(--ease);
}

.footer__list a:hover {
  color: var(--signal);
  transform: translateX(2px);
}

.footer__contact {
  max-width: 1180px;
  margin: 36px auto 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(143, 166, 160, 0.18);
}

.footer__contact-line {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(242, 246, 243, 0.66);
}

.footer__mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--mist);
}

.footer__note {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--scale);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  max-width: 1180px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(143, 166, 160, 0.14);
}

.footer__legal,
.footer__copyright {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--scale);
}

/* ---------- 10. 进场动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 平板 ---------- */
@media (min-width: 768px) {
  .container { padding: 0 28px; }

  .rail { padding: 12px 24px; }

  .rail__brand-name { font-size: 17px; }

  .footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px 28px;
  }

  .footer__brand { grid-column: 1 / -1; }

  .site-footer { padding: 64px 28px 36px; }

  .panel { padding: 34px 32px; }
}

/* ---------- 12. 桌面端：左侧垂直信号刻度轨 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    border-bottom: 0;
    border-right: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #0E1412 0%, #10201B 58%, #0B1A2E 100%);
  }

  .rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 10px;
    padding: 22px 10px 18px;
  }

  .rail__brand {
    flex-direction: column;
    gap: 14px;
    padding: 6px 0;
  }

  .rail__brand-name {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 15px;
    letter-spacing: 0.22em;
    white-space: normal;
  }

  .rail__brand-tag { letter-spacing: 0.2em; }

  .nav-toggle { display: none; }

  .nav {
    grid-column: auto;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0;
    transition: none;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { width: 0; height: 0; }

  .nav__list {
    align-items: stretch;
    gap: 4px;
    width: 100%;
    padding: 0;
  }

  .nav__link {
    justify-content: center;
    padding: 12px 6px 12px 18px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    line-height: 1.25;
    border-radius: var(--radius-s);
    text-align: center;
  }

  .nav__link::before {
    left: 6px;
  }

  .rail__foot {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 14px 0 0;
    margin-top: 0;
    border-top: 1px solid rgba(143, 166, 160, 0.18);
  }

  .rail__status {
    flex-direction: column;
    gap: 6px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-align: center;
    white-space: normal;
  }

  .rail__cta {
    width: 100%;
    min-height: 44px;
    padding: 12px 6px;
    font-size: 12.5px;
    letter-spacing: 0.02em;
  }

  .scroll-meter {
    left: var(--rail-w);
    right: auto;
    top: 0;
    width: 3px;
    height: 100vh;
  }

  .scroll-meter__bar {
    width: 100%;
    height: 100%;
    transform-origin: center top;
    transform: scaleY(var(--p, 0));
    background: linear-gradient(180deg, var(--moss), var(--signal));
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px 32px;
  }

  .footer__brand { grid-column: auto; }

  .site-footer {
    padding: 72px 40px 40px;
    margin-top: 72px;
  }

  .footer__bottom { margin-top: 32px; }
}

/* ---------- 13. 减弱动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

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

  .rail__mark::after,
  .dot,
  .nav__link[aria-current="page"]::before { animation: none; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 1024px) {
  .nav { transition: none; }
}
