/* ============ 奇异果体育平台 · 全站共享样式 ============ */

/* ---------- 1. 变量与重置 ---------- */
:root {
  --paper: #F5F0E6;
  --ink: #262626;
  --kiwi: #1A7A4A;
  --emerald: #3BAF74;
  --gold: #C9A227;
  --desert: #C96F2D;
  --oasis: #0F6E7A;
  --grid: #D8D0C0;
  --white: #FFFFFF;
  --gray: #404040;
  --header-w: 320px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-head: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  --font-body: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul,
ol {
  list-style: none;
}

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

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--kiwi);
  color: var(--paper);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- 2. 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.4em;
}

p {
  margin-bottom: 1em;
}

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

.text-head {
  font-family: var(--font-head);
  font-weight: 900;
}

.text-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--gray);
}

.text-center {
  text-align: center;
}

.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;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ---------- 3. 布局 ---------- */
.site-main {
  padding: 96px 0 64px;
}

#main-content {
  scroll-margin-top: 80px;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: 48px 0;
}

@media (max-width: 767px) {
  .container {
    padding-inline: 16px;
  }
}

/* ---------- 4. 通用按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  color: var(--paper);
  background: var(--kiwi);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--emerald);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--kiwi);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--emerald);
}

.btn-secondary {
  background: var(--gold);
  color: var(--ink);
}

.btn-secondary:hover {
  background: #D9B630;
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
}

.btn-dark:hover {
  background: var(--gray);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--white);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ---------- 5. 顶部侧边轨 ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 5000;
  padding: 10px 20px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  transition: top 0.2s ease;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--kiwi), var(--emerald) 60%, var(--gold));
  z-index: 4000;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-w);
  height: 100vh;
  height: 100dvh;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 22% 78%, rgba(58, 175, 116, 0.16), transparent 140px),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(245, 240, 230, 0.045) 31px, rgba(245, 240, 230, 0.045) 32px),
    repeating-linear-gradient(90deg, transparent 0, transparent 31px, rgba(245, 240, 230, 0.045) 31px, rgba(245, 240, 230, 0.045) 32px);
  border-right: 1px solid rgba(245, 240, 230, 0.12);
  z-index: 2000;
}

.header-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header-top {
  padding: 24px 24px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-svg {
  width: 100%;
  height: 100%;
}

.brand-ring {
  transform-origin: center;
  animation: brand-rotate 24s linear infinite;
}

@keyframes brand-rotate {
  to {
    transform: rotate(360deg);
  }
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.15;
  color: var(--paper);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--emerald);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 240, 230, 0.3);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

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

.nav-toggle:active {
  background: rgba(58, 175, 116, 0.2);
}

.nav-toggle-box {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--paper);
  transition: top 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle-bar:nth-child(1) { top: 0; }
.nav-toggle-bar:nth-child(2) { top: 6px; }
.nav-toggle-bar:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  top: 6px;
  transform: 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) {
  top: 6px;
  transform: rotate(-45deg);
}

.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px;
  overflow-y: auto;
}

.nav-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(245, 240, 230, 0.45);
  padding: 0 8px 12px;
  border-bottom: 1px solid rgba(245, 240, 230, 0.12);
  margin-bottom: 12px;
}

.nav-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.nav-item {
  margin: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 230, 0.75);
  border-left: 3px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  right: 16px;
  width: 6px;
  height: 6px;
  background: transparent;
  transform: rotate(45deg);
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(58, 175, 116, 0.14);
  border-left-color: var(--emerald);
}

.nav-link:hover::after {
  background: var(--emerald);
  opacity: 1;
}

.nav-link[aria-current="page"] {
  background: var(--kiwi);
  border-left-color: var(--gold);
  color: var(--paper);
}

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

.nav-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.08em;
  min-width: 22px;
}

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

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

.nav-label {
  display: block;
}

.header-cta {
  padding: 20px 0 28px;
  border-top: 1px solid rgba(245, 240, 230, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(245, 240, 230, 0.55);
  text-align: center;
}

.header-coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(245, 240, 230, 0.3);
  text-align: center;
}

/* ---------- 6. 响应式头部 · 移动抽屉 ---------- */
@media (max-width: 1023px) {
  .site-header {
    width: 100%;
    height: 64px;
    border-right: none;
    border-bottom: 1px solid rgba(245, 240, 230, 0.15);
  }

  .header-frame {
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
  }

  .header-top {
    position: relative;
    z-index: 3100;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-sub {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    padding: 72px 20px 24px;
    background: var(--ink);
    border-right: 1px solid rgba(245, 240, 230, 0.15);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    visibility: hidden;
    z-index: 3000;
    overflow-y: auto;
    transition: transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }

  .site-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s var(--ease-out), visibility 0s linear 0s;
  }

  .nav-list {
    justify-content: flex-start;
    flex: none;
  }

  .nav-link {
    font-size: 16px;
    padding: 14px 16px;
  }

  .header-cta {
    margin-top: auto;
  }
}

