/* =========================================================
   必赢亚州游戏 · 共享样式表 /assets/site.css
   深墨蓝基底 + 侧边轨道导航 + 偏置网格
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --ink: #0A1A2A;
  --ink-2: #122A3F;
  --panel: #1B3A52;
  --paper: #E9F0F6;
  --mute: #9FB3C3;
  --cyan: #35E0E0;
  --amber: #D8A54B;
  --moss: #7FA98C;
  --stone: #5C6B78;
  --clay: #B4673F;

  --line: rgba(233, 240, 246, 0.12);
  --line-strong: rgba(233, 240, 246, 0.24);
  --glass-1: rgba(233, 240, 246, 0.06);
  --glass-2: rgba(233, 240, 246, 0.12);

  --font-display: "Archivo Narrow", "Roboto Condensed", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --rail-w: clamp(228px, 17vw, 282px);
  --gutter: clamp(20px, 4vw, 56px);
  --content-max: 1180px;
  --topbar-h: 60px;

  --radius: 2px;
  --shadow-1: 0 10px 30px rgba(3, 10, 18, 0.35);
  --shadow-2: 0 18px 48px rgba(3, 10, 18, 0.5);
  --ease: cubic-bezier(0.33, 0.72, 0.28, 1);
}

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

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

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

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

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

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

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 基础中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(53, 224, 224, 0.07), transparent 62%),
    radial-gradient(900px 520px at 96% 4%, rgba(216, 165, 75, 0.06), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-left: var(--rail-w);
}

::selection {
  background: var(--cyan);
  color: #062430;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ---------- 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 12px 24px;
  background: var(--cyan);
  color: #062430;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.24s var(--ease);
}

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

/* =========================================================
   头部：桌面端侧边轨道 / 移动端顶栏 + 抽屉
   ========================================================= */
.site-header { position: relative; z-index: 110; }

/* 移动端顶栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 100;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 106px;
  background: rgba(10, 26, 42, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.topbar__brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.topbar__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
}

/* 侧边轨道 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 110;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.4vh, 40px);
  padding: clamp(22px, 3.6vh, 38px) clamp(18px, 2vw, 30px) clamp(18px, 2.6vh, 28px);
  background:
    repeating-linear-gradient(112deg, transparent 0 44px, rgba(233, 240, 246, 0.022) 44px 45px),
    linear-gradient(180deg, #122A3F 0%, #0D2338 55%, #081625 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  opacity: 0.75;
  background: linear-gradient(180deg, transparent, rgba(53, 224, 224, 0.5) 38%, rgba(216, 165, 75, 0.5) 72%, transparent);
}

/* 品牌 */
.rail__brand {
  display: block;
  text-decoration: none;
  color: var(--paper);
}

.rail__brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--paper);
}

.rail__brand-mark::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 9px;
  background: linear-gradient(90deg, var(--cyan), rgba(53, 224, 224, 0));
}

.rail__brand-sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mute);
}

.rail__brand:hover .rail__brand-mark { color: var(--cyan); }

/* 竖向目录导航 */
.rail__nav-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--mute);
}

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

.rail__item {
  opacity: 1;
  transition: opacity 0.22s var(--ease);
}

.rail__link {
  position: relative;
  display: grid;
  grid-template-columns: 2.3em minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px 11px 15px;
  color: var(--paper);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.26s var(--ease);
}

.rail__link:hover { background: var(--glass-1); }

.rail__link:hover::before,
.rail__link:focus-visible::before,
.rail__link[aria-current="page"]::before { transform: scaleY(1); }

.rail__link[aria-current="page"] {
  background: rgba(53, 224, 224, 0.08);
  color: var(--cyan);
}

.rail__link[aria-current="page"] .rail__name { font-weight: 600; }

.rail__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
  transition: color 0.22s var(--ease);
}

.rail__link:hover .rail__idx,
.rail__link[aria-current="page"] .rail__idx { color: var(--cyan); }

.rail__name {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* 同组其它项降透明度（鼠标与键盘两条路径） */
.rail__list:hover .rail__item { opacity: 0.7; }
.rail__list:hover .rail__item:hover { opacity: 1; }

.rail__list:has(.rail__link:focus-visible) .rail__item { opacity: 0.7; }
.rail__list .rail__item:has(.rail__link:focus-visible) { opacity: 1; }

/* 轨道底部 */
.rail__foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--amber);
  color: #211606;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.rail__cta::after {
  content: "\2192";
  font-family: var(--font-mono);
  transition: transform 0.2s var(--ease);
}

.rail__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(216, 165, 75, 0.3);
}

.rail__cta:hover::after { transform: translateX(3px); }

.rail__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stone);
  line-height: 1.7;
}

/* 滚动进度线 */
.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: rgba(233, 240, 246, 0.05);
  pointer-events: none;
}

.rail__progress-bar {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--cyan), var(--amber));
}

/* 移动端导航按钮 */
.nav-toggle {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 130;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(18, 42, 63, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 16px;
  height: 14px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* 抽屉遮罩 */
.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(4, 10, 18, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* =========================================================
   通用版式与组件
   ========================================================= */
.wrap {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content-max));
  margin-inline: auto;
}

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

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.h-sub {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--mute);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: none;
  background: var(--cyan);
}

