/* ============================================================
   澳客赛场 · 共享样式表  /assets/site.css
   主题：高原夜赛数据台 —— 框架式导航 + 非对称编辑部版式
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --night:        #0A1730;
  --night-2:      #122448;
  --night-3:      #0d1f3e;
  --grid:         #7E8CA6;
  --white:        #EEF3FB;

  --flux:         #33F0C8;
  --flux-soft:    #A8FBEA;
  --heat:         #FF7A2F;
  --heat-deep:    #C4521A;

  --flag-blue:    #4C6FA8;
  --flag-red:     #B8503F;
  --flag-green:   #4A8B6B;
  --flag-yellow:  #D6B25C;

  --line:         rgba(126, 140, 166, 0.28);
  --line-soft:    rgba(126, 140, 166, 0.14);
  --flux-line:    rgba(51, 240, 200, 0.42);

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 2px;
  --rail: 0px;
  --wrap-max: 1240px;
}

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  padding-left: var(--rail);
  background-color: var(--night);
  background-image:
    linear-gradient(to right, rgba(126, 140, 166, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(126, 140, 166, 0.055) 1px, transparent 1px);
  background-size: 88px 88px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--flux);
  color: var(--night);
}

/* ---------- 3. 排版 ---------- */
h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(36px, 7vw, 88px); letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 3.4vw, 42px); }
h3 { font-size: clamp(18px, 2vw, 26px); }
h4 { font-size: 17px; }

p { max-width: 68ch; }

strong, b { font-weight: 700; color: var(--white); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.num--up   { color: var(--flux); }
.num--down { color: var(--flag-red); }

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

/* ---------- 4. 焦点与可访问 ---------- */
:focus { outline: none; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--flux);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 14px;
  z-index: 200;
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--flux);
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: top 0.16s var(--ease);
}

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

/* ---------- 5. 容器与网格 ---------- */
.wrap {
  width: min(100% - 36px, var(--wrap-max));
  margin-inline: auto;
}

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

@media (min-width: 900px) {
  .editorial-grid {
    grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
    gap: 48px;
  }
}

.note-rail {
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.08em;
  color: var(--grid);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.rail-vertical {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--grid);
}

@media (min-width: 900px) {
  .rail-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.34em;
    border-right: 1px solid var(--line);
    padding-right: 12px;
    min-height: 180px;
  }
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--flux-line);
  border-radius: var(--radius);
  background: rgba(51, 240, 200, 0.06);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.btn:hover {
  border-color: var(--flux);
  background: rgba(51, 240, 200, 0.13);
  color: var(--flux);
}

.btn:active { transform: translateY(1px); }

.btn-heat {
  border-color: transparent;
  background: linear-gradient(135deg, var(--heat) 0%, var(--heat-deep) 100%);
  color: #08152B;
}

.btn-heat:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #FF9455 0%, var(--heat) 100%);
  color: #08152B;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---------- 7. 头部：框架式导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
}

.header-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 23, 48, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--flux-line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(51, 240, 200, 0.2), rgba(255, 122, 47, 0.14));
  color: var(--flux);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--white);
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--grid);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars i {
  display: block;
  height: 1px;
  background: var(--flux);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

[data-header][data-open="true"] .nav-toggle-bars i:first-child {
  transform: translateY(2.5px) rotate(45deg);
}

[data-header][data-open="true"] .nav-toggle-bars i:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* --- 移动端抽屉 --- */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  padding: 82px 20px calc(96px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #0A1730 0%, #122448 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

[data-header][data-open="true"] .site-nav { display: flex; }

.nav-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

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

.nav-link {
  display: block;
  padding: 16px 14px 16px 16px;
  border-left: 2px solid transparent;
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-link:hover {
  color: var(--flux);
  border-left-color: rgba(51, 240, 200, 0.5);
  background: rgba(51, 240, 200, 0.05);
}

.nav-link[aria-current="page"] {
  color: var(--flux);
  border-left-color: var(--flux);
  background: rgba(51, 240, 200, 0.09);
}

.nav-quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.nav-mini {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--grid);
  padding: 4px 2px;
  transition: color 0.16s var(--ease);
}

.nav-mini:hover { color: var(--flux); }

.rail-caption { display: none; }

/* --- 移动端底部浮条 --- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 23, 48, 0.96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mobile-bar-text {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--grid);
}

@media (max-width: 1023.98px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
}

/* --- 桌面端：左侧固定框架轨道 --- */
@media (min-width: 1024px) {
  :root { --rail: 236px; }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail);
    height: 100vh;
    z-index: 80;
  }

  .header-rail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100%;
    padding: 26px 20px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: linear-gradient(180deg, #122448 0%, #0A1730 62%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: auto;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    inset: auto;
    display: flex;
    flex: 1 1 auto;
    padding: 16px 0 0;
    background: none;
    overflow: visible;
  }

  .nav-list { border-top: 0; }

  .nav-item { border-bottom: 0; }

  .nav-link {
    padding: 11px 8px 11px 12px;
    font-size: 15px;
    letter-spacing: 0.05em;
  }

  .nav-quick {
    margin-top: auto;
    padding-top: 18px;
    gap: 8px;
  }

  .nav-quick .btn { padding: 10px 12px; font-size: 13px; }

  .nav-mini { font-size: 12px; }

  .rail-caption {
    display: block;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    line-height: 1.9;
    letter-spacing: 0.2em;
    color: var(--grid);
  }

  .mobile-bar { display: none; }
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 36, 72, 0.7) 0%, rgba(6, 14, 30, 0.98) 100%);
}

