/* ==========================================================================
   WILLIAMHILL体育 · 全站共享样式  /assets/site.css
   夜场球场 × 数据指挥台
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #060A08;
}

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

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

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

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

button { background: none; border: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:where(a, button, summary) { -webkit-tap-highlight-color: transparent; }

/* ---------- 2. Tokens ---------- */
:root {
  --night: #060A08;
  --deep: #0B241A;
  --brand-green: #0F4D34;
  --lime: #A8FF60;
  --orange: #FF5A36;
  --yellow: #FFD24A;
  --steel: #8FA9B8;
  --mist: #F2F6F3;
  --panel: #16211D;
  --line: #2C3B35;
  --text: #C9D6D0;
  --warn: #E5484D;
  --ink: #06210F;

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

  --rail: 112px;
  --shell: 1180px;
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

/* ---------- 3. 中文排版基底 ---------- */
body {
  padding-left: var(--rail);
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--mist);
  text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: .7em 1.1em;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--mist);
  outline-offset: 2px;
}

/* ---------- 5. 页头：左侧轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 80;
  background: var(--deep);
  background-image: linear-gradient(180deg, rgba(15, 77, 52, .62), rgba(6, 10, 8, 0) 46%);
  border-right: 1px solid var(--line);
  color: var(--mist);
}

.site-header__rail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: 100%;
  padding: 1.1rem .6rem 1rem;
}

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
  color: var(--mist);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  transition: background-color .18s var(--ease);
}

.brand:hover .brand__mark { background: #BFFF8B; }

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  text-align: center;
}

.brand__name {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--mist);
  word-break: break-word;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: .56rem;
  line-height: 1.35;
  letter-spacing: .06em;
  color: var(--steel);
}

/* 抽屉按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

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

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .18s var(--ease);
}

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

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

.nav-toggle__label {
  display: inline-block;
  line-height: 1;
}

/* 遮罩 */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 60px 0 0;
  z-index: 70;
  padding: 0;
  margin: 0;
  background: rgba(6, 10, 8, .74);
  cursor: pointer;
}

.nav-scrim[hidden] { display: none; }

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  gap: .9rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  display: block;
  padding: .55rem .5rem;
  border-left: 2px solid transparent;
  border-radius: 1px;
  color: var(--text);
  font-size: .76rem;
  line-height: 1.35;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.site-nav__list a:hover {
  color: var(--mist);
  background: rgba(168, 255, 96, .1);
  border-left-color: var(--lime);
}

.site-nav__list a[aria-current="page"] {
  color: var(--ink);
  background: var(--lime);
  border-left-color: var(--ink);
  font-weight: 700;
}

.site-nav__note {
  padding: .6rem .5rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .58rem;
  line-height: 1.55;
  letter-spacing: .06em;
  color: var(--steel);
}

/* 轨道底部状态面板 */
.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.rail-foot__eyebrow {
  font-family: var(--font-mono);
  font-size: .56rem;
  letter-spacing: .16em;
  color: var(--steel);
}

.rail-foot__current {
  font-family: var(--font-mono);
  font-size: .68rem;
  line-height: 1.3;
  letter-spacing: .04em;
  color: var(--lime);
}

.rail-meter {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.rail-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width .12s linear;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  background:
    radial-gradient(90% 130% at 88% -12%, rgba(15, 77, 52, .72), rgba(11, 36, 26, 0) 62%),
    var(--deep);
  border-top: 1px solid var(--brand-green);
  color: var(--text);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 169, 184, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 169, 184, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 3vw, 2.8rem);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3.5rem) clamp(1.6rem, 3vw, 2.4rem);
}

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

.footer-wordmark {
  margin: 0 0 .55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--mist);
}

.footer-wordmark__cn {
  margin-left: .18em;
  color: var(--lime);
}

.footer-tagline {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--steel);
}

.footer-meta {
  margin: 0;
  max-width: 34ch;
  font-size: .85rem;
  line-height: 1.72;
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 1.5rem 2.25rem;
}

.footer-col { min-width: 6.5rem; }

.footer-col__title {
  margin: 0 0 .7rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  color: var(--lime);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col__list a {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--text);
  font-size: .86rem;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-col__list a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

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

.footer-contact__list {
  display: grid;
  gap: .85rem;
  margin: 0;
  padding: 0;
  font-size: .86rem;
}

.footer-contact__list dt {
  margin-bottom: .15rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--steel);
}

