/* ==========================================================================
   尚牛竞猜 · 共享站点样式 /assets/site.css
   基调：赛场后台监控室 —— 蓝图网格 / 切角面板 / 牛血红 × 电光青
   ========================================================================== */

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

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

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

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

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

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: none; }

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

::selection { background: var(--blood); color: #fff; }

/* ---------- 2. Tokens ---------- */
:root {
  --blood: #8E1F2F;
  --blood-deep: #5C111D;
  --cyan: #18D9C8;
  --green: #35D0A0;
  --ink: #0E1113;
  --rock: #23282B;
  --clay: #B56A4A;
  --cream: #F4EFE6;
  --lime: #D9FF3F;
  --mist: #8D969C;
  --paper: #FBF8F2;

  --line: rgba(244, 239, 230, 0.14);
  --line-soft: rgba(244, 239, 230, 0.07);
  --line-strong: rgba(244, 239, 230, 0.30);

  --font-display: "DIN Condensed", "Bebas Neue", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --shell-max: 1280px;
  --gutter: clamp(1rem, 3.2vw, 2.75rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --cut: 18px;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.45vw + 13.6px, 16.5px);
  line-height: 1.75;
  letter-spacing: 0.012em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    repeating-linear-gradient(0deg, rgba(244, 239, 230, 0.022) 0 1px, transparent 1px 5px),
    linear-gradient(to right, rgba(244, 239, 230, 0.042) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 239, 230, 0.028) 1px, transparent 1px),
    radial-gradient(130% 90% at 50% -20%, rgba(35, 40, 43, 0.88), transparent 62%);
  background-size: auto, 96px 96px, 96px 96px, auto;
  background-attachment: fixed, fixed, fixed, fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.005em;
  font-stretch: condensed;
}

p { max-width: 42ch; }

strong, b { font-weight: 700; color: #fff; }

code, kbd, samp { font-family: var(--font-mono); }

/* ---------- 4. Layout primitives ---------- */
.shell {
  width: min(var(--shell-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: clamp(2.25rem, 5vw, 4rem); }

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

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

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

@media (max-width: 760px) {
  .grid--split { grid-template-columns: 1fr; }
}

/* ---------- 5. Editorial type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 18px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.85;
}

.section-title {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.1vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  font-stretch: condensed;
  color: var(--cream);
  transform: skewX(-2deg);
  transform-origin: left bottom;
}

.lede {
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.84);
  max-width: 42ch;
}

/* ---------- 6. Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.66rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  opacity: 0.85;
}

.btn--cta {
  background: var(--blood);
  border-color: var(--blood);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.14);
}

.btn--cta::after { background: var(--lime); }

.btn--cta:hover,
.btn--cta:focus-visible {
  background: var(--blood-deep);
  border-color: var(--cyan);
  color: #fff;
}

.btn--ghost {
  background: rgba(35, 40, 43, 0.5);
  border-color: var(--line-strong);
  color: var(--cream);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.btn--lime::after { background: var(--blood); }

.btn--lime:hover,
.btn--lime:focus-visible {
  box-shadow: 0 0 0 2px rgba(24, 217, 200, 0.55);
}

.header-cta {
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 0.5rem 0.9rem;
}

/* ---------- 7. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.86);
  vertical-align: middle;
}

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

.tag--clay {
  background: rgba(181, 106, 74, 0.22);
  border-color: var(--clay);
  color: var(--cream);
}

.tag--cyan {
  background: rgba(24, 217, 200, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 8. Panel ---------- */
.panel {
  position: relative;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  background: linear-gradient(160deg, rgba(35, 40, 43, 0.92), rgba(14, 17, 19, 0.92));
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, 0 100%);
}

.panel > p { max-width: 42ch; }

/* ---------- 9. Media frame ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--rock);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut),
                     100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(14, 17, 19, 0.26) 0 1px, transparent 1px 4px),
    radial-gradient(120% 110% at 50% 50%, transparent 44%, rgba(14, 17, 19, 0.62));
}

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 4 / 5; }

.media-caption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--mist);
  max-width: none;
}

/* ---------- 10. Table of contents ---------- */
.toc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.toc-link {
  display: block;
  padding: 0.4rem 0.55rem;
  color: var(--mist);
  border-left: 1px solid var(--line);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease);
}

.toc-link:hover { color: var(--cream); }

.toc-link[aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: rgba(24, 217, 200, 0.08);
}

/* ---------- 11. Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 12. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 13. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background:
    linear-gradient(180deg, rgba(92, 17, 29, 0.34), rgba(14, 17, 19, 0.97) 52%),
    var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 22px 36px -34px #000;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--blood) 0 26%, var(--cyan) 26% 34%, var(--rock) 34% 72%, transparent 100%);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 0.9rem 0.75rem;
}

.header-id {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  background: linear-gradient(140deg, var(--blood), var(--blood-deep));
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 9px;
  height: 2px;
  background: var(--cyan);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 6px;
  height: 6px;
  background: var(--lime);
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.09em;
  color: var(--cream);
  transform: skewX(-2deg);
  transform-origin: left bottom;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--mist);
  white-space: nowrap;
}

.brand:hover .brand-name,
.brand:focus-visible .brand-name { color: var(--cyan); }

/* Season status chip */
.season-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0;
  padding: 0.26rem 0.6rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  border-radius: 2px;
  background: rgba(35, 40, 43, 0.72);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  max-width: none;
  white-space: nowrap;
}

