/* ============================================================
   AB游艺会馆 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 基础组件
   ============================================================ */

/* ---------- 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, li, figure, blockquote, dl, dd { margin: 0; }

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

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

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

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 变量 ---------- */
:root {
  --ink: #1A1C1F;
  --ink-2: #24272B;
  --ink-3: #2E3237;
  --paper: #F5F1E8;
  --muted: #B9B2A6;
  --amber: #E8A33D;
  --amber-2: #F2C14E;
  --cyan: #2DE2E6;
  --teal: #0E7C7B;
  --deep: #0D3B3B;
  --wine: #4A1E2B;
  --line: #3A3E44;
  --line-soft: rgba(245, 241, 232, 0.09);

  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  --shell: min(1220px, 90vw);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 基础与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(245, 241, 232, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 232, 0.022) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  background-position: -1px -1px, -1px -1px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.35vw + 0.96rem, 1.125rem);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--paper);
}

h1 { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 800; line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }

p { text-wrap: pretty; }

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

::selection { background: var(--amber); color: var(--ink); }

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

/* ---------- 通用工具 ---------- */
.shell {
  width: var(--shell);
  margin-inline: auto;
}

.content { max-width: 68ch; }

.section { padding-block: clamp(2.6rem, 6vw, 5rem); }

.section--deep {
  background: var(--deep);
  border-block: 1px solid rgba(45, 226, 230, 0.18);
}

.section--wine {
  background: var(--wine);
  border-block: 1px solid rgba(232, 163, 61, 0.22);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.4rem;
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.section__title { font-size: clamp(1.5rem, 3vw, 2.5rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

.lede {
  font-size: clamp(1.02rem, 1.1vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--amber) 0 42px, var(--line) 42px 100%);
}

.mono { font-family: var(--font-mono); letter-spacing: 0.05em; }

.num {
  font-family: var(--font-mono);
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--amber-2);
}

.stack { display: grid; gap: clamp(0.7rem, 1.6vw, 1.1rem); }

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
}

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  z-index: 200;
  transform: translate(-50%, -160%);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
  z-index: 3;
}

.masthead {
  background:
    linear-gradient(180deg, rgba(45, 226, 230, 0.05), transparent 72%),
    var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.masthead__inner {
  width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0 1.1rem;
  transition: padding 0.3s var(--ease);
}

.masthead__note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.masthead__brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.6rem, 3.1vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.masthead__brand:hover { color: var(--amber-2); }

.masthead__mark {
  width: 0.6em;
  height: 0.6em;
  flex: none;
  background: var(--cyan);
  box-shadow: 5px 0 0 -1px var(--amber);
  border-radius: 1px;
}

.masthead__status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 226, 230, 0.14);
  animation: status-pulse 2.8s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(45, 226, 230, 0.14); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(45, 226, 230, 0.05); }
}

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

.version-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.2rem 0.5rem;
  color: var(--amber);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* 滚动收窄状态 */
.site-header.is-condensed .masthead__inner { padding: 0.55rem 0 0.45rem; }
.site-header.is-condensed .masthead__brand { font-size: clamp(1.15rem, 2vw, 1.5rem); }
.site-header.is-condensed .masthead__note { opacity: 0; visibility: hidden; }

/* ---------- 导航条 ---------- */
.nav-bar {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.nav-bar__inner {
  position: relative;
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 1.5vw, 1.3rem);
}

.nav-list a {
  position: relative;
  display: block;
  padding: 0.85rem 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.22s var(--ease);
  white-space: nowrap;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.5rem;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease);
}

.nav-list a:hover { color: var(--paper); }
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] {
  color: var(--amber-2);
  font-weight: 600;
}

.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: var(--paper);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 20px;
}

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

.nav-bar[data-open] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-bar[data-open] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-bar[data-open] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-bar[data-open] .nav-toggle__label { color: var(--amber-2); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-2), var(--ink) 62%);
}

.footer-grid {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 1.3fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}

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

.footer-col--brand {
  border-left: 2px solid var(--amber);
  padding-left: clamp(0.9rem, 1.6vw, 1.4rem);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.22s var(--ease);
}

.footer-brand::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  flex: none;
  background: var(--cyan);
  box-shadow: 4px 0 0 -1px var(--amber);
  border-radius: 1px;
}

