/* =====================================================================
   澳发平台 · 共享外壳样式  /assets/site.css
   深夜蓝底 + 蓝图网格 + 青绿路径线 + 暖橙信号色
   ===================================================================== */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

/* ---------- 02 变量 ---------- */
:root {
  --ink-900: #0A1A2F;
  --ink-800: #12294A;
  --ink-700: #0C2138;
  --line-600: #1E3A5F;
  --path: #19E0C0;
  --path-deep: #0E7F73;
  --signal: #FF8A3D;
  --signal-deep: #C75A18;
  --text: #E6EDF5;
  --muted: #9FB2C8;
  --paper: #F2EAD9;

  --rail-w: 220px;
  --bar-h: 56px;
  --bar-h-min: 40px;
  --shell: 1180px;
  --gutter: 20px;

  --font-display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- 03 基础排版 ---------- */
body {
  padding-top: var(--bar-h);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  letter-spacing: .005em;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 560px at 78% -12%, rgba(25, 224, 192, .10), transparent 62%),
    radial-gradient(880px 480px at 8% 108%, rgba(255, 138, 61, .07), transparent 60%),
    linear-gradient(rgba(30, 58, 95, .42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, .42) 1px, transparent 1px);
  background-size: auto, auto, 80px 80px, 80px 80px;
  background-attachment: fixed, fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: .01em;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); font-weight: 300; line-height: 1.03; letter-spacing: -.005em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.0625rem; font-weight: 500; letter-spacing: .02em; }

p { max-width: 68ch; }
strong, b { color: #FFFFFF; font-weight: 600; }

::selection { background: rgba(25, 224, 192, .3); color: #FFFFFF; }

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

/* ---------- 04 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.stack > * + * { margin-top: 18px; }

.display-1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.01em;
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.05;
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: var(--text);
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.index-text {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }

/* ---------- 05 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 11px 18px;
  background: var(--path);
  color: #04201C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 0 0 2px 0;
  transform: translateY(-100%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 06 头部：命令栏 ---------- */
.site-header { position: relative; z-index: 80; }

.cmd-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(12, 33, 56, .97), rgba(10, 26, 47, .90));
  border-bottom: 1px solid var(--line-600);
  backdrop-filter: blur(9px);
  transition: height 220ms ease, background-color 220ms ease;
}
.site-header[data-scrolled="true"] .cmd-bar {
  height: var(--bar-h-min);
  background: linear-gradient(180deg, rgba(9, 22, 40, .99), rgba(9, 22, 40, .95));
}

.cmd-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  flex: 0 0 auto;
}
.brand-mark {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  background: var(--path);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 12px rgba(25, 224, 192, .75);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .05em;
}
.brand-host {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--muted);
  max-height: 20px;
  overflow: hidden;
  transition: opacity 180ms ease, max-height 180ms ease;
}
.site-header[data-scrolled="true"] .brand-host { opacity: 0; max-height: 0; }

.cmd-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ver-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--signal);
  padding: 3px 7px;
  border: 1px solid rgba(255, 138, 61, .5);
  background: rgba(255, 138, 61, .09);
  border-radius: 2px;
}

.cmd-progress {
  --scroll: 0%;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.cmd-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--scroll);
  background: linear-gradient(90deg, var(--path), var(--signal));
  transition: width 140ms linear;
}

/* ---------- 07 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .04em;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 160ms ease, border-color 160ms ease,
              color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.btn-primary {
  background: var(--path);
  border-color: var(--path);
  color: #04201C;
  font-weight: 600;
}
.btn-primary:hover { background: #3BEED4; border-color: #3BEED4; box-shadow: 0 0 0 3px rgba(25, 224, 192, .16); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  border-color: var(--line-600);
  color: var(--text);
  background: rgba(18, 41, 74, .5);
}
.btn-ghost:hover { border-color: var(--path); color: var(--path); background: rgba(25, 224, 192, .08); }

/* ---------- 08 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 34px;
  border: 1px solid var(--line-600);
  border-radius: 2px;
  background: rgba(18, 41, 74, .6);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.nav-toggle:hover { border-color: var(--path); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--path);
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -5px; left: 0; }
.nav-toggle-bars::after { position: absolute; top: 5px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 09 路径栏（桌面） ---------- */
.path-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 20px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0C2138 0%, #0A1A2F 62%, #091628 100%);
  border-right: 1px solid var(--line-600);
}

.rail-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 12px 12px;
  border-bottom: 1px solid var(--line-600);
  max-width: none;
}

.rail-list { display: flex; flex-direction: column; }

.rail-item { position: relative; }
.rail-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--line-600) 0 4px, transparent 4px 9px);
}
.rail-item:first-child::before { top: 50%; }
.rail-item:last-child::before { bottom: 50%; }

.rail-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px 11px 26px;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.rail-link::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border: 1px solid var(--line-600);
  background: var(--ink-700);
  border-radius: 50%;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.rail-link:hover {
  color: var(--text);
  background: rgba(25, 224, 192, .06);
}
.rail-link:hover::before {
  background: var(--path);
  border-color: var(--path);
  box-shadow: 0 0 0 3px rgba(25, 224, 192, .14);
}
.rail-link[aria-current="page"] {
  color: var(--path);
  background: linear-gradient(90deg, rgba(25, 224, 192, .14), rgba(25, 224, 192, 0));
  box-shadow: inset 2px 0 0 var(--path);
}
.rail-link[aria-current="page"]::before {
  background: var(--path);
  border-color: var(--path);
  box-shadow: 0 0 0 3px rgba(25, 224, 192, .18);
}

