/* ====== 设计令牌 ====== */
:root {
  --ink: #0A1F44;
  --ink-soft: #12305F;
  --paper: #F5F1E8;
  --gold: #FFD700;
  --orange: #FF6A00;
  --white: #FFFFFF;
  --muted: #5D6B7E;
  --line: #C8C3B8;
  --danger: #E63B2E;
  --success: #14B86B;
  --link: #2F7BFF;

  --font-headline: "Roboto Condensed", "Arial Narrow", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "JetBrains Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;

  --display: clamp(40px, 8vw, 88px);
  --h1: clamp(32px, 6vw, 60px);
  --h2: clamp(24px, 4vw, 40px);
  --h3: clamp(18px, 2.5vw, 24px);
  --body: 16px;
  --data-lg: clamp(28px, 4vw, 48px);

  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  --container-max: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 300ms;

  color-scheme: light;
}

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

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 200ms ease;
}

a:hover {
  color: #1B5BC8;
}

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

/* ====== 标题排版 ====== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.4em;
}

h1 {
  font-size: var(--h1);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--h2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--h3);
}

p {
  margin-bottom: 1em;
}

/* ====== 容器与布局 ====== */
.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.section {
  padding: var(--space-3xl) 0;
}

.section--dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
}

.section--dark .section-title {
  color: var(--white);
}

.section--dark .section-desc {
  color: rgba(255, 255, 255, 0.6);
}

.section--dark .section-eyebrow {
  color: var(--gold);
}

.section-head {
  margin-bottom: var(--space-2xl);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.section-title {
  font-size: var(--h2);
  letter-spacing: -0.01em;
}

.section-desc {
  max-width: 65ch;
  color: var(--muted);
  font-size: 16px;
  margin-top: 8px;
}

/* ====== 网格与 Bento ====== */
.grid,
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

.bento-cell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: var(--space-xl);
  position: relative;
}

.bento-cell--dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  border-color: var(--ink);
}

.bento-cell--tall {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-sticky {
  position: sticky;
  top: 104px;
}

/* ====== 卡片与数据面板 ====== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: var(--space-xl);
}

.card--dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  border-color: var(--ink);
}

.card--paper {
  background: var(--paper);
  border-color: var(--line);
}

.card--flat {
  background: transparent;
  border-color: var(--line);
}

.data-panel {
  background: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: var(--space-lg);
  color: rgba(255, 255, 255, 0.8);
}

.data-panel .panel-title {
  font-family: var(--font-headline);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.kpi {
  display: grid;
  gap: 6px;
}

.kpi-number {
  font-family: var(--font-data);
  font-size: var(--data-lg);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.data-panel .kpi-label,
.bento-cell--dark .kpi-label {
  color: rgba(255, 255, 255, 0.5);
}

/* ====== 按钮 ====== */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn--gold {
  background-color: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.btn--gold:hover {
  background-color: #FFDD33;
  border-color: #FFDD33;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.28);
}

.btn--orange {
  background-color: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.btn--orange:hover {
  background-color: #FF7B1A;
  border-color: #FF7B1A;
  color: var(--white);
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.28);
}

.btn--outline {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--outline:hover {
  background-color: rgba(10, 31, 68, 0.04);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}

.btn--white {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--white:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  color: var(--white);
  box-shadow: none;
}

/* ====== 徽标与状态 ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--yellow {
  background: rgba(255, 215, 0, 0.14);
  color: #7A6400;
}

.badge--red {
  background: rgba(230, 59, 46, 0.12);
  color: var(--danger);
}

.badge--green {
  background: rgba(20, 184, 107, 0.14);
  color: var(--success);
}

.badge--blue {
  background: rgba(47, 123, 255, 0.12);
  color: var(--link);
}

.badge--muted {
  background: rgba(93, 107, 126, 0.12);
  color: var(--muted);
}

.status-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: statusPing 2s ease-out infinite;
}

.status-dot--gold { color: var(--gold); }
.status-dot--orange { color: var(--orange); }
.status-dot--green { color: var(--success); }

@keyframes statusPing {
  0% { transform: scale(1); opacity: 0.5; }
  80%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ====== 表格 ====== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  font-family: var(--font-headline);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}

.data-table td.data-num {
  text-align: right;
  font-family: var(--font-data);
}

.section--dark .data-table th,
.section--dark .data-table td {
  border-color: rgba(255, 255, 255, 0.12);
}

.section--dark .data-table th {
  color: var(--gold);
}

.section--dark .data-table td {
  color: rgba(255, 255, 255, 0.8);
}

/* ====== 媒体 ====== */
.media-frame {
  position: relative;
  display: block;
  background: var(--line);
  overflow: hidden;
}

.media-frame::before {
  content: "";
  display: block;
  padding-bottom: 56.25%;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%);
}

.media-frame--4x3::before {
  padding-bottom: 75%;
}

.media-frame--3x2::before {
  padding-bottom: 66.67%;
}

.media-frame--square::before {
  padding-bottom: 100%;
}

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

/* ====== 面包屑 ====== */
.breadcrumbs {
  margin-bottom: var(--space-lg);
  font-size: 13px;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.breadcrumbs-item:not(:last-child)::after {
  content: "/";
  font-family: var(--font-data);
  color: var(--line);
}

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

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

.breadcrumbs-current {
  color: var(--ink);
  font-weight: 600;
}

/* ====== 滚动进度与跳转 ====== */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 9999;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  pointer-events: none;
  transition: width 100ms linear;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 10000;
  display: inline-block;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(10, 31, 68, 0.2);
  transition: top 200ms ease;
}

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

/* ====== 页头 ====== */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  width: min(calc(100% - 24px), 1280px);
  margin: 12px auto 24px;
  background: rgba(10, 31, 68, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  box-shadow: 0 10px 36px rgba(10, 31, 68, 0.2);
  transition: border-radius 200ms ease;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--gold), var(--orange));
  background-size: 300% 100%;
  animation: statusFlow 6s linear infinite;
  pointer-events: none;
  opacity: 0.9;
}

