/* ==========================================================================
   亿游互娱 · 数字庭院 共享样式 /assets/site.css
   负责：reset、变量、中文排版、头部轨道、页脚、通用组件、图片容器基础规则
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, hr { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); }

/* ---------- 2. 变量 ---------- */
:root {
  /* 墨色基底 */
  --ink: #10151C;
  --ink-2: #161E2A;
  --line: #26313F;
  /* 四季 */
  --spring: #7BC96F;
  --summer: #2BB3C0;
  --autumn: #E39A3B;
  --winter: #2E3A66;
  --winter-lit: #5A6DA8;
  /* 文本 */
  --mist: #E8EDF2;
  --muted: #9AA7B4;
  --pure: #FFFFFF;
  --snow: #F2F6F9;
  /* 生长渐变 */
  --grow: linear-gradient(135deg, #7BC96F, #2BB3C0, #E39A3B);
  /* 尺度 */
  --rail-w: 104px;
  --shell: 1240px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--ink);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 17px; } }
@media (min-width: 1080px) { body { padding-inline-start: var(--rail-w); } }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--snow); }

:focus-visible { outline: 2px solid var(--summer); outline-offset: 3px; border-radius: 8px; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--spring);
  color: #0B1016;
  font-size: 14px;
  font-weight: 800;
  transform: translateY(-220%);
  transition: transform .28s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 布局容器 ---------- */
.container { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }
@media (min-width: 1400px) { .container { padding-inline: 48px; } }

.section { padding-block: clamp(56px, 9vw, 110px); }
.section--tight { padding-block: clamp(36px, 6vw, 72px); }

.prose { max-width: 38rem; color: var(--muted); }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--mist); font-weight: 700; }

.lead { font-size: clamp(17px, 2.1vw, 22px); line-height: 1.8; color: var(--muted); max-width: 34em; }

.display {
  font-size: clamp(40px, 7.4vw, 88px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--pure);
}
.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--accent, var(--summer)); }

/* ---------- 6. 网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-asym { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-asym { grid-template-columns: 1.35fr .85fr; align-items: start; } }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grow); color: #0B1016; }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(43, 179, 192, .25); }
.btn-ghost { background: rgba(22, 30, 42, .7); border-color: var(--line); color: var(--mist); }
.btn-ghost:hover { border-color: var(--summer); color: var(--snow); }

.to-top {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(22, 30, 42, .8);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.to-top:hover { color: var(--snow); border-color: var(--autumn); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: start;
  padding-bottom: 3px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  color: var(--snow);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.copy-btn:hover { color: var(--summer); border-color: var(--summer); }
.copy-value { word-break: break-all; }
.copy-hint { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.copy-btn.is-copied { border-color: var(--spring); color: var(--spring); }
.copy-btn.is-copied .copy-hint { color: var(--spring); }

/* ---------- 8. 卡片 / 标签 / 数据 ---------- */
.card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(43, 179, 192, .55); box-shadow: 0 20px 44px rgba(0, 0, 0, .38); }
.card > :last-child { margin-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(22, 30, 42, .85);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.pill[data-season="spring"] { color: var(--spring); border-color: rgba(123, 201, 111, .45); }
.pill[data-season="summer"] { color: var(--summer); border-color: rgba(43, 179, 192, .45); }
.pill[data-season="autumn"] { color: var(--autumn); border-color: rgba(227, 154, 59, .45); }
.pill[data-season="winter"] { color: var(--winter-lit); border-color: rgba(90, 109, 168, .5); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--accent, var(--autumn));
}
.stat-label { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

.rule { height: 1px; background: var(--line); border: 0; }
.branch {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: .55;
  pointer-events: none;
}

/* ---------- 9. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(46, 58, 102, .55), rgba(22, 30, 42, .95));
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-frame { aspect-ratio: 16 / 9; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.media-caption { margin-top: 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb { padding-block: 18px; font-size: 13px; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a:hover { color: var(--summer); }
.breadcrumb [aria-current="page"] { color: var(--mist); }

/* ==========================================================================
   11. 页头：移动顶栏 + 桌面侧边轨道 + 移动抽屉
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 90; }

/* --- 移动顶栏 --- */
.topbar {
  position: relative;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(16, 21, 28, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grow); }
.topbar-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--snow); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
}
.nav-toggle-bars { position: relative; width: 16px; height: 10px; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 8px; }
.site-header[data-open] .nav-toggle-bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { top: 4px; transform: rotate(-45deg); }
.site-header[data-open] .topbar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }

/* --- 侧边轨道 --- */
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: var(--rail-w);
  height: 100vh;
  height: 100dvh;
  padding: 24px 6px 18px;
  background: linear-gradient(180deg, #141C26, var(--ink) 55%, #131A23);
  border-inline-end: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.rail-progress { position: absolute; top: 0; right: 0; width: 2px; height: 100%; background: rgba(38, 49, 63, .55); }
.rail-progress-fill { display: block; width: 100%; height: 0; background: var(--grow); }

.rail-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: var(--grow); box-shadow: 0 0 22px rgba(43, 179, 192, .35); }
.brand-name { writing-mode: vertical-rl; font-size: 15px; font-weight: 900; letter-spacing: .3em; line-height: 1; color: var(--snow); }

.season-scale { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 8px; }
.season-tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
  opacity: .42;
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .4s var(--ease);
}
.season-tick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.season-tick[data-season="spring"] { color: var(--spring); }
.season-tick[data-season="summer"] { color: var(--summer); }
.season-tick[data-season="autumn"] { color: var(--autumn); }
.season-tick[data-season="winter"] { color: var(--winter-lit); }
.season-tick[data-lit="true"] { opacity: 1; transform: scale(1.06); }

.rail-nav { width: 100%; }
.rail-nav-list { display: flex; flex-direction: column; gap: 4px; }
.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.rail-link[data-season="spring"] { --accent: var(--spring); }
.rail-link[data-season="summer"] { --accent: var(--summer); }
.rail-link[data-season="autumn"] { --accent: var(--autumn); }
.rail-link[data-season="winter"] { --accent: var(--winter-lit); }
.rail-link-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--line)); }
.rail-link-label { white-space: nowrap; }
.rail-link:hover { color: var(--snow); background: rgba(38, 49, 63, .55); border-color: var(--line); transform: translateX(2px); }
.rail-link[aria-current="page"] {
  color: var(--snow);
  background: linear-gradient(90deg, rgba(46, 58, 102, .95), rgba(46, 58, 102, .42));
  border-color: rgba(46, 58, 102, 1);
  box-shadow: inset 3px 0 0 var(--accent, var(--spring));
}

