/* =========================================================
   杏彩体育赛事 · 共享样式 /assets/site.css
   设计母题：山城夜色赛场指挥台
   ========================================================= */

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

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

html.nav-open { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 640px at 88% -10%, rgba(255, 122, 26, .13), transparent 62%),
    radial-gradient(900px 560px at -8% 106%, rgba(43, 240, 200, .07), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.02em;
}

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

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

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

figure, blockquote, dl, dd { margin: 0; }

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

input, textarea, select { font: inherit; }

a { color: var(--orange-soft); text-decoration: none; }

::selection { background: var(--orange); color: #170A02; }

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0A2A21;
  --ink-2: #123C2F;
  --ink-3: #174836;
  --orange: #FF7A1A;
  --orange-soft: #FFB36B;
  --cyan: #2BF0C8;
  --paper: #F7F2E8;
  --paper-2: #E7DCC4;
  --charcoal: #111815;
  --sage: #7F9C90;
  --flag: #FF4D4D;

  --rail-w: 88px;
  --bar-h: 68px;
  --maxw: 1280px;

  --line: rgba(247, 242, 232, .16);
  --line-soft: rgba(247, 242, 232, .08);
  --line-strong: rgba(247, 242, 232, .34);

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

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(46px, 6.5vw, 92px); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.72;
  color: var(--paper-2);
  max-width: 62ch;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 44px; }
}

/* ---------- 4. Typographic components ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  flex: 0 0 auto;
  background: currentColor;
}

.annotation {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage);
}

.tag--signal {
  background: var(--orange);
  border-color: var(--orange);
  color: #170A02;
  font-weight: 700;
}

.tag--data {
  border-color: rgba(43, 240, 200, .45);
  color: var(--cyan);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--paper);
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

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

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #170A02;
  box-shadow: 4px 4px 0 0 rgba(43, 240, 200, .34);
}

.btn--primary:hover {
  background: var(--orange-soft);
  border-color: var(--orange-soft);
  box-shadow: 6px 6px 0 0 rgba(43, 240, 200, .5);
}

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

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

/* ---------- 6. Plates / crumbs / media ---------- */
.plate {
  position: relative;
  background: var(--paper);
  color: var(--charcoal);
  border: 1px solid rgba(17, 24, 21, .85);
  box-shadow: 7px 7px 0 0 rgba(255, 122, 26, .9);
}

.plate--ink {
  background: var(--ink-2);
  color: var(--paper);
  border-color: var(--line-strong);
  box-shadow: 7px 7px 0 0 rgba(43, 240, 200, .28);
}

.crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage);
}

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

.crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumbs li:not(:last-child)::after {
  content: "›";
  color: var(--orange);
  letter-spacing: 0;
}

.crumbs a { color: var(--paper-2); }
.crumbs a:hover { color: var(--orange); }

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
}

.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.05);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(10, 42, 33, .58) .9px, transparent 1.1px);
  background-size: 4px 4px;
  opacity: .3;
  mix-blend-mode: multiply;
}

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

.media-frame__caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  background: var(--paper);
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- 7. Header ---------- */
.site-header {
  position: relative;
  z-index: 90;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--orange);
  color: #170A02;
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
  transform: translateY(-200%);
  transition: transform .16s var(--ease);
}

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

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: rgba(247, 242, 232, .1);
  pointer-events: none;
}

.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-soft) 58%, var(--cyan) 100%);
  transition: width .12s linear;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 16px;
  background: rgba(10, 42, 33, .93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.rail-top { display: flex; align-items: center; min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--orange);
  color: #170A02;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  border-radius: 2px;
  box-shadow: 3px 3px 0 0 rgba(43, 240, 200, .34);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.brand:hover .brand-mark {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 0 rgba(43, 240, 200, .52);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sage);
  white-space: nowrap;
}

