/* =========================================================
   MANBET 在线 · 夜间航行情报面板
   /assets/site.css —— 全站共享外壳与基础组件
   ========================================================= */

:root {
  --ink-0: #04121F;
  --ink-1: #071A2B;
  --ink-2: #0B2740;
  --line: #1C3A4F;
  --cyan: #31F2D3;
  --cyan-soft: #8FE3D6;
  --amber: #F5B54A;
  --amber-deep: #C97A18;
  --text: #F2F7F7;
  --muted: #A9BCC8;
  --ok: #7BE495;
  --warn: #FF7A68;

  --font-head: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Courier New", monospace;

  --frame: 2px;
  --max: 1320px;
  --gutter: clamp(16px, 3vw, 40px);
  --shadow-hard: 6px 6px 0 rgba(49, 242, 211, 0.13);
  --shadow-ink: 4px 4px 0 rgba(4, 18, 31, 0.85);
  --r-pill: 999px;
  --r-panel: 14px;
}

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

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

a { color: inherit; text-decoration: none; }

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

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

/* ---------- 中文排版与底色 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1100px 620px at 10% -12%, rgba(49, 242, 211, 0.10), transparent 62%),
    radial-gradient(920px 700px at 98% 2%, rgba(245, 181, 74, 0.07), transparent 58%),
    radial-gradient(800px 500px at 50% 120%, rgba(28, 58, 79, 0.55), transparent 70%),
    repeating-linear-gradient(0deg, rgba(28, 58, 79, 0.42) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(28, 58, 79, 0.42) 0 1px, transparent 1px 96px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: var(--text);
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: 1.15rem; line-height: 1.35; letter-spacing: 0; }
h4 { font-size: 1rem; line-height: 1.4; letter-spacing: 0; }

strong { font-weight: 800; }

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

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

/* =========================================================
   1. HEADER —— 框架式导航外框
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, rgba(4, 18, 31, 0.99) 0%, rgba(7, 26, 43, 0.97) 100%);
  border-bottom: var(--frame) solid var(--line);
  box-shadow: 0 10px 0 rgba(4, 18, 31, 0.28);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 999;
  padding: 10px 18px;
  border: var(--frame) solid var(--amber-deep);
  border-radius: var(--r-pill);
  background: var(--amber);
  color: #231301;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 800;
  transform: translateY(-240%);
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--cyan);
}

/* 顶部状态刻度线 */
.header-rail {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 6px var(--gutter);
  border-bottom: 1px dashed rgba(28, 58, 79, 0.95);
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--muted);
  white-space: nowrap;
}

.rail-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(49, 242, 211, 0.9);
  animation: rail-pulse 2.6s ease-in-out infinite;
}

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

.rail-ticks {
  flex: 1 1 auto;
  max-width: 320px;
  height: 8px;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(143, 227, 214, 0.6) 0 1px,
    transparent 1px 10px
  );
}

/* 主横梁 */
.header-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter) 12px;
  min-height: 66px;
}

/* 品牌准星 */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
}

