/* ============================================================
   完美体育赛场 — 共享样式表  /assets/site.css
   负责：reset、变量、中文排版、头部、页脚、通用按钮、
        面包屑、正文容器、网格、卡片、媒体容器
   ============================================================ */

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

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

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

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

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

a { color: inherit; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 自然矿物色 + 赛场三色 */
  --ink: #0B1B2B;
  --ink-2: #15293D;
  --ink-3: #1F3A50;
  --green: #19B36B;
  --green-lift: #22CE7C;
  --moss: #4E7A5C;
  --orange: #FF6B2C;
  --score: #FFC53D;
  --score-deep: #B98600;
  --paper: #F4F1EA;
  --gray: #8C97A3;
  --clay: #B4643C;
  --white: #FFFFFF;

  --line: rgba(140, 151, 163, .22);
  --line-soft: rgba(140, 151, 163, .13);

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

  --shell: 1240px;
  --gutter: clamp(18px, 4.6vw, 56px);
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 26px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 160ms;
  --base: 240ms;
  --slow: 420ms;
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.015em;
  color: var(--white);
  text-wrap: balance;
}

p {
  margin-bottom: 1em;
  max-width: 40em;
}

p:last-child { margin-bottom: 0; }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--score);
}

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

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--score);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--fast) var(--ease);
}

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

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--fast) var(--ease),
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

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

.btn-primary {
  background: var(--green);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--green-lift);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(244, 241, 234, .34);
}

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

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

.btn-signal:hover { background: #ff8149; }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(11, 27, 43, .98) 0%, rgba(11, 27, 43, .93) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--paper);
}

.header-progress {
  position: absolute;
  inset: auto 0 -1px 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, var(--score) 52%, var(--orange) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

.header-top { border-bottom: 1px solid var(--line-soft); }

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 13px var(--gutter);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(150deg, var(--green) 0 52%, transparent 52% 100%),
    var(--ink-3);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 234, .16);
  transform: skewX(-8deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 3px;
  border-radius: 2px;
  background: var(--score);
  transform: translate(-50%, -50%) rotate(-32deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.18;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--white);
  white-space: nowrap;
}

.brand-tagline {
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--gray);
  white-space: nowrap;
}

/* 头部行动区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.header-cta {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(244, 241, 234, .3);
  border-radius: 999px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

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

.nav-toggle-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-lines span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

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

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

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

.nav-toggle-label { line-height: 1; }

/* 赛程轨道式栏目导航 */
.header-rail {
  position: relative;
  background: rgba(21, 41, 61, .72);
  border-top: 1px solid var(--line-soft);
}

.header-rail-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-item { flex: none; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(244, 241, 234, .72);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 11px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--base) var(--ease);
}

.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(.34); }

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

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 76px) 0 0;
  background: var(--ink);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -46%;
  width: min(760px, 90vw);
  height: min(760px, 90vw);
  background: radial-gradient(circle at 50% 50%, rgba(25, 179, 107, .16) 0%, rgba(25, 179, 107, 0) 66%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: min(46%, 420px);
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--score));
}

.footer-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--white);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.footer-brand:hover { color: var(--green); }

.footer-intro {
  max-width: 44ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.7fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(30px, 4.5vw, 50px) 0;
}

.footer-group-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--score);
}

.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  font-size: 15px;
  color: rgba(244, 241, 234, .78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.footer-link:hover {
  color: var(--green);
  border-bottom-color: currentColor;
}

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

.footer-address {
  display: grid;
  gap: 12px;
  font-style: normal;
}

.footer-contact-row {
  display: grid;
  gap: 2px;
  margin: 0;
  max-width: none;
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gray);
}

.footer-contact-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-legal-line {
  margin: 0;
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gray);
}

/* ---------- 8. 容器 / 网格 / 卡片 / 面包屑 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 30px);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}

.breadcrumb a {
  color: var(--gray);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

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

.breadcrumb-sep {
  color: var(--moss);
  user-select: none;
}

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

/* ---------- 9. 媒体容器（页面阶段放图） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  background: var(--ink-2);
}

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

.media-frame > img,
.media-frame > .media-slot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--slice {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.media-slot {
  background:
    repeating-linear-gradient(135deg, rgba(25, 179, 107, .16) 0 14px, rgba(25, 179, 107, 0) 14px 28px),
    linear-gradient(160deg, var(--ink-3) 0%, var(--ink-2) 100%);
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--slow) var(--ease);
  }

  .site-header[data-open="true"] .site-nav {
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 4px 0 14px;
    overflow: visible;
  }

  .nav-item { flex: 1 1 auto; }

  .nav-link {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 18px;
    justify-content: flex-start;
    font-size: 16px;
  }

  .nav-link::after {
    left: 0;
    right: auto;
    top: 13px;
    bottom: 13px;
    width: 3px;
    height: auto;
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: 50% 0;
    transition: transform var(--base) var(--ease);
  }

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

  .footer-masthead { align-items: flex-start; }
}

@media (max-width: 559px) {
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-name { font-size: 17px; }
  .brand-tagline { display: none; }

  .header-cta {
    padding: 9px 14px;
    font-size: 13px;
  }

  .nav-toggle {
    padding: 8px 12px;
    gap: 7px;
  }

  .nav-toggle-label { font-size: 13px; }

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

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 11. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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

  .header-progress { will-change: auto; }
}