.footer-contact__list dd {
  margin: 0;
  color: var(--mist);
  line-height: 1.6;
  word-break: break-word;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem) 1.7rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .05em;
  color: var(--steel);
}

.footer-legal { margin: 0; }

.footer-service {
  margin: 0;
  max-width: 58ch;
  line-height: 1.62;
}

/* ---------- 7. 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack--lg { gap: 2rem; }

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 2rem);
}

@media (min-width: 860px) {
  .grid--5-7 { grid-template-columns: 5fr 7fr; }
  .grid--4-8 { grid-template-columns: 4fr 8fr; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 8. 通用文字工具 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin: 0;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--lime);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

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

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.rule--lime {
  background: linear-gradient(90deg, var(--lime), rgba(168, 255, 96, 0));
}

/* ---------- 9. 章节标题 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--lime);
}

.section-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -.02em;
  color: var(--mist);
}

.section-head__note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--steel);
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .82em 1.35em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

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

.btn--primary:hover {
  background: #BFFF8B;
  transform: translateY(-1px);
}

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

.btn--ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-1px);
}

.btn--sm {
  padding: .6em 1em;
  font-size: .82rem;
}

/* ---------- 11. 卡片 ---------- */
.card {
  position: relative;
  display: block;
  padding: clamp(1rem, 2.2vw, 1.6rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

a.card:hover {
  border-color: var(--brand-green);
  transform: translateY(-1px);
}

.card--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.card__label {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  color: var(--lime);
}

.card__title {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--mist);
}

.card__body {
  margin: 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text);
}

.card__meta {
  display: block;
  margin-top: .85rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  color: var(--steel);
}

/* ---------- 12. 数据面板 ---------- */
.metric {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding-left: .85rem;
  border-left: 2px solid var(--brand-green);
}

.metric__value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--mist);
}

.metric__label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  color: var(--steel);
}

/* ---------- 13. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .32em .68em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--text);
}

.tag--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.tag--orange {
  background: rgba(255, 90, 54, .1);
  border-color: rgba(255, 90, 54, .45);
  color: var(--orange);
}

.tag--steel {
  background: rgba(143, 169, 184, .08);
  border-color: var(--line);
  color: var(--steel);
}

/* ---------- 14. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 75% 0%, rgba(168, 255, 96, .14), rgba(6, 10, 8, 0) 58%),
    linear-gradient(155deg, #0B241A 0%, #060A08 72%);
}

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

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 169, 184, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 169, 184, .12) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .4;
  pointer-events: none;
}

.media-frame__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: .6rem .8rem;
  background: linear-gradient(0deg, rgba(6, 10, 8, .94), rgba(6, 10, 8, 0));
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--mist);
}

/* ---------- 15. 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--steel);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "›";
  color: var(--brand-green);
}

.breadcrumbs__link {
  color: var(--steel);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.breadcrumbs__link:hover { color: var(--lime); }

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

/* ---------- 16. 滚动显现 ---------- */
html.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .36s var(--ease), transform .36s var(--ease);
}

html.has-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 移动端 ---------- */
@media (max-width: 900px) {
  body { padding-left: 0; }

  .site-header {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-header__rail {
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    height: 60px;
    padding: 0 1rem;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: .65rem;
    margin-right: auto;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
    font-size: .66rem;
  }

  .brand__text {
    align-items: flex-start;
    text-align: left;
  }

  .brand__name { font-size: .85rem; letter-spacing: .03em; }
  .brand__sub { font-size: .55rem; }

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

  .site-nav {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    z-index: 76;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 1rem 1rem 1.4rem;
    background: var(--deep);
    border-bottom: 1px solid var(--brand-green);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  }

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

  .site-nav__list { gap: 4px; }

  .site-nav__list a {
    padding: .8rem .9rem;
    font-size: .95rem;
    border-left-width: 3px;
  }

  .site-nav__note {
    margin-top: .9rem;
    font-size: .68rem;
  }

  .rail-foot { display: none; }

  .nav-scrim:not([hidden]) { display: block; }
}

/* ---------- 18. 页脚断点 ---------- */
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: 1.5fr 2fr 1.15fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- 19. 减少动态 ---------- */
@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;
  }

  html.has-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail-meter__fill { transition: none; }
}