/* 移动端抽屉 */
.rail-nav {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  right: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - var(--bar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 16px 22px;
  background: var(--ink-2);
  border-bottom: 3px solid var(--orange);
  box-shadow: 0 28px 52px -22px rgba(0, 0, 0, .9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s var(--ease);
}

.rail-nav[data-open] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.rail-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 15px 6px;
  border-bottom: 1px dashed var(--line);
  color: var(--paper);
  text-decoration: none;
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}

.rail-link:last-child { border-bottom: 0; }

.rail-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--orange);
  min-width: 20px;
  flex: 0 0 auto;
}

.rail-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .01em;
  line-height: 1.1;
}

.rail-link:hover {
  color: var(--orange-soft);
  padding-left: 12px;
}

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

.rail-link[aria-current="page"] .rail-label {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--cyan);
}

.rail-foot { display: none; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(247, 242, 232, .05);
  color: var(--paper);
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: background-color .16s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), top .2s var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  background: linear-gradient(180deg, #10362A 0%, #08221B 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 62%, var(--cyan) 62%, var(--cyan) 100%);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 54px 20px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 38px;
}

.footer-lead .brand { margin-bottom: 18px; }

.footer-note {
  max-width: 40ch;
  margin-bottom: 22px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--paper-2);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 18px;
}

.footer-group-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--sage);
}

.footer-group-num { color: var(--orange); }

.footer-list li + li { margin-top: 9px; }

.footer-list a {
  display: inline-block;
  font-size: 15px;
  color: var(--paper-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-list a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

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

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
}

.contact-val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.contact-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--sage);
}

.footer-ruler {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-ruler span {
  padding: 8px 0 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--sage);
  border-right: 1px solid var(--line);
}

.footer-ruler span:last-child { border-right: 0; }

.footer-bottom {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px 20px 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--paper-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-legal a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--sage);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 95;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--charcoal);
  border: 1px solid rgba(17, 24, 21, .85);
  border-radius: 2px;
  box-shadow: 4px 4px 0 0 var(--orange);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease), box-shadow .2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { box-shadow: 6px 6px 0 0 var(--cyan); }

/* ---------- 9. Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }

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

/* ---------- 10. Tablet ---------- */
@media (min-width: 640px) {
  body { font-size: 17.5px; }
  .footer-inner { padding-inline: 32px; }
  .footer-bottom { padding-inline: 32px; }
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
    padding-block: 62px 40px;
  }
  .footer-legal { gap: 8px 22px; }
}

/* ---------- 11. Desktop rail ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
  }

  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 20px 0 16px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0E3529 0%, #0A2A21 72%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rail-top {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .brand {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .brand-text { align-items: center; }

  .brand-name {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 12px;
    letter-spacing: .18em;
    white-space: normal;
  }

  .brand-sub { display: none; }

  .rail-nav {
    position: static;
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin-top: 20px;
    padding: 0;
    background: none;
    border-bottom: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    gap: 2px;
  }

  .rail-link {
    position: relative;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 9px 0;
    border-bottom: 0;
    border-radius: 2px;
  }

  .rail-link:hover { padding-left: 0; }

  .rail-index {
    font-size: 10px;
    min-width: 0;
    padding-top: 2px;
  }

  .rail-label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 11px;
    letter-spacing: .12em;
    line-height: 1.2;
  }

  .rail-link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--orange);
  }

  .rail-link[aria-current="page"] .rail-label {
    text-decoration: none;
    color: var(--orange);
  }

  .rail-foot {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .rail-tag {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .26em;
    color: var(--sage);
  }

  .nav-toggle { display: none; }

  .read-progress { left: var(--rail-w); }

  .to-top { right: 24px; bottom: 24px; }

  #main-content { scroll-margin-top: 0; }
}

@media (max-width: 1023.98px) {
  #main-content { scroll-margin-top: calc(var(--bar-h) + 16px); }
}

/* ---------- 12. Wide desktop ---------- */
@media (min-width: 1180px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr) minmax(0, .95fr);
    gap: 44px;
    padding-inline: 44px;
  }

  .footer-contact { grid-column: auto; }

  .footer-bottom { padding-inline: 44px; }
}

/* ---------- 13. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .nav-toggle:hover,
  .brand:hover .brand-mark {
    transform: none;
  }
}
