/* ===== Reset & Design Tokens ===== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --c-deep: #0D3B66;
  --c-coral: #FF6B4A;
  --c-light: #E6F0FA;
  --c-navy: #0A2540;
  --c-slate: #4A5C7A;
  --c-coral-hover: #E45B3C;
  --c-line: #DDE6F0;
  --c-white: #FFFFFF;
  --font-display: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  --max-width: 1280px;
  --header-offset: 120px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-navy);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  color: var(--c-navy);
  margin: 0 0 .5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--c-deep);
  text-underline-offset: 3px;
  transition: color .2s ease;
}

ul, ol {
  padding: 0;
  margin: 0;
}

li {
  list-style: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--c-coral);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== 通用容器与布局系统 ===== */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: clamp(48px, 8vw, 88px) 0;
}

.section--deep {
  background: var(--c-deep);
  color: rgba(255,255,255,.85);
}

.section--deep h2,
.section--deep .section-title {
  color: var(--c-white);
}

.section--light {
  background: var(--c-light);
}

.section--white {
  background: var(--c-white);
}

.grid-split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--c-navy);
  margin: 0 0 14px;
}

.section-title::before {
  content: "// ";
  color: var(--c-coral);
}

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

.lead {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.85;
  color: var(--c-slate);
  max-width: 60ch;
  margin: 0 0 1.4em;
}

/* ===== 基础组件 ===== */
.card {
  background: var(--c-light);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.card:hover {
  border-color: var(--c-coral);
  box-shadow: 0 12px 32px rgba(13,59,102,.10);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-deep);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-coral);
  flex-shrink: 0;
}

.data-number {
  font-family: var(--font-mono);
  font-size: 1.08em;
  color: var(--c-deep);
  font-variant-numeric: tabular-nums;
}

.data-number--coral {
  color: var(--c-coral);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--c-light);
  color: var(--c-navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}

.btn:hover {
  border-color: var(--c-coral);
  color: var(--c-coral);
}

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

.btn--coral:hover {
  background: var(--c-coral-hover);
  border-color: var(--c-coral-hover);
  color: var(--c-white);
}

/* 面包屑：以路径箭头连接层级 */
.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--c-slate);
  margin: 0 0 24px;
}

.crumb a {
  color: var(--c-deep);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--c-coral);
}

.crumb span[aria-current="page"] {
  color: var(--c-coral);
  font-weight: 700;
}

.crumb li + li::before {
  content: "→";
  margin-right: 6px;
  color: var(--c-coral);
}

/* 虚线路径分隔线：末端珊瑚橙节点 */
.divider-path {
  position: relative;
  height: 1px;
  background: var(--c-line);
  margin: 44px 0;
}

.divider-path::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-coral);
  box-shadow: 0 0 0 3px rgba(255,107,74,.18);
}

/* 响应式图片容器：页面阶段直接放入图片 */
.media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-light);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 120px;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .3s ease;
}

.media:hover img {
  transform: scale(1.02);
}

/* ===== 共享头部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-deep);
  color: var(--c-white);
  box-shadow: 0 4px 18px rgba(10,37,64,.18);
}

.site-header__skip {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  background: var(--c-coral);
  color: var(--c-white);
  padding: 12px 22px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top .25s ease;
}

.site-header__skip:focus {
  top: 0;
}

/* 滚动进度线：置顶的珊瑚橙航迹 */
.site-header__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: var(--progress, 0%);
  max-width: 100%;
  background: var(--c-coral);
  box-shadow: 0 0 8px rgba(255,107,74,.45);
  z-index: 210;
}

/* 顶部快捷轨道 */
.site-header__top {
  background: var(--c-navy);
  border-bottom: 1px solid rgba(230,240,250,.08);
}

.site-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}

.site-header__slogan {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(230,240,250,.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__quick {
  flex-shrink: 0;
  background: var(--c-coral);
  color: var(--c-white);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color .25s ease, box-shadow .25s ease;
}

.site-header__quick:hover {
  background: var(--c-coral-hover);
  box-shadow: 0 4px 14px rgba(255,107,74,.35);
}

/* 主导航轨道 */
.site-header__main {
  position: relative;
}

.site-header__main::after {
  content: "";
  position: absolute;
  left: max(24px, calc((100% - var(--max-width)) / 2));
  bottom: 0;
  width: 220px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--c-coral) 0 8px, transparent 8px 16px);
  pointer-events: none;
}

