/* =========================================================
   大江赛事 · 共享样式 /assets/site.css
   01 变量与重置 · 02 排版 · 03 布局 · 04 头部 · 05 页脚
   06 通用组件 · 07 图片容器 · 08 响应式 · 09 动效降级
   ========================================================= */

/* ---------- 01 变量与重置 ---------- */
:root {
  --ink: #071A1F;
  --ink-2: #0F2E36;
  --line: #24464B;
  --orange: #FF6A2A;
  --orange-deep: #C74616;
  --score: #B8FF3C;
  --fg: #F2F7F5;
  --muted: #A9C0BD;
  --paper: #F4F1EA;
  --paper-ink: #12211F;

  --font-display: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell-max: 1320px;
  --gutter: 48px;
  --sp: 8px;
  --shadow-hard: 8px 8px 0 0 #041012;
  --t: 180ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(36, 70, 75, 0.28) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 70, 75, 0.28) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
table { border-collapse: collapse; width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--score);
  outline-offset: 3px;
}

/* ---------- 02 排版 ---------- */
h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
h4 { font-size: 18px; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 800; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 03 布局 ---------- */
.shell {
  width: 100%;
  max-width: calc(var(--shell-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ---------- 04 头部 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--score);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--ink);
  transform: translateY(-220%);
  transition: transform var(--t) linear;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: linear-gradient(180deg, rgba(7, 26, 31, 0.94) 0%, rgba(7, 26, 31, 0.5) 62%, rgba(7, 26, 31, 0) 100%);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t) linear, border-color var(--t) linear;
}

.site-header[data-scrolled] {
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 0 -10px rgba(0, 0, 0, 0.75);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: calc(var(--shell-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 14px var(--gutter);
  min-height: 78px;
}

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

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid var(--orange);
  background: rgba(255, 106, 42, 0.1);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.brand-mark::before { left: 4px; right: 4px; top: 50%; height: 1px; }
.brand-mark::after { top: 4px; bottom: 4px; left: 50%; width: 1px; }

.brand-mark-dot {
  position: relative;
  width: 12px;
  height: 12px;
  background: var(--score);
  box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.16);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 12px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color var(--t) linear, background-color var(--t) linear, border-color var(--t) linear;
}

.nav-link:hover {
  color: var(--fg);
  border-color: var(--line);
  background: rgba(36, 70, 75, 0.5);
}

.nav-link[aria-current="page"] {
  color: var(--fg);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--orange);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid var(--orange);
  box-shadow: 4px 4px 0 0 var(--orange-deep);
  transition: background-color var(--t) linear, color var(--t) linear, border-color var(--t) linear,
    box-shadow var(--t) linear, transform var(--t) linear;
}

.nav-cta:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
  color: var(--fg);
  box-shadow: 2px 2px 0 0 #041012;
  transform: translate(2px, 2px);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 12px 14px;
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--t) linear, color var(--t) linear;
}