.brand-glyph {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: var(--frame) solid var(--cyan);
  background: rgba(49, 242, 211, 0.09);
  box-shadow: 3px 3px 0 rgba(4, 18, 31, 0.9);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.brand-glyph::before,
.brand-glyph::after {
  content: "";
  position: absolute;
  background: var(--cyan);
}

.brand-glyph::before {
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.brand-glyph::after {
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  opacity: 0.5;
  transform: translateX(-50%);
}

.brand-lockup:hover .brand-glyph {
  background: rgba(49, 242, 211, 0.2);
  box-shadow: 0 0 0 2px rgba(4, 18, 31, 0.9), 0 0 18px rgba(49, 242, 211, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand-latin {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--cyan);
  margin-top: 3px;
}

/* 胶囊导航轨道 */
.nav-rail {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link {
  display: inline-block;
  padding: 8px 15px;
  border: var(--frame) solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(11, 39, 64, 0.85);
  transform: translateY(-1px);
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(143, 227, 214, 0.14);
  box-shadow: inset 0 0 0 1px rgba(49, 242, 211, 0.22), 0 4px 0 rgba(4, 18, 31, 0.9);
}

/* 行动组 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: var(--frame) solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: var(--shadow-ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(4, 18, 31, 0.85);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(4, 18, 31, 0.85);
}

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

.btn--ghost:hover {
  border-color: var(--cyan);
  background: rgba(49, 242, 211, 0.09);
  color: var(--cyan);
}

.btn--amber {
  background: var(--amber);
  border-color: var(--amber-deep);
  color: #231301;
}

.btn--amber:hover {
  background: #FFC468;
  border-color: var(--amber);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border: var(--frame) solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-ink);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.18s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-header[data-open] .nav-toggle-label { color: var(--cyan); }

/* 滚动进度条（脚本注入） */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(28, 58, 79, 0.9);
  overflow: hidden;
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-soft) 55%, var(--amber) 100%);
}

/* =========================================================
   2. FOOTER —— 三舱式页脚
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background-color: var(--ink-0);
  background-image: linear-gradient(180deg, rgba(7, 26, 43, 0.85) 0%, rgba(4, 18, 31, 1) 62%);
  border-top: var(--frame) solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(49, 242, 211, 0.75) 0 14px,
    transparent 14px 34px
  );
  opacity: 0.55;
}

.footer-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
}

.footer-col {
  padding: 16px 18px;
  border: var(--frame) solid var(--line);
  background: rgba(11, 39, 64, 0.5);
  box-shadow: var(--shadow-ink);
}

.footer-col--accent {
  border-color: rgba(245, 181, 74, 0.45);
  background: rgba(11, 39, 64, 0.78);
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--cyan-soft);
}

.footer-title::before {
  content: "";
  width: 14px;
  height: 2px;
  flex: 0 0 14px;
  background: var(--cyan);
}

.footer-col--accent .footer-title { color: var(--amber); }
.footer-col--accent .footer-title::before { background: var(--amber); }

.footer-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}

.footer-text + .footer-text { margin-top: 10px; }
.footer-text + .btn { margin-top: 16px; }

.footer-text--mono {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: rgba(143, 227, 214, 0.7);
  word-break: break-all;
}

.footer-brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.footer-contact {
  display: grid;
  gap: 9px;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan-soft);
}

.footer-val {
  color: var(--muted);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: 18px;
  border-top: 1px dashed rgba(28, 58, 79, 0.95);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(169, 188, 200, 0.75);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-legal a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-legal a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* =========================================================
   3. 通用版式：容器 / 章节 / 网格 / 面板 / 图片位
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 880px; }

.section {
  padding-block: clamp(34px, 5vw, 64px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(18px, 2.6vw, 30px);
  padding-bottom: 14px;
  border-bottom: var(--frame) solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--cyan);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.14;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.8;
  color: var(--muted);
  max-width: 44ch;
}

.prose p {
  max-width: 44ch;
  line-height: 1.8;
  color: var(--muted);
}

.prose p + p { margin-top: 14px; }

.prose a {
  color: var(--cyan);
  border-bottom: 2px solid rgba(49, 242, 211, 0.4);
}

.prose a:hover { border-bottom-color: var(--cyan); }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

.panel {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  border: var(--frame) solid var(--line);
  border-radius: var(--r-panel);
  background: var(--ink-2);
  box-shadow: var(--shadow-hard);
}

.panel--offset { transform: translateY(-16px); }

.panel-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  margin-bottom: 10px;
  color: var(--text);
}

/* 图片容器基础规则（头部与页脚不放图，页面阶段在此放入 <img>） */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--frame) solid var(--line);
  background:
    linear-gradient(150deg, var(--ink-2) 0%, var(--ink-1) 58%, #0E2F4B 100%);
  box-shadow: var(--shadow-hard);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
  background-image:
    repeating-linear-gradient(90deg, rgba(49, 242, 211, 0.16) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(49, 242, 211, 0.10) 0 1px, transparent 1px 40px);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 12px;
  border: 1px solid rgba(49, 242, 211, 0.55);
  border-radius: var(--r-pill);
  background: rgba(4, 18, 31, 0.85);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

/* 面包屑 */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumbs a { transition: color 0.18s ease; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current="page"] { color: var(--cyan-soft); }

/* 工具类 */
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.visually-hidden {
  position: absolute;
  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;
}

/* 显现（需 <html class="js">，无 JS 时全部可见） */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* =========================================================
   4. 响应式
   ========================================================= */
@media (max-width: 1180px) {
  .header-actions .btn--ghost { display: none; }
  .nav-link { padding: 8px 11px; font-size: 0.86rem; }
}

@media (max-width: 980px) {
  .site-header { position: sticky; }

  .header-frame {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 0;
    min-height: 60px;
  }

  .brand-lockup { grid-area: brand; }
  .header-actions { grid-area: actions; }
  .nav-rail { grid-area: nav; }

  .nav-rail {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 190;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 12px var(--gutter) 20px;
    border-top: var(--frame) solid var(--line);
    border-bottom: var(--frame) solid var(--line);
    background: var(--ink-1);
    box-shadow: 0 18px 40px rgba(4, 18, 31, 0.75);
  }

  .site-header[data-open] .nav-rail { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-link {
    display: block;
    padding: 13px 16px;
    border-radius: 10px;
    border-color: var(--line);
    background: var(--ink-2);
    font-size: 0.95rem;
  }

  .nav-link[aria-current="page"] {
    border-color: var(--cyan);
    box-shadow: inset 3px 0 0 var(--cyan);
  }

  .nav-toggle { display: inline-flex; }
  .header-actions .btn--amber { display: none; }

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

  .panel--offset { transform: none; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .rail-ticks { display: none; }

  .rail-status {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    white-space: normal;
  }

  .brand-glyph { width: 30px; height: 30px; flex-basis: 30px; }
  .brand-name { font-size: 0.98rem; }

  .footer-col { padding: 14px 15px; }
  .footer-contact li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* 打印与可访问性 */
@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;
  }

  .rail-dot { animation: none; }

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

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .scroll-meter { display: none !important; }

  body {
    background: #FFFFFF;
    color: #04121F;
  }
}
