/* =========================================================
   星空体育官网 — 共享样式  /assets/site.css
   头部 · 页脚 · 通用组件 · 基础排版
   ========================================================= */

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

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

body {
  margin: 0;
  min-height: 100vh;
}

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

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

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

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

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

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --space-bg: #0A1128;
  --midnight: #1B2A4A;
  --nebula: #2E1A47;
  --cyan: #00E5FF;
  --orange: #FF8A00;
  --red: #FF3D5A;
  --text: #E6F1FF;
  --muted: #8A9BB5;
  --line: #2A3B5C;

  --rail-w: 72px;
  --bar-h: 56px;
  --wrap: 1200px;
  --radius: 14px;

  --font-head: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Roboto Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-soft: 0 20px 44px -34px rgba(0, 0, 0, .95);
}

/* ---------- 3. Base typography ---------- */
body {
  background-color: var(--space-bg);
  background-image:
    radial-gradient(1100px 620px at 84% -8%, rgba(46, 26, 71, .92), rgba(46, 26, 71, 0) 62%),
    radial-gradient(900px 520px at 4% 0%, rgba(0, 229, 255, .09), rgba(0, 229, 255, 0) 60%),
    radial-gradient(700px 420px at 50% 108%, rgba(255, 138, 0, .06), rgba(255, 138, 0, 0) 65%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: .012em;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.012em;
}

h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); }

.num,
.mono,
time,
.version-tag,
.league-tab,
.league-bar__status { font-family: var(--font-mono); }

.num,
time { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

::selection { background: rgba(0, 229, 255, .28); color: #fff; }

/* ---------- 4. Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 90;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--cyan);
  color: #04121c;
  font-weight: 700;
  font-size: .86rem;
  transition: top .22s var(--ease);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.section { padding-block: clamp(40px, 6vw, 76px); }
.section--tight { padding-block: clamp(26px, 4vw, 44px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(18px, 3vw, 30px);
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 16px);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 24px); }
.grid--2,
.grid--3 { grid-template-columns: 1fr; }

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

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 5. Buttons & tags ---------- */
.btn {
  --btn-bg: var(--cyan);
  --btn-fg: #04121c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: .62em 1.15em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(0, 229, 255, .8);
}

.btn--signal {
  --btn-bg: var(--orange);
  --btn-fg: #1a0d00;
}

.btn--signal:hover { box-shadow: 0 12px 26px -14px rgba(255, 138, 0, .85); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .3em .72em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 17, 40, .6);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
}

.tag--cyan { color: var(--cyan); border-color: rgba(0, 229, 255, .45); }
.tag--orange { color: var(--orange); border-color: rgba(255, 138, 0, .45); }
.tag--live { color: var(--red); border-color: rgba(255, 61, 90, .5); }

.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- 6. Cards ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(27, 42, 74, .88), rgba(27, 42, 74, .5));
  box-shadow: inset 0 1px 0 rgba(230, 241, 255, .04), var(--shadow-soft);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.card:hover {
  border-color: rgba(0, 229, 255, .45);
  transform: translateY(-3px);
}

.card--nebula { background: linear-gradient(160deg, rgba(46, 26, 71, .95), rgba(27, 42, 74, .55)); }

.card__eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--muted);
}

.card__title {
  margin-top: 8px;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
}

.card__text {
  margin-top: 8px;
  font-size: .93rem;
  color: var(--muted);
}

/* ---------- 7. Breadcrumb & prose ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--muted);
}

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

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

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--line);
}

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

.prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.78;
  color: rgba(230, 241, 255, .86);
}

.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { list-style: disc; padding-left: 1.25em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--text); }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0, 229, 255, .4);
  text-underline-offset: 3px;
}

/* ---------- 8. Media frames ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(158deg, #101c3d 0%, #2E1A47 56%, #0A1128 100%);
}

.media-frame > img,
.media-frame > svg,
.media-frame > .media-frame__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame--pitch::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(230, 241, 255, .06) 0 1px, transparent 1px 64px),
    radial-gradient(circle at 50% 118%, rgba(0, 229, 255, .22), transparent 58%);
  pointer-events: none;
}

.media-frame__art { pointer-events: none; }

/* ---------- 9. Header ---------- */
.site-head {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 17, 40, .96), rgba(10, 17, 40, .86));
}

