/* ==========================================================
   AK赛场 · 高原赛事观察台
   /assets/site.css — 全站共享层
   设计关键词：雪山白 / 纯净蓝 / 活力红 / 金色 / 锐利直角 / 轨道导航
   ========================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --snow: #F8F6F2;
  --blue: #1E4D7B;
  --blue-deep: #163B5E;
  --blue-ink: #142F4C;
  --red: #E63946;
  --red-deep: #C42E3A;
  --gold: #C9A227;
  --gold-deep: #8A6D1A;
  --gray: #8A8D8F;
  --green: #6B7F65;
  --terra: #B5651D;
  --ink: #1A1A1A;
  --offwhite: #F0EFEA;

  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  --header-h: 56px;
  --nav-rail: 152px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --body-size: 1rem;
  --line-body: 1.8;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--body-size);
  line-height: var(--line-body);
  color: var(--ink);
  background-color: var(--snow);
  background-image:
    linear-gradient(rgba(30, 77, 123, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 77, 123, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 300;
  line-height: 1.25;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

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

a {
  color: var(--blue);
}

a:hover {
  color: var(--gold-deep);
}

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

strong {
  font-weight: 700;
}

button {
  font-family: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
}

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

::selection {
  background: rgba(230, 57, 70, 0.22);
  color: var(--ink);
}

/* ---------- 工具 ---------- */
.visually-hidden {
  position: absolute !important;
  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: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--red);
  color: #FFFFFF;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 10px 24px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 8px;
}

.caption {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.kicker {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---------- 头部顶栏 ---------- */
.site-header {
  display: block;
}

.header-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  background: var(--blue);
}

.header-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.85) 0%, rgba(201, 162, 39, 0.85) 74%, rgba(230, 57, 70, 0.9) 74%, rgba(230, 57, 70, 0.9) 100%);
}

@media (min-width: 768px) {
  .header-topbar {
    padding: 0 var(--space-5);
  }
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--snow);
}

.brand-peak {
  display: inline-block;
  position: relative;
  width: 26px;
  height: 22px;
  flex: 0 0 auto;
}

.brand-peak::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 22px;
  background: var(--red);
  clip-path: polygon(50% 0%, 100% 100%, 0 100%);
}

.brand-peak::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 7px;
  width: 12px;
  height: 10px;
  background: var(--snow);
  clip-path: polygon(50% 0%, 100% 100%, 0 100%);
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--snow);
  line-height: 1;
}

.brand-ak {
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-right: 1px;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.55);
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid rgba(248, 246, 242, 0.22);
}

@media (max-width: 640px) {
  .brand-sub {
    display: none;
  }
}

/* 顶栏工具 */
.header-utils {
  display: flex;
  align-items: center;
  gap: 12px;
}

.env-pill {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.5);
  padding: 4px 12px;
  white-space: nowrap;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .env-pill {
    display: none;
  }
}

.search-entry {
  position: relative;
  display: flex;
  align-items: center;
  width: 190px;
  background: rgba(248, 246, 242, 0.08);
  border: 1px solid rgba(248, 246, 242, 0.2);
  transition: border-color 0.2s var(--ease), width 0.2s var(--ease), background-color 0.2s var(--ease);
}

.search-entry:focus-within {
  width: 220px;
  border-color: var(--gold);
  background: rgba(248, 246, 242, 0.13);
}

@media (max-width: 640px) {
  .search-entry {
    width: 120px;
  }
  .search-entry:focus-within {
    width: 152px;
  }
}

.search-symbol {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(248, 246, 242, 0.65);
  border-radius: 50%;
  pointer-events: none;
}

.search-symbol::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.5px;
  background: rgba(248, 246, 242, 0.65);
  transform: rotate(45deg);
}

.search-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  padding: 8px 10px 8px 30px;
  color: var(--snow);
  font-size: 0.8rem;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: rgba(248, 246, 242, 0.4);
  letter-spacing: 0.05em;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* 汉堡按钮 */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: 4px;
  background: transparent;
  border: 1px solid rgba(248, 246, 242, 0.18);
  cursor: pointer;
  padding: 8px 9px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-toggle:hover {
  background: rgba(248, 246, 242, 0.08);
  border-color: rgba(201, 162, 39, 0.6);
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--snow);
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease), background-color 0.2s;
}

body[data-nav-open] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body[data-nav-open] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

body[data-nav-open] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

/* ---------- 左侧轨道导航 ---------- */
.site-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--nav-rail);
  z-index: 150;
  background: linear-gradient(180deg, var(--blue-deep) 0%, #16436E 100%);
  border-right: 1px solid rgba(201, 162, 39, 0.2);
  transform: translateX(-102%);
  visibility: hidden;
  overflow: hidden;
  transition: transform 0.32s var(--ease), visibility 0s linear 0.32s;
}

.site-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.32s var(--ease), visibility 0s;
}

@media (min-width: 992px) {
  .site-nav {
    transform: none;
    visibility: visible;
    transition: none;
  }
}

.nav-track {
  position: absolute;
  top: 66px;
  bottom: 100px;
  left: 13px;
  width: 1px;
  background: rgba(201, 162, 39, 0.28);
}

.nav-caption {
  margin: 0;
  padding: 14px 12px 12px 30px;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.35);
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 10px 12px 30px;
  color: rgba(248, 246, 242, 0.65);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(201, 162, 39, 0.7);
  background: var(--blue-deep);
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-link:hover {
  color: var(--snow);
  padding-left: 34px;
}

