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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

ul,
ol {
  padding-left: 1.2em;
}

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

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

#main-content:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 6px;
}

/* ============ 设计变量 ============ */
:root {
  --blue: #0057B8;
  --blue-bright: #0068DC;
  --ink-green: #0B3D2E;
  --orange: #FF6B1A;
  --orange-deep: #B84300;
  --paper: #F4F7F5;
  --white: #FFFFFF;
  --blue-soft: #DCEBFF;
  --ink: #071A2B;
  --fog: #C7D2CC;
  --edge: #7D8F86;
  --ok: #157347;
  --warn: #C43E1C;

  --wrap: 1240px;
  --gutter: 16px;
  --pill: 999px;
  --card-radius: 4px;
  --bw: 2px;
  --shadow-hard: 6px 6px 0 rgba(11, 61, 46, 0.16);
  --shadow-press: 3px 3px 0 var(--ink);

  --dur: 200ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-head: "Oswald", "Barlow Condensed", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;
}

/* ============ 中文排版基线 ============ */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
}

h2 {
  font-size: clamp(24px, 3.2vw, 34px);
}

h3 {
  font-size: clamp(18px, 2.2vw, 22px);
}

p {
  margin: 0 0 1em;
}

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

.mono,
[data-digit] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ============ 布局工具 ============ */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(36px, 6vw, 80px);
}

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

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

/* ============ 跳转链接 ============ */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--ink-green);
  border: var(--bw) solid var(--ink);
  border-radius: var(--card-radius);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease);
}

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

/* ============ 滚动进度条 ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ============ 头部外壳 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 14px 0 10px;
  background: linear-gradient(
    180deg,
    rgba(244, 247, 245, 0.98) 0%,
    rgba(244, 247, 245, 0.92) 62%,
    rgba(244, 247, 245, 0) 100%
  );
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

/* 品牌浮岛 */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 7px;
  color: #fff;
  text-decoration: none;
  background: var(--ink-green);
  border: var(--bw) solid var(--ink);
  border-radius: var(--pill);
  box-shadow: 0 4px 0 rgba(7, 26, 43, 0.22);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.brand-island:hover {
  transform: translate(-1px, -1px);
  box-shadow: 0 6px 0 rgba(7, 26, 43, 0.26);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, #0A7BD4 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

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

.brand-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #B9D8C8;
}

/* 栏目胶囊 */
.nav-shell {
  display: block;
  justify-self: center;
  padding: 6px;
  background: var(--white);
  border: var(--bw) solid var(--ink-green);
  border-radius: var(--pill);
  box-shadow: 0 4px 0 rgba(11, 61, 46, 0.16);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-green);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--pill);
  transition: background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.nav-link:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-link[aria-current="page"] {
  color: #fff;
  background: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* 状态浮岛 */
.status-island {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 16px;
  background: var(--blue-soft);
  border: var(--bw) solid var(--ink-green);
  border-radius: var(--pill);
  box-shadow: 0 4px 0 rgba(11, 61, 46, 0.16);
}

.status-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  line-height: 1.15;
}

.status-item + .status-item {
  padding-left: 14px;
  border-left: 1px solid rgba(11, 61, 46, 0.18);
}

.status-key {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #41675A;
}

.status-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-green);
}

.status-value--accent {
  color: var(--orange-deep);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.22);
}

.status-dot.is-ping {
  animation: dot-ping 900ms var(--ease) 1;
}

@keyframes dot-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 26, 0.5);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 107, 26, 0);
  }
}

.status-toggle {
  display: none;
}

.status-shortcuts {
  display: none;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--ink-green);
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(7, 26, 43, 0.25);
  cursor: pointer;
}

.nav-toggle-bar {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  transition: background var(--dur) var(--ease);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
  transition: transform var(--dur) var(--ease),
    top var(--dur) var(--ease);
}

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

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

.site-header[data-open="nav"] .nav-toggle-bar {
  background: transparent;
}

