/* =========================================================
   冠竞看台 · 共享外壳样式 /assets/site.css
   炭黑框架 + 深墨绿基底 + 青柠脉冲
   ========================================================= */

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

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

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

ul, ol { padding: 0; }

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

button { font: inherit; }

/* ---------- tokens ---------- */
:root {
  --ink: #12110F;
  --bg: #0E1A16;
  --moss: #2A3B32;
  --rock: #7A8578;
  --clay: #B4744F;
  --paper: #F2EFE6;
  --lime: #C6FF3D;
  --orange: #FF6A2B;
  --pulse: #4CE0C8;
  --pale: #D8DCD2;

  --line: rgba(242, 239, 230, 0.13);
  --line-soft: rgba(242, 239, 230, 0.07);
  --line-strong: rgba(242, 239, 230, 0.30);

  --rail-w: 58px;
  --bar-h: 64px;
  --radius: 3px;

  --font-display: "Helvetica Neue", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono", "Courier New", monospace;
}

/* ---------- base ---------- */
body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  min-height: 100vh;
  padding-top: var(--bar-h);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--paper);
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6vw, 56px); line-height: 1.06; }
h2 { font-size: clamp(26px, 3.4vw, 32px); line-height: 1.16; }
h3 { font-size: 20px; line-height: 1.3; }
h4 { font-size: 17px; line-height: 1.35; }

p { margin-bottom: 1em; }

a { color: inherit; }

::selection { background: var(--lime); color: var(--ink); }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-220%);
  background: var(--lime);
  color: var(--ink);
  padding: 11px 18px;
  border-radius: var(--radius);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.16s ease;
}

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

/* ---------- header frame ---------- */
.site-header { position: relative; z-index: 120; }

.frame-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  background: var(--ink);
  border-right: 1px solid var(--line);
  z-index: 130;
}

.rail-label {
  writing-mode: vertical-rl;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.34em;
  color: var(--rock);
}

.rail-foot {
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--lime);
  opacity: 0.75;
}

.rail-marks {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 0;
}

.rail-mark {
  display: block;
  width: 9px;
  height: 1px;
  background: var(--line-strong);
}

.rail-mark.is-major {
  width: 21px;
  height: 2px;
  background: var(--rock);
}

.rail-track {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: var(--line-soft);
}

.rail-scroll {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top center;
  background: linear-gradient(180deg, var(--lime) 0%, var(--pulse) 100%);
  will-change: transform;
}

/* ---------- header bar ---------- */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  z-index: 125;
  background: rgba(18, 17, 15, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  height: 100%;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(14px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  border-radius: 2px;
  font: 700 13px/1 var(--font-mono);
  letter-spacing: -0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.brand-slogan {
  font: 500 10px/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--rock);
  white-space: nowrap;
}

/* ---------- navigation ---------- */
.primary-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.1vw, 16px);
}

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 10px;
  color: var(--pale);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-link:hover { color: var(--paper); border-bottom-color: var(--lime); }

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

.nav-i {
  font: 500 10px/1 var(--font-mono);
  color: var(--rock);
  letter-spacing: 0.04em;
}

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

/* ---------- header actions ---------- */
.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font: 600 13.5px/1.2 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.btn-primary:hover { background: #d9ff70; transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--pale);
}

.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-clay {
  background: var(--clay);
  color: var(--paper);
}

