/* ==========================================================
   site.css — hg8868皇冠 全站共享样式
   深蓝 × 金色 · 控制台风格 · 目录型信息地图
   ========================================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --c-primary: #0B1F33;
  --c-primary-dark: #071527;
  --c-primary-light: #1B3A5B;
  --c-gold: #D4AF37;
  --c-gold-light: #F0D876;
  --c-red: #E63946;
  --c-red-light: #F18B93;
  --c-cream: #F8F9FA;
  --c-gray-light: #E9ECEF;
  --c-gray-dark: #343A40;
  --c-success: #2ECC71;

  --font-headline: 'Playfair Display', 'Times New Roman', 'Songti SC', 'SimSun', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  --font-data: 'Roboto Mono', 'SFMono-Regular', Consolas, monospace;

  --header-h: 4.75rem;
  --container-max: 76rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-cream);
  background-color: var(--c-primary);
  background-image:
    radial-gradient(ellipse 70% 45% at 12% -4%, rgba(27, 58, 91, 0.55), transparent 60%),
    radial-gradient(ellipse 50% 30% at 88% 2%, rgba(212, 175, 55, 0.07), transparent 65%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- 基础排版 ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-headline);
  font-weight: 800;
  line-height: 1.25;
  color: var(--c-gold-light);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--c-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--c-gold-light);
}

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

::selection {
  background: var(--c-gold);
  color: var(--c-primary-dark);
}

/* ---------- 布局工具 ---------- */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.main-content {
  min-height: 70vh;
}

.visually-hidden {
  position: absolute;
  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: -4rem;
  left: 1rem;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.125rem;
  background: var(--c-gold);
  color: var(--c-primary-dark);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-light) 70%, var(--c-red));
  border-radius: 0 3px 3px 0;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 21, 39, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.site-header__inner {
  position: relative;
  z-index: 3;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand__emblem {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.875rem;
  background: linear-gradient(145deg, var(--c-gold-light), var(--c-gold) 70%);
  color: var(--c-primary);
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.375rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.2;
}

.brand__title {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.03em;
  color: var(--c-gold-light);
}

.brand__sub {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 249, 250, 0.5);
}

.brand__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.25rem;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(46, 204, 113, 0.08);
  font-family: var(--font-data);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--c-success);
  white-space: nowrap;
}

/* 状态点 */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.45);
  animation: status-pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.06);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 1.15rem;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 99px;
  background: var(--c-gold);
  transition: transform 0.3s var(--ease), background-color 0.3s ease;
}

.nav-toggle__text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-gold);
}

.nav-toggle[data-open] .nav-toggle__bar:first-child {
  transform: translateY(0.25rem) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle__bar:last-child {
  transform: translateY(-0.25rem) rotate(-45deg);
}

/* 主导航 */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__item {
  position: relative;
}

.site-nav__item + .site-nav__item::before {
  content: "";
  position: absolute;
  left: -0.125rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.25rem;
  background: rgba(212, 175, 55, 0.25);
}

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(248, 249, 250, 0.78);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--c-gold-light);
}

.site-nav__link[aria-current="page"] {
  background: rgba(212, 175, 55, 0.14);
  color: var(--c-gold);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.site-nav__index {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--c-gold);
  opacity: 0.6;
}

.site-nav__label {
  line-height: 1.45;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 4rem;
  background: var(--c-primary-dark);
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  overflow: hidden;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer__glow {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 22rem;
  height: 14rem;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.1), transparent 70%);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr;
  gap: 3rem;
  padding: 3.5rem 0 3rem;
}

.site-footer__col {
  min-width: 0;
}

.site-footer__brand {
  font-family: var(--font-headline);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--c-gold);
  letter-spacing: 0.02em;
}

.site-footer__tagline {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: rgba(248, 249, 250, 0.55);
}

.site-footer__trust {
  margin-top: 1.25rem;
  max-width: 34rem;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(248, 249, 250, 0.5);
  background: rgba(212, 175, 55, 0.05);
  border-left: 2px solid rgba(212, 175, 55, 0.45);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.site-footer__title {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-gold-light);
  padding-left: 0.75rem;
  border-left: 3px solid var(--c-gold);
  margin-bottom: 1.25rem;
}

.site-footer__links,
.site-footer__contacts {
  display: grid;
  gap: 0.7rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(248, 249, 250, 0.72);
  font-size: 0.9375rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__links a::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--c-gold);
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--c-gold-light);
  padding-left: 0.25rem;
}

.site-footer__links a:hover::before {
  opacity: 1;
  transform: scale(1.2);
}

.site-footer__contact-item {
  display: flex;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(248, 249, 250, 0.72);
}

.site-footer__contact-label {
  color: var(--c-gold);
  font-weight: 600;
  white-space: nowrap;
}

.site-footer__contact-label::after {
  content: "：";
}

.site-footer__contact-value {
  word-break: break-all;
}

