/* ==========================================================
   华悦棋牌 · 乐动体育赛事内容站
   共享样式 /assets/site.css —— 框架式导航 / 棋盘索引 / 数据叙事
   ========================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

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

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

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

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

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

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

address { font-style: normal; }

/* 2. tokens ----------------------------------------------- */
:root {
  --ink: #07130F;
  --ink-2: #0F1A16;
  --grid: #26332E;
  --ivory: #F3F1E8;
  --muted: #9AA8A1;
  --cyan: #2EE6C8;
  --orange: #FF6B2C;
  --teal: #17796C;
  --orange-deep: #3A1E12;
  --edge: #C9C6B8;

  --rail-w: clamp(13rem, 17vw, 16.5rem);
  --shell-max: 1200px;

  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --line: 1px solid var(--grid);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 3. typography ------------------------------------------- */
body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: .008em;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.022em;
  font-stretch: 88%;
  color: var(--ivory);
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.02rem; }

p { max-width: 68ch; }

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

.t-display {
  font-family: var(--font-head);
  font-weight: 800;
  font-stretch: 85%;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  transform: skewX(-1.2deg);
}

.t-h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.t-h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.t-h3 { font-size: 1.15rem; }

.t-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.t-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

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

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--muted);
  line-height: 1.75;
}

.note {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .03em;
  line-height: 1.8;
}

.hl-cyan { color: var(--cyan); }
.hl-orange { color: var(--orange); }

/* 4. layout ----------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 3.4vw, 2.6rem);
}

.wrap--narrow { max-width: 860px; }

.site-main { display: block; }

.band {
  border-top: var(--line);
  padding-block: clamp(2.6rem, 6vw, 5.2rem);
}
.band--alt { background: var(--ink-2); }
.band--flush { border-top: 0; }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }

.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 2rem); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
.grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 5. components ------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  padding: .7rem 1.1rem;
  background: var(--orange);
  color: #170D07;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .06em;
  transform: translateY(-130%);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .62rem 1rem;
  border: 1px solid var(--grid);
  background: transparent;
  color: var(--ivory);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
    border-color .18s var(--ease);
}
.btn--accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #170D07;
}
.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06120E;
}
.btn--solid {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ivory);
}
.btn--solid:hover { background: var(--cyan); border-color: var(--cyan); color: #06120E; }
.btn--ghost { color: var(--muted); }
.btn--ghost:hover { color: var(--cyan); border-color: var(--cyan); }
.btn--block { width: 100%; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--muted);
}
.crumbs a:hover { color: var(--cyan); }
.crumbs__sep { color: var(--grid); }
.crumbs [aria-current="page"] { color: var(--ivory); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem;
  border: 1px solid var(--grid);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.chip--live { color: var(--cyan); border-color: rgba(46, 230, 200, .5); }
.chip--price {
  color: var(--orange);
  border-color: rgba(255, 107, 44, .55);
  background: var(--orange-deep);
}

.data-table {
  width: 100%;
  border-top: var(--line);
  font-size: .87rem;
}
.data-table th,
.data-table td {
  padding: .62rem .7rem;
  border-bottom: var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table thead th {
  background: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-table tbody tr { transition: background-color .15s var(--ease); }
.data-table tbody tr:hover { background: rgba(46, 230, 200, .05); }

.bar {
  position: relative;
  height: 9px;
  background: var(--ink-2);
  border: 1px solid var(--grid);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
  transition: width .9s var(--ease);
}
.bar--accent .bar__fill { background: var(--orange); }
.bar--muted .bar__fill { background: var(--teal); }
.bar[data-live] .bar__fill { width: var(--val, 0%); }

.rail-timeline {
  position: relative;
  padding-left: 1.4rem;
  border-left: 1px solid var(--grid);
}
.rail-timeline__node {
  position: relative;
  padding-bottom: 1.4rem;
}
.rail-timeline__node::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: .55rem;
  width: 7px;
  height: 7px;
  background: var(--ink);
  border: 1px solid var(--cyan);
  transform: translateX(-4px) rotate(45deg);
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border: var(--line);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.06) brightness(.92);
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame__caption {
  margin-top: .5rem;
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--muted);
}
.media-grid {
  display: grid;
  gap: clamp(.7rem, 1.6vw, 1.2rem);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.chess-strip {
  height: 12px;
  background-image:
    linear-gradient(45deg, var(--grid) 25%, transparent 25%, transparent 75%, var(--grid) 75%),
    linear-gradient(45deg, var(--grid) 25%, transparent 25%, transparent 75%, var(--grid) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  opacity: .9;
}

/* 6. header / 左框棋盘索引 -------------------------------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  background: rgba(38, 51, 46, .65);
  pointer-events: none;
}
.scroll-meter__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  background: var(--ink-2);
  border-right: var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  pointer-events: none;
  border-right: var(--line);
  background-image:
    linear-gradient(45deg, var(--grid) 25%, transparent 25%, transparent 75%, var(--grid) 75%),
    linear-gradient(45deg, var(--grid) 25%, transparent 25%, transparent 75%, var(--grid) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: .55;
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  width: 100%;
  padding: 1.8rem 1.05rem 1.4rem 1.65rem;
  overflow-y: auto;
}

.rail-brand__link {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.rail-brand__mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #170D07;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.04em;
}
.rail-brand__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.04rem;
  letter-spacing: -.01em;
  color: var(--ivory);
}
.rail-brand__sub {
  display: block;
  font-size: .67rem;
  line-height: 1.45;
  letter-spacing: .08em;
  color: var(--muted);
}
.rail-brand__tagline {
  margin-top: .75rem;
  padding-top: .6rem;
  border-top: var(--line);
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .5rem .7rem;
  border: 1px solid var(--grid);
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: var(--cyan);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(4px) 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(-4px) rotate(-45deg); }

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
}
.site-nav__list {
  display: flex;
  flex-direction: column;
  border-top: var(--line);
}
.site-nav__item { border-bottom: var(--line); }
.site-nav__link {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .62rem .5rem .62rem .35rem;
  border-left: 2px solid transparent;
  font-size: .9rem;
  color: var(--muted);
  transition: color .18s var(--ease), border-color .18s var(--ease),
    background-color .18s var(--ease), padding-left .18s var(--ease);
}
.site-nav__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: .66rem;
  letter-spacing: .06em;
  color: rgba(154, 168, 161, .55);
  transition: color .18s var(--ease);
}
.site-nav__label { line-height: 1.35; }
.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--ivory);
  border-left-color: var(--cyan);
  background: rgba(46, 230, 200, .06);
  padding-left: .6rem;
}
.site-nav__link[aria-current="page"] {
  color: var(--ivory);
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(255, 107, 44, .16), rgba(255, 107, 44, 0) 72%);
}
.site-nav__link[aria-current="page"] .site-nav__num { color: var(--orange); }

.rail-readout {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem .35rem 0;
  border-top: 1px dashed var(--grid);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--muted);
  opacity: .5;
  transition: opacity .25s var(--ease);
}
.rail-readout[data-active] { opacity: 1; }
.rail-readout__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: .86rem;
  color: var(--cyan);
}
.rail-readout__name { color: var(--ivory); }

.site-nav__utility {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding-top: .3rem;
}
.rail-index {
  font-size: .68rem;
  line-height: 1.6;
  letter-spacing: .05em;
  color: var(--muted);
}

/* 7. footer ----------------------------------------------- */
.site-footer {
  margin-top: clamp(2.5rem, 7vw, 6rem);
  background: var(--ink-2);
  border-top: var(--line);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  padding-block: clamp(2.4rem, 5vw, 4rem);
}
.footer-brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.footer-brand__name a:hover { color: var(--cyan); }
.footer-brand__sub {
  margin-top: .55rem;
  font-size: .78rem;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer-brand__cta { margin-top: 1.1rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.6rem 1.4rem;
}
.footer-col__title {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-col__list {
  margin-top: .85rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-link {
  font-size: .86rem;
  color: var(--muted);
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}
.footer-link:hover { color: var(--cyan); padding-left: .25rem; }

.footer-contact { border-top: var(--line); }
.footer-contact__line {
  padding-block: 1rem;
  font-size: .78rem;
  line-height: 1.9;
  letter-spacing: .03em;
  color: var(--muted);
  max-width: none;
}

.footer-base { border-top: var(--line); background: var(--ink); }
.footer-base__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: .95rem;
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--muted);
}
.footer-base__legal { color: var(--ivory); }

/* 8. motion ------------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-reveal][data-visible] { opacity: 1; transform: none; }

/* 9. focus & a11y ----------------------------------------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
#main-content:focus { outline: none; }

/* 10. responsive ------------------------------------------ */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .scroll-meter { left: var(--rail-w); }
}

