/* ==========================================================================
   爱游戏体育 · 共享层站点套件
   00 reset / 01 tokens / 02 排版 / 03 布局 / 04 头部
   05 页脚 / 06 按钮 / 07 内容块 / 08 工具类 / 09 动效与无障碍
   ========================================================================== */

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

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

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

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

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: #FF6B2C;
  color: #160A04;
}

/* 01 — tokens ------------------------------------------------------------ */
:root {
  --ink: #0B1220;
  --panel: #111C2E;
  --panel-deep: #0E1727;
  --line: #1B2A42;
  --line-strong: #26395A;
  --paper: #F2EFE8;
  --mist: #9BA9BF;
  --signal: #FF6B2C;
  --signal-soft: #FF8449;
  --mint: #35F0C0;
  --alert: #E04A3D;

  --lg-football: #3E6E8E;
  --lg-basket: #5A8F7B;
  --lg-cup: #8E6E3E;

  --shell-max: 1320px;
  --gutter: 32px;
  --header-h: 56px;
  --radius: 2px;

  --font-display: "Barlow Condensed", "Oswald", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "HarmonyOS Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 140ms;
  --dur-mid: 280ms;
}

/* 02 — 排版 -------------------------------------------------------------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(27, 42, 66, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 42, 66, 0.34) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 2.4vw, 28px); }
h3 { font-size: clamp(18px, 1.8vw, 21px); }

p {
  text-wrap: pretty;
}

a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

strong {
  font-weight: 600;
  color: var(--paper);
}

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

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

#main-content {
  display: block;
  min-height: 50vh;
}

#main-content:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: -4px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 12px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--signal);
  color: #160A04;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform var(--dur-fast) var(--ease);
}

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

/* 04 — 头部 -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(11, 18, 32, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: var(--header-h);
  padding-block: 8px;
}

/* 品牌锁定字 */
.brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 107, 44, 0.16), rgba(255, 107, 44, 0.02));
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--signal);
  border-bottom: 1px solid var(--signal);
}

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

.brand-line {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand-sub {
  margin-top: 3px;
  color: var(--mist);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* 移动菜单按钮 */
.nav-toggle {
  order: 3;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(27, 42, 66, 0.35);
  color: var(--paper);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--signal);
  background: rgba(255, 107, 44, 0.08);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars > span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars > span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars > span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars > span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* 主导航 */
.primary-nav {
  order: 2;
  flex: 1 1 auto;
  display: block;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--mist);
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(27, 42, 66, 0.6);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--line-strong);
  transition: color var(--dur-fast) var(--ease);
}

.nav-link:hover .nav-index {
  color: var(--mist);
}

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

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 18px;
  transform: translateY(-50%);
  background: var(--signal);
}

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

/* 右端工具区 */
.header-tools {
  order: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(53, 240, 192, 0.06);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(53, 240, 192, 0.16);
  animation: status-pulse 2.6s var(--ease) infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* 05 — 页脚 -------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--panel-deep) 0%, var(--ink) 78%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 96px;
  height: 1px;
  background: var(--signal);
}