.eyebrow--amber::before { background: var(--amber); }

.prose { max-width: 38em; }
.prose > * + * { margin-top: 1.15em; }
.prose p { font-size: 17px; line-height: 1.75; }

.mono-note {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  color: var(--mute);
}

/* 面层 */
.panel {
  background: var(--panel);
  border: 1px solid rgba(233, 240, 246, 0.08);
  border-radius: var(--radius);
}

.glass {
  background: var(--glass-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.glass--interactive:hover {
  background: var(--glass-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.btn--cyan {
  background: var(--cyan);
  color: #062430;
  box-shadow: 0 8px 24px rgba(53, 224, 224, 0.22);
}

.btn--cyan:hover { box-shadow: 0 14px 32px rgba(53, 224, 224, 0.32); }

.btn--amber {
  background: var(--amber);
  color: #211606;
  box-shadow: 0 8px 24px rgba(216, 165, 75, 0.2);
}

.btn--amber:hover { box-shadow: 0 14px 32px rgba(216, 165, 75, 0.3); }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 13px;
}

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--mute);
  border: 1px solid currentColor;
  border-radius: var(--radius);
}

.tag--live { color: var(--cyan); }
.tag--stable { color: var(--amber); }
.tag--done { color: var(--moss); }
.tag--change { color: var(--clay); }
.tag--muted { color: var(--stone); }

/* 分隔与斜向引导线 */
.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.rule--amber {
  background: linear-gradient(90deg, rgba(216, 165, 75, 0.7), rgba(216, 165, 75, 0));
}

.slash {
  display: block;
  width: 1px;
  height: var(--slash-h, 220px);
  transform: rotate(20deg);
  transform-origin: top center;
  background: linear-gradient(180deg, rgba(53, 224, 224, 0.55), rgba(53, 224, 224, 0));
  pointer-events: none;
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mute);
}

.crumbs a {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.crumbs a:hover { color: var(--cyan); }

.crumbs__sep {
  color: var(--stone);
  opacity: 0.8;
}

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

/* 视觉容器（页面阶段放置内联 SVG / img） */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(140deg, #122A3F 0%, #0A1A2A 72%);
}

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

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

.media--cyan { background: linear-gradient(140deg, #0F3A4A 0%, #0A1A2A 72%); }
.media--amber { background: linear-gradient(140deg, #2A2113 0%, #0A1A2A 72%); }

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mute);
  background: linear-gradient(0deg, rgba(10, 26, 42, 0.92), rgba(10, 26, 42, 0));
}

/* 网格 */
.grid {
  display: grid;
  gap: var(--gap, clamp(20px, 3vw, 40px));
}

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

/* 显现 */
.is-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s var(--ease) var(--rd, 0ms),
    transform 0.5s var(--ease) var(--rd, 0ms);
}

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

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 132px);
  padding: clamp(48px, 7vw, 92px) var(--gutter) clamp(28px, 4vw, 40px);
  background: linear-gradient(180deg, #0A1A2A 0%, #0C1F32 45%, #071320 100%);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 165, 75, 0.75) 28%, rgba(216, 165, 75, 0.75) 72%, transparent);
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(233, 240, 246, 0.02) 40px 41px);
}

.footer__inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.7fr) repeat(4, minmax(120px, 1fr));
  gap: clamp(28px, 3.4vw, 56px);
}

.footer__mark {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--paper);
  line-height: 1.15;
}

.footer__tagline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.footer__cta { margin-top: 22px; }

.footer__col-title {
  padding-bottom: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
}

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

.footer__entry {
  font-size: 14px;
  line-height: 1.6;
  color: var(--stone);
}

.footer__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer__link:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer__legal {
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: baseline;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.9;
  color: var(--mute);
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--mute);
}

.footer__contact { white-space: nowrap; }

/* =========================================================
   响应式：桌面 >=1000px 为侧边轨道，之下为顶栏 + 抽屉
   ========================================================= */
@media (min-width: 1000px) {
  .span-main { grid-column: 2 / 9; }
  .span-aside { grid-column: 10 / 13; }
  .span-wide { grid-column: 1 / 13; }

  .slash { --slash-h: 260px; }
}

@media (max-width: 999px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

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

  .rail {
    width: min(330px, 86vw);
    transform: translateX(-104%);
    transition: transform 0.32s var(--ease);
    z-index: 120;
    box-shadow: none;
  }

  .rail[data-open] {
    transform: translateX(0);
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.55);
  }

  .rail__progress { display: none; }

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

  .grid--12 { grid-template-columns: minmax(0, 1fr); }
  .span-main,
  .span-aside,
  .span-wide { grid-column: auto; }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 28px;
  }

  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__legal { flex-direction: column; align-items: flex-start; }
  .footer__contact { white-space: normal; }

  .rail { width: min(300px, 90vw); }
}

@media (min-width: 1000px) {
  .rail-scrim { display: none !important; }
}

/* ---------- 降低动效偏好 ---------- */
@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;
  }

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

  .rail { transition: none; }
  .rail[data-open] { transition: none; }
}
