/* =========================================================
   PG娱乐中心 · 共享样式 /assets/site.css
   档案墨蓝 × 奶油纸面 × 电光青 × 暖金
   ========================================================= */

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

main { display: block; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #0B1F33;
  --ink-deep: #061522;
  --paper: #F4EEDF;
  --paper-warm: #E7DDC7;
  --cyan: #2FD4E6;
  --gold: #D8A64A;
  --terracotta: #C65A32;
  --violet: #8B83A6;
  --violet-ink: #5F5878;
  --graphite: #26231F;
  --mist: #AEB8AE;

  /* 线条与阴影 */
  --hairline: 1px solid rgba(38, 35, 31, 0.16);
  --hairline-strong: 1px solid rgba(38, 35, 31, 0.30);
  --hairline-light: 1px solid rgba(244, 238, 223, 0.16);
  --shadow-soft: 0 1px 0 rgba(38, 35, 31, 0.05), 0 18px 34px -26px rgba(11, 31, 51, 0.65);
  --shadow-lift: 0 2px 0 rgba(38, 35, 31, 0.06), 0 26px 44px -30px rgba(11, 31, 51, 0.7);

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  /* 尺度 */
  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --radius: 2px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--graphite);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(38, 35, 31, 0.026) 0 1px, transparent 1px 5px),
    radial-gradient(120% 90% at 12% 0%, rgba(231, 221, 199, 0.9) 0%, rgba(244, 238, 223, 0) 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.32;
  color: var(--graphite);
}

h1 { font-size: clamp(30px, 4.4vw, 54px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }

p { max-width: 74ch; }

strong { font-weight: 700; }

code, kbd, samp, time, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

::selection {
  background: rgba(47, 212, 230, 0.35);
  color: var(--ink-deep);
}

/* ---------- 4. 焦点与可访问性 ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(11, 31, 51, 0.32);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  display: inline-block;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--cyan);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 14px;
}

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

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 32px);
}

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

.section {
  padding-block: clamp(46px, 7vw, 96px);
}

.section--ink {
  background: var(--ink);
  color: var(--paper);
  border-block: 1px solid rgba(47, 212, 230, 0.18);
}

.section--ink h1,
.section--ink h2,
.section--ink h3 { color: var(--paper); }

.section--paper {
  background: var(--paper-warm);
  border-block: var(--hairline);
}

.section-head {
  margin-bottom: clamp(22px, 3.4vw, 40px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: rgba(38, 35, 31, 0.16);
}

.section--ink .rule { background: rgba(244, 238, 223, 0.18); }

/* ---------- 6. 通用文字元件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section--ink .eyebrow { color: var(--gold); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--violet-ink);
  background: rgba(139, 131, 166, 0.12);
  border: 1px solid rgba(139, 131, 166, 0.44);
  border-radius: var(--radius);
}

.section--ink .tag {
  color: var(--mist);
  background: rgba(139, 131, 166, 0.18);
  border-color: rgba(139, 131, 166, 0.5);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease,
              box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--ink-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn:active { transform: translateY(0); }

.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: #e6b45a;
  color: var(--ink-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(11, 31, 51, 0.36);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.section--ink .btn--ghost {
  color: var(--paper);
  border-color: rgba(244, 238, 223, 0.4);
}

.section--ink .btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(38, 35, 31, 0.66);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: rgba(38, 35, 31, 0.3);
}

.breadcrumbs a:hover { color: var(--terracotta); }

/* ---------- 9. 图像容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(158deg, var(--ink) 0%, var(--ink-deep) 100%);
  border: var(--hairline-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 212, 230, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 212, 230, 0.10) 1px, transparent 1px);
  background-size: 36px 36px;
}

.media-frame:has(> img)::before,
.media-frame:has(> picture)::before {
  display: none;
}

.media-frame > img,
.media-frame > picture,
.media-frame > svg,
.media-frame > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: linear-gradient(0deg, rgba(6, 21, 34, 0.88) 0%, rgba(6, 21, 34, 0) 100%);
}

/* ---------- 10. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
}

/* 上：档案条 */
.header-top {
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(47, 212, 230, 0.09) 0%, rgba(11, 31, 51, 0) 42%, rgba(216, 166, 74, 0.07) 100%),
    repeating-linear-gradient(90deg, rgba(47, 212, 230, 0.05) 0 1px, transparent 1px 8px);
  color: var(--paper);
  border-bottom: 1px solid rgba(47, 212, 230, 0.18);
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(47, 212, 230, 0.07);
  border: 1px solid rgba(47, 212, 230, 0.55);
  border-radius: var(--radius);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.brand:hover .brand__mark {
  background: rgba(47, 212, 230, 0.18);
  color: var(--paper);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--paper);
  max-width: none;
}

