/* ==========================================================
   SITE KIT — 开心体育 / /assets/site.css
   复古出版 × 体育数据可视化
   ========================================================== */

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

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  padding-top: var(--header-h);
}

main {
  display: block;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

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

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

::selection {
  background: var(--orange);
  color: var(--cream);
}

/* ---------- Variables ---------- */
:root {
  --cream: #F5EFE0;
  --ink: #231F1B;
  --orange: #E85D2A;
  --blue: #003B73;
  --gray: #6B6B6B;
  --green: #B6FF00;
  --panel: #E8E2D5;
  --shadow: #1A1715;

  --font-head: 'Arial Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'Roboto Mono', 'SFMono-Regular', Consolas, monospace;

  --header-h: 72px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Screen Reader Only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -64px;
  left: 1rem;
  z-index: 999;
  background: var(--ink);
  color: var(--cream);
  padding: 0.625rem 1.25rem;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: var(--cream);
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
  width: min(92%, 1200px);
  margin-inline: auto;
}

/* ---------- Section Layout ---------- */
.section {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 72ch;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  transform: skew(-3deg);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray);
  max-width: 60ch;
}

/* ---------- Overline Label ---------- */
.overline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

.overline-label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(182, 255, 0, 0.6);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transform: skew(-3deg);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  text-align: center;
}

.btn:hover {
  box-shadow: 4px 4px 0 var(--ink);
  transform: skew(-3deg) translate(-2px, -2px);
}

.btn:active {
  transform: skew(-3deg) translate(2px, 2px);
  box-shadow: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--cream);
  border-color: var(--orange);
}

.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
}

.panel-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  transform: skew(-2deg);
  line-height: 1.2;
}

.panel-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(35, 31, 27, 0.85);
}

.panel-blue {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--cream);
}

.panel-blue .panel-text {
  color: rgba(245, 239, 224, 0.85);
}

.panel-blue .panel-title {
  color: var(--green);
}

.panel-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.panel-ink .panel-text {
  color: rgba(245, 239, 224, 0.8);
}

.panel-ink .panel-title {
  color: var(--orange);
}

/* ---------- Tag Chips ---------- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--orange);
  color: var(--cream);
}

.tag-chip-blue {
  background: var(--blue);
  color: var(--cream);
}

.tag-chip-ink {
  background: var(--ink);
  color: var(--cream);
}

.tag-chip-green {
  background: var(--green);
  color: var(--ink);
}

/* ---------- Data Digits ---------- */
.data-digit {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.data-digit-green {
  color: var(--green);
}

.data-digit-sm {
  font-size: 1.5rem;
}

/* ---------- Image Frame ---------- */
.image-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(-45deg,
      rgba(232, 93, 42, 0.06) 0 10px,
      transparent 10px 20px),
    var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.image-frame-16-9 {
  aspect-ratio: 16 / 9;
}

.image-frame-square {
  aspect-ratio: 1 / 1;
}

.image-frame-portrait {
  aspect-ratio: 3 / 4;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-frame::after {
  content: "IMG";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) skew(-4deg);
  font-family: var(--font-data);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gray);
  opacity: 0.5;
  pointer-events: none;
}

.image-frame:has(img)::after {
  display: none;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 1.75rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--gray);
  opacity: 0.7;
}

.breadcrumb a {
  color: var(--gray);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Content Body ---------- */
.content-body {
  max-width: 65ch;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.content-body > * + * {
  margin-top: 1.25rem;
}

.content-body h2,
.content-body h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  transform: skew(-2deg);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.content-body h2 {
  font-size: 1.75rem;
}

.content-body h3 {
  font-size: 1.375rem;
}

.content-body p {
  line-height: 1.8;
}

.content-body ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.content-body ol {
  list-style: decimal;
  padding-left: 1.5rem;
}

.content-body blockquote {
  border-left: 4px solid var(--orange);
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.5rem;
  font-style: italic;
}

.content-body a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(232, 93, 42, 0.4);
  text-underline-offset: 3px;
}

.content-body a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* ---------- Page Hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 3rem) 0 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  background: repeating-linear-gradient(-45deg,
    transparent 0 12px,
    rgba(232, 93, 42, 0.07) 12px 24px);
  pointer-events: none;
}

