/* ============================================================
   乐竞赛场 · 全站共享样式  /assets/site.css
   赛场控制台：框架式导航 + 展览画册式画布
   ============================================================ */

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

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

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

ul, ol { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* 色彩 */
  --navy: #0B1620;
  --navy-2: #122230;
  --panel: #1B3346;
  --green: #0F7A43;
  --green-dark: #0B6135;
  --green-soft: #D8F3E3;
  --orange: #D94F12;
  --lime: #C8F04A;
  --amber: #FFB000;
  --paper: #F4F7F2;
  --paper-2: #EAF0E7;
  --ink: #10202B;
  --ink-2: #55666E;
  --line: rgba(16, 32, 43, .14);
  --line-strong: rgba(16, 32, 43, .28);

  /* 字体 */
  --font-body: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "Roboto Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* 尺度 */
  --maxw: 1440px;
  --maxw-text: 1200px;
  --pad-x: clamp(18px, 4vw, 56px);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 88px); }
h2 { font-size: clamp(28px, 3.4vw, 48px); }
h3 { font-size: clamp(20px, 2vw, 27px); }

p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 桌面端左侧赛场细边线，强化框架感 */
@media (min-width: 1200px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0 auto 0 0;
    width: 6px;
    z-index: 80;
    background: linear-gradient(180deg, var(--green) 0%, var(--lime) 46%, var(--orange) 100%);
    opacity: .9;
    pointer-events: none;
  }
}

/* ---------- 4. 布局容器 ---------- */
.frame {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.container {
  width: 100%;
  max-width: var(--maxw-text);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.site-main { padding-block: clamp(22px, 4vw, 48px) 0; }

.grid {
  display: grid;
  gap: var(--grid-gap, 24px);
  grid-template-columns: minmax(0, 1fr);
}

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

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

.stack > * + * { margin-top: var(--stack-gap, 16px); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, 12px);
}

/* ---------- 5. 通用按钮 ---------- */
.btn {
  --btn-bg: var(--green);
  --btn-fg: #F5FBF3;
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }

.btn--accent {
  --btn-bg: var(--lime);
  --btn-fg: #0B1620;
}
.btn--accent:hover { background: #D6F86A; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #E9F1E6;
  --btn-bd: var(--panel);
}
.btn--ghost:hover { background: rgba(200, 240, 74, .1); border-color: rgba(200, 240, 74, .45); }

.btn--sm { padding: 8px 16px; font-size: 13px; }

/* ---------- 6. 页头：固定赛场边线 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--navy);
  color: #E9F1E6;
  border-bottom: 1px solid var(--panel);
}

.header-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(200, 240, 74, .08);
  pointer-events: none;
}

.header-progress {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--lime) 72%, var(--amber) 100%);
  transition: width .12s linear;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "brand status actions"
    "nav nav nav";
  align-items: center;
  column-gap: 22px;
  row-gap: 6px;
  padding-block: 12px 0;
}

/* 品牌 */
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--green), var(--lime));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px 6px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg,
    rgba(11, 22, 32, .82) 0 2px,
    transparent 2px 5px);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .04em;
  color: #F6FAF3;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: rgba(200, 240, 74, .8);
  white-space: nowrap;
}

/* 状态胶囊 */
.header-status {
  grid-area: status;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px;
  border: 1px solid var(--panel);
  border-radius: var(--radius-pill);
  background: rgba(27, 51, 70, .55);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: #B9C7BE;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 240, 74, .14);
  animation: status-pulse 2.8s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 240, 74, .14); }
  50%      { box-shadow: 0 0 0 7px rgba(200, 240, 74, .04); }
}

/* 操作区 */
.header-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--panel);
  border-radius: var(--radius-pill);
  background: rgba(27, 51, 70, .6);
  color: #E9F1E6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}

.nav-toggle:hover {
  background: var(--panel);
  border-color: rgba(200, 240, 74, .42);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: top .2s var(--ease), transform .2s var(--ease);
}

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

.site-header[data-open] .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after  { top: 5px; transform: rotate(-45deg); }

/* 导航条 */
.site-nav {
  grid-area: nav;
  padding-bottom: 10px;
}

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

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  color: #C6D4C9;
  transition: background .16s var(--ease), color .16s var(--ease);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: rgba(200, 240, 74, .55);
}

.nav-list a:hover {
  background: rgba(255, 255, 255, .07);
  color: #F4F8F1;
}

.nav-list a[aria-current="page"] {
  background: rgba(200, 240, 74, .13);
  color: #F6FAF3;
}

.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}