.brand__descriptor {
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: rgba(174, 184, 174, 0.94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.meta-chip {
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: rgba(174, 184, 174, 0.95);
  border: 1px solid rgba(174, 184, 174, 0.3);
  border-radius: 999px;
}

.version-badge {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  white-space: nowrap;
  color: var(--gold);
  background: rgba(216, 166, 74, 0.1);
  border: 1px solid rgba(216, 166, 74, 0.52);
  border-radius: var(--radius);
}

/* 下：栏目索引带 */
.header-bottom {
  position: relative;
  background: var(--paper-warm);
  border-bottom: 1px solid rgba(38, 35, 31, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.header-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 7px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__link {
  display: inline-block;
  padding: 9px 14px;
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  white-space: nowrap;
  color: rgba(38, 35, 31, 0.86);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.16s ease, color 0.16s ease,
              box-shadow 0.16s ease, border-color 0.16s ease;
}

.site-nav__link:hover {
  color: var(--graphite);
  background: rgba(11, 31, 51, 0.06);
}

.site-nav__link[aria-current="page"] {
  color: var(--graphite);
  font-weight: 500;
  background: var(--paper);
  border-left-color: var(--terracotta);
  box-shadow: inset 0 -2px 0 var(--terracotta), 0 1px 0 rgba(38, 35, 31, 0.07);
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: rgba(244, 238, 223, 0.7);
  border: 1px solid rgba(38, 35, 31, 0.3);
  border-radius: var(--radius);
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.nav-toggle:hover {
  background: var(--paper);
  border-color: rgba(38, 35, 31, 0.5);
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  flex: none;
  background: currentColor;
  transition: background-color 0.18s ease;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.site-header[data-open] .nav-toggle__icon { background: transparent; }
.site-header[data-open] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }

/* 滚动进度线 */
.scroll-progress {
  --progress: 0;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 120;
  height: 2px;
  pointer-events: none;
  background: transparent;
}

.scroll-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--gold) 100%);
  transition: transform 0.12s linear;
}

/* ---------- 11. 站点页脚 ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  border-top: 1px solid rgba(216, 166, 74, 0.42);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(44px, 6vw, 76px) clamp(34px, 4vw, 56px);
}

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

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  color: var(--paper);
  max-width: none;
}

.footer-brand__summary {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(244, 238, 223, 0.7);
  max-width: 34ch;
}

.footer-stamp {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(174, 184, 174, 0.8);
  max-width: none;
}

.footer-brand__cta { margin-top: 24px; }

.footer-col {
  min-width: 0;
  padding-left: clamp(0px, 2vw, 24px);
  border-left: 1px solid rgba(244, 238, 223, 0.12);
}

.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1.4;
}

.footer-links {
  display: grid;
  gap: 2px;
}

.footer-links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  color: rgba(244, 238, 223, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(47, 212, 230, 0.5);
}

.footer-contact {
  display: grid;
  gap: 0;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(244, 238, 223, 0.14);
}

.footer-contact__key {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.footer-contact__value,
.footer-contact__link {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 238, 223, 0.9);
  word-break: break-word;
}

.footer-contact__link {
  border-bottom: 1px solid rgba(47, 212, 230, 0.42);
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

.footer-contact__note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(174, 184, 174, 0.85);
  max-width: 40ch;
}

.footer-base {
  background: rgba(11, 31, 51, 0.72);
  border-top: 1px solid rgba(244, 238, 223, 0.12);
}

.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer-legal,
.footer-copy {
  max-width: none;
  line-height: 1.6;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-legal-links a {
  color: rgba(244, 238, 223, 0.74);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-legal-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(47, 212, 230, 0.5);
}

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

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

  .footer-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(244, 238, 223, 0.12);
    padding-top: 22px;
  }
}

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

  .header-bottom__inner { justify-content: flex-end; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    padding: 10px var(--gutter) 22px;
    background-color: var(--ink);
    background-image: linear-gradient(180deg, rgba(6, 21, 34, 0.96) 0%, rgba(11, 31, 51, 1) 100%);
    border-top: 1px solid rgba(47, 212, 230, 0.24);
    box-shadow: 0 26px 44px -30px rgba(6, 21, 34, 0.95);
  }

  .site-header[data-open] .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    overflow: visible;
  }

  .site-nav__link {
    display: block;
    padding: 13px 14px;
    font-size: 16px;
    color: rgba(244, 238, 223, 0.86);
    border-left: 3px solid transparent;
  }

  .site-nav__link:hover {
    color: var(--paper);
    background: rgba(244, 238, 223, 0.08);
  }

  .site-nav__link[aria-current="page"] {
    color: var(--paper);
    background: rgba(47, 212, 230, 0.14);
    border-left-color: var(--cyan);
    box-shadow: none;
  }

  .brand__descriptor { display: none; }
  .meta-chip { display: none; }
}

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

  html { scroll-padding-top: 88px; }

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

  .header-top__inner { padding-block: 10px; }

  .brand__mark { width: 38px; height: 38px; font-size: 12px; }
  .brand__name { font-size: 17px; letter-spacing: 0.06em; }

  .footer-main { grid-template-columns: minmax(0, 1fr); }
  .footer-base__inner { justify-content: flex-start; }
  .footer-legal-links { gap: 6px 16px; }

  .btn { width: 100%; }
  .footer-brand__cta { width: auto; }
}

/* ---------- 13. 动效降级 ---------- */
@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;
  }

  .btn:hover,
  .btn:active { transform: none; }
}
