/* ============================================================
   盈嘉体育 · 共享层 site.css
   夜间记分牌控制台：墨绿托底 / 青绿脉冲 / 琥珀归档
   ============================================================ */

/* ---------- 1. 令牌 ---------- */
:root {
  --ink: #0B211B;
  --ink-2: #123128;
  --ink-3: #08160F;
  --pitch: #3BF0A8;
  --pitch-soft: #8FF7CE;
  --amber: #F0B429;
  --sand: #F4F1E8;
  --on-sand: #0E2A22;
  --muted: #7E9A8E;
  --muted-deep: #5C7A6F;
  --coral: #FF6B5A;

  --line: rgba(126, 154, 142, 0.22);
  --line-soft: rgba(126, 154, 142, 0.14);
  --line-strong: rgba(59, 240, 168, 0.42);

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

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

main {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 2px;
}

/* ---------- 3. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background-color: var(--pitch);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

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

/* ---------- 4. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: padding 0.28s ease, background-color 0.28s ease,
    border-color 0.28s ease;
}

.site-header[data-scrolled="true"] {
  padding: 10px 0;
  background-color: rgba(11, 33, 27, 0.95);
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(244, 241, 232, 0.05) 1px,
    transparent 0
  );
  background-size: 4px 4px;
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 品牌 */
.brand {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  background-color: var(--ink-2);
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
}

.brand-mark i {
  position: absolute;
  left: 10px;
  height: 2px;
  border-radius: 1px;
  background-color: var(--pitch);
  transform: rotate(-12deg);
  transform-origin: left center;
}

.brand-mark i:nth-child(1) {
  top: 11px;
  width: 17px;
}

.brand-mark i:nth-child(2) {
  top: 18px;
  width: 12px;
  background-color: var(--amber);
}

.brand-mark i:nth-child(3) {
  top: 25px;
  width: 7px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sand);
  white-space: nowrap;
}

.brand-note {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  margin-left: auto;
}

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

.nav-list > li {
  display: flex;
  align-items: center;
}

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

.nav-link {
  position: relative;
  display: block;
  padding: 10px 13px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--pitch-soft);
}

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

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