.status-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(217, 255, 63, 0.16);
}

.season-status-label { color: var(--mist); }

.season-status-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.season-status-meta {
  font-size: 0.62rem;
  color: var(--mist);
  opacity: 0.85;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.site-nav { min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.45rem 0.6rem;
  font-size: 0.83rem;
  letter-spacing: 0.05em;
  color: rgba(244, 239, 230, 0.82);
  transition: color 0.18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.16rem;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

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

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

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--blood), var(--cyan));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(35, 40, 43, 0.9);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}

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

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars { background-size: 0 0; }
[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5.5px) rotate(-45deg); }

/* Reading progress */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(244, 239, 230, 0.07);
  overflow: hidden;
}

.read-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blood), var(--cyan) 70%, var(--lime));
  transition: width 0.08s linear;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  background:
    linear-gradient(180deg, rgba(92, 17, 29, 0.26), rgba(14, 17, 19, 0) 46%),
    var(--ink);
  border-top: 1px solid var(--line);
  color: var(--cream);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--blood) 0 34%, var(--cyan) 34% 46%, var(--rock) 46% 100%);
}

.footer-shell {
  padding-block: clamp(2rem, 5vw, 3.4rem) 1.4rem;
}

.footer-tick {
  height: 10px;
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
  background: repeating-linear-gradient(90deg,
    var(--line-strong) 0 1px, transparent 1px 14px);
  opacity: 0.65;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.05fr) 2fr;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.9rem; }

.brand--footer .brand-mark { width: 24px; height: 24px; }
.brand--footer .brand-name { font-size: 1rem; }

.footer-lead {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(244, 239, 230, 0.78);
  max-width: 26ch;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

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

.footer-col-title {
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.footer-list a {
  display: inline-block;
  font-size: 0.86rem;
  color: rgba(244, 239, 230, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-list--contact { gap: 0.6rem; }

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--line);
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-contact-value {
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.85);
  overflow-wrap: anywhere;
}

.footer-legal {
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.footer-legal p { max-width: none; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-left: auto;
}

.footer-legal-links a {
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- 15. Responsive: header & footer ---------- */
@media (max-width: 1080px) {
  .brand-tagline { display: none; }
  .nav-link { padding-inline: 0.48rem; font-size: 0.8rem; }
}

@media (max-width: 900px) {
  .header-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-block: 0.7rem 0.55rem;
  }

  .header-id {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 0.9rem;
  }

  .header-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line-soft);
  }

  .nav-actions {
    order: 1;
    justify-content: space-between;
  }

  .site-nav {
    order: 2;
    display: none;
    width: 100%;
  }

  .site-nav[data-open="true"] { display: block; }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 0.35rem 0.25rem;
    margin-top: 0.35rem;
    border-top: 1px dashed var(--line-soft);
  }

  .nav-item { width: 100%; }

  .nav-link {
    display: block;
    padding: 0.7rem 0.2rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    padding-left: 0.65rem;
    background: linear-gradient(90deg, rgba(142, 31, 47, 0.45), transparent 70%);
    box-shadow: inset 2px 0 0 var(--cyan);
  }

  .footer-top { grid-template-columns: 1fr; }
  .footer-lead { max-width: 40ch; }
}

@media (max-width: 720px) {
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--contact { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .season-status-meta { display: none; }
  .header-cta { font-size: 0.74rem; padding: 0.45rem 0.7rem; }
  .brand-name { font-size: 0.98rem; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-legal-links { margin-left: 0; }
  .footer-legal { font-size: 0.66rem; }
}

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

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

  .read-progress-bar { transition: none; }
}
