/* ============================================
   云开体育 · 全站共享样式
   文件位置 /assets/site.css
   设计语言：数据速报板 · Bento 模块 · 斜切动势
   ============================================ */

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

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

body {
  font-family: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1A1A1A;
  background: #F5F0E6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
  line-height: 1.25;
  color: #0D1B2A;
}

p {
  margin: 0;
}

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

ul,
ol {
  list-style: none;
}

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

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

:focus-visible {
  outline: 3px solid #FF6D00;
  outline-offset: 2px;
}

::selection {
  background: #C6FF00;
  color: #0D1B2A;
}

/* ---------- CSS 变量 ---------- */
:root {
  /* 色彩 */
  --ink-blue: #0D1B2A;
  --ink-blue-light: #14263A;
  --ink-blue-dark: #081220;
  --rice-white: #F5F0E6;
  --rice-white-dark: #E8E2D5;
  --bright-orange: #FF6D00;
  --bright-orange-dark: #E85F00;
  --lime: #C6FF00;
  --rock-grey: #8A8D8E;
  --moss: #5C7A5A;
  --terracotta: #C77B5A;
  --ink: #1A1A1A;

  /* 字体 */
  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "Roboto Mono", "SF Mono", "Consolas", monospace;
  --font-body: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 字号 */
  --text-display: clamp(2.5rem, 5vw, 4rem);
  --text-h1: 2.25rem;
  --text-h2: 2rem;
  --text-h3: 1.25rem;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  /* 间距 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* 布局 */
  --container-width: 1440px;
  --header-height: 72px;

  /* 阴影 */
  --shadow-sm: 0 1px 4px rgba(13, 27, 42, 0.08);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, 0.12);
  --shadow-lg: 0 12px 32px rgba(13, 27, 42, 0.18);

  /* 过渡 */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* 层级 */
  --z-progress: 2000;
  --z-header: 1000;
  --z-skip: 3000;
}

/* ---------- 通用排版辅助 ---------- */
.text--data {
  font-family: var(--font-data);
}

.text--muted {
  color: var(--rock-grey);
}

/* ---------- 容器与区块 ---------- */
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

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

.section--dark {
  background: var(--ink-blue);
  color: var(--rice-white);
}

.section--light {
  background: var(--rice-white);
  color: var(--ink);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--rice-white);
}

.section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-index {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bright-orange);
}

.section--dark .section-index {
  color: var(--lime);
}

.section-title {
  font-family: var(--font-head);
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-blue);
}

.section--dark .section-title {
  color: var(--rice-white);
}

.section-divider {
  display: block;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--bright-orange), var(--lime));
  transform: skewX(-12deg);
  margin: var(--space-4) 0 var(--space-6);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: var(--rice-white);
  border: 1px solid rgba(13, 27, 42, 0.08);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card--dark {
  background: var(--ink-blue);
  border-color: rgba(13, 27, 42, 0.5);
  color: var(--rice-white);
}

.card--dark:hover {
  box-shadow: var(--shadow-lg);
}

.card--accent {
  border-left: 4px solid var(--bright-orange);
}

.card--accent::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, transparent 12px, var(--bright-orange) 12px);
  pointer-events: none;
}

.card__body {
  padding: var(--space-5);
}

.card__title {
  font-family: var(--font-head);
  font-size: var(--text-h3);
  font-weight: 800;
  color: var(--ink-blue);
  margin-bottom: var(--space-2);
}

.card--dark .card__title {
  color: var(--rice-white);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--text-sm);
  line-height: 1;
  color: var(--ink-blue);
  background: var(--bright-orange);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--ink-blue);
  color: var(--rice-white);
  transform: translateY(-2px);
}

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

.btn--ghost {
  background: transparent;
  color: var(--ink-blue);
  box-shadow: inset 0 0 0 2px var(--ink-blue);
}

.btn--ghost:hover {
  background: var(--ink-blue);
  color: var(--rice-white);
}

.btn--light {
  background: var(--rice-white);
  color: var(--ink-blue);
}

.btn--light:hover {
  background: var(--bright-orange);
  color: var(--ink-blue);
}

.btn--green {
  background: var(--lime);
  color: var(--ink-blue);
}

.btn--green:hover {
  background: var(--ink-blue);
  color: var(--lime);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  background: var(--moss);
  color: var(--rice-white);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

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

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

.tag--terracotta {
  background: var(--terracotta);
}

.tag--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--rock-grey);
  color: var(--rock-grey);
  clip-path: none;
}

/* ---------- 数据展示 ---------- */
.data-stat {
  font-family: var(--font-data);
  font-size: var(--text-h1);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink-blue);
}

.data-stat--lime {
  color: var(--lime);
}

