/* ==========================================================
   KAIYUN 线上球赛 — 全站共享样式 /assets/site.css
   设计概念：球场HUD战术界面 + 坐标索引系统
   ========================================================== */

/* ---------- 01. CSS 变量 ---------- */
:root {
  --pitch-green: #1E984F;
  --deep-blue: #0A1F44;
  --pitch-green-light: #33B86B;
  --indigo: #2B3A67;
  --wine-red: #6B1F3F;
  --sun-yellow: #F2C94C;
  --orange: #F2994A;
  --paper: #F7F9F7;
  --muted-text: #4A5568;
  --line: #D6DEE6;

  --font-title: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'DIN Alternate', 'Roboto Mono', 'SFMono-Regular', monospace;

  --container-max: 1280px;
  --header-height: 72px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 31, 68, 0.10);
  --shadow-lg: 0 12px 32px rgba(10, 31, 68, 0.18);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: #1A2433;
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--deep-blue);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h3 {
  font-size: 1.4rem;
}

p {
  text-wrap: pretty;
}

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

a {
  color: var(--pitch-green);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--deep-blue);
}

ul, ol {
  list-style: none;
}

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

blockquote {
  font-style: italic;
  color: var(--wine-red);
  border-left: 3px solid var(--wine-red);
  padding-left: 16px;
  margin: 24px 0;
}

/* ---------- 03. Focus & A11y ---------- */
:focus-visible {
  outline: 2px solid var(--pitch-green);
  outline-offset: 3px;
  border-radius: 2px;
}

#main-content {
  display: block;
  min-height: 45vh;
}

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

/* ---------- 05. Container & Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 768px) {
  .container {
    padding-inline: 16px;
  }
  body {
    font-size: 15px;
  }
}

.split-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  min-height: 100vh;
}

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

.pitch-grid {
  background-image:
    linear-gradient(rgba(30, 152, 79, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 152, 79, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.coord-divider {
  height: 1px;
  border: none;
  margin: 32px 0;
  background: linear-gradient(90deg, var(--pitch-green) 0%, var(--line) 60%, var(--line) 100%);
  position: relative;
}

.coord-divider::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  background: var(--pitch-green);
  transform: rotate(45deg);
}

/* ---------- 06. Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 10px 20px;
  background: var(--pitch-green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}

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

/* ---------- 07. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(10, 31, 68, 0.72) 0%, rgba(10, 31, 68, 0) 100%);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--deep-blue);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(10, 31, 68, 0.28);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex-shrink: 0;
}

.site-header__brand:hover {
  color: #fff;
}

.site-header__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--pitch-green) 0%, var(--pitch-green-light) 100%);
  color: #fff;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  border-radius: 8px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  box-shadow: 0 2px 8px rgba(30, 152, 79, 0.35);
}

.site-header__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-header__name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.site-header__tagline {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pitch-green-light);
  font-weight: 500;
  white-space: nowrap;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 14px;
  background: var(--pitch-green);
  border-radius: 0 2px 2px 0;
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.2s ease;
}

.site-nav__link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.site-nav__link:hover::before,
.site-nav__link[aria-current="page"]::before {
  transform: translateY(-50%) scaleY(1);
}

.site-nav__link[aria-current="page"] {
  color: #fff;
  background-color: rgba(30, 152, 79, 0.16);
}

/* ---------- 08. Mobile Toggle ---------- */
.site-header__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 31, 68, 0.4);
  flex-shrink: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header__toggle:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(10, 31, 68, 0.6);
}

.site-header__toggle-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.site-header__toggle-bar:nth-child(1) {
  top: 15px;
}

.site-header__toggle-bar:nth-child(2) {
  top: 21px;
}

.site-header__toggle-bar:nth-child(3) {
  top: 27px;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ---------- 09. Scroll Progress ---------- */
.site-header__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pitch-green) 0%, var(--pitch-green-light) 60%, var(--sun-yellow) 100%);
  transition: width 0.1s linear;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  position: relative;
  background-color: var(--deep-blue);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 64px;
  padding-bottom: 28px;
  margin-top: 80px;
  overflow: hidden;
}