.btn-clay:hover { background: #c8835c; }

/* ---------- mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--paper);
  cursor: pointer;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  transition: border-color 0.16s ease, color 0.16s ease;
}

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

.nav-toggle-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-lines i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--lime);
  color: var(--lime);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

.nav-toggle-label { white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  display: block;
  height: 12px;
  background-image:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(90deg, rgba(242, 239, 230, 0.12) 0 1px, transparent 1px 18px);
  background-size: 100% 12px, 100% 6px;
  background-repeat: repeat-x;
  background-position: top left, bottom left;
  border-bottom: 1px solid var(--line);
}

.footer-main {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 64px) clamp(16px, 4vw, 40px) clamp(24px, 3vw, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.9fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 64px);
}

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

.brand--footer .brand-name { font-size: 19px; }

.brand--footer .brand-slogan { letter-spacing: 0.1em; }

.footer-slogan {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0;
}

.footer-meta {
  font: 500 12px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--rock);
  margin: 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lime);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: var(--pale);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

.footer-contact { display: flex; flex-direction: column; gap: 12px; }

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list li { display: flex; flex-direction: column; gap: 3px; }

.contact-label {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  color: var(--rock);
}

.contact-value {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer-note {
  font: 400 12.5px/1.8 var(--font-body);
  color: var(--rock);
  padding-left: 12px;
  border-left: 1px solid var(--clay);
  margin: 0;
}

.footer-base {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 18px clamp(16px, 4vw, 40px) 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  font: 500 12px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--rock);
}

.footer-copy,
.footer-icp { margin: 0; }

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.wrap--wide { max-width: 1440px; }

.section { padding-block: clamp(48px, 7vw, 96px); }

.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--lime);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(16px, 3vw, 44px);
  margin-bottom: clamp(24px, 4vw, 46px);
}

.section-note {
  font: 500 13px/1.75 var(--font-mono);
  color: var(--rock);
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

/* ---------- generic blocks ---------- */
.card {
  background: var(--moss);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 24px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.card:hover {
  border-color: var(--lime);
  background: #2F4338;
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.32;
  margin-bottom: 0.5em;
  color: var(--paper);
}

.card-meta {
  font: 500 12px/1.6 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--rock);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 11px/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--pale);
}

.badge--live { border-color: var(--lime); color: var(--lime); }
.badge--warn { border-color: var(--orange); color: var(--orange); }
.badge--data { border-color: var(--pulse); color: var(--pulse); }

.tag {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--clay);
  border-bottom: 1px dashed var(--clay);
  padding-bottom: 2px;
}

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

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

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font: 500 12px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--rock);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 10px;
  color: var(--line-strong);
}

.breadcrumb li:last-child::after { content: ""; margin: 0; }

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

.breadcrumb a:hover { color: var(--lime); }

/* ---------- prose ---------- */
.prose {
  max-width: 68ch;
  color: #DCDBD1;
}

.prose p { margin-bottom: 1.1em; }
.prose strong { color: var(--paper); }
.prose a { color: var(--lime); text-decoration-thickness: 1px; }
.prose h2 { margin: 1.6em 0 0.6em; }
.prose h3 { margin: 1.4em 0 0.5em; }
.prose ul,
.prose ol { margin: 0 0 1.1em 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- grid ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- media frame (页面阶段放图) ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(76, 224, 200, 0.10) 0%, transparent 58%),
    linear-gradient(135deg, #17251E 0%, #0C1714 58%, #12110F 100%);
}

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

.media-frame--overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 17, 15, 0) 42%, rgba(18, 17, 15, 0.72) 100%);
}

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

.mlabel {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 9px;
  background: rgba(18, 17, 15, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--lime);
}

/* ---------- reveal ---------- */
html[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- responsive ---------- */
@media (min-width: 1080px) {
  :root { --bar-h: 70px; }

  body { padding-left: var(--rail-w); }

  .frame-rail { display: flex; }

  .header-bar { left: var(--rail-w); }
}

@media (max-width: 1079px) {
  .header-actions { display: none; }

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

  .primary-nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.25rem clamp(16px, 5vw, 30px) 3rem;
    background: var(--ink);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .primary-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 1rem 0.25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    border-bottom: none;
  }

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

  .nav-i { font-size: 11px; }
}

@media (max-width: 1020px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-note { border-left: 0; border-top: 1px solid var(--line-strong); padding: 12px 0 0; }
}

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

@media (max-width: 700px) {
  body { font-size: 16px; }

  .brand-slogan { display: none; }

  .footer-main { grid-template-columns: 1fr; }

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

  .footer-base { flex-direction: column; align-items: flex-start; }
}

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

/* ---------- motion preferences ---------- */
@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;
  }

  html[data-js="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }

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