.head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 12px clamp(16px, 4vw, 32px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(150deg, #14224c, var(--nebula));
  color: var(--cyan);
  box-shadow: inset 0 1px 0 rgba(230, 241, 255, .06);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand__name {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.brand__claim {
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--muted);
}

.head-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-tag {
  padding: 3px 9px;
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 999px;
  color: var(--cyan);
  font-size: .72rem;
  letter-spacing: .1em;
}

/* --- nav toggle --- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(27, 42, 74, .65);
  color: var(--text);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color .2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease);
}

.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 { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* --- primary nav --- */
.site-nav { border-top: 1px solid var(--line); }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(8px, 3vw, 24px);
}

.site-nav__link {
  display: block;
  padding: 13px 16px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.site-nav__link:hover { color: var(--text); }

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* --- league bar --- */
.league-bar {
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(27, 42, 74, .9), rgba(46, 26, 71, .45) 48%, rgba(10, 17, 40, .5));
}

.league-bar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar-h);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.league-bar__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--muted);
  text-transform: uppercase;
}

.league-tabs {
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.league-tabs::-webkit-scrollbar { display: none; }

.league-tab {
  flex: none;
  padding: .42em .95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 17, 40, .5);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}

.league-tab:hover { color: var(--text); border-color: var(--muted); }

.league-tab[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04121c;
}

.league-bar__status {
  flex: none;
  display: none;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--orange);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .league-bar__status { display: block; }
}

/* --- fixed feedback rail --- */
.rail {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-right: 1px solid var(--line);
  background: rgba(10, 17, 40, .92);
}

.rail__link {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 14px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .3em;
  transition: color .22s var(--ease), border-color .22s var(--ease), background-color .22s var(--ease);
}

.rail__link:hover {
  color: #04121c;
  background: var(--orange);
  border-color: var(--orange);
}

.rail__track {
  position: relative;
  width: 3px;
  height: 132px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.rail__fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--cyan), var(--orange));
  will-change: height;
}

@media (min-width: 1100px) {
  .rail { display: flex; }
  body { padding-left: var(--rail-w); }
}

/* ---------- 10. Footer ---------- */
.site-foot {
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(46, 26, 71, .55), rgba(27, 42, 74, .4) 42%, rgba(10, 17, 40, .98));
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  padding-block: clamp(34px, 5vw, 56px) 26px;
}

@media (min-width: 720px) {
  .foot-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-brand .brand__name {
  font-size: 1.34rem;
  font-weight: 800;
  letter-spacing: .07em;
}

.foot-brand .brand__claim {
  font-size: .74rem;
  letter-spacing: .32em;
  color: var(--cyan);
}

.foot-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.foot-link {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  color: rgba(230, 241, 255, .82);
  font-size: .9rem;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.foot-link:hover {
  color: var(--cyan);
  border-bottom-color: rgba(0, 229, 255, .5);
}

.foot-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .86rem;
  color: rgba(230, 241, 255, .8);
}

.foot-line + .foot-line { margin-top: 10px; }

.foot-line > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.foot-key {
  flex: none;
  width: 2.8em;
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .12em;
}

.foot-note {
  margin-top: 4px;
  font-size: .78rem;
  line-height: 1.7;
  color: var(--muted);
}

.foot-contact .foot-note { margin-top: 14px; }

.foot-meta {
  border-top: 1px solid var(--line);
  background: rgba(10, 17, 40, .72);
}

.foot-meta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- 11. Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------- 12. Focus & motion ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

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

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- 13. Mobile header ---------- */
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(10, 17, 40, .98);
  }

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

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 6px 16px 14px;
  }

  .site-nav__link {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: var(--line);
    border-left-color: var(--cyan);
  }

  .league-bar__label { display: none; }
}

@media (max-width: 560px) {
  .version-tag,
  .head-cta { display: none; }

  .head-top { padding-block: 10px; }

  .brand__mark { width: 36px; height: 36px; }
}
