/* =========================================================
   AK体育直播 · Site Kit
   /assets/site.css  —  reset / tokens / shared shell / base UI
   ========================================================= */

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

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

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

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

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

button {
  background: none;
  border: 0;
}

a { color: inherit; }

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

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

/* ---------- 2. Design tokens ---------- */
:root {
  --void:    #0B0E13;
  --red:     #E21B3C;
  --flame:   #FF5A4E;
  --blue:    #2D9CFF;
  --lime:    #B6FF3B;
  --wine:    #4A1024;
  --teal:    #0B2E2E;
  --indigo:  #241A4A;
  --ivory:   #F4F1EA;
  --mist:    #9AA4B2;

  --line:      rgba(244, 241, 234, 0.16);
  --line-soft: rgba(244, 241, 234, 0.08);
  --ink-soft:  rgba(244, 241, 234, 0.74);

  --header-h: 84px;
  --shell-w: 1400px;
  --gutter: 1.5rem;

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
                  "Alibaba PuHuiTi", "Microsoft YaHei", sans-serif;
  --font-body:    "PingFang SC", "Noto Sans SC", "Microsoft YaHei",
                  system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", Consolas,
                  "Courier New", monospace;

  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, 0.55);
  --shadow-hard-lg: 12px 12px 0 rgba(0, 0, 0, 0.55);
  --edge: 2px solid var(--ivory);
}

/* ---------- 3. Base / Chinese typography ---------- */
body {
  background: var(--void);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p { max-width: 72ch; }

main { display: block; }

#main-content { padding-top: var(--header-h); }

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

/* ---------- 4. Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -140px;
  z-index: 300;
  padding: 0.7rem 1.15rem;
  background: var(--lime);
  color: var(--void);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--flame);
}

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

.note-rail {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid currentColor;
  line-height: 1.5;
}

.tag--red  { color: var(--flame); }
.tag--lime { color: var(--lime); }

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, color 0.16s ease,
              border-color 0.16s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.55);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.btn:focus-visible {
  outline-color: var(--lime);
  outline-offset: 4px;
}

.btn--primary {
  --btn-bg: var(--red);
  --btn-fg: #FFFFFF;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ivory);
  border-color: var(--ivory);
}

.btn--ghost:hover {
  --btn-bg: var(--ivory);
  --btn-fg: var(--void);
}

.btn--blue {
  --btn-bg: var(--blue);
  --btn-fg: var(--void);
  border-color: var(--void);
}

.btn--lime {
  --btn-bg: var(--lime);
  --btn-fg: var(--void);
  border-color: var(--void);
}

.btn--sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.btn--sm:hover {
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

/* ---------- 7. Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.crumbs li + li::before {
  content: "/";
  color: rgba(244, 241, 234, 0.28);
}

.crumbs a {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.16s ease;
}

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

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

/* ---------- 8. Image container base ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--ivory);
  box-shadow: var(--shadow-hard-lg);
  background:
    linear-gradient(135deg, rgba(226, 27, 60, 0.26), rgba(45, 156, 255, 0.16)),
    repeating-linear-gradient(90deg,
      rgba(244, 241, 234, 0.07) 0 1px,
      transparent 1px 14px),
    var(--teal);
}

.img-frame > img,
.img-frame > picture,
.img-frame > picture > img,
.img-frame > svg,
.img-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 34%,
              var(--blue) 34% 67%, var(--lime) 67% 100%);
  z-index: 2;
}

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

/* =========================================================
   9. Site header
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.site-header.is-stuck,
.site-header.nav-open {
  background: rgba(11, 14, 19, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 22px 48px -34px #000000;
}

.header-inner {
  width: min(100% - 2 * var(--gutter), var(--shell-w));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
  transition: min-height 0.3s ease;
}

.site-header.is-stuck .header-inner {
  min-height: 66px;
}

/* --- brand --- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
  margin-right: auto;
  padding-block: 0.4rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
  transition: background-color 0.2s ease;
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  background: var(--flame);
}

.brand-mark--lg {
  width: 58px;
  height: 58px;
  font-size: 1.15rem;
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.07em;
  color: var(--ivory);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mist);
}

/* --- nav --- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

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

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ivory);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

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

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

/* --- nav footer group --- */
.nav-foot {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid var(--line);
  white-space: nowrap;
  line-height: 1.5;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  animation: ak-pulse 2.8s ease-out infinite;
}

@keyframes ak-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(182, 255, 59, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(182, 255, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(182, 255, 59, 0); }
}

/* --- mobile toggle --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  flex: 0 0 auto;
  background: rgba(11, 14, 19, 0.6);
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: var(--red);
  background: rgba(226, 27, 60, 0.14);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ivory);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

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

/* --- scroll meter --- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--line-soft);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header.is-stuck .scroll-meter,
.site-header.nav-open .scroll-meter {
  opacity: 1;
}

.scroll-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--flame) 45%, var(--lime));
}

/* =========================================================
   10. Site footer
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: 6rem;
  background: var(--void);
  border-top: 2px solid var(--red);
  color: var(--ivory);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: clamp(90px, 18%, 260px);
  height: 2px;
  background: var(--lime);
}

.footer-inner {
  width: min(100% - 2 * var(--gutter), var(--shell-w));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.45fr 0.9fr 0.9fr 1.35fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.75rem;
}

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

.footer-brandname {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.08em;
}

.footer-tag {
  margin-top: 0.4rem;
  max-width: 20ch;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--mist);
}

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

.footer-heading {
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--lime);
  padding-left: 0.35rem;
}

.footer-col--contact { padding-left: 1.5rem; border-left: 1px solid var(--line-soft); }

.footer-contact {
  display: grid;
  gap: 0.9rem;
}

.footer-contact-row dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-contact-row dd {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ivory);
  word-break: break-word;
}

.footer-base {
  border-top: 1px solid var(--line);
}

.footer-base-inner {
  width: min(100% - 2 * var(--gutter), var(--shell-w));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-block: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--mist);
}

.footer-base-inner p { max-width: none; }

/* =========================================================
   11. Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .nav-link {
    padding: 0.5rem 0.55rem;
    font-size: 0.84rem;
  }
  .nav-link::after { left: 0.55rem; right: 0.55rem; }
  .nav-foot { padding-left: 0.9rem; gap: 0.6rem; }
  .header-status { font-size: 0.62rem; letter-spacing: 0.12em; }
}

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    padding-block: 3rem 2.25rem;
  }
  .footer-col--contact {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 1.5rem;
    grid-column: 1 / -1;
  }
  .footer-contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 980px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 0.5rem 1.25rem 1.75rem;
    background: var(--void);
    border-top: 1px solid var(--line);
    border-bottom: 2px solid var(--red);
    box-shadow: 0 34px 60px -26px #000000;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

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

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

  .nav-item { display: block; }

  .nav-link {
    padding: 0.9rem 0.25rem 0.9rem 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line);
  }

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

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

  .nav-link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    transform: translateY(-50%);
    background: var(--lime);
  }

  .nav-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    margin-top: 1.5rem;
    padding-left: 0;
    border-left: 0;
  }

  .nav-foot .btn { width: 100%; }
  .nav-foot .header-status { justify-content: center; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.15rem; }

  .brand-mark { width: 40px; height: 40px; font-size: 0.85rem; }
  .brand-name { font-size: 0.95rem; letter-spacing: 0.05em; }
  .brand-sub  { font-size: 0.52rem; letter-spacing: 0.28em; }
  .header-inner { gap: 0.9rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.5rem 2rem;
  }

  .footer-contact {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .footer-base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .site-footer { margin-top: 4rem; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
}

/* ---------- 12. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }
}
