/* ===== 博亚娱乐 · 矩阵控制台 Site Kit ===== */

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

html, body, h1, h2, h3, h4, p, ul, ol, li, figure, figcaption, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* ---- tokens ---- */
:root {
  --ink: #071A2B;
  --console: #0E2740;
  --glass: #1B3A57;
  --gold: #D8A544;
  --coral: #F26B4E;
  --jade: #58B7A3;
  --fog: #F4F7FA;
  --mist: #A8B9C9;
  --line: #8C6420;
  --abyss: #04101C;

  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 74px;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

#main-content { display: block; scroll-margin-top: calc(var(--header-h) + 16px); }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 通用排版 ---- */
.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; color: var(--mist); }
.coord { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(168, 185, 201, 0.72); }
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.75; color: var(--mist); max-width: 68ch; }
.h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.18; letter-spacing: -0.01em; color: var(--fog); }
.display-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -0.02em; color: var(--fog); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line); }

/* ---- 跳转链接 ---- */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-180%);
  padding: 10px 18px;
  background: var(--gold); color: #08192A;
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 11px 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600; line-height: 1.2; letter-spacing: 0.02em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13.5px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #08192A; }
.btn-gold:hover { background: #E7B858; border-color: #E7B858; }
.btn-ghost { background: rgba(27, 58, 87, 0.55); border-color: rgba(216, 165, 68, 0.4); color: var(--fog); }
.btn-ghost:hover { background: rgba(27, 58, 87, 0.9); border-color: var(--gold); color: var(--gold); }
.btn-coral { background: var(--coral); border-color: var(--coral); color: #160604; }
.btn-coral:hover { background: #FF8266; border-color: #FF8266; }
.btn:active { transform: translateY(1px); }

/* ---- 头部 ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  color: var(--fog);
  background: rgba(7, 26, 43, 0.42);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid rgba(216, 165, 68, 0.24);
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.site-header[data-scrolled] {
  background: var(--console);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 32px rgba(4, 16, 28, 0.5);
}

.header-inner {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 6px 0; color: var(--fog); }
.brand-mark {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  background: rgba(27, 58, 87, 0.55);
  color: var(--gold);
  font-family: var(--font-mono); font-size: 15px; line-height: 1;
}
.brand-mark::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 6px; height: 6px; background: var(--coral);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: 0.05em; }
.brand-meta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em; color: var(--mist); margin-top: 2px; }

.primary-nav { margin-inline: auto; }
.nav-matrix { display: flex; align-items: stretch; gap: 2px; }
.nav-cell { display: flex; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 13px;
  font-size: 14.5px; color: var(--mist); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: rgba(168, 185, 201, 0.62); }
.nav-link:hover { color: var(--fog); background: rgba(27, 58, 87, 0.6); border-bottom-color: rgba(216, 165, 68, 0.5); }
.nav-link[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.nav-link[aria-current="page"] .nav-num { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  padding: 0;
  background: rgba(27, 58, 87, 0.55);
  border: 1px solid rgba(216, 165, 68, 0.42);
  border-radius: var(--radius);
}
.nav-toggle-bar {
  display: block; width: 18px; height: 2px;
  margin: 3px auto;
  background: var(--fog);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] { border-color: var(--gold); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.header-progress {
  position: absolute; left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.1s linear;
}

/* ---- 页脚 ---- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--abyss);
  color: var(--mist);
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.footer-inner {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 30px);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(28px, 4vw, 64px);
}
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-tagline { max-width: 34ch; font-size: 15px; line-height: 1.7; color: var(--mist); }
.footer-coord {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(216, 165, 68, 0.78);
}
.footer-contact {
  display: grid; gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(140, 100, 32, 0.42);
}
.footer-contact-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  font-size: 14.5px; line-height: 1.6;
}
.footer-key { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--mist); padding-top: 3px; }
.footer-val { color: var(--fog); word-break: break-word; }

.footer-links-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 32px); }
.footer-col { display: grid; align-content: start; }
.footer-col-title {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
}
.footer-idx { color: rgba(216, 165, 68, 0.55); }
.footer-links { display: grid; gap: 9px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 0;
  font-size: 15px; color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-links a::before {
  content: ""; flex: 0 0 auto;
  width: 5px; height: 5px;
  background: var(--line);
  transition: background 0.18s var(--ease);
}
.footer-links a:hover { color: var(--fog); border-bottom-color: var(--line); }
.footer-links a:hover::before { background: var(--gold); }

.footer-bottom {
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid rgba(140, 100, 32, 0.36);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.05em; line-height: 1.7;
  color: rgba(168, 185, 201, 0.78);
}
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em; }
.footer-legal a { color: var(--mist); border-bottom: 1px solid transparent; transition: color 0.18s var(--ease), border-color 0.18s var(--ease); }
.footer-legal a:hover { color: var(--gold); border-bottom-color: var(--line); }

/* ---- 页面容器与章节 ---- */
.page-shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 54px));
  padding-bottom: clamp(32px, 5vw, 64px);
}
.section { padding-block: clamp(34px, 5vw, 72px); }
.section-head { display: grid; gap: 12px; max-width: 68ch; margin-bottom: clamp(20px, 3vw, 34px); }