.footer-grid {
  display: grid;
  grid-template-columns:
    minmax(240px, 1.5fr)
    minmax(140px, 0.85fr)
    minmax(140px, 0.85fr)
    minmax(260px, 1.35fr);
  gap: 44px 40px;
  padding-block: 64px 44px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand--footer .brand-mark {
  width: 38px;
  height: 38px;
}

.footer-tagline {
  max-width: 28ch;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.7;
}

.footer-mono {
  margin-top: auto;
  color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-list {
  display: flex;
  flex-direction: column;
}

.footer-link {
  display: block;
  padding: 6px 0;
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease);
}

.footer-link:hover {
  color: var(--signal);
  padding-left: 6px;
}

.footer-contact .footer-col-title {
  border-bottom-color: var(--line);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-meta-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.footer-meta-row dt {
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-meta-row dd {
  margin: 0;
  color: var(--paper);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 18px;
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--mist);
  font-size: 12.5px;
  line-height: 1.75;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px 30px;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

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

.footer-legal {
  color: var(--line-strong);
}

/* 返回顶部 */
.to-top {
  --progress: 0;
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  overflow: hidden;
  transition:
    opacity var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    visibility var(--dur-mid) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.to-top::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--progress) * 100%);
  height: 2px;
  background: var(--signal);
  transition: width 120ms linear;
}

.to-top-glyph {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
}

/* 06 — 按钮 -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #160A04;
  font-weight: 700;
}

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

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

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

.btn-mint {
  background: rgba(53, 240, 192, 0.1);
  border-color: rgba(53, 240, 192, 0.42);
  color: var(--mint);
}

.btn-mint:hover {
  background: rgba(53, 240, 192, 0.18);
  border-color: var(--mint);
}

/* 07 — 内容块 ------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px 8px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.breadcrumb a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

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

.prose {
  max-width: 68ch;
  color: var(--paper);
  font-size: 15.5px;
  line-height: 1.85;
}

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

.prose h2,
.prose h3 {
  margin-top: 1.9em;
  margin-bottom: 0.55em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose a {
  color: var(--mint);
}

.prose blockquote {
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--signal);
  color: var(--mist);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(27, 42, 66, 0.35);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.tag--signal {
  border-color: rgba(255, 107, 44, 0.42);
  background: rgba(255, 107, 44, 0.08);
  color: var(--signal);
}

.tag--mint {
  border-color: rgba(53, 240, 192, 0.36);
  background: rgba(53, 240, 192, 0.07);
  color: var(--mint);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
}

.eyebrow {
  margin: 0;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 图片容器基础规则 —— 页面阶段只需放入 img 或内联 SVG */
.fig {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(27, 42, 66, 0.9), rgba(11, 18, 32, 0.95));
}

.fig img,
.fig svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.04);
}

.fig::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(158deg, rgba(255, 107, 44, 0.10), rgba(11, 18, 32, 0.46) 62%);
}

.fig--wide {
  aspect-ratio: 16 / 9;
}

.fig--square {
  aspect-ratio: 1 / 1;
}

.fig--tall {
  aspect-ratio: 3 / 4;
}

.fig-caption {
  margin-top: 10px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* 联赛色带 */
.band {
  display: inline-block;
  width: 3px;
  min-height: 14px;
  border-radius: 2px;
  background: var(--line-strong);
}

.band--fbl {
  background: var(--lg-football);
}

.band--bkt {
  background: var(--lg-basket);
}

.band--cup {
  background: var(--lg-cup);
}

/* 08 — 工具类 ------------------------------------------------------------ */
.grid {
  display: grid;
  gap: 24px;
}

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

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

/* 09 — 焦点与动效 -------------------------------------------------------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* 响应式 ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
    padding-block: 52px 36px;
  }

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

@media (max-width: 1080px) {
  .header-inner {
    gap: 0 16px;
  }

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

  .header-tools {
    display: none;
  }

  .primary-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 12px;
    border-top: 1px solid var(--line);
    background: rgba(17, 28, 46, 0.98);
  }

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

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

  .nav-link {
    width: 100%;
    padding: 14px 12px 14px 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 15px;
  }

  .nav-list > li:last-child .nav-link {
    border-bottom: 0;
  }

  .nav-link:hover {
    background: rgba(27, 42, 66, 0.55);
  }

  .nav-link[aria-current="page"]::before {
    left: 0;
    height: 16px;
  }
}

@media (max-width: 720px) {
  .brand-sub {
    display: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-block: 44px 32px;
  }

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

  .footer-base {
    justify-content: flex-start;
    padding-block: 18px 26px;
  }

  .to-top {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

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

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

  .to-top {
    transform: none;
  }

  .nav-toggle-bars > span {
    transition: none;
  }
}
