/* ==========================================================================
   易倍赛事 · 共享站点样式 /assets/site.css
   高原档案册视觉系统：深靛蓝底、经幡色块、粗边硬影、等宽数据
   ========================================================================== */

:root {
  --indigo: #17233F;
  --indigo-deep: #101A30;
  --twilight: #3B2F5C;
  --saffron: #C6432E;
  --prayer-teal: #2E9C98;
  --prayer-yellow: #E6B23C;
  --prayer-white: #F4EFE6;
  --warm-gray: #D6CEC0;
  --ink-green: #254A3F;
  --charcoal: #101624;
  --mist-teal: #8FD3C7;

  --font-sans: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Source Han Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular",
    Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 3rem;
  --fs-3xl: 4rem;
  --fs-display: clamp(2.4rem, 6vw, 5.2rem);

  --border-w: 3px;
  --shadow-hard: 6px 6px 0 var(--charcoal);
  --shadow-hard-sm: 4px 4px 0 var(--charcoal);
  --shadow-hover: 8px 8px 0 var(--charcoal);

  --wrap: 1280px;
  --gutter: 24px;
  --header-h: 76px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75;
  font-weight: 400;
  color: var(--prayer-white);
  background-color: var(--indigo);
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 84% -8%, rgba(198, 67, 46, 0.22), transparent 48%),
    radial-gradient(circle at 4% 14%, rgba(46, 156, 152, 0.16), transparent 44%),
    linear-gradient(180deg, #1b2949 0%, #17233F 38%, #131c33 100%);
  background-size: 46px 46px, 46px 46px, auto, auto, auto;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
}

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

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

figure {
  margin: 0;
}

::selection {
  background: var(--saffron);
  color: var(--prayer-white);
}

:focus-visible {
  outline: 3px solid var(--prayer-yellow);
  outline-offset: 2px;
}

/* ---------- 基础通用 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 64px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--prayer-teal);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--saffron);
  flex: none;
}

.display {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--prayer-white);
}

.lead {
  max-width: 68ch;
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--warm-gray);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
  background: var(--prayer-white);
  border: var(--border-w) solid var(--charcoal);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--charcoal);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--charcoal);
}

.btn--primary {
  background: var(--saffron);
  color: var(--prayer-white);
}

.btn--ghost {
  background: transparent;
  color: var(--prayer-white);
  border-color: var(--prayer-white);
  box-shadow: 4px 4px 0 var(--prayer-teal);
}

.btn--ghost:hover {
  box-shadow: 2px 2px 0 var(--prayer-teal);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--warm-gray);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--prayer-teal);
}

.breadcrumb a {
  color: var(--prayer-white);
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.breadcrumb a:hover {
  color: var(--prayer-yellow);
  border-bottom-color: var(--prayer-yellow);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--charcoal);
  background: var(--warm-gray);
  border: 2px solid var(--charcoal);
}

.tag--teal {
  background: var(--prayer-teal);
  color: var(--charcoal);
}

.tag--yellow {
  background: var(--prayer-yellow);
  color: var(--charcoal);
}

.tag--saffron {
  background: var(--saffron);
  color: var(--prayer-white);
}

.tag--outline {
  background: transparent;
  color: var(--prayer-white);
  border-color: var(--prayer-white);
}

/* ---------- 网格与卡片 ---------- */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.archive-card {
  position: relative;
  padding: 24px;
  background: var(--twilight);
  border: var(--border-w) solid var(--charcoal);
  box-shadow: var(--shadow-hard);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.archive-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--saffron);
}

/* ---------- 图片画框基础规则 ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--twilight);
  border: var(--border-w) solid var(--charcoal);
  box-shadow: var(--shadow-hard);
}

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

.img-frame--16x9 { aspect-ratio: 16 / 9; }
.img-frame--4x3  { aspect-ratio: 4 / 3; }
.img-frame--1x1  { aspect-ratio: 1 / 1; }
.img-frame--wide { aspect-ratio: 21 / 9; }

.img-frame figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--prayer-white);
  background: rgba(23, 35, 63, 0.86);
  border-top: 2px solid var(--prayer-teal);
}

/* ---------- 正文排版区 ---------- */
.prose {
  max-width: 68ch;
  color: var(--warm-gray);
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1em;
}

.prose p,
.prose li {
  font-size: 1.0625rem;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--prayer-white);
}

.prose h3 {
  margin-top: 1.4em;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--prayer-white);
}

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

.prose ul { list-style: square; }
.prose ol { list-style: decimal; }

.prose li { margin-top: 0.4em; }

.prose strong { color: var(--prayer-white); }

.prose a {
  color: var(--mist-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--prayer-yellow); }

.prose code {
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(244, 239, 230, 0.1);
}

