/* ==========================================================================
   PG娱乐中心 · 共享层 site.css
   坐标刊头 / 刻度轨道 / 深海蓝—信号橙—荧光青的信息秩序
   ========================================================================== */

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

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

body { margin: 0; }

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; padding: 0; }

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

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

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 2. 设计令牌 ------------------------------------------------------------- */
:root {
  /* 色板 */
  --deep-900: #071C2C;
  --harbor-800: #0E2F47;
  --chart-600: #1F5C78;
  --signal-500: #F26B21;
  --signal-700: #B84312;
  --cyan-400: #2AD4C8;
  --mist-100: #E6EDF2;
  --paper-50: #F7F3EA;
  --rock-500: #6E7B84;
  --ink-900: #101820;

  /* 语义色 */
  --surface: var(--paper-50);
  --surface-alt: var(--mist-100);
  --text: var(--ink-900);
  --text-muted: var(--rock-500);
  --link: var(--chart-600);
  --accent: var(--signal-500);
  --accent-deep: var(--signal-700);
  --status: var(--cyan-400);

  /* 字体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-cond: "Barlow Condensed", "Oswald", "Arial Narrow", var(--font-sans);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 字号 */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;
  --fs-88: 5.5rem;

  /* 尺度 */
  --shell: 1220px;
  --gutter: clamp(1.15rem, 4vw, 3.25rem);
  --radius: 2px;
  --hair: 1px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-offset: 168px;
}

/* 3. 基础排版 ------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.75;
  color: var(--text);
  background-color: var(--surface);
  background-image: linear-gradient(90deg, rgba(31, 92, 120, 0.045) 1px, transparent 1px);
  background-size: 96px 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#main-content { scroll-margin-top: var(--header-offset); }

::selection {
  background: var(--signal-500);
  color: var(--deep-900);
}

/* 4. 通用工具 ------------------------------------------------------------- */
.canvas {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2.4rem, 6vw, 5rem); }
.section--paper { background: var(--paper-50); }
.section--mist { background: var(--mist-100); }
.section--deep { background: var(--deep-900); color: var(--paper-50); }

.grid { display: grid; gap: clamp(1.2rem, 3vw, 2.2rem); }
.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)); }

.display {
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.2vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.005em;
  color: var(--deep-900);
  text-wrap: balance;
}

.h-serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.h-cond {
  font-family: var(--font-cond);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

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

.eyebrow--light { color: var(--cyan-400); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  padding: 0.28rem 0.62rem;
  border: 1px solid rgba(31, 92, 120, 0.35);
  color: var(--chart-600);
  background: rgba(31, 92, 120, 0.06);
  border-radius: var(--radius);
}

.tag--signal {
  border-color: rgba(242, 107, 33, 0.5);
  color: var(--accent-deep);
  background: rgba(242, 107, 33, 0.08);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--chart-600) 0%, rgba(31, 92, 120, 0.14) 62%, transparent 100%);
}

.note {
  border-left: 3px solid var(--accent);
  background: rgba(31, 92, 120, 0.06);
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink-900);
}

.frame {
  position: relative;
  border: 1px solid rgba(31, 92, 120, 0.32);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  background: rgba(247, 243, 234, 0.6);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent);
}

.frame::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.frame::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

/* 5. 按钮 ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn--signal {
  background: var(--signal-500);
  color: var(--deep-900);
  font-weight: 700;
}

.btn--signal:hover { background: #FF8040; }

.btn--ghost {
  border-color: rgba(247, 243, 234, 0.4);
  color: var(--paper-50);
  background: transparent;
}

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

.btn--ink {
  border-color: var(--chart-600);
  color: var(--chart-600);
  background: transparent;
}

.btn--ink:hover {
  background: var(--chart-600);
  color: var(--paper-50);
}

/* 6. 面包屑 --------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--rock-500);
}

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

.crumbs li + li::before {
  content: "›";
  opacity: 0.55;
}

.crumbs a {
  color: var(--link);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.crumbs a:hover { border-bottom-color: currentColor; }

/* 7. 图片容器基础 --------------------------------------------------------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--harbor-800);
  border: 1px solid rgba(31, 92, 120, 0.28);
  isolation: isolate;
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(42, 212, 200, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 212, 200, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.75;
}

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

.media__caption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--rock-500);
}

/* 8. 页头 ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--deep-900);
  color: var(--paper-50);
  border-bottom: 1px solid rgba(42, 212, 200, 0.18);
  box-shadow: 0 14px 30px -26px rgba(7, 28, 44, 0.95);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -170%);
  padding: 0.65rem 1.2rem;
  background: var(--cyan-400);
  color: var(--deep-900);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: transform 0.22s var(--ease);
}

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

/* 左侧刻度轨 */
.rail {
  position: fixed;
  left: 26px;
  top: 50%;
  z-index: 80;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.rail__cap {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  color: var(--rock-500);
}

.rail__track {
  position: relative;
  width: 2px;
  height: 168px;
  background: rgba(16, 24, 32, 0.1);
  overflow: hidden;
}

.rail__track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 15px,
    rgba(16, 24, 32, 0.24) 15px 16px
  );
}

.rail__fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--signal-500), var(--cyan-400));
  transition: height 0.15s linear;
}

.rail__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--chart-600);
}

