/* ==========================================================================
   大港奥中文站 · 共享层 /assets/site.css
   技术蓝图 · 港口秩序 · 侧轨导航
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  --deep-900: #071C2F;
  --deep-700: #0E3350;
  --marine-500: #1D6A8C;
  --port-500: #E8642A;
  --port-300: #F4A26B;
  --fog-300: #C6D0D8;
  --fog-100: #EDF1F4;
  --paper: #F7F3EA;
  --ink: #111820;
  --signal: #2F7D5B;
  --alert: #B4472F;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: clamp(212px, 17vw, 248px);
  --bar-h: 64px;
  --shell-max: 1440px;
  --pad-x: clamp(20px, 4vw, 64px);

  --line-ink: 1px solid rgba(17, 24, 32, 0.14);
  --line-fog: 1px solid rgba(198, 208, 216, 0.24);
  --line-rail: 1px solid rgba(198, 208, 216, 0.16);
}

body {
  font-family: var(--font-body);
  font-size: clamp(16px, 0.6vw + 14px, 17px);
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--deep-900);
}
h1 { font-size: clamp(44px, 7vw, 104px); letter-spacing: 0.005em; }
h2 { font-size: clamp(32px, 4.2vw, 56px); }
h3 { font-size: clamp(22px, 2.2vw, 32px); }
h4 { font-size: clamp(18px, 1.4vw, 22px); }

p { hanging-punctuation: allow-end; }

::selection { background: var(--port-500); color: #fff; }

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

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

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--port-500);
  color: #fff;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ==========================================================================
   1. 头部 —— 桌面左侧轨道 / 移动顶部品牌条
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--deep-900);
  color: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--bar-h);
  padding: 0 var(--pad-x);
}

/* 遮罩层：点击关闭抽屉（事件目标为 header 本身） */
.site-header::after {
  content: "";
  position: fixed;
  inset: var(--bar-h) 0 0 0;
  z-index: 2;
  background: rgba(7, 28, 47, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.site-header:has(.nav[data-open])::after {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px; height: 36px;
  background: var(--port-500);
  color: var(--deep-900);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 2px;
}
.brand__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--paper);
}
.brand__descriptor {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fog-300);
  text-transform: uppercase;
}
@media (max-width: 430px) {
  .brand__descriptor { display: none; }
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(198, 208, 216, 0.38);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-toggle:hover { border-color: var(--port-300); color: var(--port-300); }
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block; height: 2px; width: 100%;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle__label { display: inline-block; }

/* ---------- 导航（移动端抽屉） ---------- */
.nav {
  position: fixed;
  top: var(--bar-h);
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: min(86vw, 342px);
  padding: 22px var(--pad-x) 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(7, 28, 47, 0.95);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-left: 1px solid rgba(198, 208, 216, 0.26);
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.7, 0.28, 1), visibility 0.3s linear;
}
.nav[data-open] { visibility: visible; transform: translateX(0); }

.nav__eyebrow {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--port-300);
  text-transform: uppercase;
}
.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 52px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(198, 208, 216, 0.16);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.nav__link:hover,
.nav__link:focus-visible { color: var(--port-300); border-bottom-color: var(--port-300); }
.nav__link[aria-current="page"] { color: var(--port-300); }
.nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--port-300);
  opacity: 0.8;
}
.nav__label { white-space: nowrap; }
.nav__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.nav__actions .btn { flex: 1 1 122px; }
.nav__note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: rgba(198, 208, 216, 0.62);
}

/* ---------- 侧轨滚动进度 ---------- */
.rail-progress { display: none; }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  background: var(--deep-900);
  color: var(--paper);
  border: 1px solid rgba(198, 208, 216, 0.32);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s linear,
              background 0.18s ease, border-color 0.18s ease;
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--port-500); border-color: var(--port-500); }
.to-top__glyph { font-family: var(--font-mono); font-size: 14px; line-height: 1; }
.to-top__text { display: inline-block; }

/* ==========================================================================
   2. 桌面端：左侧轨道
   ========================================================================== */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    height: 100vh;
    background: linear-gradient(180deg, #0A2438 0%, var(--deep-900) 46%, #051626 100%);
    border-right: 1px solid rgba(198, 208, 216, 0.16);
  }
  .site-header::after { display: none; }

  .site-header__inner {
    height: 100%;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
  }

  .nav-toggle { display: none; }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 0;
    padding: 28px 22px 22px;
    border-bottom: var(--line-rail);
  }
  .brand__mark { width: 46px; height: 46px; flex: 0 0 46px; font-size: 21px; }
  .brand__name { font-size: 19px; letter-spacing: 0.14em; }
  .brand__descriptor { display: block; font-size: 9.5px; line-height: 1.6; letter-spacing: 0.14em; }

  .nav {
    position: static;
    z-index: auto;
    width: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 0 0;
    overflow-y: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: 0;
    visibility: visible;
    transform: none;
  }
  .nav::-webkit-scrollbar { width: 4px; }
  .nav::-webkit-scrollbar-thumb { background: rgba(198, 208, 216, 0.3); }

  .nav__eyebrow { padding: 0 22px 12px; margin-bottom: 0; font-size: 9.5px; }

  .nav__item { border-top: var(--line-rail); }
  .nav__item:last-child { border-bottom: var(--line-rail); }

  .nav__link {
    align-items: baseline;
    gap: 12px;
    min-height: 0;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--fog-300);
    border-bottom: 0;
    border-left: 2px solid transparent;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  }
  .nav__link:hover,
  .nav__link:focus-visible {
    color: var(--paper);
    background: rgba(29, 106, 140, 0.3);
    border-left-color: var(--port-300);
  }
  .nav__link[aria-current="page"] {
    color: var(--paper);
    font-weight: 700;
    background: rgba(232, 100, 42, 0.16);
    border-left-color: var(--port-500);
  }
  .nav__link[aria-current="page"] .nav__index { color: var(--port-500); opacity: 1; }

  .nav__actions { flex-direction: column; gap: 8px; padding: 20px 22px 0; margin-top: 0; }
  .nav__actions .btn { flex: 0 0 auto; width: 100%; }
  .nav__note { padding: 14px 22px 20px; margin-top: 0; font-size: 9.5px; }

  .rail-progress {
    display: block;
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: rgba(198, 208, 216, 0.14);
  }
  .rail-progress__bar {
    display: block;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--port-300), var(--port-500));
  }
}