.site-footer__bottom {
  position: relative;
  border-top: 1px solid rgba(248, 249, 250, 0.08);
  padding: 1.25rem 0;
}

.site-footer__bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(248, 249, 250, 0.45);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn--gold {
  background: var(--c-gold);
  color: var(--c-primary-dark);
}

.btn--gold:hover {
  background: var(--c-gold-light);
  color: var(--c-primary-dark);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--c-gold);
}

.btn--outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.7);
  color: var(--c-gold-light);
}

.btn--ghost {
  background: transparent;
  color: rgba(248, 249, 250, 0.8);
}

.btn--ghost:hover {
  background: rgba(248, 249, 250, 0.08);
  color: var(--c-cream);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(248, 249, 250, 0.55);
}

.breadcrumb a:hover {
  color: var(--c-gold-light);
}

.breadcrumb__sep {
  color: rgba(212, 175, 55, 0.5);
}

.breadcrumb__current {
  color: rgba(248, 249, 250, 0.65);
}

/* ---------- 编号章节标题 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head__num {
  font-family: var(--font-data);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--c-gold);
  opacity: 0.32;
  letter-spacing: 0.02em;
}

.section-head__title {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-gold-light);
}

.section-head__desc {
  flex-basis: 100%;
  max-width: 42rem;
  margin-top: -0.5rem;
  font-size: 0.9375rem;
  color: rgba(248, 249, 250, 0.58);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.grid > * {
  grid-column: span 4;
}

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(150deg, rgba(27, 58, 91, 0.5), rgba(11, 31, 51, 0.8));
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-3px);
}

.card--flat {
  background: rgba(11, 31, 51, 0.6);
}

.card__title {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-gold-light);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.9375rem;
  color: rgba(248, 249, 250, 0.7);
}

/* ---------- 控制台面板 ---------- */
.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(27, 58, 91, 0.55), rgba(7, 21, 39, 0.82));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--c-gold), var(--c-gold-light) 60%, transparent);
  border-radius: 3px 0 0 3px;
}

.panel__title {
  font-family: var(--font-headline);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-gold-light);
  padding-left: 0.625rem;
  margin-bottom: 0.875rem;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.275rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--c-gold);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.tag--red {
  background: rgba(230, 57, 70, 0.14);
  border-color: rgba(230, 57, 70, 0.35);
  color: var(--c-red-light);
}

/* ---------- 图片容器 ---------- */
.image-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, var(--c-primary-light), var(--c-primary-dark));
  border: 1px solid rgba(212, 175, 55, 0.16);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.image-frame__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(212, 175, 55, 0.55);
  font-family: var(--font-data);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

.image-frame__placeholder::before {
  content: "◇";
  font-size: 0.75rem;
  color: rgba(212, 175, 55, 0.8);
}

/* ---------- 滚动显现 ---------- */
html.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
}

html.js-enabled [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 64rem) {
  .brand__sub,
  .brand__status {
    display: none;
  }

  .site-nav__link {
    padding: 0.5rem 0.7rem;
    font-size: 0.875rem;
  }

  .site-nav__index {
    font-size: 0.625rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .grid > * {
    grid-column: span 6;
  }

  .col-span-2,
  .col-span-3,
  .col-span-4 {
    grid-column: span 6;
  }

  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8,
  .col-span-9,
  .col-span-10,
  .col-span-11,
  .col-span-12 {
    grid-column: span 12;
  }
}

/* ---------- 响应式：移动端导航 ---------- */
@media (max-width: 52rem) {
  html.nav-open {
    overflow: hidden;
  }

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

  .site-header__inner {
    min-height: 4.25rem;
  }

  .site-header__inner > .brand,
  .site-header__inner > .nav-toggle {
    position: relative;
    z-index: 4;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 2rem;
    background:
      radial-gradient(ellipse 60% 30% at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
      rgba(7, 21, 39, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    width: 100%;
    max-width: 22rem;
  }

  .site-nav__item + .site-nav__item::before {
    display: none;
  }

  .site-nav__link {
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1.125rem;
  }

  .site-nav__index {
    font-size: 0.75rem;
  }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 40rem) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.75rem 0 2.5rem;
  }

  .site-footer__bottom-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid > *,
  .col-span-2,
  .col-span-3,
  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8,
  .col-span-9,
  .col-span-10,
  .col-span-11,
  .col-span-12 {
    grid-column: span 12;
  }

  .section-head {
    gap: 0.75rem;
  }

  .section-head__num {
    font-size: 2.5rem;
  }

  .section-head__title {
    font-size: 1.5rem;
  }

  .breadcrumb {
    font-size: 0.8125rem;
  }
}

/* ---------- 偏好减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .status-dot {
    animation: none;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3);
  }

  html.js-enabled [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress {
    transition: none;
  }

  .site-nav,
  .site-nav[data-open] {
    transition: none;
  }
}