/* ==========================================================================
   页头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--prayer-white);
  background: var(--indigo);
  border-bottom: var(--border-w) solid var(--charcoal);
  box-shadow: 0 4px 0 rgba(16, 22, 36, 0.45);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 400;
  padding: 10px 18px;
  font-weight: 700;
  color: var(--charcoal);
  background: var(--prayer-yellow);
  border: var(--border-w) solid var(--charcoal);
  box-shadow: var(--shadow-hard-sm);
  transition: top 120ms ease;
}

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

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 300;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--wrap);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--prayer-white);
  white-space: nowrap;
}

.brand:hover {
  color: var(--prayer-yellow);
}

.brand-mark {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 24px;
  border: 2px solid var(--charcoal);
  background: linear-gradient(
    180deg,
    var(--prayer-teal) 0 25%,
    var(--prayer-yellow) 25% 50%,
    var(--saffron) 50% 75%,
    var(--prayer-white) 75% 100%
  );
}

.round-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--prayer-yellow);
  background: var(--twilight);
  border: 2px solid var(--charcoal);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--prayer-white);
  background: var(--saffron);
  border: var(--border-w) solid var(--charcoal);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.nav-toggle:hover {
  background: #a93624;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--prayer-teal);
  color: var(--charcoal);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--charcoal);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after  { top: 5px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--prayer-white);
  border-bottom: 3px solid transparent;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.nav-link:hover {
  color: var(--prayer-yellow);
  border-bottom-color: var(--prayer-yellow);
}

.nav-link[aria-current="page"] {
  font-weight: 700;
  color: var(--prayer-white);
  border-bottom-color: var(--saffron);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(244, 239, 230, 0.2);
}

.nav-tool {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--mist-teal);
  border: 2px solid rgba(143, 211, 199, 0.4);
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.nav-tool:hover {
  color: var(--prayer-white);
  border-color: var(--prayer-teal);
  background: rgba(46, 156, 152, 0.18);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: 96px;
  color: var(--prayer-white);
  background: var(--charcoal);
  border-top: 4px solid var(--saffron);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.35fr 2.65fr;
  gap: 48px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
}

.footer-brand .brand {
  font-size: 1.45rem;
}

.footer-desc {
  max-width: 34ch;
  margin-top: 16px;
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--warm-gray);
}

.footer-contact {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--warm-gray);
}

.footer-label {
  flex: none;
  min-width: 68px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--prayer-teal);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-col h3 {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prayer-yellow);
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.92rem;
  color: var(--warm-gray);
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.footer-col a:hover {
  color: var(--prayer-white);
  border-bottom-color: var(--prayer-teal);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter) 30px;
  font-size: 0.8rem;
  color: #9aa1ad;
  border-top: 1px solid rgba(244, 239, 230, 0.14);
}

.footer-legal a {
  color: var(--warm-gray);
  transition: color 120ms ease;
}

.footer-legal a:hover {
  color: var(--prayer-yellow);
}

.footer-copy {
  color: var(--warm-gray);
}

.footer-icp {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--mist-teal);
}

/* ==========================================================================
   响应式：平板
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-link {
    padding: 8px 9px;
    font-size: 0.9rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-cols {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   响应式：移动导航折叠
   ========================================================================== */
@media (max-width: 900px) {
  :root {
    --header-h: 64px;
    --gutter: 18px;
  }

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

  .round-badge {
    display: none;
  }

  .brand {
    font-size: 1.15rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px var(--gutter) 22px;
    background: var(--twilight);
    border-bottom: var(--border-w) solid var(--charcoal);
    box-shadow: 0 8px 0 rgba(16, 22, 36, 0.45);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: block;
    padding: 11px 10px;
    font-size: 1rem;
    border-bottom: none;
    border-left: 4px solid transparent;
  }

  .nav-link:hover {
    border-bottom-color: transparent;
    border-left-color: var(--prayer-yellow);
    background: rgba(230, 178, 60, 0.1);
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--saffron);
    background: rgba(198, 67, 46, 0.16);
  }

  .nav-tools {
    flex-wrap: wrap;
    margin: 12px 0 0;
    padding: 14px 0 0;
    border-left: none;
    border-top: 2px solid rgba(244, 239, 230, 0.2);
  }

  .nav-tool {
    font-size: 0.8rem;
    padding: 7px 11px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  .footer-icp {
    margin-left: 0;
  }

  .section {
    padding: 48px 0;
  }
}

/* ==========================================================================
   响应式：窄屏手机
   ========================================================================== */
@media (max-width: 560px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .archive-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .footer-inner {
    padding-top: 40px;
  }

  .footer-legal {
    gap: 8px 16px;
  }
}

/* ==========================================================================
   无障碍：减少动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .btn:hover,
  .archive-card:hover {
    transform: none;
  }
}