/* 头部快捷入口 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background-color: transparent;
  border: 1px solid var(--line);
  color: var(--sand);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.btn--solid {
  background-color: var(--pitch);
  border-color: var(--pitch);
  color: var(--ink-3);
}

.btn--solid:hover {
  background-color: var(--pitch-soft);
  border-color: var(--pitch-soft);
}

.btn--ghost {
  border-color: rgba(126, 154, 142, 0.42);
  color: var(--sand);
}

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

.btn--amber {
  border-color: rgba(240, 180, 41, 0.5);
  color: var(--amber);
}

.btn--amber:hover {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--ink-3);
}

/* 移动导航按钮 */
.nav-toggle {
  position: relative;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 13px;
  background-color: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

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

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

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

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

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

.site-header[data-open="true"] .nav-toggle-bars i:nth-child(2) {
  opacity: 0;
}

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

/* ---------- 5. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 120px;
  padding: 88px 0 36px;
  background-color: var(--ink-3);
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(244, 241, 232, 0.04) 1px,
    transparent 0
  );
  background-size: 5px 5px;
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-image: repeating-linear-gradient(
    -12deg,
    var(--amber) 0 10px,
    transparent 10px 28px
  );
  opacity: 0.55;
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px 32px;
}

.footer-brand .brand {
  margin-bottom: 22px;
}

.footer-tagline {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.footer-contact {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.7;
}

.footer-key {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted-deep);
}

.footer-val {
  color: var(--sand);
  word-break: break-word;
}

.footer-col-title {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--amber);
}

.footer-links li + li {
  margin-top: 11px;
}

.footer-link {
  display: inline-block;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--pitch-soft);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  margin-top: 68px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.footer-meta-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted-deep);
}

/* ---------- 6. 通用排版 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow {
  max-width: 860px;
}

.section {
  padding: clamp(64px, 9vw, 140px) 0;
}

.section--ink2 {
  background-color: var(--ink-2);
}

.section--sand {
  background-color: var(--sand);
  color: var(--on-sand);
}

.section--sand .note,
.section--sand .stat-label,
.section--sand .eyebrow {
  color: var(--muted-deep);
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--sand);
}

.h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.h2 {
  font-size: clamp(22px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.body-text {
  font-size: 17px;
  line-height: 1.75;
}

.note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--pitch);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 1px;
  height: 14px;
  background-color: currentColor;
}

.slant-rule {
  height: 2px;
  margin: 0;
  border: 0;
  background-image: repeating-linear-gradient(
    -12deg,
    var(--line-strong) 0 12px,
    transparent 12px 30px
  );
  opacity: 0.6;
}

/* ---------- 7. 网格与卡片 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

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

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

.panel {
  position: relative;
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    0 100%
  );
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--cut);
  height: var(--cut);
  background-image: linear-gradient(
    to bottom left,
    var(--line-strong) 0 1px,
    transparent 1px
  );
  pointer-events: none;
}

.panel--sand {
  background-color: var(--sand);
  border-color: rgba(14, 42, 34, 0.14);
  color: var(--on-sand);
}

.panel--sand .note,
.panel--sand .stat-label {
  color: var(--muted-deep);
}

.panel--amber {
  border-color: rgba(240, 180, 41, 0.4);
}

/* ---------- 8. 组件 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--pitch);
}

.panel--sand .stat-num {
  color: var(--on-sand);
}

.stat-label {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  border: 1px solid rgba(240, 180, 41, 0.45);
  color: var(--amber);
}

.tag--pitch {
  border-color: var(--line-strong);
  color: var(--pitch);
}

.tag--coral {
  border-color: rgba(255, 107, 90, 0.5);
  color: var(--coral);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--pitch);
}

.link-arrow::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

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

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(126, 154, 142, 0.5);
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--sand);
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
}

.prose p + p {
  margin-top: 1.1em;
}

.prose h2 {
  margin: 2em 0 0.6em;
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.35;
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin: 0.4em 0;
}

.prose strong {
  font-weight: 700;
  color: var(--pitch-soft);
}

.section--sand .prose strong {
  color: var(--on-sand);
}

/* ---------- 9. 图片容器基础规则 ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    0 100%
  );
}

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

.img-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background-image: linear-gradient(
    to top,
    rgba(8, 22, 15, 0.82),
    rgba(8, 22, 15, 0)
  );
}

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--tall {
  aspect-ratio: 4 / 5;
}

.img-frame--slanted {
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 44px),
    calc(100% - 44px) 100%,
    0 100%
  );
}

/* ---------- 10. 动效协议 ---------- */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.34s ease, transform 0.34s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1120px) {
  .header-actions {
    display: none;
  }

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

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 100px var(--gutter) 48px;
    overflow-y: auto;
    background-color: var(--ink);
    background-image: radial-gradient(
      circle at 1px 1px,
      rgba(244, 241, 232, 0.05) 1px,
      transparent 0
    );
    background-size: 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.26s ease, transform 0.26s ease, visibility 0.26s ease;
  }

  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-header[data-open="true"] {
    background-color: var(--ink);
    border-bottom-color: var(--line);
  }

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

  .nav-list > li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav-link {
    padding: 20px 2px;
    font-family: var(--font-display);
    font-size: clamp(20px, 5.4vw, 26px);
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--sand);
  }

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

  .nav-link[aria-current="page"]::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: 1 / -1;
  }

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

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

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

  .site-footer {
    margin-top: 88px;
    padding-top: 68px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 18px;
    --cut: 14px;
  }

  body {
    font-size: 16px;
  }

  .brand-name {
    font-size: 16px;
  }

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

  .footer-contact li {
    grid-template-columns: 62px 1fr;
    gap: 10px;
  }

  .footer-meta {
    margin-top: 48px;
    gap: 6px 20px;
  }
}

/* ---------- 12. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

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