/* ============================================================
   趣体育赛场 · /assets/site.css
   共享层：重置 / 变量 / 排版 / 页头 / 页脚 / 通用组件
   ============================================================ */

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

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

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 { max-width: 100%; }

img { display: block; }

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

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

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

main { display: block; }

[id] { scroll-margin-top: 150px; }

/* ---------- 2. TOKENS ---------- */
:root {
  --ink: #071A2B;
  --ink-2: #0D2F38;
  --indigo: #2A2352;
  --wine: #5A1F33;
  --grass: #2FBF71;
  --orange: #FF6B1A;
  --yellow: #FFC42E;
  --red: #E23B3B;
  --fog: #F2F6F5;
  --mist: #93A9B5;
  --glass: rgba(255, 255, 255, 0.08);
  --line: rgba(147, 169, 181, 0.22);
  --line-strong: rgba(147, 169, 181, 0.42);
  --accent: var(--grass);

  --font-display: "Oswald", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1180px;
  --pad: clamp(16px, 4vw, 32px);
  --r: 3px;
  color-scheme: dark;
}

html[data-view="test"] { --accent: var(--orange); }

/* ---------- 3. BASE ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--fog);
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 82% -10%, rgba(42, 35, 82, 0.55), transparent 70%),
    radial-gradient(900px 520px at 8% 4%, rgba(47, 191, 113, 0.10), transparent 65%),
    linear-gradient(to right, rgba(147, 169, 181, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(147, 169, 181, 0.07) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
  background-attachment: fixed, fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fog);
}

h1 { font-size: clamp(34px, 6vw, 64px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); }

p { line-height: 1.75; }

strong { font-weight: 700; color: var(--fog); }

::selection { background: rgba(255, 107, 26, 0.4); color: var(--fog); }

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 120;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--grass);
  border-radius: var(--r);
  transition: top 0.2s ease;
}

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

/* ---------- 5. BUTTONS & TAGS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--grass); color: var(--ink); }
.btn--primary:hover { background: #3ad381; }

.btn--signal { background: var(--orange); color: var(--ink); }
.btn--signal:hover { background: #ff7f3c; }

.btn--ghost { border-color: var(--line-strong); color: var(--fog); background: transparent; }
.btn--ghost:hover { border-color: var(--grass); color: var(--grass); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--fog);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.tag--grass { color: var(--grass); border-color: rgba(47, 191, 113, 0.6); }
.tag--yellow { color: var(--yellow); border-color: rgba(255, 196, 46, 0.6); }
.tag--red { color: var(--red); border-color: rgba(226, 59, 59, 0.6); }

/* ---------- 6. HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 26, 43, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

/* 比分条 */
.score-ticker {
  max-height: 46px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(13, 47, 56, 0.95), rgba(7, 26, 43, 0.55));
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.score-ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 44s linear infinite;
}

.score-ticker:hover .score-ticker__track,
.score-ticker:focus-within .score-ticker__track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.score-ticker__group { display: flex; align-items: center; }

.score-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(242, 246, 245, 0.86);
  border-right: 1px solid var(--line);
  transition: background 0.2s ease;
}

.score-ticker__item:hover,
.score-ticker__item:focus-visible { background: rgba(47, 191, 113, 0.14); }

.score-ticker__time { font-size: 12px; color: var(--mist); }

.score-ticker__fixture {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.score-ticker__team { color: rgba(242, 246, 245, 0.9); }

.score-ticker__score {
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.score-ticker__round {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

.score-ticker__live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(226, 59, 59, 0.6);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 59, 59, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(226, 59, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 59, 59, 0); }
}

/* 刊头 */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px var(--pad) 14px;
  transition: padding 0.3s ease;
}

.masthead__side {
  grid-column: 1;
  justify-self: start;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.masthead__edition { color: var(--mist); }

.masthead__brand {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fog);
  transition: font-size 0.3s ease;
}

.masthead__brand:hover .masthead__name { color: var(--grass); }

.masthead__tagline {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.masthead__utility {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.utility-btn {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--fog);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.utility-btn:hover,
.utility-btn:focus-visible { color: var(--accent); border-color: var(--accent); }

.utility-btn--ghost { background: transparent; }

.utility-btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--orange);
  border-color: var(--orange);
}

/* 导航 */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: var(--pad);
  background: rgba(13, 47, 56, 0.6);
  border-bottom: 1px solid var(--line);
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(242, 246, 245, 0.82);
  transition: color 0.2s ease;
}

.nav-link__idx {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mist);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--fog); }

.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

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

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

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

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--fog);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fog);
  transition: background 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--fog);
  transition: transform 0.25s ease;
}