.page-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  transform: skew(-3deg);
  margin-bottom: 0.75rem;
}

.page-hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray);
  max-width: 55ch;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(26, 23, 21, 0.16);
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--orange), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 5;
  transition: transform 0.05s linear;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--header-h) - 2px);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
  flex-shrink: 0;
  transform: skew(-2deg);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.brand:hover {
  color: var(--orange);
  transform: skew(-3deg) scale(1.02);
}

.brand-text {
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-dot {
  position: relative;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 6px rgba(182, 255, 0, 0.7);
  flex-shrink: 0;
}

.brand-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green);
  opacity: 0.6;
  animation: brandPulse 2.4s ease-out infinite;
}

@keyframes brandPulse {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ---------- Nav ---------- */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  transform: skew(-2deg);
  border-radius: 3px;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--orange);
}

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

.nav-link[aria-current="page"] {
  color: var(--orange);
  font-weight: 700;
}

/* ---------- Mobile Toggle ---------- */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}

.nav-toggle:hover {
  background: var(--panel);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

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

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

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background:
    linear-gradient(rgba(245, 239, 224, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 239, 224, 0.02) 1px, transparent 1px),
    var(--blue);
  background-size: 24px 24px;
  color: var(--cream);
  margin-top: 5rem;
  overflow: hidden;
}

.speed-lines {
  height: 6px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 10px,
    var(--ink) 10px 20px,
    var(--cream) 20px 28px,
    var(--blue) 28px 38px
  );
  border-bottom: 1px solid rgba(245, 239, 224, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: 3.5rem 0 2.5rem;
}

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

.footer-brand {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  transform: skew(-3deg);
  margin-bottom: 0.75rem;
  color: var(--cream);
}

.footer-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(245, 239, 224, 0.85);
  max-width: 38ch;
}

.footer-title {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(245, 239, 224, 0.25);
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: rgba(245, 239, 224, 0.9);
  font-size: 0.9375rem;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer-links a:hover {
  color: var(--green);
  padding-left: 4px;
}

.footer-contact li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(245, 239, 224, 0.88);
}

.contact-label {
  color: var(--orange);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 2.5em;
}

.footer-bottom {
  border-top: 1px solid rgba(245, 239, 224, 0.2);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  color: rgba(245, 239, 224, 0.75);
}

.footer-copyright {
  color: rgba(245, 239, 224, 0.8);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal a {
  color: rgba(245, 239, 224, 0.75);
  transition: color 0.25s var(--ease);
}

.footer-legal a:hover {
  color: var(--green);
}

.footer-icp {
  color: rgba(245, 239, 224, 0.55);
}

.footer-brand-col {
  grid-column: auto;
}

/* ---------- Back To Top ---------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--orange);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s var(--ease), background-color 0.25s var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--ink);
  color: var(--green);
}

.back-to-top-arrow {
  font-family: var(--font-data);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  transform: skew(-4deg);
}

/* ---------- Scroll Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--cream);
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 12px 24px rgba(26, 23, 21, 0.12);
    padding: 0.75rem 4% 1rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease),
      visibility 0.35s var(--ease);
  }

  .site-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

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

  .nav-item {
    border-bottom: 1px dashed rgba(35, 31, 27, 0.15);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 0.9rem 0.5rem;
    font-size: 1.0625rem;
    transform: skew(-2deg);
    border-radius: 0;
  }

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

  .nav-link[aria-current="page"] {
    color: var(--orange);
    background: rgba(232, 93, 42, 0.08);
    border-left: 3px solid var(--orange);
    font-weight: 700;
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .footer-brand-col {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 60px;
  }

  .brand {
    font-size: 1.125rem;
  }

  .brand-dot {
    width: 8px;
    height: 8px;
    margin-right: 8px;
  }

  .page-hero {
    padding-top: calc(var(--header-h) + 2rem);
  }
}

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

  .brand-dot::after {
    animation: none;
    display: none;
  }

  .scroll-progress,
  .site-nav,
  .nav-toggle-line,
  .back-to-top,
  .btn,
  .btn:hover,
  .nav-link,
  .nav-link::after,
  .footer-links a {
    transition: none;
  }

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