/* ==========================================================================
   开云体育新版 · /assets/site.css
   共享外壳：设计变量 / reset / 中文排版 / 头部 / 页脚 / 按钮 / 基础组件
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink-950: #081512;
  --ink-900: #0C1D18;
  --ink-800: #12291F;
  --ink-700: #1B3A2C;
  --graphite-600: #2C322F;
  --mist-100: #E9EDE6;
  --paper-050: #F7F8F4;
  --lime-400: #B8FF4A;
  --lime-200: #D6FF9E;
  --gold-500: #E7B764;
  --gold-700: #8A6420;
  --mint-300: #6FD9B0;

  --text: var(--mist-100);
  --text-dim: rgba(233, 237, 230, 0.68);
  --text-faint: rgba(233, 237, 230, 0.48);
  --line: rgba(233, 237, 230, 0.14);
  --line-lime: rgba(184, 255, 74, 0.34);

  --maxw: 1440px;
  --gutter: 24px;
  --pad-x: clamp(16px, 4vw, 48px);

  --radius-l: 28px;
  --radius-m: 16px;
  --radius-s: 10px;

  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 108px;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, dt, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }
ul[class], ol[class] { list-style: none; }

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

button { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; }

/* ---------- 3. 中文排版基础 ---------- */
body {
  min-height: 100vh;
  background: var(--ink-950);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; }

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
}

strong { font-weight: 700; color: var(--mist-100); }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
}

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

/* ---------- 4. 通用容器与节奏 ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold-500);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-lime {
  background: var(--lime-400);
  color: var(--ink-950);
  border-color: var(--lime-400);
}
.btn-lime:hover { background: var(--lime-200); border-color: var(--lime-200); }

.btn-outline {
  background: transparent;
  color: var(--mist-100);
  border-color: rgba(233, 237, 230, 0.28);
}
.btn-outline:hover {
  border-color: var(--lime-400);
  color: var(--lime-400);
  background: rgba(184, 255, 74, 0.08);
}

.btn-gold {
  background: var(--gold-500);
  color: var(--ink-950);
  border-color: var(--gold-500);
}
.btn-gold:hover { background: var(--gold-500); filter: brightness(1.08); }

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--lime-400);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 3px;
}

/* ---------- 7. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: clamp(10px, 1.2vw, 18px) clamp(10px, 2.4vw, 28px) 0;
}

.header-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding: 8px 8px 8px clamp(14px, 1.6vw, 20px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 23, 19, 0.86);
  box-shadow: 0 22px 46px -34px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: padding var(--dur) var(--ease), background var(--dur) var(--ease);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--mist-100);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--lime-400) 8%, var(--mint-300) 92%);
  transform: rotate(-6deg);
  box-shadow: 0 0 0 1px rgba(184, 255, 74, 0.24);
}

.brand-mark::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--ink-950);
  transform: rotate(12deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  transform: skewX(-4deg);
  transform-origin: left bottom;
}

.brand-tagline {
  max-height: 16px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  white-space: nowrap;
  transition: max-height var(--dur) var(--ease), opacity 180ms var(--ease);
}

/* 滚动收窄态 */
.site-header.is-condensed .header-shell { padding-block: 4px; }
.site-header.is-condensed .brand-tagline {
  max-height: 0;
  opacity: 0;
}

/* 品牌浮岛右下的斜切暗块，制造非对称重心 */
.site-header .brand::after {
  content: "";
  width: 1px;
  height: 26px;
  margin-left: 6px;
  background: linear-gradient(180deg, transparent, rgba(184, 255, 74, 0.45), transparent);
}

/* 导航 */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 clamp(8px, 0.95vw, 14px);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.02vw, 15px);
  font-weight: 500;
  line-height: 1;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease), background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.nav-link:hover {
  color: var(--mist-100);
  background: rgba(184, 255, 74, 0.1);
}

.nav-link[aria-current="page"] {
  color: var(--lime-400);
  background: rgba(184, 255, 74, 0.1);
  box-shadow: inset 0 0 0 1px rgba(184, 255, 74, 0.34);
}

.nav-cta {
  flex: 0 0 auto;
  min-height: 44px;
  padding-inline: clamp(14px, 1.6vw, 22px);
  font-size: 14px;
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(233, 237, 230, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--mist-100);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--lime-400);
  background: rgba(184, 255, 74, 0.08);
}