.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* 收缩态 */
.site-header.is-compact .score-ticker {
  max-height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.site-header.is-compact .masthead { padding-block: 8px; }
.site-header.is-compact .masthead__tagline { display: none; }
.site-header.is-compact .masthead__name { font-size: clamp(20px, 3vw, 28px); }

/* ---------- 7. FOOTER ---------- */
.site-footer {
  position: relative;
  margin-top: 72px;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(to right, rgba(147, 169, 181, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(147, 169, 181, 0.06) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  display: block;
  height: 26px;
  background: linear-gradient(
    90deg,
    var(--grass) 0 22%,
    var(--orange) 22% 36%,
    var(--indigo) 36% 56%,
    var(--wine) 56% 70%,
    var(--ink-2) 70% 100%
  );
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 48px var(--pad) 28px;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fog);
}

.footer-brand__text {
  margin-top: 10px;
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242, 246, 245, 0.72);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-col__list li + li { margin-top: 10px; }

.footer-col a {
  font-size: 14px;
  color: rgba(242, 246, 245, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--grass);
  border-bottom-color: rgba(47, 191, 113, 0.5);
}

.footer-contact {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--pad) 20px;
}

.footer-contact__line {
  padding-top: 20px;
  font-size: 13px;
  color: var(--mist);
  border-top: 1px solid var(--line);
}

.footer-contact__line .mono { color: var(--fog); }

.footer-contact__addr {
  margin-top: 6px;
  font-size: 13px;
  color: var(--mist);
}

.footer-legal {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--pad) 36px;
}

.footer-legal__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(147, 169, 181, 0.82);
}

/* ---------- 8. SHARED CONTENT PRIMITIVES ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-head__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--orange);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fog);
}

.section-head__note {
  font-size: 13px;
  color: var(--mist);
}

.panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(18px, 3vw, 28px);
}

.glass {
  background: var(--glass);
  border: 1px solid rgba(242, 246, 245, 0.16);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
}

.data-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 22px);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: linear-gradient(90deg, rgba(47, 191, 113, 0.14), rgba(255, 107, 26, 0.08));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
}

.scoreline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.scoreline__num {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fog);
}

.scoreline__num--win { color: var(--accent); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
}

.stat__value {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1;
  color: var(--fog);
}

.stat__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--grass), rgba(147, 169, 181, 0.25));
}

.timeline__item {
  position: relative;
  padding-bottom: 22px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--grass);
}

.timeline__time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.crumbs { font-size: 12px; color: var(--mist); }

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

.crumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: rgba(147, 169, 181, 0.5);
}

.crumbs a { color: var(--mist); transition: color 0.2s ease; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--grass); }
.crumbs [aria-current="page"] { color: var(--fog); }

.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background-color: var(--indigo);
  background-image:
    linear-gradient(135deg, rgba(47, 191, 113, 0.20), rgba(255, 107, 26, 0.16) 55%, rgba(42, 35, 82, 0.65)),
    repeating-linear-gradient(45deg, rgba(147, 169, 181, 0.12) 0 2px, transparent 2px 12px);
}

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

.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame--portrait { aspect-ratio: 4 / 5; }

.img-frame__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fog);
  background: linear-gradient(180deg, transparent, rgba(7, 26, 43, 0.88));
}

/* ---------- 9. MOTION ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--grass), var(--orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 10. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; row-gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-bar {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 6px var(--pad);
  }

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

  .primary-nav {
    display: none;
    width: 100%;
  }

  .primary-nav[data-open="true"] { display: block; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 12px;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 13px 4px;
    border-bottom: 1px solid rgba(147, 169, 181, 0.14);
  }

  .nav-link::after {
    left: 4px;
    right: auto;
    bottom: 8px;
    width: 34px;
  }
}

@media (max-width: 768px) {
  .masthead {
    grid-template-columns: 1fr auto;
    padding-block: 14px 12px;
  }

  .masthead__side { display: none; }

  .masthead__brand {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .masthead__utility { grid-column: 2; }

  .masthead__tagline { letter-spacing: 0.1em; }

  .score-ticker__item { padding: 9px 14px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding-top: 36px;
  }

  .site-footer { margin-top: 52px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }

  .masthead__utility { gap: 6px; }

  .utility-btn { padding: 6px 9px; font-size: 10px; }

  .masthead__tagline { font-size: 11px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .footer-contact__line { font-size: 12px; line-height: 1.9; }
}

/* ---------- 11. REDUCED MOTION ---------- */
@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;
  }

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

  .score-ticker { overflow-x: auto; }
  .score-ticker__track { animation: none; }
  .score-ticker__live { animation: none; }
  .btn:hover { transform: none; }
}
