/* =========================================================
   乐竞体育 · site.css
   ========================================================= */

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

:root {
  --moss: #3C7A5E;
  --spring: #6EBF8B;
  --terra: #C96B3D;
  --rock: #5A6B70;
  --cream: #F4EFE6;
  --ink: #1A1A1A;
  --glass: #F8F8F8;
  --warn: #E0A500;
  --data-blue: #2A6F97;

  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;

  --header-height: 72px;
  --container: 1280px;
  --container-wide: 1440px;
  --container-narrow: 720px;
  --rail: 24px;
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.10);
  --z-skip: 1100;
  --z-header: 100;
  --z-progress: 1200;
}

/* ---------- 2. Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.3;
  color: var(--ink);
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--data-blue);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--terra);
}

ul, ol {
  list-style: none;
}

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

#main-content {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

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

::selection {
  background: rgba(201, 107, 61, 0.2);
}

[data-year] {
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. Skip Link & Scroll Progress ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: var(--z-skip);
  display: inline-block;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--spring), var(--terra));
  z-index: var(--z-progress);
  pointer-events: none;
}

/* ---------- 4. Containers & Sections ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--rail);
}

.container-wide {
  max-width: var(--container-wide);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: 80px;
}

.section-tight {
  padding-block: 40px;
}

@media (max-width: 768px) {
  .section {
    padding-block: 48px;
  }
}

/* ---------- 5. Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--moss);
  position: sticky;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--terra) 0%, var(--terra) 35%, var(--spring) 35%, var(--spring) 75%, var(--moss) 75%, var(--moss) 100%);
  z-index: 1;
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
  padding-block: 10px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}

.site-brand:hover {
  color: var(--moss);
}

.brand-logo {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--moss) 0%, var(--moss) 50%, var(--terra) 50%, var(--terra) 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.brand-logo::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.brand-text {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- 7. Navigation ---------- */
.site-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover {
  background-color: rgba(60, 122, 94, 0.08);
  color: var(--moss);
}

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 1px;
  height: 2px;
  border-radius: 1px;
  background-color: var(--terra);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--rock);
  transition: color var(--transition);
}

.nav-link:hover .nav-index,
.nav-link[aria-current="page"] .nav-index {
  color: var(--terra);
}

.header-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.v4-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terra);
  color: #fff;
  font-weight: 900;
  font-size: 0.72rem;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  transform: rotate(1.5deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.v4-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--spring);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(110, 191, 139, 0.3);
}

.v4-badge:hover {
  background: #b35a30;
  color: #fff;
  transform: rotate(-1deg) translateY(-1px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition);
}

.nav-toggle:hover {
  background: rgba(60, 122, 94, 0.08);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  border-radius: 1px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition), background-color var(--transition);
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 8. Mobile Navigation ---------- */
@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: rgba(244, 239, 230, 0.98);
    border-bottom: 3px solid var(--moss);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.3s;
  }

  .site-nav[data-open] {
    max-height: 480px;
    visibility: visible;
  }

  .site-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius);
  }

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

  .nav-link[aria-current="page"] {
    background: rgba(60, 122, 94, 0.08);
  }

  .nav-index {
    font-size: 0.68rem;
  }
}

/* ---------- 9. Footer ---------- */
.site-footer {
  background: var(--moss);
  color: rgba(244, 239, 230, 0.88);
  margin-top: 80px;
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--terra) 0%, var(--terra) 30%,
    var(--warn) 30%, var(--warn) 48%,
    var(--spring) 48%, var(--spring) 72%,
    var(--data-blue) 72%, var(--data-blue) 100%);
}

.site-footer .site-brand {
  color: var(--cream);
}

.site-footer .site-brand:hover {
  color: #fff;
}

.site-footer a {
  color: rgba(244, 239, 230, 0.85);
}

.site-footer a:hover {
  color: #fff;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 40px;
  padding-block: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-motto {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--cream);
  border-left: 3px solid var(--terra);
  padding-left: 12px;
  margin: 20px 0 12px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(244, 239, 230, 0.6);
  letter-spacing: 0.08em;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--spring);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}

.footer-links {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.footer-links a {
  display: inline-block;
  padding: 2px 0;
}

.footer-links a:hover {
  transform: translateX(2px);
  transition: transform var(--transition);
}

.footer-contact-list {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-all;
}

.footer-support {
  margin-top: 16px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(244, 239, 230, 0.65);
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  padding-top: 12px;
}

.footer-support-email {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--spring);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.16);
  padding-block: 16px;
  border-top: 1px solid rgba(244, 239, 230, 0.08);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(244, 239, 230, 0.7);
}

@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 36px;
  }

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

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- 10. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--terra);
  border: 2px solid var(--terra);
  color: #fff;
}

.btn-primary:hover {
  background: #b35a30;
  border-color: #b35a30;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--moss);
  color: var(--moss);
}

.btn-secondary:hover {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--cream);
  transform: translateY(-1px);
}

/* ---------- 11. Cards ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(90, 107, 112, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.glass-card {
  background: rgba(248, 248, 248, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(90, 107, 112, 0.18);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 107, 61, 0.3);
}

/* ---------- 12. Data Typography ---------- */
.data-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.15;
  color: var(--moss);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.data-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rock);
  margin-bottom: 4px;
}

.data-highlight {
  color: var(--terra);
  font-weight: 700;
}

/* ---------- 13. Section Heading & Annotation ---------- */
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--terra);
  background: rgba(201, 107, 61, 0.1);
  border: 1px solid rgba(201, 107, 61, 0.2);
  padding: 2px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.section-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.3;
}

.section-note {
  margin-left: auto;
  max-width: 260px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--rock);
  text-align: right;
}

.v-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--rock);
  border-left: 2px solid var(--terra);
  padding-left: 8px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .section-heading {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-note {
    margin-left: 0;
    text-align: left;
    max-width: 100%;
  }
}

/* ---------- 14. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--rock);
  padding-block: 16px;
}

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

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

.breadcrumb-sep {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--terra);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 15. Figure & Image ---------- */
.figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(60, 122, 94, 0.12), rgba(201, 107, 61, 0.12));
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.figure:hover img {
  transform: scale(1.03);
}

.figure-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--rock);
}

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

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-1-1 {
  aspect-ratio: 1 / 1;
}

/* ---------- 16. Reveal Protocol ---------- */
[data-reveal] {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(24px);
}

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

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

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

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