/* ============ CSS 变量 ============ */
:root {
  --navy: #0A1F44;
  --orange: #FF6B35;
  --bg: #F5F7FA;
  --cream: #FDF6EC;
  --gray: #A8B0B8;
  --moss: #7A8B5A;
  --terracotta: #C65D3B;
  --blue: #2D9CDB;
  --text: #333333;
  --white: #FFFFFF;

  --font-heading: "Arial Black", "Impact", "Oswald", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --rail-w: 240px;
  --content-max: 1200px;
}

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

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

body {
  margin: 0;
  padding-left: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; }
h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.3; }
h3 { font-size: 24px; line-height: 1.35; }
h4 { font-size: 20px; line-height: 1.4; }
h5 { font-size: 18px; line-height: 1.4; }
h6 { font-size: 16px; line-height: 1.4; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }

button {
  font-family: inherit;
  font-size: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

input {
  font-family: inherit;
  font-size: inherit;
}

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

#main-content {
  scroll-margin-top: 28px;
}

/* ============ 跳过链接 ============ */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--orange);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0% calc(100% - 10px));
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ============ 滚动进度 ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), #ff9a55);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
  z-index: 2100;
}

/* ============ 移动导航按钮 ============ */
.nav-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 220;
  display: flex;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(10, 31, 68, 0.25);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ 头部侧轨 ============ */
.site-header.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: min(84vw, 300px);
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(circle at 130% -10%, rgba(255, 107, 53, 0.14), transparent 55%),
    linear-gradient(160deg, #0a1f44 0%, #0c2a54 100%);
  color: var(--white);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 12px 0 32px rgba(10, 31, 68, 0.25);
}

.site-header.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 255, 255, 0.018) 18px 20px);
  pointer-events: none;
}

.site-header[data-open] {
  transform: translateX(0);
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 24px 24px;
  overflow-y: auto;
}

/* ============ 品牌 ============ */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  padding: 0 8px;
  background: var(--orange);
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0% calc(100% - 9px));
}

.brand-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gray);
}

/* ============ 导航 ============ */
.site-nav {
  margin-top: 40px;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: rail;
}

.nav-item {
  counter-increment: rail;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #dbe2ea;
  font-size: 15px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, padding-left 0.2s;
}

.nav-link::before {
  content: counter(rail);
  min-width: 24px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--orange);
  opacity: 0.9;
}

.nav-link:hover {
  color: var(--white);
  border-left-color: var(--orange);
  background-color: rgba(255, 255, 255, 0.06);
  padding-left: 20px;
}

.nav-link[aria-current="page"] {
  color: var(--white);
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.18), rgba(255, 107, 53, 0.02));
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--orange);
}

/* ============ 站内查询 ============ */
.header-search {
  margin-top: auto;
  flex-shrink: 0;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
}

.search-box {
  position: relative;
  display: block;
}

.search-glyph {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--gray);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-glyph::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 2px;
  height: 6px;
  background: var(--gray);
  transform: rotate(45deg);
}

.search-input {
  width: 100%;
  padding: 11px 12px 11px 36px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  color: var(--white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: #7f8da3;
}

.search-input:focus {
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.1);
}

/* ============ 状态面板 ============ */
.header-status {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
  flex-shrink: 0;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 rgba(122, 139, 90, 0.55);
  animation: status-pulse 2s ease-out infinite;
}

@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(122, 139, 90, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(122, 139, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 139, 90, 0); }
}

.status-tel {
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #dbe2ea;
}

.rail-ruler {
  margin-top: 16px;
  height: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 8px, rgba(255, 255, 255, 0.22) 8px 9px);
  flex-shrink: 0;
  opacity: 0.8;
}

/* ============ 页脚 ============ */
.site-footer {
  background: linear-gradient(180deg, rgba(10, 31, 68, 0.98), rgba(10, 31, 68, 1)), var(--navy);
  color: #dbe2ea;
  border-top: 3px solid var(--orange);
  margin-top: 96px;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 28px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 48px;
}

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

.footer-col-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-col-nav,
.footer-col-contact {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  margin-bottom: 18px;
}

.footer-statement {
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.75;
  color: #b7c1ce;
  border-left: 3px solid var(--orange);
  padding-left: 14px;
}

.footer-keyword {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray);
  letter-spacing: 0.3px;
}

.footer-heading {
  margin-bottom: 16px;
  padding-bottom: 8px;
  font-size: 14px;
  color: var(--white);
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-nav-list {
  display: grid;
  gap: 6px;
}

.footer-nav-item {
  display: block;
}

.footer-nav-link {
  display: inline-block;
  padding: 6px 0;
  color: #b7c1ce;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.footer-nav-link::before {
  content: "→";
  color: var(--orange);
  margin-right: 8px;
  font-size: 12px;
}

.footer-nav-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}

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

.footer-contact-item {
  font-size: 13px;
  color: #b7c1ce;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--gray);
}

.footer-copyright,
.footer-icp {
  margin: 0;
}

/* ============ 返回顶部 ============ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0% calc(100% - 9px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background-color 0.2s, color 0.2s;
  z-index: 300;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--orange);
  color: var(--navy);
}

/* ============ 通用组件 ============ */
.container-page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--navy);
  background: var(--orange);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0% calc(100% - 10px));
  transition: filter 0.2s, transform 0.2s, background-color 0.2s;
}

.btn:hover {
  filter: brightness(0.88);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--orange);
  color: var(--navy);
}

.btn-ghost {
  background: var(--cream);
  color: var(--navy);
}

.panel-cut {
  padding: 28px;
  background: var(--cream);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0% calc(100% - 14px));
}

.label-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--terracotta);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0% calc(100% - 6px));
}

.tick-rule {
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--gray) 0 2px, transparent 2px 12px);
  opacity: 0.65;
}

.diag-strip {
  display: block;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, transparent 14px 28px);
}

.motion-track {
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--orange) 50%, var(--navy));
  background-size: 200% 100%;
  background-position: 0% 0;
}

.data-console {
  padding: 20px;
  background: var(--navy);
  color: var(--white);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0% calc(100% - 12px));
  font-family: var(--font-heading);
}

.console-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: var(--gray);
}

.breadcrumb-item a {
  color: var(--gray);
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--navy);
}

/* ============ 响应式 ============ */
@media (max-width: 767px) {
  body.nav-is-open {
    overflow: hidden;
  }

  body.nav-is-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 31, 68, 0.45);
    z-index: 150;
  }

  .header-inner {
    padding-top: 84px;
  }

  #main-content {
    padding-top: 72px;
  }

  .footer-inner {
    padding: 32px 20px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .container-page {
    padding: 0 20px;
  }

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

@media (min-width: 768px) {
  :root {
    --rail-w: 240px;
  }

  body {
    padding-left: var(--rail-w);
  }

  .site-header.rail {
    width: var(--rail-w);
    transform: none;
    transition: none;
    box-shadow: 4px 0 18px rgba(10, 31, 68, 0.12);
  }

  .nav-toggle {
    display: none;
  }

  .header-inner {
    padding: 26px 22px 22px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

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

@media (min-width: 1200px) {
  :root {
    --rail-w: 280px;
  }

  .header-inner {
    padding: 32px 28px 28px;
  }
}

/* ============ 减少动态偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }

  .scroll-progress {
    display: none;
  }

  .status-dot {
    animation: none;
  }
}
