/* ==========================================================================
   万博娱乐 · 品牌认证档案馆
   Site Kit 共享样式 /assets/site.css
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink: #071624;
  --ink-2: #0D2238;
  --ink-3: #02070D;
  --paper: #F5EFE3;
  --gold: #D7A94B;
  --gold-soft: #E7C070;
  --jade: #7FB7A3;
  --stone: #8C9AA8;
  --line: #2B435A;
  --clay: #BF6B4F;
  --parchment: #E8DFCF;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --shell: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--gold); color: var(--ink-3); }

:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- 3. 中文排版基线 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: var(--paper);
}
h1 { font-size: clamp(30px, 4.6vw, 52px); }
h2 { font-size: clamp(23px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-size: 17px; letter-spacing: 0.04em; }

/* ---------- 4. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.content { max-width: 68ch; }

.prose { font-size: 16.5px; line-height: 1.85; color: var(--paper); }
.prose p { margin-bottom: 1.1em; }
.prose h2 { margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.8em 0 0.5em; }
.prose ul,
.prose ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--paper); font-weight: 700; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--gold);
  color: var(--parchment);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- 5. 通用小件 ---------- */
.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: 26px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  flex: none;
  animation: dotPulse 3.8s ease-in-out infinite;
}
.dot--gold { background: var(--gold); animation-delay: 1.2s; }
.dot--clay { background: var(--clay); animation-delay: 2.1s; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-3);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--ink-3);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}
.btn--sm { padding: 9px 14px; font-size: 12px; letter-spacing: 0.1em; }

/* ---------- 7. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

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

.masthead { background: var(--ink); }

.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 66px;
  padding-block: 11px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  flex: none;
}
.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  flex: none;
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(215, 169, 75, 0.32);
  pointer-events: none;
}
.brand__text { display: block; }
.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--paper);
}
.brand__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  line-height: 1.5;
  color: var(--stone);
}

.masthead__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  font-family: var(--font-mono);
  line-height: 1.6;
  text-align: right;
}
.masthead__status {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--jade);
}
.masthead__status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--jade);
  animation: dotPulse 3.8s ease-in-out infinite;
}
.masthead__contact {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--stone);
}

.masthead__cta { flex: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle__bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: var(--gold);
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.primary-nav {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -16px;
}
.nav-list a {
  position: relative;
  display: block;
  padding: 14px 16px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.26s var(--ease);
}
.nav-list a:hover,
.nav-list a:focus-visible { color: var(--gold-soft); }
.nav-list a:hover::after,
.nav-list a:focus-visible::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] {
  color: var(--gold);
  background: rgba(215, 169, 75, 0.07);
}
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--clay) 55%, var(--jade));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumbs {
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}
.breadcrumbs a { color: var(--stone); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 10. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.media--wide { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 4 / 5; }
.media::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(215, 169, 75, 0.26);
  pointer-events: none;
  z-index: 2;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--stone);
  background-image:
    linear-gradient(to right, rgba(43, 67, 90, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 67, 90, 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
}
.media__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  padding: 5px 10px;
  background: var(--gold);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.6;
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--ink-3);
  color: var(--paper);
}
.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--clay) 48%, var(--jade));
}
.footer-edge {
  height: 10px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.1fr);
  gap: clamp(26px, 4vw, 56px);
  padding-block: clamp(38px, 6vw, 68px);
}

.footer-identity__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  color: var(--paper);
}
.footer-identity__tag {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--gold);
}
.footer-identity__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--stone);
}
.footer-status {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.footer-status li { display: flex; align-items: center; gap: 10px; }

.footer-col__title {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--paper);
}
.footer-list { display: grid; gap: 11px; }
.footer-list a {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.footer-list a:hover,
.footer-list a:focus-visible { color: var(--gold); padding-left: 4px; }

.footer-contact__list { display: grid; gap: 14px; margin-bottom: 22px; }
.footer-contact__list dt {
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--stone);
}
.footer-contact__list dd {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-block: 20px 34px;
  border-top: 1px solid var(--line);
}
.footer-legal__copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.9;
  color: var(--stone);
}
.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.footer-legal__links a { color: var(--stone); text-decoration: none; }
.footer-legal__links a:hover,
.footer-legal__links a:focus-visible { color: var(--gold); }

/* ---------- 12. 返回顶部（JS 注入） ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 90;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--ink-2);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 13. 滚动显现 ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 章节跟随回退样式 ---------- */
[data-chapter-link][aria-current="true"] { color: var(--gold); }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  html { scroll-padding-top: 96px; }

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

  .primary-nav {
    border-top-width: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.34s var(--ease), visibility 0.34s var(--ease);
  }
  .site-header[data-open] .primary-nav {
    max-height: min(72vh, 560px);
    overflow-y: auto;
    visibility: visible;
    border-top-width: 1px;
  }

  .nav-list { flex-direction: column; margin-inline: 0; }
  .nav-list li + li { border-top: 1px solid rgba(43, 67, 90, 0.55); }
  .nav-list a { padding: 15px 0; font-size: 13.5px; }
  .nav-list a::after { left: 0; right: auto; width: 34px; }

  .masthead__cta { display: none; }
}

@media (max-width: 600px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-legal { padding-bottom: 40px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 17px; }
}

@media (max-width: 440px) {
  .brand__tag { display: none; }
  .masthead__inner { min-height: 58px; }
}

/* ---------- 16. 动效降级 ---------- */
@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;
  }
  .dot { animation: none; opacity: 1; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .to-top { transform: none; }
}