.footer-brand:hover { color: var(--amber-2); }

.footer-note {
  margin-top: 0.75rem;
  max-width: 34ch;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}

.footer-icp {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-title {
  margin-bottom: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer-links {
  display: grid;
  gap: 0.42rem;
}

.footer-links a {
  display: inline-block;
  padding-left: 0.55rem;
  border-left: 2px solid transparent;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.footer-links a:hover {
  color: var(--paper);
  border-left-color: var(--cyan);
}

.footer-contact {
  display: grid;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-contact li {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  gap: 0.6rem;
  line-height: 1.65;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  padding-top: 0.15rem;
}

.footer-val { word-break: break-word; }

.footer-cta {
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 163, 61, 0.45);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.footer-cta:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-notes {
  display: grid;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-notes li {
  position: relative;
  padding-left: 0.95rem;
  line-height: 1.65;
}

.footer-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 1px;
  background: var(--cyan);
}

.footer-base {
  width: var(--shell);
  margin-inline: auto;
  padding: 1rem 0 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

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

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-legal a:hover {
  color: var(--amber-2);
  border-bottom-color: var(--amber-2);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.btn:hover {
  background: var(--amber-2);
  border-color: var(--amber-2);
  transform: translateY(-2px);
}

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

.btn--ghost:hover {
  background: rgba(45, 226, 230, 0.08);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--quiet {
  padding: 0.35rem 0;
  background: transparent;
  border-color: transparent;
  color: var(--amber);
  border-bottom: 1px solid rgba(232, 163, 61, 0.45);
  border-radius: 0;
}

.btn--quiet:hover {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--cyan);
  color: var(--cyan);
  transform: none;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: nowrap;
}

.tag--amber { color: var(--amber); border-color: rgba(232, 163, 61, 0.5); }
.tag--cyan { color: var(--cyan); border-color: rgba(45, 226, 230, 0.45); }

/* ---------- 面板 ---------- */
.panel {
  display: block;
  padding: clamp(1.05rem, 2vw, 1.6rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.26s var(--ease), transform 0.26s var(--ease),
    box-shadow 0.26s var(--ease);
}

.panel:hover,
.panel:focus-within {
  border-color: var(--amber);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.95);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  width: var(--shell);
  margin: clamp(1rem, 2.4vw, 1.7rem) auto 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumb a:hover {
  color: var(--amber-2);
  border-bottom-color: var(--amber-2);
}

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

/* ---------- 图片容器（无远程图片，用于抽象占位与页面阶段放图） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 18% 8%, rgba(13, 59, 59, 0.9) 0%, rgba(26, 28, 31, 1) 62%),
    var(--ink-2);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(245, 241, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 232, 0.05) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
}

.media-frame__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

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

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 2;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: linear-gradient(180deg, transparent, rgba(26, 28, 31, 0.92));
}

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

/* ---------- 响应式：桌面 → 平板 ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1.3fr;
  }

  .footer-col--brand { grid-column: 1 / -1; }

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

@media (max-width: 900px) {
  .masthead__inner {
    grid-template-columns: auto 1fr auto;
    padding: 0.95rem 0 0.8rem;
  }

  .masthead__note { display: none; }

  .masthead__brand { justify-self: start; }

  .masthead__status { justify-self: end; }

  .nav-bar__inner {
    justify-content: flex-start;
    min-height: 52px;
  }

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

  .nav-list {
    position: absolute;
    top: calc(100% + 1px);
    left: -5vw;
    right: -5vw;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 0;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-top: 0;
  }

  .nav-bar[data-open] .nav-list { display: flex; }

  .nav-list a {
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .nav-list a::after {
    left: 1.1rem;
    right: auto;
    width: 20px;
    bottom: 0.62rem;
  }

  .site-header.is-condensed .masthead__note { display: none; }

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

/* ---------- 响应式：手机 ---------- */
@media (max-width: 620px) {
  :root { --shell: min(1220px, 90vw); }

  body { line-height: 1.75; }

  .masthead__status .status-text { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-col--brand { grid-column: auto; }

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

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

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

/* ---------- 无障碍：减少动态效果 ---------- */
@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;
  }

  .status-dot { animation: none; }

  .panel:hover,
  .panel:focus-within,
  .btn:hover { transform: none; }
}
