/* ============================================
   site.css — 必一体育 全站共享样式
   ============================================ */

/* 0. 设计变量 */
:root {
  /* 品牌色板 */
  --green: #00A651;
  --deep: #0A0E1A;
  --lime: #C8FF00;
  --parchment: #F2E8D5;
  --pine: #0D2A1D;
  --steel: #2A9D8F;
  --mist: #9BA4B0;
  --white: #FFFFFF;
  --env: #E5F4E0;

  /* 字体 */
  --font-heading: "Oswald", "DIN Alternate", "Source Han Sans Heavy", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Roboto Mono", "Courier New", monospace;

  /* 字号 */
  --text-hero: clamp(3rem, 8vw, 5.25rem);
  --text-h1: clamp(2.25rem, 5vw, 3.5rem);
  --text-h2: clamp(1.75rem, 3vw, 2.5rem);
  --text-h3: clamp(1.375rem, 2vw, 1.75rem);
  --text-big: 1.25rem;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  /* 布局变量 */
  --container: 1280px;
  --header-h: 76px;
  --space-section: clamp(4rem, 10vw, 7.5rem);
  --space-block: clamp(2.5rem, 6vw, 4.5rem);
  --radius: 14px;

  /* 动效与阴影 */
  --transition: 0.3s ease-out;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.25);
  --shadow-deep: 0 20px 50px rgba(0, 0, 0, 0.45);

  /* 滚动进度 */
  --progress: 0%;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--parchment);
  background: var(--deep);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* 2. 通用工具类 */
.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 {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 1100;
  padding: 10px 24px;
  background: var(--lime);
  color: var(--deep);
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* 3. 顶部滚动进度条 */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1002;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.progress-bar::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--green), var(--lime));
  border-radius: 0 2px 2px 0;
  transition: width 0.08s linear;
}

/* 4. 头部 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(10, 14, 26, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: rgba(242, 232, 213, 0.08);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green) 0%, var(--lime) 100%);
  clip-path: polygon(0 0, 100% 12%, 88% 100%, 0 68%);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--parchment);
  transition: color var(--transition);
}

.brand:hover .brand-text {
  color: var(--lime);
}

/* 主导航 */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(242, 232, 213, 0.85);
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  bottom: 0.125rem;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--lime);
  transition: width var(--transition);
}

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

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  width: calc(100% - 1.75rem);
}

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

/* 头部 CTA */
.header-cta {
  flex-shrink: 0;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 4px;
  border: 1px solid rgba(242, 232, 213, 0.25);
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.35);
  transition: border-color var(--transition), background var(--transition);
}

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

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--parchment);
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line {
  background: var(--lime);
}

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

/* 5. 内容容器 */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.has-fixed-header {
  padding-top: var(--header-h);
}

.section {
  padding: var(--space-section) 0;
}

.section-tight {
  padding: var(--space-block) 0;
}

.section-light {
  background: var(--env);
  color: var(--pine);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  position: relative;
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: linear-gradient(180deg, var(--green), var(--lime));
  border-radius: 1px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: var(--text-big);
  color: var(--mist);
  max-width: 42em;
}

/* 6. 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-sm);
  color: var(--mist);
  padding: 0.875rem 0;
}

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

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

.breadcrumb-sep {
  color: var(--steel);
  font-family: var(--font-mono);
}

/* 7. 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.375rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: #00bd5c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 166, 81, 0.35);
}

.btn-accent {
  background: var(--lime);
  color: var(--deep);
}

.btn-accent:hover {
  background: #d6ff4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 255, 0, 0.3);
}

.btn-outline {
  border-color: rgba(242, 232, 213, 0.35);
  color: var(--parchment);
}

.btn-outline:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* 8. 响应式栅格 */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

/* 9. 数据可视化基础组件 */
.data-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--lime);
  background: rgba(200, 255, 0, 0.08);
  border: 1px solid rgba(200, 255, 0, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.data-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(200, 255, 0, 0.6);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.data-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--lime);
  line-height: 1;
  letter-spacing: -0.03em;
}

.data-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(242, 232, 213, 0.12);
  overflow: hidden;
}

.data-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--lime));
  border-radius: 3px;
}

/* 10. 滚动显现 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 11. 页脚 */
.site-footer {
  position: relative;
  background: var(--deep);
  color: var(--parchment);
  border-top: 1px solid rgba(200, 255, 0, 0.12);
  padding-top: 4rem;
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--lime), var(--steel), transparent);
  border-radius: 0 0 4px 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}

.footer-brand {
  position: relative;
}

.footer-brand::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 1.25rem;
  background: linear-gradient(90deg, var(--green), var(--lime));
  border-radius: 2px;
}

.footer-brand .brand-text {
  font-size: 1.75rem;
}

.footer-tagline {
  margin-top: 1rem;
  font-size: var(--text-sm);
  color: var(--mist);
  max-width: 300px;
  line-height: 1.7;
}

.footer-note {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1.125rem;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  display: inline-block;
  font-size: var(--text-sm);
  color: rgba(242, 232, 213, 0.72);
  transition: color var(--transition), padding-left var(--transition);
}

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

.footer-contact li {
  font-size: var(--text-sm);
  color: rgba(242, 232, 213, 0.72);
  line-height: 1.6;
  word-break: break-all;
}

.contact-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--steel);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-bottom {
  border-top: 1px solid rgba(242, 232, 213, 0.1);
  padding: 1.25rem 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--mist);
}

.footer-icp {
  font-family: var(--font-mono);
}

/* 12. 焦点可见 */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 13. 响应式断点 */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 960px) {
  /* 移动导航侧滑 */
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: rgba(10, 14, 26, 0.98);
    border-left: 1px solid rgba(200, 255, 0, 0.12);
    padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
    z-index: 99;
    box-shadow: var(--shadow-deep);
    transition: right var(--transition);
    overflow-y: auto;
  }

  .main-nav[data-open] {
    right: 0;
  }

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

  .nav-link {
    font-size: var(--text-base);
    padding: 0.875rem 0.5rem;
    color: var(--parchment);
    border-bottom: 1px solid rgba(242, 232, 213, 0.08);
  }

  .nav-link::after {
    left: 0.5rem;
    bottom: 0;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    width: calc(100% - 1rem);
  }

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

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

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

/* 14. 减少动效 */
@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;
  }

  .progress-bar::before {
    transition: none;
  }

  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