/* 刊头 */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(0.9rem, 2vw, 1.35rem) var(--gutter) clamp(0.5rem, 1.4vw, 0.9rem);
}

.masthead__meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.48);
}

.masthead__core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.masthead__brand {
  display: inline-block;
  padding-left: 0.16em;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  letter-spacing: 0.16em;
  line-height: 1.25;
  color: var(--paper-50);
  transition: color 0.2s var(--ease);
}

.masthead__brand:hover { color: var(--cyan-400); }

.masthead__tagline {
  padding-left: 0.42em;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.masthead__code {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(247, 243, 234, 0.48);
}

/* 导航带 */
.nav-bar {
  background: var(--harbor-800);
  border-top: 1px solid rgba(247, 243, 234, 0.1);
}

.nav-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.25rem, 1.6vw, 1.6rem);
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.9rem 0.3rem;
  font-size: var(--fs-14);
  letter-spacing: 0.14em;
  color: rgba(247, 243, 234, 0.72);
  transition: color 0.2s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  right: 0.3rem;
  bottom: 0.55rem;
  height: 2px;
  background: var(--signal-500);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--ease), background-color 0.2s var(--ease);
}

.site-nav__link:hover { color: var(--paper-50); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] {
  color: var(--paper-50);
  font-weight: 500;
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--cyan-400);
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 48px;
  padding: 0.95rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--paper-50);
  cursor: pointer;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle__bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cyan-400);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 阅读进度条 */
.progress-bar {
  position: relative;
  height: 2px;
  background: rgba(247, 243, 234, 0.1);
  overflow: hidden;
}

.progress-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--signal-500) 100%);
  transition: width 0.15s linear;
}

/* 9. 页脚 ----------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(3rem, 9vw, 7rem);
  background: var(--deep-900);
  color: rgba(247, 243, 234, 0.78);
  border-top: 3px solid var(--signal-500);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(42, 212, 200, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(42, 212, 200, 0.06) 1px, transparent 1px);
  background-size: 112px 112px;
}

.footer-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.4rem, 6vw, 4.5rem) var(--gutter) clamp(1.4rem, 3vw, 2rem);
}

.footer-lead { max-width: 46ch; }

.footer-eyebrow {
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--cyan-400);
}

.footer-brand {
  display: inline-block;
  padding-left: 0.14em;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  letter-spacing: 0.14em;
  line-height: 1.25;
  color: var(--paper-50);
  transition: color 0.2s var(--ease);
}

.footer-brand:hover { color: var(--cyan-400); }

.footer-tagline {
  margin-top: 0.35rem;
  padding-left: 0.36em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--signal-500);
}

.footer-desc {
  margin-top: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.85;
  color: rgba(247, 243, 234, 0.66);
}

.footer-cta { margin-top: 1.4rem; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 2.6rem);
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
  padding-top: clamp(1.6rem, 4vw, 2.4rem);
  border-top: 1px solid rgba(247, 243, 234, 0.14);
}

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

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--signal-500);
}

.footer-col__title::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.footer-list li {
  padding-block: 0.28rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(247, 243, 234, 0.66);
  overflow-wrap: anywhere;
}

.footer-list a {
  display: inline-block;
  padding-bottom: 1px;
  color: rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid rgba(247, 243, 234, 0.2);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-list a:hover {
  color: var(--cyan-400);
  border-bottom-color: var(--cyan-400);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.8rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.3rem;
  border-top: 1px solid rgba(247, 243, 234, 0.14);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(247, 243, 234, 0.5);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.footer-legal a {
  color: rgba(247, 243, 234, 0.72);
  transition: color 0.2s var(--ease);
}

.footer-legal a:hover { color: var(--cyan-400); }

.footer-icp { color: rgba(247, 243, 234, 0.45); overflow-wrap: anywhere; }

/* 10. 显现动效 ------------------------------------------------------------ */
[data-reveal] {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

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

/* 11. 响应式 -------------------------------------------------------------- */
@media (min-width: 1360px) {
  .rail { display: flex; }
}

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

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

@media (max-width: 880px) {
  :root { --header-offset: 190px; }

  .masthead {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 0.4rem;
    padding-block: 1rem 0.7rem;
  }

  .masthead__meta { display: none; }

  .masthead__code {
    justify-self: center;
    font-size: 0.6rem;
    letter-spacing: 0.24em;
  }

  .nav-bar__inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    border-top: 1px solid rgba(247, 243, 234, 0.1);
  }

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

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.6rem;
  }

  .site-nav__item {
    border-bottom: 1px solid rgba(247, 243, 234, 0.1);
  }

  .site-nav__item:last-child { border-bottom: 0; }

  .site-nav__link {
    display: block;
    padding: 0.95rem 0.2rem;
    font-size: var(--fs-16);
    letter-spacing: 0.1em;
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] {
    color: var(--cyan-400);
    font-weight: 700;
  }

  .site-nav__link[aria-current="page"]::before {
    content: "▪";
    margin-right: 0.55rem;
    color: var(--signal-500);
  }
}

@media (max-width: 600px) {
  :root { --header-offset: 200px; }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

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

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

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

@media (max-width: 400px) {
  .masthead__brand { font-size: 1.25rem; letter-spacing: 0.12em; }
  .footer-brand { font-size: 1.4rem; }
}

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

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