:root {
  --primary-blue: #1E90FF;
  --snow-white: #F8F9FA;
  --accent-orange: #FF6B35;
  --dark-blue: #0A2F44;
  --light-gray: #E2E8F0;
  --glass-white: rgba(255,255,255,0.7);
  --success-green: #28A745;
  --warning-yellow: #FFC107;
  --heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --data-font: "Courier New", Courier, monospace;
  --caption-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-weight: 700;
  --body-weight: 400;
  --data-weight: 400;
  --caption-weight: 300;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body-font);
  font-weight: var(--body-weight);
  color: var(--dark-blue);
  background: var(--snow-white);
  padding-top: var(--header-height);
  min-height: 100vh;
}

ul, ol { list-style: none; }

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 0.5em 1em;
  background: var(--primary-blue);
  color: #fff;
  z-index: 9999;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
}

/* 通用容器 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
  white-space: nowrap;
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #1a7de6;
  border-color: #1a7de6;
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.3);
}

.btn-accent {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

.btn-accent:hover,
.btn-accent:focus-visible {
  background: #e55a2b;
  border-color: #e55a2b;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--dark-blue);
  border-color: var(--dark-blue);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--dark-blue);
  color: #fff;
}

/* 头部 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--glass-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-gray);
  transition: background 0.3s;
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.logo {
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--primary-blue);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo--footer {
  font-size: 1.4rem;
  color: var(--snow-white);
}

/* 导航 */
.site-nav {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--glass-white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-gray);
  padding: 1rem 1.5rem;
}

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

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-nav__link {
  display: block;
  padding: 0.5em 0.2em;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 1rem;
  color: var(--dark-blue);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  position: relative;
}

.site-nav__link::before {
  content: counter(nav-index, decimal-leading-zero);
  counter-increment: nav-index;
  font-family: var(--data-font);
  font-size: 0.7em;
  color: var(--primary-blue);
  margin-right: 0.4em;
  opacity: 0.6;
  vertical-align: super;
}

.site-nav__list {
  counter-reset: nav-index;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
}

.site-nav__link[aria-current="page"] {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  font-weight: 700;
}

/* 移动导航按钮 */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.2s;
  margin-left: auto;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(0,0,0,0.05);
}

.nav-toggle__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark-blue);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.site-header__cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
    flex: 1;
  }

  .site-nav__list {
    flex-direction: row;
    gap: 1rem;
  }

  .site-nav__link {
    padding: 0.3em 0.6em;
    font-size: 0.9rem;
    border-bottom: none;
  }

  .site-nav__link::before {
    content: attr(style);
    content: none;
    /* 桌面隐藏数字索引，用伪元素替代 */
  }

  .site-header__cta {
    display: inline-flex;
    margin-left: auto;
  }
}

/* 页脚 */
.site-footer {
  background: var(--dark-blue);
  color: var(--snow-white);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.site-footer__brand .logo {
  margin-bottom: 0.5rem;
  display: inline-block;
}

.site-footer__trust {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  max-width: 400px;
  line-height: 1.6;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.site-footer__link {
  color: var(--snow-white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
}

.site-footer__contact p {
  margin-bottom: 0.3rem;
}

.site-footer__contact a {
  color: var(--primary-blue);
  border-bottom: 1px solid transparent;
}

.site-footer__contact a:hover {
  border-bottom-color: var(--primary-blue);
}

.site-footer__legal {
  grid-column: 1 / -1;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* 返回顶部 */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus-visible {
  background: var(--accent-orange);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

/* 框景首屏组件 */
.box-frame {
  position: relative;
  border: 2px solid var(--primary-blue);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.box-frame::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 2rem;
  width: 60px;
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    var(--primary-blue) 0,
    var(--primary-blue) 2px,
    transparent 2px,
    transparent 8px
  );
}

.box-frame::after {
  content: "";
  position: absolute;
  top: 2rem;
  left: -2px;
  width: 10px;
  height: 60px;
  background: repeating-linear-gradient(
    to bottom,
    var(--primary-blue) 0,
    var(--primary-blue) 2px,
    transparent 2px,
    transparent 8px
  );
}

/* 玻璃卡片 */
.glass-card {
  background: var(--glass-white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--light-gray);
}

/* 标签 */
.badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge--update {
  background: var(--success-green);
  color: #fff;
}

.badge--new {
  background: var(--accent-orange);
  color: #fff;
}

.badge--highlight {
  background: var(--warning-yellow);
  color: var(--dark-blue);
}

/* 动效与焦点 */
:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 自定义滚动进度条（可选） */
.progress-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-orange);
  z-index: 999;
  transition: width 0.1s linear;
}

/* 移动端菜单打开时 body 防滚动 */
body.nav-open {
  overflow: hidden;
}