@media (max-width: 1023px) {
  html { scroll-padding-top: 4.6rem; }
  .site-header {
    position: sticky;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: 0;
    border-bottom: var(--line);
  }
  .site-header::before {
    inset: auto 0 0 0;
    width: 100%;
    height: 6px;
    border-right: 0;
    border-top: var(--line);
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
    opacity: .5;
  }
  .site-header__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
    padding: .8rem clamp(1rem, 3.4vw, 1.6rem);
    overflow-y: visible;
  }
  .rail-brand {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .rail-brand__link { gap: .55rem; }
  .rail-brand__mark { width: 32px; height: 32px; font-size: .95rem; }
  .rail-brand__tagline { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    gap: .85rem;
    padding-top: .85rem;
    border-top: var(--line);
    max-height: 72vh;
    overflow-y: auto;
  }
  .site-header[data-open] .site-nav { display: flex; }
  .site-nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--grid);
    border-top: 0;
  }
  .site-nav__item { border-bottom: 0; background: var(--ink-2); }
  .site-nav__link { padding: .8rem .7rem; font-size: .92rem; }
  .site-nav__link:hover, .site-nav__link:focus-visible { padding-left: .85rem; }
  .rail-readout { display: none; }
  .site-nav__utility {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
  }
  .site-nav__utility .btn { flex: 1 1 11rem; }
  .rail-index { flex: 1 1 100%; }
}

@media (max-width: 920px) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .grid--split,
  .grid--halves,
  .grid--thirds { grid-template-columns: minmax(0, 1fr); }
  .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
}

@media (max-width: 600px) {
  .site-nav__list { grid-template-columns: minmax(0, 1fr); }
  .data-table { font-size: .8rem; }
  .data-table th, .data-table td { padding: .5rem .5rem; }
  .footer-base__row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .bar__fill { width: var(--val, 0%); }
}