.site-header[data-open="nav"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header[data-open="nav"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============ 按钮体系 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  border: var(--bw) solid var(--ink);
  border-radius: var(--card-radius);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-primary {
  color: #fff;
  background: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-bright);
}

.btn-accent {
  color: var(--ink);
  background: var(--orange);
}

.btn-ghost {
  color: var(--ink-green);
  background: var(--white);
}

.btn-ghost:hover {
  background: var(--blue-soft);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-sm:hover {
  box-shadow: 4px 4px 0 var(--ink);
}

/* ============ 面包屑 ============ */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #4A6B5C;
}

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

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

.breadcrumbs a {
  color: var(--blue);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* ============ 卡片与标签 ============ */
.card {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--white);
  border: var(--bw) solid var(--ink-green);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-green);
  background: var(--blue-soft);
  border: 1.5px solid var(--ink-green);
  border-radius: var(--pill);
}

.tag--orange {
  color: var(--ink);
  background: var(--orange);
  border-color: var(--ink);
}

.tag--ok {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}

.tag--warn {
  color: #fff;
  background: var(--warn);
  border-color: var(--warn);
}

/* ============ 图片容器基础规则 ============ */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(140deg, #0B3D2E 0%, #0057B8 58%, #0A5F52 100%);
  border: var(--bw) solid var(--ink-green);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
}

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

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

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

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

.media-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

/* ============ 页脚 ============ */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(40px, 6vw, 72px) 0 24px;
  color: #E7F1EB;
  background: var(--ink-green);
  border-top: 6px solid var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.footer-brand-name {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.footer-brand-line {
  max-width: 32ch;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.75;
  color: #B9D8C8;
}

.footer-version {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--blue-soft);
  background: rgba(0, 87, 184, 0.35);
  border: 1px solid rgba(220, 235, 255, 0.34);
  border-radius: var(--pill);
}

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8FB7A3;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-list a {
  color: #DCEBFF;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: #fff;
  border-bottom-color: var(--orange);
}

.footer-contact-list {
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #B9D8C8;
}

.footer-contact-list li {
  font-variant-numeric: tabular-nums;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding-top: 20px;
  font-size: 12.5px;
  color: #8FB7A3;
  border-top: 1px solid rgba(199, 210, 204, 0.28);
}

.footer-copy,
.footer-icp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

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

.footer-legal a {
  color: #C7D2CC;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--orange);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--ink-green);
  border: var(--bw) solid var(--ink);
  border-radius: var(--pill);
  box-shadow: 4px 4px 0 rgba(7, 26, 43, 0.32);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease), visibility var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  box-shadow: 6px 6px 0 rgba(7, 26, 43, 0.4);
}

/* ============ 平板与手机 ============ */
@media (max-width: 1023px) {
  .site-header {
    padding: 10px 0 6px;
  }

  .header-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav"
      "status status";
    gap: 10px;
  }

  .brand-island {
    grid-area: brand;
    justify-self: start;
  }

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

  .nav-shell {
    grid-area: nav;
    display: none;
    justify-self: stretch;
    padding: 8px;
    border-radius: 16px;
  }

  .site-header[data-open="nav"] .nav-shell {
    display: block;
  }

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

  .nav-link {
    padding: 11px 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  .status-island {
    grid-area: status;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px;
    border-radius: 16px;
  }

  .status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink-green);
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
  }

  .status-toggle-text {
    flex: 1;
    text-align: left;
  }

  .status-body {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 10px;
  }

  .site-header[data-open="status"] .status-body {
    display: flex;
    padding-bottom: 10px;
  }

  .status-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .status-item + .status-item {
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 1px solid rgba(11, 61, 46, 0.18);
  }

  .status-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-base {
    justify-content: flex-start;
  }
}

@media (max-width: 599px) {
  :root {
    --gutter: 14px;
  }

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

  .brand-sub {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

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

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}

/* ============ 动效降级 ============ */
@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;
  }

  .brand-island:hover,
  .btn:hover,
  .btn:active {
    transform: none;
  }
}