.nav-link:hover::before {
  border-color: var(--gold);
}

.nav-link[aria-current="page"] {
  color: var(--snow);
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.13), transparent 86%);
  box-shadow: inset 4px 0 0 var(--red);
}

.nav-link[aria-current="page"]::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

.nav-index {
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(201, 162, 39, 0.65);
  min-width: 18px;
  letter-spacing: 0.06em;
}

.nav-text {
  font-weight: 300;
}

/* 登顶计程条 */
.nav-summit {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 2px;
  height: 76px;
  background: rgba(248, 246, 242, 0.16);
}

.summit-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: var(--gold);
  transition: height 0.14s linear;
}

.summit-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: rgba(248, 246, 242, 0.32);
  white-space: nowrap;
}

/* 抽屉遮罩 */
.nav-overlay {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(17, 38, 61, 0.58);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

body[data-nav-open] .nav-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

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

@media (max-width: 991.98px) {
  body[data-nav-open] {
    overflow: hidden;
  }
}

/* ---------- 主内容 ---------- */
#main-content {
  display: block;
  min-height: 70vh;
  outline: none;
}

@media (min-width: 992px) {
  #main-content {
    margin-left: var(--nav-rail);
  }
}

/* ---------- 版心与章节 ---------- */
.container {
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
}

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

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

.section-tight {
  padding: var(--space-4) 0;
}

.section-kicker {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section-title {
  margin: 0 0 var(--space-2);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 200;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.section-lead {
  max-width: 36em;
  margin: 0 0 var(--space-4);
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.68);
}

/* ---------- 通用网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}

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

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

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #FFFFFF;
}

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

.btn-outline:hover {
  background: var(--blue);
  color: var(--snow);
}

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--offwhite);
  border: 1px solid rgba(26, 26, 26, 0.12);
}

.badge-gold {
  color: var(--gold-deep);
  border-color: rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.08);
}

.badge-red {
  color: var(--red);
  border-color: rgba(230, 57, 70, 0.4);
  background: rgba(230, 57, 70, 0.06);
}

.badge-green {
  color: var(--green);
  border-color: rgba(107, 127, 101, 0.4);
  background: rgba(107, 127, 101, 0.08);
}

.badge-terra {
  color: var(--terra);
  border-color: rgba(181, 101, 29, 0.4);
  background: rgba(181, 101, 29, 0.07);
}

/* ---------- 资料面板 ---------- */
.panel {
  position: relative;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--snow);
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 0;
  box-shadow: 6px 6px 0 rgba(30, 77, 123, 0.06);
}

.panel-kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-1);
}

.panel-title {
  margin: 0 0 var(--space-2);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.panel-body {
  font-size: 0.925rem;
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.72);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

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

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

.breadcrumb-item a {
  color: var(--blue);
  text-decoration: none;
}

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

.breadcrumb-item[aria-current="page"] {
  color: var(--gray);
}

/* ---------- 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  background-color: var(--offwhite);
  background-image:
    linear-gradient(135deg, rgba(30, 77, 123, 0.06) 25%, transparent 25%),
    linear-gradient(225deg, rgba(30, 77, 123, 0.06) 25%, transparent 25%);
  background-size: 14px 14px;
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--blue-ink);
  color: rgba(248, 246, 242, 0.7);
  position: relative;
}

@media (min-width: 992px) {
  .site-footer {
    margin-left: var(--nav-rail);
  }
}

.footer-ridge {
  height: 12px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 68%, var(--red) 68%, var(--red) 100%);
  clip-path: polygon(
    0% 100%, 0% 40%, 4% 80%, 8% 15%, 12% 65%, 16% 25%, 20% 90%, 24% 30%,
    28% 72%, 32% 10%, 36% 60%, 40% 28%, 44% 85%, 48% 18%, 52% 70%, 56% 12%,
    60% 78%, 64% 30%, 68% 88%, 72% 20%, 76% 64%, 80% 8%, 84% 72%, 88% 25%,
    92% 85%, 96% 35%, 100% 20%, 100% 100%
  );
}

.footer-frame {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-4);
}

@media (min-width: 768px) {
  .footer-frame {
    padding: var(--space-6) var(--space-5) var(--space-4);
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 0.8fr 1.1fr 1.1fr;
    gap: var(--space-5);
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-2);
}

.footer-brand .brand-peak {
  width: 28px;
  height: 24px;
}

.footer-brand .brand-peak::before {
  width: 28px;
  height: 24px;
}

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

.footer-brief-text {
  font-size: 0.875rem;
  color: rgba(248, 246, 242, 0.55);
  max-width: 26em;
  margin-bottom: var(--space-3);
}

.footer-contact-link {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.55);
  padding: 8px 18px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-contact-link:hover {
  background: var(--gold);
  color: var(--blue-ink);
}

.footer-heading {
  margin: 0 0 var(--space-2);
  padding-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(248, 246, 242, 0.68);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}

.footer-links a:hover {
  color: var(--snow);
  border-bottom-color: var(--gold);
  padding-left: 6px;
}

.footer-links-contact li {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(248, 246, 242, 0.6);
}

.footer-note {
  font-size: 0.8rem;
  line-height: 1.8;
  color: rgba(248, 246, 242, 0.55);
  margin-bottom: var(--space-1);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(248, 246, 242, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(248, 246, 242, 0.45);
}

.footer-bottom p {
  margin: 0;
}

.footer-trust {
  color: rgba(201, 162, 39, 0.55);
}

/* ---------- 动效与可访问性 ---------- */
@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;
  }
}