/* ---------- 7. 桌面适配 ---------- */
@media (min-width: 1024px) {
  .site-main {
    margin-left: var(--header-w);
    padding: 64px 0 80px;
  }

  #main-content {
    scroll-margin-top: 0;
  }

  .scroll-progress {
    left: var(--header-w);
  }

  .site-footer {
    margin-left: var(--header-w);
  }
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 39px, rgba(245, 240, 230, 0.035) 39px, rgba(245, 240, 230, 0.035) 40px),
    repeating-linear-gradient(90deg, transparent 0, transparent 39px, rgba(245, 240, 230, 0.035) 39px, rgba(245, 240, 230, 0.035) 40px);
  border-top: 4px solid var(--kiwi);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1120px;
  margin-inline: auto;
  padding: 56px 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 240, 230, 0.65);
  max-width: 34ch;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 400;
}

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

.footer-link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: rgba(245, 240, 230, 0.8);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover {
  color: var(--emerald);
  padding-left: 6px;
}

.footer-link-cta {
  color: var(--gold);
}

.footer-link-cta::after {
  content: '\2197';
  margin-left: 4px;
  display: inline-block;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(245, 240, 230, 0.5);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid rgba(245, 240, 230, 0.12);
  padding: 18px 24px;
  max-width: 1120px;
  margin-inline: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245, 240, 230, 0.5);
}

@media (min-width: 1280px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
  }
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }

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

/* ---------- 9. 面板 · 卡片 · 标签 ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--grid);
  border-radius: 2px;
  padding: 32px;
}

.card {
  background: var(--white);
  border: 1px solid var(--grid);
  border-left: 4px solid var(--kiwi);
  border-radius: 2px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(38, 38, 38, 0.08);
}

.card[data-reveal].is-visible:hover {
  transform: translateY(-4px);
}

.cut-corner {
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--kiwi);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 2px;
}

.tag::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

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

.tag-gold::before {
  background: var(--ink);
}

.tag-orange {
  background: var(--desert);
  color: var(--white);
}

.tag-orange::before {
  background: var(--paper);
}

.tag-blue {
  background: var(--oasis);
  color: var(--white);
}

.tag-blue::before {
  background: var(--gold);
}

/* ---------- 10. 章节 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--desert);
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  color: var(--ink);
}

.section-desc {
  color: var(--gray);
  max-width: 58ch;
  font-size: 16px;
}

@media (max-width: 767px) {
  .section-head {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- 11. 图片占位容器 ---------- */
.media-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #EBE4D6;
  border: 1px solid var(--grid);
  overflow: hidden;
}

.media-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(38, 38, 38, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 38, 38, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}

.media-frame::after {
  content: 'GRAPHIC / SVG';
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: rgba(38, 38, 38, 0.3);
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

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

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

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--kiwi);
  transition: color 0.2s ease;
}

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

.breadcrumb-sep {
  color: var(--grid);
}

/* ---------- 13. 栅格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

/* ---------- 14. 滚动显现 ---------- */
.js-enabled [data-reveal] {
  transition: opacity 0.55s var(--ease-out), clip-path 0.55s var(--ease-out);
}

.js-enabled [data-reveal]:not(.is-visible) {
  opacity: 0;
  clip-path: inset(0 0 12px 0);
}

.js-enabled [data-reveal].is-visible {
  opacity: 1;
  clip-path: inset(0);
}

/* ---------- 15. 减少动效 ---------- */
@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: 0ms !important;
  }

  .js-enabled [data-reveal]:not(.is-visible) {
    opacity: 1;
    clip-path: inset(0);
  }

  .scroll-progress {
    display: none;
  }
}
