/* ============================================================
   云体育看台 · 共享样式表 /assets/site.css
   1. reset  2. tokens  3. 中文排版  4. 布局  5. 通用组件
   6. 页头   7. 页脚   8. 动效与可访问性
   ============================================================ */

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

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

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

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

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

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

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

/* 2. tokens ------------------------------------------------ */
:root {
  --ink-900: #0D1A23;
  --ink-800: #162A36;
  --ink-700: #274454;
  --ink-500: #607D8F;
  --ink-300: #A9BAC6;
  --paper: #F3F7F9;
  --orange: #FF6A2A;
  --cyan: #24C7BE;
  --yellow: #F5B841;
  --on-orange: #08141C;

  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 14px;
  --pill: 999px;

  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 40px);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --line: rgba(96, 125, 143, 0.24);
  --line-soft: rgba(96, 125, 143, 0.16);
}

/* 3. 中文排版 ---------------------------------------------- */
body {
  background-color: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.55vw + 12.6px, 17px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

h1 { font-size: clamp(2rem, 4.6vw + 0.6rem, 4rem); line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 2.4vw + 0.8rem, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.2vw + 0.9rem, 1.45rem); }

p { text-wrap: pretty; }

::selection {
  background-color: var(--cyan);
  color: var(--on-orange);
}

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

.section {
  padding-block: clamp(40px, 6vw, 88px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.prose {
  max-width: 72ch;
  color: var(--ink-300);
}

.prose h2,
.prose h3 {
  color: var(--paper);
  margin-top: 1.6em;
}

.prose h2:first-child,
.prose h3:first-child { margin-top: 0; }

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

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(36, 199, 190, 0.45);
}

.prose a:hover { border-bottom-color: var(--cyan); }

.prose ul {
  margin-block: 1em;
  display: grid;
  gap: 0.5em;
}

.prose ul li {
  position: relative;
  padding-left: 20px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--orange);
}

/* 5. 通用组件 ---------------------------------------------- */
.page-title { font-size: clamp(2rem, 5.2vw, 4rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.lede {
  font-size: clamp(1rem, 0.6vw + 0.86rem, 1.15rem);
  line-height: 1.72;
  color: var(--ink-300);
  max-width: 60ch;
}

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

.panel {
  background-color: var(--ink-800);
  border-radius: var(--radius-md);
  padding: clamp(20px, 2.6vw, 32px);
  box-shadow: inset 0 0 0 1px var(--line);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--pill);
  background-color: var(--orange);
  color: var(--on-orange);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease),
    box-shadow 180ms var(--ease), color 180ms var(--ease);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 106, 42, 0.28);
}

.cta--sm {
  padding: 10px 18px;
  font-size: 13px;
}

.cta--ghost {
  background-color: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(243, 247, 249, 0.28);
}

.cta--ghost:hover {
  background-color: rgba(36, 199, 190, 0.14);
  box-shadow: inset 0 0 0 1px var(--cyan);
  color: var(--cyan);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background-color: rgba(96, 125, 143, 0.2);
  color: var(--ink-300);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.tag--live { background-color: rgba(255, 106, 42, 0.16); color: var(--orange); }
.tag--ok { background-color: rgba(36, 199, 190, 0.14); color: var(--cyan); }
.tag--warn { background-color: rgba(245, 184, 65, 0.16); color: var(--yellow); }

.breadcrumbs { padding-block: clamp(16px, 2.4vw, 28px) 0; }

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.breadcrumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs__list li::after {
  content: "/";
  color: var(--ink-700);
}

.breadcrumbs__list li:last-child::after { content: none; }

.breadcrumbs a:hover { color: var(--cyan); }

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

/* 图片容器基础规则（页面阶段放置图片占位） */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--ink-700);
  aspect-ratio: var(--frame-ratio, 16 / 9);
  box-shadow: inset 0 0 0 1px rgba(96, 125, 143, 0.32);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(96, 125, 143, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(96, 125, 143, 0.24) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(120% 100% at 18% 0%, #000 28%, transparent 82%);
  mask-image: radial-gradient(120% 100% at 18% 0%, #000 28%, transparent 82%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    135deg,
    rgba(36, 199, 190, 0.16),
    rgba(13, 26, 35, 0) 52%,
    rgba(255, 106, 42, 0.18)
  );
  pointer-events: none;
}

.media-frame > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: clamp(16px, 3vw, 32px);
  height: 100%;
  text-align: center;
}

.media-frame__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-300);
}

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