.site-footer__stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pitch-green) 0%, var(--pitch-green-light) 50%, var(--sun-yellow) 100%);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer a:hover {
  color: #fff;
  border-color: var(--pitch-green-light);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__block--brand {
  padding-right: 24px;
}

.site-footer__brand-name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-footer__brand-line {
  font-size: 14px;
  color: var(--pitch-green-light);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.site-footer__trust {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 16px;
  max-width: 44ch;
  border-left: 2px solid rgba(30, 152, 79, 0.5);
  padding-left: 12px;
}

.site-footer__heading {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}

.site-footer__heading--secondary {
  margin-top: 24px;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer__list a {
  display: inline-block;
  padding: 4px 0 4px 10px;
  font-size: 14px;
  border-left: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-footer__list a:hover {
  border-left-color: var(--pitch-green-light);
  color: #fff;
}

.site-footer__contact {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__note {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer__icp {
  letter-spacing: 0.05em;
}

/* ---------- 11. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background-color: var(--pitch-green);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--pitch-green-light);
  color: #fff;
  box-shadow: 0 4px 16px rgba(30, 152, 79, 0.28);
}

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

.btn--outline:hover {
  background-color: var(--deep-blue);
  color: #fff;
}

/* ---------- 12. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.tag--green {
  background: rgba(30, 152, 79, 0.1);
  color: #116B37;
}

.tag--wine {
  background: rgba(107, 31, 63, 0.08);
  color: var(--wine-red);
}

.tag--yellow {
  background: rgba(242, 201, 76, 0.18);
  color: #7A5C12;
}

.tag--orange {
  background: rgba(242, 153, 74, 0.14);
  color: #A65619;
}

/* ---------- 13. Card ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* ---------- 14. Section Title ---------- */
.section-title {
  position: relative;
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--deep-blue);
  padding-left: 16px;
  margin-bottom: 24px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.08em;
  bottom: 0.08em;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--pitch-green), var(--pitch-green-light));
}

/* ---------- 15. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted-text);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--muted-text);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.breadcrumb__sep {
  color: var(--line);
}

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

/* ---------- 16. Data Number ---------- */
.data-num {
  font-family: var(--font-data);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--deep-blue);
}

/* ---------- 17. Media Frame ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--indigo);
  border: 1px solid var(--line);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(43, 58, 103, 0.4) 0%, rgba(43, 58, 103, 0) 60%),
    var(--indigo);
}

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

.media-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.media-frame--1x1 {
  aspect-ratio: 1 / 1;
}

/* ---------- 18. Legend / Coordinate Index ---------- */
.legend {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.legend__item:last-child {
  border-bottom: none;
}

.legend__key {
  flex-shrink: 0;
  min-width: 30px;
  padding: 2px 6px;
  background: rgba(30, 152, 79, 0.08);
  color: var(--pitch-green);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
}

/* ---------- 19. Page Hero ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-height) + 56px) 0 56px;
  background-color: var(--deep-blue);
  color: #fff;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero__meta {
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pitch-green-light);
  margin-bottom: 8px;
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #fff;
  max-width: 16ch;
}

/* ---------- 20. Responsive Adjustments ---------- */
@media (max-width: 900px) {
  .site-header__toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 16px;
    right: 16px;
    z-index: 99;
    max-height: calc(100dvh - var(--header-height) - 16px);
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--deep-blue);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__link {
    display: block;
    padding: 13px 16px;
    font-size: 15px;
    border-radius: 8px;
    border-left: 3px solid transparent;
  }

  .site-nav__link::before {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(30, 152, 79, 0.16);
    border-left-color: var(--pitch-green);
  }
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .site-footer__block--brand {
    padding-right: 0;
  }
}

@media (max-width: 600px) {
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .site-header__name {
    font-size: 15px;
  }

  .site-header__tagline {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .site-header__mark {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}

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