.footer-inner {
  width: min(100% - 36px, var(--wrap-max));
  margin-inline: auto;
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

@media (min-width: 720px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; }
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 32px;
    padding: 64px 0 48px;
  }
}

.footer-lead { display: flex; flex-direction: column; gap: 14px; }

.footer-claim {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--white);
  max-width: 14ch;
}

.footer-claim::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--flux), var(--heat));
}

.footer-note {
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--grid);
  max-width: 30ch;
}

.footer-col-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--grid);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(238, 243, 251, 0.78);
  word-break: break-word;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-link:hover {
  color: var(--flux);
  border-bottom-color: var(--flux-line);
}

.footer-base {
  width: min(100% - 36px, var(--wrap-max));
  margin-inline: auto;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 720px) {
  .footer-base {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
}

.footer-legal,
.footer-service {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: var(--grid);
  max-width: none;
}

.footer-service { color: rgba(126, 140, 166, 0.85); }

/* ---------- 9. 通用内容组件 ---------- */
.section-head {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--flux);
}

.section-title { margin: 0; }

.section-sub {
  font-size: 15px;
  line-height: 1.8;
  color: var(--grid);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--grid);
}

.breadcrumb-item { color: var(--grid); transition: color 0.16s var(--ease); }
.breadcrumb-item:hover { color: var(--flux); }

.breadcrumb-sep { color: rgba(126, 140, 166, 0.5); }

.compose-block {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.compose-block--sm { padding: 18px 0; }

.compose-block--xs { padding: 12px 0; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 11px 16px;
  border-bottom: 2px solid transparent;
  color: var(--grid);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tab:hover { color: var(--white); }

.tab[aria-selected="true"] {
  color: var(--flux);
  border-bottom-color: var(--flux);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--night-2);
}

.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.panel-body { padding: 18px; }

[hidden] { display: none !important; }

.data-card {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 36, 72, 0.9), rgba(10, 23, 48, 0.9));
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.data-card:hover { border-color: var(--flux-line); }

.data-card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
}

.data-card-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  font-size: 12px;
  line-height: 1.75;
  color: var(--grid);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.24s var(--ease), opacity 0.24s var(--ease), margin-top 0.24s var(--ease);
}

.data-card:hover .data-card-foot,
.data-card:focus-within .data-card-foot {
  max-height: 120px;
  opacity: 1;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--flux-line);
  border-radius: var(--radius);
  color: var(--flux);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--red    { border-color: rgba(184, 80, 63, 0.6);  color: #D98C7C; }
.tag--green  { border-color: rgba(74, 139, 107, 0.6); color: #7CC4A1; }
.tag--yellow { border-color: rgba(214, 178, 92, 0.6); color: var(--flag-yellow); }
.tag--blue   { border-color: rgba(76, 111, 168, 0.7); color: #9DB8E0; }

.track {
  display: flex;
  gap: 16px;
  padding-bottom: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.track > * {
  flex: 0 0 min(300px, 78vw);
  scroll-snap-align: start;
}

/* ---------- 10. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--night-2);
  aspect-ratio: 16 / 9;
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.06);
}

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

.media-frame--grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(238, 243, 251, 0.5) 0px,
    rgba(238, 243, 251, 0.5) 1px,
    transparent 1px,
    transparent 3px
  );
}

.media-caption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--grid);
}

/* ---------- 11. 显现与滚动进度 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 95;
  pointer-events: none;
  background: transparent;
}

.scroll-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--flux) 0%, var(--flux-soft) 48%, var(--heat) 100%);
  box-shadow: 0 0 10px rgba(51, 240, 200, 0.4);
}

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

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

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

  .data-card-foot {
    max-height: none;
    opacity: 1;
  }
}
