/* ===== 变量与基础 ===== */
:root {
  --ink: #0A1F44;
  --ink-deep: #071631;
  --ink-soft: #1B3260;
  --paper: #F5F0E6;
  --orange: #FF6B35;
  --orange-soft: #FF8A60;
  --silver: #C0C0C0;
  --white: #FFFFFF;
  --green: #00C48C;
  --yellow: #FFC94D;
  --red: #FF3E4E;
  --gray: #1A1A1A;
  --slate: #6B7A99;
  --font-display: "Montserrat", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", sans-serif;
  --font-data: "JetBrains Mono", "Roboto Mono", monospace;
  --container: 80rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius-lg: 1.75rem;
  --radius-md: 1.25rem;
  --radius-sm: 0.75rem;
  --shadow-soft: 0 1rem 2rem rgba(7, 22, 49, 0.08);
  --shadow-card: 0 0.5rem 1.5rem rgba(7, 22, 49, 0.12);
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
  --header-h: 4.75rem;
}

*, *::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: 1rem;
  line-height: 1.75;
  color: var(--gray);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--gray);
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
}

h4 {
  font-size: 1.125rem;
  font-weight: 700;
}

p {
  margin-top: 0;
}

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

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

main#main-content {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  outline: none;
}

/* ===== 容器与排版 ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-caption {
  color: var(--slate);
  max-width: 48rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.display-title {
  color: var(--gray);
}

.lead-text {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.7;
  color: var(--gray);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--orange);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transform: translateY(-300%);
  transition: transform 0.2s var(--ease);
}

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

/* ===== 头部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ink-deep);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header[data-overlay] {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

.site-header[data-overlay][data-scrolled],
.site-header[data-overlay][data-nav-open] {
  background: var(--ink-deep);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1rem 3rem rgba(7, 22, 49, 0.25);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  min-height: var(--header-h);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  min-height: 2.5rem;
}

.brand-link--footer {
  color: var(--white);
}

.brand-mark {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid rgba(192, 192, 192, 0.55);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 210deg, var(--orange) 0 76deg, transparent 76deg 360deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.375rem;
  border-radius: 50%;
  background: var(--ink-deep);
  border: 1px solid rgba(192, 192, 192, 0.5);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.site-nav {
  justify-self: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav__item {
  margin: 0;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.375rem;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

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

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 1;
}

.site-nav__link[aria-current="page"] {
  color: var(--white);
}

.cta-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 0.5rem 1.5rem rgba(255, 107, 53, 0.35);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta-button:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 2rem rgba(255, 107, 53, 0.42);
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s var(--ease);
}

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

.nav-toggle__bar {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 0.25rem;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(0.375rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-0.375rem) rotate(-45deg);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.86);
  padding-bottom: 2rem;
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0 30%, rgba(255, 255, 255, 0.14) 30% 32%, transparent 32% 100%);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(3rem, 6vw, 5rem);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s var(--ease);
}

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

.footer-brand__desc {
  margin-top: 1rem;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-brand__trust {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--silver);
  font-family: var(--font-data);
}

.footer-heading {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 1rem;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact__item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.footer-contact__label {
  font-size: 0.8rem;
  color: var(--silver);
  letter-spacing: 0.06em;
}

.footer-contact__value {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-all;
}

.footer-contact__value.data-copy {
  font-family: var(--font-data);
  color: rgba(255, 255, 255, 0.95);
  word-break: break-all;
}

.data-copy {
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.data-copy:hover,
.data-copy[data-copied] {
  color: var(--orange);
  border-color: var(--orange);
}

.footer-links__list {
  display: grid;
  gap: 0.75rem;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 0.5rem 1.5rem rgba(255, 107, 53, 0.25);
}

.btn--primary:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
}

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

.btn--outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate);
  padding-block: 1.25rem;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--silver);
}

.breadcrumb__link {
  color: var(--slate);
}

.breadcrumb__link:hover {
  color: var(--orange);
}

.breadcrumb__current {
  color: var(--gray);
  font-weight: 600;
}

/* ===== 分屏与面板 ===== */
.split-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: center;
}

.console-panel {
  position: relative;
  background: var(--ink-deep);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.console-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent);
}

.index-panel {
  background: var(--paper);
  color: var(--gray);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-soft);
}

/* ===== 数据卡片 ===== */
.data-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(26, 26, 26, 0.04);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.data-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: var(--shadow-card);
}

.data-card__value {
  font-family: var(--font-data);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.data-card__label {
  font-size: 0.875rem;
  color: var(--slate);
  margin-top: 0.375rem;
}

/* ===== 状态点与脉冲 ===== */
.status-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--silver);
  flex-shrink: 0;
}

.status-dot--live {
  background: var(--green);
  box-shadow: 0 0 0 0.25rem rgba(0, 196, 140, 0.2);
}

.status-dot--warn {
  background: var(--red);
  box-shadow: 0 0 0 0.25rem rgba(255, 62, 78, 0.2);
}

.status-dot--sync {
  background: var(--orange);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.45);
  }
  70% {
    box-shadow: 0 0 0 0.5rem rgba(255, 107, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
  }
}

.pulse-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.pulse-chip--paper {
  border-color: rgba(26, 26, 26, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: var(--gray);
}

/* ===== 路线索引 ===== */
.route-list {
  display: grid;
  gap: 1rem;
}

.route-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.route-list__item:hover {
  background: rgba(255, 107, 53, 0.14);
  border-color: rgba(255, 107, 53, 0.4);
  color: var(--orange);
}

.route-list__index {
  font-family: var(--font-data);
  color: var(--orange);
  font-size: 0.875rem;
  font-weight: 600;
}

.index-panel .route-list__item {
  background: var(--white);
  border-color: rgba(26, 26, 26, 0.08);
  color: var(--gray);
}

.index-panel .route-list__item:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.index-panel .route-list__item:hover .route-list__index {
  color: var(--ink);
}

.route-index {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.875rem;
  color: var(--slate);
  border-left: 1px solid var(--silver);
  padding-left: 1rem;
}

.route-index__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.route-index__item::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--silver);
}

.route-index__item.is-current {
  color: var(--ink);
  font-weight: 600;
}

.route-index__item.is-current::before {
  background: var(--orange);
  box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.2);
}

/* ===== 标签页 ===== */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--silver);
  background: transparent;
  color: var(--gray);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tab-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.tab-button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.tab-panel {
  margin-top: 1.5rem;
}

.tab-panel[hidden] {
  display: none;
}

/* ===== 图片容器 ===== */
.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink));
  aspect-ratio: 16 / 9;
}

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

.media-frame--ratio-portrait {
  aspect-ratio: 4 / 5;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%);
  background-size: 24px 24px;
}

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

.media-frame__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(7, 22, 49, 0.85));
  color: var(--white);
  font-size: 0.875rem;
  border-radius: inherit;
}

/* ===== 图例 ===== */
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate);
}

.legend-item__swatch {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 0.25rem;
  background: var(--silver);
  flex-shrink: 0;
}

.legend-item__swatch--orange {
  background: var(--orange);
}

.legend-item__swatch--green {
  background: var(--green);
}

.legend-item__swatch--red {
  background: var(--red);
}

/* ===== 响应式 ===== */
@media (max-width: 64rem) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .cta-button {
    display: none;
  }

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

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--ink-deep);
    padding: 2rem var(--gutter);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }

  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .site-nav__link {
    font-size: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .split-screen {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 30rem) {
  :root {
    --header-h: 4.25rem;
  }

  .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .brand-text {
    font-size: 1rem;
  }
}

/* ===== 动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-dot--sync {
    animation: none;
  }
}