.nav-toggle-box {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.nav-toggle[aria-expanded="true"] { border-color: var(--lime-400); color: var(--lime-400); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.nav-toggle-label { line-height: 1; }

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(4, 10, 8, 0.66);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms var(--ease), visibility 200ms var(--ease);
}

.nav-scrim[data-open] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 阅读进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  width: 0;
  height: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--gold-500), var(--lime-400));
  transition: width 90ms linear;
  pointer-events: none;
}

/* ---------- 8. 移动端抽屉 ---------- */
@media (max-width: 1080px) {
  html { scroll-padding-top: 96px; }

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

  .primary-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 125;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-height: min(78vh, 560px);
    margin: 0;
    padding: 22px clamp(16px, 5vw, 32px) calc(22px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-lime);
    border-radius: 26px 26px 0 0;
    background: rgba(8, 21, 18, 0.97);
    box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(calc(100% + 40px));
    transition: transform 240ms var(--ease);
  }

  .primary-nav[data-open] { transform: translateY(0); }

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

  .nav-link {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 16px;
  }

  .nav-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
  }

  .site-header .brand::after { display: none; }

  body.nav-open { overflow: hidden; }
}

@media (min-width: 1081px) {
  .nav-scrim { display: none; }
}

/* ---------- 9. 站点页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--ink-900);
  color: var(--mist-100);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--lime-400), var(--mint-300) 38%, transparent 82%);
  opacity: 0.7;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -34%;
  width: min(620px, 78vw);
  height: min(620px, 78vw);
  background: radial-gradient(circle, rgba(184, 255, 74, 0.1), transparent 66%);
  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.85fr);
  gap: clamp(32px, 5vw, 72px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 76px) var(--pad-x) clamp(28px, 4vw, 48px);
}

.footer-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.brand--footer { gap: 14px; }
.brand--footer .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
.brand--footer .brand-name { font-size: clamp(20px, 2vw, 26px); }
.brand--footer .brand-tagline { font-size: 11px; max-height: none; }

.footer-summary {
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.footer-links a:hover {
  color: var(--lime-400);
  transform: translateX(3px);
}

.footer-contact {
  grid-column: 1 / -1;
  padding-top: clamp(22px, 3vw, 32px);
  border-top: 1px solid var(--line);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px clamp(20px, 3vw, 40px);
  margin: 0;
}

.contact-item { display: flex; flex-direction: column; gap: 4px; }

.contact-item dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-item dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--mist-100);
  word-break: break-word;
}

.footer-note {
  margin-top: 16px;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-faint);
}

.footer-base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px clamp(18px, 3vw, 36px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--pad-x) clamp(26px, 4vw, 34px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-faint);
}

.footer-legal { font-family: var(--font-mono); letter-spacing: 0.02em; }

.footer-base-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-base-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.footer-base-links a:hover { color: var(--lime-400); }

.footer-base .footer-note { margin-top: 0; flex-basis: 100%; }

/* ---------- 10. 栏目标签轨道 ---------- */
.rail { position: relative; }

.rail-track {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 41, 31, 0.92);
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-track::-webkit-scrollbar { display: none; }

.rail-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 clamp(14px, 1.8vw, 22px);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.rail-tab:hover {
  color: var(--mist-100);
  background: rgba(184, 255, 74, 0.1);
}

.rail-tab[aria-selected="true"] {
  background: var(--lime-400);
  color: var(--ink-950);
  box-shadow: 0 0 0 1px rgba(184, 255, 74, 0.5);
}

.rail-panel { padding-top: 24px; }
.rail-panel[hidden] { display: none; }
.rail-panel:focus-visible { outline-offset: 6px; }

/* ---------- 11. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-m);
  background:
    repeating-linear-gradient(115deg, rgba(184, 255, 74, 0.05) 0 2px, transparent 2px 16px),
    linear-gradient(140deg, var(--ink-800), var(--ink-950));
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 21, 18, 0) 42%, rgba(8, 21, 18, 0.72) 100%);
  pointer-events: none;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 12. 入场动效 ---------- */
.reveal {
  transition: opacity 460ms var(--ease), transform 460ms var(--ease);
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

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

/* ---------- 13. 响应式收敛 ---------- */
@media (max-width: 1024px) {
  .footer-shell { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; line-height: 1.78; }
  .header-shell { gap: 10px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .footer-base .footer-note { margin-top: 4px; }
}

@media (max-width: 480px) {
  .brand-tagline { display: none; }
  .nav-toggle-label { display: none; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .contact-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 14. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .btn:hover,
  .footer-links a:hover { transform: none; }
}