/* ---------- 7. 页脚：深墨蓝数据面板 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  padding-block: clamp(42px, 6vw, 76px) 26px;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(15, 122, 67, .30), transparent 58%),
    radial-gradient(90% 80% at 100% 0%, rgba(217, 79, 18, .16), transparent 55%),
    var(--navy);
  color: #C2D0C5;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, var(--lime) 48%, var(--orange) 100%);
}

.footer-inner {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  grid-template-columns: minmax(0, 1fr);
}

.footer-line {
  margin-top: 16px;
  max-width: 32em;
  font-size: 15px;
  line-height: 1.8;
  color: #B6C6B9;
}

.footer-note {
  margin-top: 10px;
  max-width: 34em;
  font-size: 13px;
  line-height: 1.7;
  color: #8DA294;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 24px;
}

.footer-col {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(200, 240, 74, .82);
}

.footer-col a {
  font-size: 14.5px;
  color: #C2D0C5;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-col a:hover {
  color: #F4F8F1;
  border-bottom-color: var(--lime);
}

.footer-contact {
  display: grid;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #A9BBAD;
}

.footer-contact p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.footer-k {
  flex: 0 0 auto;
  min-width: 62px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(200, 240, 74, .78);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  padding-top: 18px;
  border-top: 1px solid var(--panel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: #829689;
}

@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .95fr);
    grid-template-areas:
      "lead nav contact"
      "base base base";
    align-items: start;
  }
  .footer-lead   { grid-area: lead; }
  .footer-nav    { grid-area: nav; }
  .footer-contact{ grid-area: contact; }
  .footer-base   { grid-area: base; }
}

/* ---------- 8. 通用内容组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

.index-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--green);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border: 1px solid rgba(15, 122, 67, .2);
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.chip--orange {
  background: rgba(217, 79, 18, .1);
  border-color: rgba(217, 79, 18, .26);
  color: var(--orange);
}

.chip--dark {
  background: var(--navy-2);
  border-color: var(--panel);
  color: var(--lime);
}

.card {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #FBFDF9;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}

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

.card--dark {
  background: var(--navy-2);
  border-color: var(--panel);
  color: #D9E5DB;
}

.card--dark:hover {
  background: var(--panel);
  border-color: rgba(200, 240, 74, .34);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 42px);
  background: var(--line);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.breadcrumb a {
  color: var(--green);
  border-bottom: 1px solid transparent;
  transition: border-color .16s var(--ease);
}

.breadcrumb a:hover { border-bottom-color: currentColor; }

.breadcrumb span[aria-current] { color: var(--ink); }

.prose {
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink);
}

.prose p + p { margin-top: 1em; }
.prose h3 { margin-top: 1.6em; margin-bottom: .5em; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li { margin-block: .35em; }

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

/* 筛选条 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-btn {
  padding: 8px 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.filter-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #F5FBF3;
}

[data-filtered="out"] { display: none; }

/* 可复用图片容器（页面阶段放 img 或占位） */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 18% 8%, rgba(15, 122, 67, .34), transparent 62%),
    linear-gradient(158deg, var(--navy-2) 0%, var(--panel) 100%);
}

.media > img,
.media > picture,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(200, 240, 74, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 240, 74, .1) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  opacity: .55;
}

.media--plain::after { display: none; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }

/* ---------- 9. 显现协议 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}

.js-reveal [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: var(--pad-x);
  top: -120px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--amber);
  color: #0B1620;
  font-size: 14px;
  font-weight: 700;
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 11. 响应式：移动与平板 ---------- */
@media (max-width: 899px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 0;
    padding-block: 10px 0;
  }

  .header-status { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { padding: 9px 15px; font-size: 13px; }

  .site-nav {
    display: none;
    padding-bottom: 12px;
  }

  .site-header[data-open] .site-nav {
    display: block;
    animation: nav-drop .18s var(--ease) both;
  }

  @keyframes nav-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--panel);
  }

  .nav-list a {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .nav-list a[aria-current="page"]::after {
    left: 14px;
    right: auto;
    width: 20px;
    bottom: 8px;
  }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .nav-toggle-label { display: none; }
  .header-actions .btn { padding: 9px 12px; font-size: 12.5px; }
}

@media (min-width: 900px) {
  .site-nav { display: block; }
}

/* ---------- 12. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js-reveal [data-reveal],
  .js-reveal [data-reveal][data-revealed] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 13. 打印友好 ---------- */
@media print {
  .site-header,
  .site-footer,
  body::before {
    display: none !important;
  }
  body { background: #fff; color: #000; }
}