@keyframes statusFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  order: 1;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 38px;
  padding: 0 10px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: 999px;
}

.brand-text {
  font-family: var(--font-headline);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  order: 2;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-link[aria-current="page"] {
  background-color: rgba(255, 215, 0, 0.14);
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 3;
}

.nav-toggle {
  display: none;
  order: 4;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 240ms ease, opacity 200ms ease;
}

.nav-toggle.is-active .toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====== 页脚 ====== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  border-top: 3px solid var(--gold);
  margin-top: var(--space-3xl);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 200ms ease;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-top {
  padding-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-xl) var(--space-lg);
}

.footer-brand {
  grid-column: span 4;
}

.footer-brand-name {
  font-family: var(--font-headline);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.55);
  max-width: 40ch;
}

.footer-col {
  grid-column: span 2;
}

.footer-col--contact {
  grid-column: span 4;
}

.footer-heading {
  font-family: var(--font-headline);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  line-height: 1.5;
}

.footer-contact-item {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ====== 显现 ====== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.js .reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* ====== 响应式 ====== */
@media (max-width: 1023px) {
  .site-header {
    width: calc(100% - 16px);
    margin: 8px auto 16px;
    border-radius: 20px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .site-brand {
    order: 1;
  }

  .nav-toggle {
    order: 2;
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    display: none;
    width: 100%;
    margin-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav .nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 15px;
  }

  .header-actions {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 0 4px;
  }

  .site-header[data-open="true"] .header-actions {
    display: flex;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .col-span-3,
  .col-span-4 {
    grid-column: span 6;
  }

  .col-span-6,
  .col-span-8,
  .col-span-12 {
    grid-column: span 12;
  }

  .footer-brand {
    grid-column: span 12;
  }

  .footer-col {
    grid-column: span 6;
  }

  .footer-col--contact {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 15px;
  }

  .site-header::before {
    left: 12px;
    right: 12px;
  }

  .col-span-3,
  .col-span-4,
  .col-span-6,
  .col-span-8,
  .col-span-12 {
    grid-column: span 12;
  }

  .footer-col {
    grid-column: span 12;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* ====== 焦点与可访问性 ====== */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.nav-link:focus-visible,
.btn:focus-visible,
.breadcrumbs-link:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header::before {
    animation: none;
    opacity: 0.6;
  }

  .status-dot::after {
    animation: none;
    opacity: 0;
  }

  .page-progress {
    transition: none;
  }

  .nav-toggle .toggle-line {
    transition: none;
  }

  .js .reveal,
  .js .reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