/* ==========================================================================
   3. 页脚 —— 泊位索引
   ========================================================================== */
.site-footer {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-top: var(--line-ink);
}
.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--deep-900) 0 54%, var(--port-500) 54% 72%, var(--fog-300) 72% 100%);
}

.site-footer__inner {
  display: grid;
  gap: clamp(28px, 3.4vw, 46px);
  grid-template-columns: 1fr;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 76px) var(--pad-x) clamp(26px, 3vw, 44px);
}
@media (min-width: 620px) {
  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 1.25fr repeat(3, minmax(0, 0.82fr)) 1.5fr;
    column-gap: clamp(20px, 2.4vw, 40px);
    align-items: start;
  }
}

.footer-brand__badge {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--marine-500);
}
.footer-brand__line {
  max-width: 22em;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--deep-900);
}
.footer-brand__meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(17, 24, 32, 0.62);
}

.footer-col__title,
.footer-contact__label {
  padding-bottom: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deep-700);
  border-bottom: var(--line-ink);
}
.footer-col__list { display: flex; flex-direction: column; gap: 9px; }
.footer-col__link {
  display: inline-block;
  font-size: 14px;
  color: rgba(17, 24, 32, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-col__link:hover,
.footer-col__link:focus-visible {
  color: var(--port-500);
  border-bottom-color: var(--port-300);
}

.footer-contact__row {
  display: flex;
  gap: 10px;
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.65;
}
.footer-contact__key {
  flex: 0 0 34px;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(17, 24, 32, 0.5);
}
.footer-contact__val { color: var(--ink); overflow-wrap: anywhere; }
.footer-contact__note {
  margin-top: 12px;
  max-width: 34em;
  font-size: 12.5px;
  line-height: 1.72;
  color: rgba(17, 24, 32, 0.6);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 16px var(--pad-x) 24px;
  border-top: var(--line-ink);
}
.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(17, 24, 32, 0.6);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; }
.site-footer__links a {
  color: rgba(17, 24, 32, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 24, 32, 0.2);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--port-500);
  border-bottom-color: var(--port-300);
}

/* ==========================================================================
   4. 通用按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn--accent { background: var(--port-500); color: #fff; }
.btn--accent:hover { background: #D4551F; }
.btn--solid { background: var(--deep-900); color: var(--paper); }
.btn--solid:hover { background: var(--deep-700); }
.btn--outline { background: transparent; color: var(--fog-300); border-color: rgba(198, 208, 216, 0.45); }
.btn--outline:hover { color: var(--port-300); border-color: var(--port-300); }

/* ==========================================================================
   5. 面包屑 / 正文容器 / 网格
   ========================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17, 24, 32, 0.5);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--fog-300); }
.breadcrumb a {
  color: var(--marine-500);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s ease;
}
.breadcrumb a:hover { border-bottom-color: currentColor; }
.breadcrumb [aria-current="page"] { color: var(--deep-900); }

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

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--tight { padding-block: clamp(26px, 3.4vw, 48px); }

.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: clamp(22px, 3vw, 40px); }
.section-head h2 { max-width: 18em; }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   6. 蓝图框景 / 索引 / 分隔线
   ========================================================================== */
.blueprint {
  background-image:
    linear-gradient(rgba(198, 208, 216, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 208, 216, 0.16) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}

.frame {
  position: relative;
  padding: clamp(20px, 3vw, 46px);
  border: 1px solid rgba(198, 208, 216, 0.42);
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--port-500);
  pointer-events: none;
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.idx {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--marine-500);
}
.idx::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--port-500);
}

.rule { height: 1px; border: 0; margin: 0; background: rgba(17, 24, 32, 0.14); }
.rule--light { background: rgba(198, 208, 216, 0.3); }

/* ==========================================================================
   7. 图片容器（供页面阶段放置占位图）
   ========================================================================== */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--deep-700);
  border: 1px solid rgba(198, 208, 216, 0.3);
  border-radius: 2px;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(198, 208, 216, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 208, 216, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
}
.media-frame__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(7, 28, 47, 0) 0%, rgba(7, 28, 47, 0.86) 100%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fog-300);
}

/* ==========================================================================
   8. 玻璃层 / 状态点
   ========================================================================== */
.glass {
  padding: clamp(18px, 2.2vw, 28px);
  background: rgba(247, 243, 234, 0.08);
  border: 1px solid rgba(198, 208, 216, 0.3);
  border-radius: 2px;
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(47, 125, 91, 0.18);
  vertical-align: middle;
}
.dot--warn {
  background: var(--alert);
  box-shadow: 0 0 0 3px rgba(180, 71, 47, 0.16);
}

/* ==========================================================================
   9. 无障碍：减弱动效
   ========================================================================== */
@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;
  }
}