.rail-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 6px;
  border-radius: 999px;
  border: 1px solid rgba(43, 179, 192, .5);
  background: linear-gradient(135deg, rgba(43, 179, 192, .22), rgba(123, 201, 111, .16));
  color: var(--snow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.rail-cta:hover { border-color: var(--spring); transform: translateY(-2px); }

.rail-version {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 30, 42, .9);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.rail-version-num { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--autumn); letter-spacing: .02em; }
.rail-version-cap { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.rail-version:hover { border-color: rgba(227, 154, 59, .6); }
.rail-version.is-copied { border-color: rgba(123, 201, 111, .7); }
.rail-version.is-copied .rail-version-cap { color: var(--spring); }

.rail-scrim { display: none; }

/* --- 桌面：轨道固定，顶栏隐藏 --- */
@media (min-width: 1080px) {
  .site-header { position: static; }
  .topbar { display: none; }
}

/* --- 移动 / 平板：抽屉 --- */
@media (max-width: 1079.98px) {
  .rail {
    inset: 0;
    width: 100%;
    height: 100dvh;
    align-items: stretch;
    gap: 18px;
    padding: 78px 20px 28px;
    border-inline-end: 0;
    background:
      radial-gradient(120% 60% at 10% 0%, rgba(123, 201, 111, .12), transparent 60%),
      radial-gradient(90% 55% at 95% 8%, rgba(43, 179, 192, .13), transparent 62%),
      linear-gradient(160deg, #10151C, #161E2A 70%, #10151C);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .4s var(--ease), visibility .4s var(--ease);
    overflow-y: auto;
  }
  .site-header[data-open] .rail { transform: translateX(0); visibility: visible; }

  .rail-progress { display: none; }
  .rail-brand { display: none; }
  .season-scale { flex-direction: row; justify-content: flex-start; gap: 18px; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
  .season-tick { flex-direction: row; align-items: center; gap: 7px; font-size: 13px; letter-spacing: .1em; }
  .rail-nav-list { gap: 8px; }
  .rail-link {
    min-height: 56px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    border-color: var(--line);
    background: rgba(22, 30, 42, .68);
    font-size: 19px;
    font-weight: 700;
  }
  .rail-link:hover { transform: none; }
  .rail-link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent, var(--spring)); }
  .rail-cta { padding: 16px; font-size: 16px; letter-spacing: .04em; }
  .rail-version { flex-direction: row; justify-content: space-between; padding: 14px 18px; }
  .rail-version-num { font-size: 18px; }
  .rail-version-cap { font-size: 12px; }

  .rail-scrim {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: none;
    background: rgba(9, 12, 17, .7);
    backdrop-filter: blur(2px);
  }
  .site-header[data-open] .rail-scrim { display: block; }
}

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

/* ==========================================================================
   12. 页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 120px);
  color: var(--mist);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(90% 60% at 8% 0%, rgba(123, 201, 111, .10), transparent 62%),
    radial-gradient(80% 60% at 92% 6%, rgba(43, 179, 192, .10), transparent 60%),
    var(--ink-2);
}
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--grow); opacity: .9; }

.footer-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) 20px clamp(28px, 4vw, 44px);
  display: grid;
  gap: clamp(30px, 5vw, 56px);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; padding-inline: 32px; } }
@media (min-width: 1080px) { .footer-inner { grid-template-columns: 1.05fr 1.55fr 1.1fr; } }

.footer-brand { font-size: 26px; font-weight: 900; letter-spacing: -.01em; color: var(--snow); }
.footer-slogan { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--muted); max-width: 22em; }
.footer-cta { margin-top: 22px; }

.footer-nav { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); }
.footer-col-title { font-size: 13px; font-weight: 700; letter-spacing: .2em; color: var(--mist); margin-bottom: 14px; }
.footer-col[data-season="spring"] .footer-col-title { color: var(--spring); }
.footer-col[data-season="summer"] .footer-col-title { color: var(--summer); }
.footer-col[data-season="autumn"] .footer-col-title { color: var(--autumn); }

.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list a { font-size: 14px; color: var(--muted); transition: color .25s var(--ease), padding-inline-start .25s var(--ease); }
.footer-list a:hover { color: var(--snow); padding-inline-start: 4px; }

.footer-contact .footer-col-title { color: var(--winter-lit); }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item { display: flex; flex-direction: column; gap: 5px; }
.contact-key { font-size: 11.5px; letter-spacing: .16em; color: var(--muted); }
.contact-value { font-size: 14px; line-height: 1.7; color: var(--mist); }
.footer-note { margin-top: 16px; font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 32em; }

.footer-base {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px 20px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  font-size: 12.5px;
  color: var(--muted);
}
@media (min-width: 760px) { .footer-base { padding-inline: 32px; } }
.footer-legal { letter-spacing: .02em; }
.footer-minor { display: flex; gap: 16px; }
.footer-minor a:hover { color: var(--summer); }
.footer-meta { margin-inline-start: auto; letter-spacing: .06em; }

/* ==========================================================================
   13. 滚动显现
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html[data-motion-ready="on"] [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  html[data-motion-ready="on"] [data-reveal].is-visible { opacity: 1; transform: none; }
}
[data-reveal][data-delay="1"] { --reveal-delay: 80ms; }
[data-reveal][data-delay="2"] { --reveal-delay: 160ms; }
[data-reveal][data-delay="3"] { --reveal-delay: 240ms; }
[data-reveal][data-delay="4"] { --reveal-delay: 320ms; }

/* ==========================================================================
   14. 降低动效偏好
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .card:hover, .rail-link:hover, .rail-cta:hover { transform: none; }
  .season-tick[data-lit="true"] { transform: none; }
}