/* ---- 面包屑 ---- */
.breadcrumb {
  margin-bottom: clamp(16px, 2.5vw, 28px);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--mist);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; color: rgba(140, 100, 32, 0.95); }
.breadcrumb a { color: var(--mist); border-bottom: 1px solid transparent; }
.breadcrumb a:hover { color: var(--gold); border-bottom-color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--fog); }

/* ---- 面板 ---- */
.panel {
  background: var(--console);
  border: 1px solid rgba(140, 100, 32, 0.34);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}
.glass-panel {
  background: rgba(27, 58, 87, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(216, 165, 68, 0.24);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}

/* ---- 网格 ---- */
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---- 标签 ---- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  border: 1px solid currentColor; border-radius: var(--radius);
}
.tag-gold { color: var(--gold); }
.tag-coral { color: var(--coral); }
.tag-jade { color: var(--jade); }

/* ---- 图片容器 ---- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(140, 100, 32, 0.4);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, rgba(88, 183, 163, 0.08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(88, 183, 163, 0.08) 0 1px, transparent 1px 34px),
    var(--ink);
}
.media-frame::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(216, 165, 68, 0.18);
  pointer-events: none;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame figcaption {
  position: absolute; left: 0; bottom: 0;
  padding: 8px 12px;
  background: rgba(4, 16, 28, 0.84);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--mist);
}
.ratio-wide { aspect-ratio: 16 / 9; }
.ratio-square { aspect-ratio: 1 / 1; }
.ratio-portrait { aspect-ratio: 4 / 5; }

/* ---- 分段切换 ---- */
.tabs { display: grid; gap: clamp(14px, 2vw, 22px); }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid rgba(140, 100, 32, 0.4); }
.tab {
  padding: 10px 16px;
  font-size: 14.5px; letter-spacing: 0.02em; color: var(--mist);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tab:hover { color: var(--fog); background: rgba(27, 58, 87, 0.5); }
.tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); background: rgba(27, 58, 87, 0.55); }
.tabpanel { padding-top: 4px; }
.tabpanel[hidden] { display: none; }

/* ---- 显现 ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---- 响应式 ---- */
@media (max-width: 1080px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: grid; }

  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin: 0;
    display: none;
    background: var(--console);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 42px rgba(4, 16, 28, 0.55);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .primary-nav[data-open] { display: block; }
  .nav-matrix { flex-direction: column; gap: 0; }
  .nav-cell { border-top: 1px solid rgba(140, 100, 32, 0.28); }
  .nav-cell:first-child { border-top: 0; }
  .nav-link {
    width: 100%;
    padding: 15px var(--gutter);
    font-size: 16px;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .nav-link:hover { border-bottom-color: transparent; }
  .nav-link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--gold);
    background: rgba(27, 58, 87, 0.6);
  }
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-tagline { max-width: 46ch; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { gap: 10px; }
  .brand-meta { display: none; }
  .header-actions .btn-ghost { display: none; }
  .footer-links-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 380px) {
  .header-actions .btn-gold { display: none; }
}

/* ---- 动效偏好 ---- */
@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
