/* ============================================================
   K体育 · 对战档案室 / site.css
   Shared shell: reset, tokens, header, footer, primitives
   ============================================================ */

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  background-color: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

[hidden] { display: none !important; }

[id] { scroll-margin-top: 96px; }

/* ---------- Tokens ---------- */
:root {
  --c-ink: #07120F;
  --c-carbon: #0E1110;
  --c-moss: #123128;
  --c-line: #2A3B35;
  --c-lime: #C6FF3D;
  --c-lime-soft: #E3FF9E;
  --c-amber: #FF9F1C;
  --c-cyan: #4DE0C0;
  --c-paper: #F4F7F2;
  --c-note: #8A9A94;
  --c-dim: #6F7F79;

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --r-sm: 2px;
  --r-md: 6px;
  --r-lg: 12px;
  --hair: 1px solid var(--c-line);
  --shadow-soft: 0 1px 0 rgba(198, 255, 61, .05), 0 22px 44px -30px rgba(0, 0, 0, .95);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--c-lime);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Typography helpers ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

.prose {
  max-width: 68ch;
  line-height: 1.9;
}

.prose p {
  margin-bottom: 1.1em;
  color: #CFD9D4;
}

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

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  letter-spacing: .02em;
  margin: 1.6em 0 .6em;
}

.prose h2 { font-size: clamp(24px, 2.6vw, 32px); }
.prose h3 { font-size: clamp(19px, 2vw, 24px); }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 14px;
  top: -72px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  background: var(--c-lime);
  color: #06120D;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  border-radius: var(--r-sm);
  transition: top .18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 14px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: relative;
  z-index: 60;
  background-color: var(--c-ink);
  background-image: radial-gradient(120% 90% at 50% -20%, rgba(18, 49, 40, .55) 0%, rgba(7, 18, 15, 0) 62%);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-paper);
}

/* --- ticker --- */
.header-ticker {
  border-bottom: 1px solid rgba(42, 59, 53, .85);
  background: linear-gradient(90deg, #0B1A15 0%, #07120F 58%, #0A1712 100%);
}

.ticker-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 7px var(--gutter);
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--c-note);
  line-height: 1.5;
}

.ticker-item--muted { color: var(--c-dim); }

.ticker-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c-lime);
  box-shadow: 0 0 0 3px rgba(198, 255, 61, .14);
  animation: tickerPulse 2.6s var(--ease) infinite;
}

@keyframes tickerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .28; }
}

/* --- masthead --- */
.masthead {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 20px;
  padding-block: 20px 14px;
}

.masthead-brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  text-align: center;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: .2em;
  line-height: 1;
  color: var(--c-paper);
  text-indent: .2em;
  text-shadow: 0 0 26px rgba(198, 255, 61, .1);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-dim);
  white-space: nowrap;
}

.brand-slash {
  font-style: normal;
  color: var(--c-amber);
  margin-inline: 7px;
}

.masthead-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  display: inline-block;
  padding: 8px 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-note);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
}

/* --- nav toggle --- */
.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: rgba(18, 49, 40, .38);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

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

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--c-lime);
  transform-origin: center;
  transition: transform .22s var(--ease);
}

.site-header[data-nav-open] .nav-toggle-bars span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.site-header[data-nav-open] .nav-toggle-bars span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

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

/* --- primary nav --- */
.site-nav {
  border-top: 1px solid rgba(42, 59, 53, .9);
  background: linear-gradient(180deg, rgba(18, 49, 40, .34) 0%, rgba(7, 18, 15, 0) 100%);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px clamp(2px, 1vw, 14px);
  max-width: 100%;
}

.nav-item { margin: 0; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 15px 14px;
  color: var(--c-note);
  font-size: 14.5px;
  letter-spacing: .07em;
  line-height: 1.4;
  transition: color .18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 9px;
  height: 2px;
  background: var(--c-lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease);
}

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

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

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 9vw, 120px);
  color: var(--c-paper);
  background-color: var(--c-ink);
  background-image:
    linear-gradient(180deg, #07120F 0%, #0A1A15 52%, #07120F 100%),
    repeating-linear-gradient(90deg, rgba(42, 59, 53, .18) 0 1px, transparent 1px 84px);
  border-top: 1px solid var(--c-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1.35fr);
  gap: clamp(28px, 3.6vw, 60px);
  padding-block: clamp(44px, 6vw, 78px) clamp(30px, 4vw, 52px);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  color: var(--c-paper);
  margin-bottom: 12px;
}

.footer-tagline {
  max-width: 30ch;
  margin-bottom: 18px;
  color: var(--c-note);
  font-size: 14.5px;
  line-height: 1.8;
}

.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: rgba(18, 49, 40, .32);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-note);
  line-height: 1.4;
}

.footer-badge {
  color: var(--c-amber);
  font-weight: 700;
}

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

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

.footer-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-dim);
  line-height: 1.4;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  color: #C3CFC9;
  font-size: 14.5px;
  line-height: 1.6;
  transition: color .18s var(--ease), transform .18s var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--c-lime);
  transform: translateX(3px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-contact li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-dim);
  line-height: 1.4;
}