.rail-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--line-600);
  min-width: 20px;
  transition: color 160ms ease;
}
.rail-link:hover .rail-idx,
.rail-link[aria-current="page"] .rail-idx { color: var(--path); }

.rail-name { letter-spacing: .03em; }

.rail-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-600);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-note-key {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail-note-val { font-size: 12px; color: var(--text); }

/* ---------- 10 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 88px;
  border-top: 1px solid var(--line-600);
  background: linear-gradient(180deg, rgba(18, 41, 74, .55), rgba(9, 22, 40, .96));
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px var(--gutter) 28px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-600);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .05em;
}
.footer-brand-host {
  font-size: 11.5px;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line-600);
}
.footer-note {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 46ch;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 36px 0 12px;
}

.footer-col { min-width: 0; }

.footer-col-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-600);
  position: relative;
}
.footer-col-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 26px;
  height: 1px;
  background: var(--path);
}

.footer-list { display: flex; flex-direction: column; gap: 9px; }

.footer-link {
  display: inline-block;
  font-size: 14.5px;
  color: var(--muted);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.footer-link:hover {
  color: var(--path);
  border-bottom-color: rgba(25, 224, 192, .55);
  transform: translateY(-1px);
}
.footer-link--strong {
  color: var(--path);
  border-bottom-color: rgba(25, 224, 192, .45);
  font-weight: 500;
}

.footer-col--contact {
  background: linear-gradient(180deg, rgba(18, 41, 74, .92), rgba(18, 41, 74, .45));
  border: 1px solid var(--line-600);
  border-top: 2px solid var(--signal);
  border-radius: 2px;
  padding: 20px 22px 22px;
}
.footer-col--contact .footer-col-title {
  border-bottom-color: rgba(30, 58, 95, .9);
}
.footer-col--contact .footer-col-title::after { background: var(--signal); }

.contact-list { display: flex; flex-direction: column; gap: 11px; }
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-key {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-val {
  font-size: 14.5px;
  color: var(--text);
  word-break: break-word;
}
.contact-hint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-600);
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: none;
}
.contact-more { margin-top: 12px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-600);
  font-size: 12.5px;
  color: var(--muted);
}
.footer-legal { max-width: none; }
.footer-meta { font-size: 12px; color: var(--signal); letter-spacing: .08em; }

/* ---------- 11 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--path);
  background: rgba(18, 41, 74, .94);
  border: 1px solid var(--path-deep);
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease,
              visibility 200ms ease, background-color 160ms ease, border-color 160ms ease;
}
.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: rgba(25, 224, 192, .16);
  border-color: var(--path);
}
.to-top-arrow { font-size: 14px; line-height: 1; }
.to-top-text { font-family: var(--font-body); }

/* ---------- 12 通用内容组件 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb a { transition: color 160ms ease; }
.breadcrumb a:hover { color: var(--path); }
.breadcrumb .sep { color: var(--line-600); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-600);
}
.section-head .sec-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--signal);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--muted);
  border: 1px solid var(--line-600);
  border-radius: 2px;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.tag--path {
  color: var(--path);
  border-color: rgba(25, 224, 192, .42);
  background: rgba(25, 224, 192, .09);
}
.tag--signal {
  color: var(--signal);
  border-color: rgba(255, 138, 61, .42);
  background: rgba(255, 138, 61, .09);
}
.tag--paper {
  color: #0A1A2F;
  background: var(--paper);
  border-color: var(--paper);
}
.tag:hover { transform: translateY(-2px); border-color: var(--path); }

.panel {
  background: linear-gradient(180deg, rgba(18, 41, 74, .88), rgba(18, 41, 74, .45));
  border: 1px solid var(--line-600);
  border-radius: 2px;
  padding: 22px;
}
.panel--flat { background: rgba(18, 41, 74, .35); }

/* ---------- 13 图片容器（页面阶段放置占位） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, rgba(18, 41, 74, .95), rgba(10, 26, 47, .95));
  border: 1px solid var(--line-600);
  border-radius: 2px;
}
.media-frame > img,
.media-frame > svg,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--paper {
  background: var(--paper);
  border-color: rgba(10, 26, 47, .22);
}
.media-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 12px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(10, 26, 47, .92));
}
.media-frame--paper .media-frame__cap { color: rgba(10, 26, 47, .72); }

/* ---------- 14 响应式 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .cmd-bar { left: var(--rail-w); }
  .skip-link { left: 8px; top: 8px; border-radius: 2px; }
}

@media (max-width: 1023px) {
  body { background-size: auto, auto, 48px 48px, 48px 48px; }

  .nav-toggle { display: inline-flex; }

  .path-rail {
    top: var(--bar-h);
    bottom: auto;
    width: auto;
    max-height: calc(100vh - var(--bar-h));
    padding: 14px 16px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line-600);
    box-shadow: 0 18px 40px rgba(4, 12, 24, .55);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  }
  .site-header[data-scrolled="true"] .path-rail { top: var(--bar-h-min); }
  .path-rail[data-open="true"] {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .rail-item::before { display: none; }
  .rail-link { padding-left: 22px; font-size: 15.5px; }
  .rail-note { margin-top: 16px; }

  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
  .footer-col--contact { padding: 20px; }
}

@media (max-width: 860px) {
  .btn-ghost { display: none; }
  .footer-top { align-items: flex-start; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .ver-badge { display: none; }
  .btn-primary { padding: 8px 12px; font-size: 12.5px; }
  .footer-inner { padding: 40px var(--gutter) 24px; }
  .to-top { right: 14px; bottom: 14px; padding: 9px 12px; }
  .to-top-text { display: none; }
  .brand-name { font-size: 15px; }
}

/* ---------- 15 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}