.site-header__main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-white);
  text-decoration: none;
  padding: 8px 0;
  flex-shrink: 0;
}

/* 路径隐喻图形：横线 + 末端节点圆点 */
.site-header__route {
  position: relative;
  width: 26px;
  height: 18px;
  flex-shrink: 0;
}

.site-header__route::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-light);
}

.site-header__route::after {
  content: "";
  position: absolute;
  right: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-coral);
  box-shadow: 0 0 0 3px rgba(255,107,74,.22);
}

.site-header__brand-text {
  display: block;
}

.site-header__brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--c-white);
}

.site-header__brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(230,240,250,.72);
  margin-top: 3px;
}

/* 移动导航按钮 */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--c-white);
  transition: transform .28s ease, opacity .28s ease;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 主导航 */
.site-header__nav {
  display: block;
}

.site-header__menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-header__menu-item {
  margin: 0;
}

.site-header__link {
  display: inline-block;
  padding: 10px 14px;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease;
}

.site-header__link:hover {
  color: var(--c-white);
  background: rgba(230,240,250,.08);
  border-bottom-color: var(--c-coral);
}

.site-header__link[aria-current="page"] {
  color: var(--c-coral);
  border-bottom-color: var(--c-coral);
}

/* ===== 共享页脚 ===== */
.site-footer {
  background: var(--c-deep);
  color: rgba(255,255,255,.8);
  border-top: 3px solid var(--c-coral);
}

.site-footer__wrap {
  padding-top: 56px;
  padding-bottom: 28px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.site-footer__slug {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  color: var(--c-white);
  margin: 0 0 6px;
  letter-spacing: .03em;
}

.site-footer__slug::before {
  content: "● ";
  color: var(--c-coral);
  font-size: 16px;
  vertical-align: 2px;
}

.site-footer__statement {
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,.62);
  margin: 0;
}

.site-footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--c-coral);
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 700;
}

.site-footer__list {
  display: grid;
  gap: 10px;
}

.site-footer__list a {
  display: inline-block;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-bottom-color .25s ease;
}

.site-footer__list a:hover {
  color: var(--c-white);
  border-bottom-color: var(--c-coral);
}

.site-footer__contact {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.7);
  word-break: break-all;
}

.site-footer__meta {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(230,240,250,.14);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.48);
}

.site-footer__copy,
.site-footer__icp {
  font-family: var(--font-mono);
}

/* ===== 响应式断点 ===== */
@media (max-width: 1023px) {
  .site-header__toggle {
    display: flex;
  }

  .site-header__brand {
    flex: 1;
  }

  .site-header__main-inner {
    flex-wrap: wrap;
    min-height: 64px;
    gap: 12px;
  }

  .site-header__nav {
    flex-basis: 100%;
    display: none;
    border-top: 1px solid rgba(230,240,250,.12);
    background: var(--c-deep);
    padding: 8px 0 16px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

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

  .site-header__menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header__link {
    display: block;
    padding: 13px 14px;
    border-radius: 0;
    border-bottom: 1px solid transparent;
    border-left: 3px solid transparent;
  }

  .site-header__link:hover {
    background: rgba(10,37,64,.35);
    border-bottom-color: transparent;
  }

  .site-header__link[aria-current="page"] {
    border-left-color: var(--c-coral);
    background: rgba(255,107,74,.08);
  }

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

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .wrap {
    padding-inline: 18px;
  }

  .site-header__top-inner {
    min-height: 34px;
  }

  .site-header__slogan {
    font-size: 11px;
  }

  .site-header__brand-name {
    font-size: 21px;
  }

  .site-header__brand-sub {
    font-size: 10px;
  }

  .site-header__main::after {
    width: 140px;
  }

  .section {
    padding: 40px 0;
  }

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

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__meta {
    justify-content: flex-start;
  }
}