.data-stat--orange {
  color: var(--bright-orange);
}

.data-stat--terracotta {
  color: var(--terracotta);
}

.data-label {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rock-grey);
}

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--rock-grey);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(13, 27, 42, 0.1);
  pointer-events: none;
  z-index: 1;
}

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

.media:hover img {
  transform: scale(1.02);
}

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

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

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

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

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: var(--text-sm);
  padding-block: var(--space-4);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  font-family: var(--font-data);
  color: var(--rock-grey);
}

.breadcrumb__link {
  color: var(--rock-grey);
  transition: color var(--transition);
}

.breadcrumb__link:hover {
  color: var(--bright-orange);
}

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-skip);
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--bright-orange);
  color: var(--ink-blue);
  font-family: var(--font-head);
  font-weight: 800;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-4);
  outline: none;
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--bright-orange), var(--lime));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: var(--z-progress);
  pointer-events: none;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--ink-blue);
  border-bottom: 3px solid var(--bright-orange);
  color: var(--rice-white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
  height: var(--header-height);
}

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

.site-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bright-orange);
  color: var(--ink-blue);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.site-brand__text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  color: var(--rice-white);
  transition: color var(--transition);
}

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

/* 主导航 */
.site-nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 0.25rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  color: rgba(245, 240, 230, 0.72);
  transition: color var(--transition);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--transition);
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--rice-white);
}

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

/* 页头快捷入口 */
.site-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: var(--lime);
  color: var(--ink-blue);
  font-family: var(--font-data);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: background-color var(--transition);
}

.site-header__cta:hover {
  background: var(--bright-orange);
}

.site-header__cta-text {
  display: inline-block;
  line-height: 1;
}

/* 移动导航按钮 */
.site-nav__toggle {
  display: none;
  position: relative;
  z-index: 1001;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 240, 230, 0.35);
  background: transparent;
}

.site-nav__toggle:hover {
  border-color: var(--lime);
}

.site-nav__toggle-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--rice-white);
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}

.site-nav__toggle-bar:nth-child(1) {
  top: 14px;
}

.site-nav__toggle-bar:nth-child(2) {
  top: 20px;
}

.site-nav__toggle-bar:nth-child(3) {
  top: 26px;
}

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

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

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

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-blue-dark);
  color: var(--rice-white);
  border-top: 3px solid var(--lime);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-6);
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
  padding-block: var(--space-7);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.site-brand--footer .site-brand__mark {
  background: var(--lime);
}

.site-brand--footer .site-brand__text {
  color: var(--rice-white);
}

.site-footer__trust {
  font-size: var(--text-sm);
  color: rgba(245, 240, 230, 0.65);
  max-width: 28rem;
  line-height: 1.7;
  margin-top: var(--space-2);
}

.site-footer__heading {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--space-4);
}

.site-footer__list li,
.site-footer__contact li {
  margin-bottom: var(--space-2);
}

.site-footer__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-sm);
  color: rgba(245, 240, 230, 0.75);
  transition: color var(--transition), transform var(--transition);
}

.site-footer__list a::before {
  content: "›";
  font-family: var(--font-data);
  color: var(--bright-orange);
}

.site-footer__list a:hover {
  color: var(--bright-orange);
  transform: translateX(4px);
}

.site-footer__contact {
  font-size: var(--text-sm);
  color: rgba(245, 240, 230, 0.75);
  line-height: 1.8;
}

.site-footer__contact li {
  padding-left: 0.875rem;
  position: relative;
}

.site-footer__contact li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  transform: skewX(-12deg);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(245, 240, 230, 0.12);
}

.site-footer__copyright,
.site-footer__icp {
  font-size: var(--text-xs);
  color: rgba(245, 240, 230, 0.5);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .site-header__inner {
    height: 64px;
  }

  .site-brand__mark {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }

  .site-brand__text {
    font-size: 1.125rem;
  }

  .site-nav {
    display: block;
    flex: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 340px);
    background: var(--ink-blue);
    border-left: 3px solid var(--bright-orange);
    transform: translateX(102%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    padding: 5rem var(--space-5) var(--space-5);
    z-index: 998;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.3);
  }

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

  .site-nav__item {
    border-bottom: 1px solid rgba(245, 240, 230, 0.1);
  }

  .site-nav__link {
    padding: 1rem 0.25rem;
    font-size: 1rem;
    color: rgba(245, 240, 230, 0.8);
  }

  .site-nav__toggle {
    display: block;
  }

  .site-header__cta {
    margin-left: auto;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding-block: var(--space-6);
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-header__cta {
    display: none;
  }

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

/* ---------- 低动效适配 ---------- */
@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;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }

  .site-nav {
    transition: none;
  }
}