/* 6. 页头 -------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--pill);
  background-color: var(--cyan);
  color: var(--on-orange);
  font-size: 14px;
  font-weight: 700;
  transition: top 180ms var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ink-900);
}

.header-masthead {
  background-color: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
}

.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  padding-block: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex: none;
}

.brand__mark {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background-color: var(--orange);
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 1px rgba(8, 20, 28, 0.18);
}

.brand__mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid var(--on-orange);
  border-radius: 3px;
  border-bottom-color: transparent;
  border-right-color: transparent;
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--on-orange);
}

.brand__text { display: block; min-width: 0; }

.brand__name {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
}

.brand__sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  white-space: nowrap;
}

.masthead__note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(36, 199, 190, 0.16);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  flex: none;
}

.masthead__status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  white-space: nowrap;
}

.header-nav {
  position: relative;
  z-index: 4;
  background-color: var(--ink-800);
  border-bottom: 1px solid var(--line-soft);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 20px);
  padding-block: 9px;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__link {
  display: inline-block;
  padding: 11px 16px;
  border-radius: var(--pill);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-300);
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.site-nav__link:hover {
  background-color: var(--ink-700);
  color: var(--paper);
}

.site-nav__link[aria-current="page"] {
  background-color: var(--orange);
  color: var(--on-orange);
  font-weight: 700;
}

.site-nav__foot { display: none; }

.nav-aside {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: none;
  padding: 8px 14px;
  border-radius: var(--pill);
  background-color: rgba(36, 199, 190, 0.1);
  box-shadow: inset 0 0 0 1px rgba(36, 199, 190, 0.35);
  transition: background-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.nav-aside:hover {
  background-color: rgba(36, 199, 190, 0.18);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.nav-aside__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.nav-aside__value {
  font-size: 13px;
  color: var(--paper);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px 16px;
  border-radius: var(--pill);
  background-color: var(--ink-700);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.nav-toggle[aria-expanded="true"] {
  background-color: var(--orange);
  color: var(--on-orange);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
  height: 14px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

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

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

.nav-toggle__label { line-height: 1; }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  z-index: 5;
  border-radius: 0 3px 3px 0;
  background-image: linear-gradient(90deg, var(--orange), var(--cyan));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
  transition: transform 120ms linear;
}

/* 7. 页脚 -------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 96px);
  background-color: var(--ink-800);
  color: var(--ink-300);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.75fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(40px, 5vw, 72px);
}

.brand--footer {
  min-height: 0;
  margin-bottom: 20px;
}

.footer-brand__line {
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-300);
}

.footer-brand__note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--yellow);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-500);
  max-width: 42ch;
}

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

.footer-col__title {
  position: relative;
  padding-top: 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.footer-col__title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--orange);
}

.footer-list {
  display: grid;
  gap: 9px;
  font-size: 14px;
}

.footer-list a {
  color: var(--ink-300);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.footer-list a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-list--data { gap: 12px; }

.footer-list--data li {
  display: grid;
  gap: 2px;
}

.k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.v {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--paper);
  word-break: break-word;
}

.footer-base {
  background-color: var(--ink-900);
  border-top: 1px solid var(--line-soft);
  padding-block: 18px;
}

.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}

.footer-copy { color: var(--ink-500); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-legal a {
  color: var(--ink-300);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.footer-legal a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-icp { color: var(--ink-500); }

.to-top {
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--pill);
  background-color: var(--ink-700);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  box-shadow:
    0 14px 30px rgba(8, 20, 28, 0.55),
    inset 0 0 0 1px rgba(36, 199, 190, 0.42);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease),
    background-color 200ms var(--ease), color 200ms var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background-color: var(--cyan);
  color: var(--on-orange);
}

/* 8. 动效与可访问性 ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.site-nav__link:focus-visible,
.cta:focus-visible,
.nav-toggle:focus-visible,
.to-top:focus-visible {
  border-radius: var(--pill);
}

/* 响应式：平板横向 */
@media (max-width: 1080px) {
  .masthead__note { display: none; }
  .nav-aside { display: none; }
  .masthead {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }
  .masthead__actions { justify-self: end; }
}

/* 响应式：平板竖向 / 移动导航 */
@media (max-width: 900px) {
  html { scroll-padding-top: 128px; }

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

  .nav-bar {
    padding-block: 8px;
    justify-content: space-between;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 6;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 12px var(--gutter) 20px;
    background-color: var(--ink-800);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 26px 48px rgba(8, 20, 28, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease),
      visibility 200ms var(--ease);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
  }

  .site-nav__link {
    display: block;
    padding: 13px 18px;
    font-size: 16px;
  }

  .site-nav__foot {
    display: block;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
  }

  .site-nav__foot .cta { width: 100%; }

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

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

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

/* 响应式：手机 */
@media (max-width: 760px) {
  .masthead__status { display: none; }
  .masthead { padding-block: 10px; }
  .brand__mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand__name { font-size: 16px; }
  .brand__sub { font-size: 9.5px; letter-spacing: 0.14em; }
  .footer-base__inner { justify-content: flex-start; }
  .footer-copy { flex: 1 1 100%; }
}

@media (max-width: 560px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .brand__sub { display: none; }
  .cta { width: 100%; }
  .masthead__actions .cta { width: auto; }
  .to-top { padding: 11px 16px; font-size: 12px; }
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .to-top {
    transform: none;
  }
}