.footer-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  line-height: 1.6;
  color: #D5DED9;
  overflow-wrap: anywhere;
}

.footer-value--text { font-family: var(--font-body); }

.footer-note {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--c-dim);
  max-width: 34ch;
}

.footer-bottom {
  border-top: 1px solid var(--c-line);
  background: rgba(0, 0, 0, .3);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px;
}

.footer-copyright {
  font-size: 12.5px;
  color: var(--c-note);
  line-height: 1.6;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--c-dim);
  line-height: 1.6;
}

/* ============================================================
   PRIMITIVES
   ============================================================ */

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.btn--signal {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: #06120D;
}

.btn--signal:hover,
.btn--signal:focus-visible {
  background: var(--c-lime-soft);
  border-color: var(--c-lime-soft);
  box-shadow: 0 0 0 4px rgba(198, 255, 61, .14);
}

.btn--amber {
  background: var(--c-amber);
  border-color: var(--c-amber);
  color: #1A0F00;
}

.btn--amber:hover,
.btn--amber:focus-visible {
  background: #FFB347;
  border-color: #FFB347;
  box-shadow: 0 0 0 4px rgba(255, 159, 28, .16);
}

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

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

.btn--sm {
  padding: 9px 15px;
  font-size: 12.5px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(198, 255, 61, .4);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-lime);
  transition: color .18s var(--ease), border-color .18s var(--ease), gap .18s var(--ease);
}

.link-arrow::after {
  content: "→";
  font-family: var(--font-body);
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
  gap: 13px;
}

/* --- tags --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--c-note);
}

.tag--lime {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: #06120D;
}

.tag--amber {
  background: var(--c-amber);
  border-color: var(--c-amber);
  color: #1A0F00;
}

/* --- panels --- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-carbon);
  box-shadow: var(--shadow-soft);
}

.panel--moss {
  background: linear-gradient(160deg, var(--c-moss) 0%, var(--c-carbon) 82%);
}

.panel--flush { padding: 0; overflow: hidden; }

/* --- section rhythm --- */
.section { padding-block: clamp(38px, 6vw, 86px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 32px;
  margin-bottom: clamp(22px, 3vw, 40px);
}

.section-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-lime);
  line-height: 1.4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.14;
  color: var(--c-paper);
}

/* --- fields --- */
.field-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-note);
  line-height: 1.4;
}

.field-value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-paper);
  overflow-wrap: anywhere;
}

/* --- breadcrumbs --- */
.crumbs { padding-block: 20px 0; }

.crumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-note);
  line-height: 1.5;
}

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

.crumbs-list li + li::before {
  content: "/";
  color: var(--c-line);
}

.crumbs-list a {
  color: var(--c-note);
  transition: color .18s var(--ease);
}

.crumbs-list a:hover,
.crumbs-list a:focus-visible { color: var(--c-lime); }

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

/* --- grids --- */
.grid {
  display: grid;
  gap: clamp(12px, 2vw, 22px);
}

.grid-2 {
  display: grid;
  gap: clamp(12px, 2vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

/* --- media frames --- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background:
    radial-gradient(110% 90% at 22% 8%, rgba(18, 49, 40, .95) 0%, rgba(14, 17, 16, .98) 70%),
    var(--c-carbon);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    repeating-linear-gradient(0deg, rgba(198, 255, 61, .07) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(77, 224, 192, .05) 0 1px, transparent 1px 30px);
}

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-dim);
  line-height: 1.6;
}

/* --- reveal protocol --- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brandcol { grid-column: 1 / -1; }
  .footer-tagline { max-width: 46ch; }
}

@media (max-width: 900px) {
  .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 15px 12px;
    gap: 12px;
  }

  .masthead-brand {
    grid-column: 1;
    justify-self: start;
    align-items: flex-start;
    text-align: left;
  }

  .brand-sub { font-size: 9.5px; letter-spacing: .16em; }

  .masthead-actions {
    display: none;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .nav-toggle { display: inline-flex; grid-column: 2; }

  .site-nav {
    display: none;
    border-top: 1px solid var(--c-line);
    padding-block: 6px 2px;
  }

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

  .site-header[data-nav-open] .masthead-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 2px;
    border-bottom: 1px solid rgba(42, 59, 53, .65);
    font-size: 16px;
  }

  .nav-link::after {
    left: 2px;
    right: auto;
    width: 24px;
    bottom: 10px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .footer-brandcol { grid-column: 1 / -1; }
  .footer-col--contact { grid-column: 1 / -1; }
  .footer-note { max-width: none; }
}

@media (max-width: 620px) {
  body { font-size: 15.5px; }

  .ticker-item {
    font-size: 10px;
    letter-spacing: .1em;
  }

  .ticker-item--muted { display: none; }

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

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .btn { width: 100%; }
  .btn--sm { width: auto; }
}

/* ============================================================
   MOTION / PRINT
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .nav-toggle { display: none !important; }

  body {
    background: #FFFFFF;
    color: #101010;
  }
}