.nav-toggle:hover { border-color: var(--score); color: var(--score); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  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: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* 移动底部快捷入口 */
.quick-rail { display: none; }

/* ---------- 05 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(90deg, rgba(36, 70, 75, 0.45) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 70, 75, 0.45) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  border-top: 3px solid var(--line);
  color: var(--fg);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.55fr);
  gap: 48px;
  padding-block: 64px 48px;
  border-bottom: 1px solid var(--line);
}

.footer-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 6px;
}

.footer-note {
  margin: 0;
  max-width: 32ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-cta { margin-top: 6px; }

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--fg);
}

.footer-col-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--orange);
  vertical-align: 1px;
}

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

.footer-link {
  display: inline-block;
  padding-left: 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--t) linear, border-color var(--t) linear;
}

.footer-link:hover {
  color: var(--fg);
  border-left-color: var(--orange);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 40px;
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--fg);
  word-break: break-word;
}

.copy-btn {
  margin-top: 2px;
  padding: 6px 12px;
  background: transparent;
  color: var(--score);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--t) linear, background-color var(--t) linear, color var(--t) linear;
}

.copy-btn:hover {
  border-color: var(--score);
  background: rgba(184, 255, 60, 0.12);
}

.copy-btn[data-copied] {
  background: var(--score);
  border-color: var(--score);
  color: var(--ink);
}

.copy-btn-text { pointer-events: none; }

.contact-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-base {
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-legal,
.footer-icp,
.footer-meta { margin: 0; }

.footer-icp { color: var(--fg); }
.footer-meta { color: var(--line); }

/* ---------- 06 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--t) linear, color var(--t) linear, border-color var(--t) linear,
    box-shadow var(--t) linear, transform var(--t) linear;
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
  box-shadow: 6px 6px 0 0 var(--orange-deep);
}

.btn--primary:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
  color: var(--fg);
  box-shadow: 3px 3px 0 0 #041012;
  transform: translate(3px, 3px);
}

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

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

.btn--score {
  background: var(--score);
  color: var(--ink);
  border-color: var(--score);
  box-shadow: 6px 6px 0 0 rgba(111, 155, 26, 0.55);
}

.btn--score:hover {
  box-shadow: 3px 3px 0 0 rgba(111, 155, 26, 0.55);
  transform: translate(3px, 3px);
}

.panel {
  position: relative;
  padding: 24px;
  background: var(--ink-2);
  border: 2px solid var(--line);
  transition: border-color var(--t) linear, transform var(--t) linear, box-shadow var(--t) linear;
}

.panel:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 10px 0 -6px rgba(0, 0, 0, 0.7);
}

.panel--accent {
  border-width: 3px;
  border-color: var(--orange);
  box-shadow: 10px 10px 0 0 rgba(199, 70, 22, 0.3);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(36, 70, 75, 0.4);
  border: 1px solid var(--line);
  color: var(--score);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-decoration: none;
  transition: border-color var(--t) linear, color var(--t) linear, background-color var(--t) linear;
}

.tag:hover {
  border-color: var(--orange);
  color: var(--fg);
}

.tag[data-active="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.crumbs {
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.crumb-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.crumb-item + .crumb-item::before {
  content: "›";
  color: var(--line);
}

.crumb-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t) linear, border-color var(--t) linear;
}

.crumb-link:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.crumb-current { color: var(--fg); }

.prose {
  padding: clamp(24px, 5vw, 64px);
  background: var(--paper);
  color: var(--paper-ink);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-hard);
  font-size: 17px;
  line-height: 1.85;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-serif);
  color: var(--paper-ink);
  line-height: 1.32;
  letter-spacing: 0;
}

.prose h2 { margin-top: 1.6em; font-size: clamp(24px, 3vw, 32px); }
.prose h3 { margin-top: 1.4em; font-size: clamp(19px, 2.2vw, 23px); }
.prose > :first-child { margin-top: 0; }
.prose p { color: #24403C; }
.prose ul,
.prose ol { margin: 0 0 1em 1.2em; padding-left: 0.4em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--paper-ink); }
.prose a {
  color: #0B5E63;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--orange-deep); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--orange);
  background: rgba(18, 33, 31, 0.06);
  font-family: var(--font-serif);
}
.prose code {
  padding: 2px 6px;
  background: rgba(18, 33, 31, 0.1);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- 07 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--line);
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(36, 70, 75, 0.7) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 70, 75, 0.7) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: border-color var(--t) linear;
}

.media-frame:hover { border-color: var(--orange); }

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

.media-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: rgba(7, 26, 31, 0.88);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--muted);
}

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

.media-frame--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

/* ---------- 08 响应式 ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 32px; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--ink-2);
    border-top: 1px solid var(--line);
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 24px 0 -16px rgba(0, 0, 0, 0.55);
    max-height: calc(100vh - 78px);
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
  }

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

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

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list li:last-child { border-bottom: 0; }

  .nav-link {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }

  .nav-link:hover {
    background: transparent;
    border-color: transparent;
    color: var(--score);
  }

  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    width: 24px;
    bottom: 12px;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 18px;
    padding: 15px 18px;
  }

  .quick-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--ink-2);
    border-top: 2px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .quick-rail-item {
    padding: 14px 6px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-decoration: none;
    border-right: 1px solid var(--line);
  }

  .quick-rail-item:last-child { border-right: 0; }

  .quick-rail-item:hover,
  .quick-rail-item:focus-visible {
    color: var(--ink);
    background: var(--score);
  }

  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  .site-footer { margin-top: 72px; }
}

@media (max-width: 760px) {
  :root { --gutter: 24px; }

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

  .footer-contact {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }

  body { font-size: 16px; }

  .header-bar { min-height: 72px; padding-block: 12px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 18px; }
  .brand-tag { display: none; }

  .site-nav { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); }

  .footer-top { padding-block: 48px 36px; }
  .footer-contact { padding-block: 32px; }
  .footer-base-inner { font-size: 11px; letter-spacing: 0.06em; }

  .prose { font-size: 16px; box-shadow: 6px 6px 0 0 #041012; }
}

/* ---------- 09 动效降级 ---------- */
@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;
  }

  .panel:hover,
  .btn:hover,
  .nav-cta:hover {
    transform: none;
  }
}
