/* ============================================================
   金沙服务 · 共享样式表 /assets/site.css
   数字绿洲展馆：深空蓝展墙 + 金沙金光源
   ============================================================ */

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

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

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

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

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

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

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

/* ---------- CSS 变量 ---------- */
:root {
  /* 色彩体系 */
  --blue-900: #071420;
  --blue-800: #0B1C2C;
  --blue-700: #122B42;
  --blue-600: #1B3A57;
  --gold-500: #D4AF37;
  --gold-300: #E8CF87;
  --sand: #C9A98C;
  --jade: #5C8A8A;
  --mist: #F5F1E8;
  --graphite: #2B2F33;

  /* 语义色 */
  --bg: var(--blue-900);
  --bg-panel: var(--blue-700);
  --bg-elevated: var(--blue-800);
  --text: var(--mist);
  --text-soft: rgba(245, 241, 232, 0.72);
  --text-dim: rgba(245, 241, 232, 0.5);
  --line: var(--blue-600);
  --accent: var(--gold-500);
  --accent-soft: var(--gold-300);

  /* 字体 */
  --font-heading: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Source Han Mono SC", "SFMono-Regular", "Menlo", monospace;
  --font-numeric: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* 尺度 */
  --shell-width: 1280px;
  --shell-pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;

  /* 节奏 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5.5rem;

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

/* ---------- 基础排版 ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

p { color: var(--text-soft); }

::selection {
  background: var(--gold-500);
  color: var(--blue-900);
}

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

/* 滚动条（暗色克制处理） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--blue-900); }
::-webkit-scrollbar-thumb { background: var(--blue-600); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--gold-500);
  color: var(--blue-900);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: top 0.25s var(--ease);
}

.skip-link:focus {
  top: var(--space-sm);
}

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

.scroll-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--jade), var(--gold-500) 60%, var(--gold-300));
  transition: width 0.1s linear;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(7, 20, 32, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0.85rem var(--shell-pad);
}

.site-header__left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  min-width: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand__mark {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mist);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.brand__mark::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--gold-500);
  vertical-align: middle;
}

.brand__subline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand);
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__item { display: flex; }

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.25rem;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover {
  color: var(--mist);
}

.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] {
  color: var(--gold-300);
}

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

/* 移动端按钮 */
.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}

.nav-toggle:hover { border-color: var(--gold-500); }

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--mist);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.site-header[data-open] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.3s var(--ease);
}

.btn--gold {
  background: var(--gold-500);
  color: var(--blue-900);
  border-color: var(--gold-500);
}

.btn--gold:hover {
  background: var(--gold-300);
  border-color: var(--gold-300);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(212, 175, 55, 0.7);
}

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

.btn--ghost:hover {
  border-color: var(--gold-500);
  color: var(--mist);
  transform: translateY(-2px);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: var(--space-xl);
  background-color: var(--blue-900);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

.site-footer__inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--shell-pad) var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 22rem;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mist);
  letter-spacing: 0.08em;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.footer__rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold-500);
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer__links a {
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer__links a:hover {
  color: var(--gold-300);
  padding-left: 6px;
}

.footer__contact {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
}

.footer__contact-line,
.footer__address {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.9;
}

.footer__address {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer__contact-line a {
  color: var(--gold-300);
  border-bottom: 1px solid rgba(232, 207, 135, 0.35);
  transition: border-color 0.25s var(--ease);
}

.footer__contact-line a:hover {
  border-color: var(--gold-500);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

/* ---------- 通用区块与容器 ---------- */
.shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: var(--space-md) 0 0;
}

.breadcrumb__item::after {
  content: "/";
  margin-left: 0.6rem;
  color: var(--blue-600);
}

.breadcrumb__item:last-child::after { content: ""; }

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

.breadcrumb [aria-current="page"] { color: var(--gold-300); }

/* ---------- 正文容器 ---------- */
.prose {
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.prose--narrow { max-width: 58ch; }

.prose h2, .prose h3 { margin-top: var(--space-md); }

.prose ul, .prose ol {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.prose ul { list-style: none; padding-left: 0; }

.prose ul li {
  position: relative;
  padding-left: 1.3rem;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-500);
  transform: rotate(45deg);
}

.prose ol { list-style: decimal; }

.prose a {
  color: var(--gold-300);
  border-bottom: 1px solid rgba(232, 207, 135, 0.35);
}

.prose a:hover { border-color: var(--gold-500); }

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- 展览标签 ---------- */
.exhibit-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(201, 169, 140, 0.06);
}

.exhibit-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-500);
}

.exhibit-label--jade {
  color: var(--jade);
  border-color: rgba(92, 138, 138, 0.4);
  background: rgba(92, 138, 138, 0.08);
}

.exhibit-label--jade::before { background: var(--jade); }

/* ---------- 面板 / 卡片 ---------- */
.panel {
  position: relative;
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel--raised {
  background: var(--bg-panel);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

.panel--raised:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.9);
}

.panel--raised::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.18), transparent 70%);
  pointer-events: none;
}

/* ---------- 数据/数字 ---------- */
.stat {
  font-family: var(--font-numeric);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--gold-500);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--blue-700);
  background-image:
    radial-gradient(circle at 22% 26%, rgba(212, 175, 55, 0.16), transparent 55%),
    radial-gradient(circle at 78% 72%, rgba(92, 138, 138, 0.14), transparent 60%),
    repeating-linear-gradient(
      115deg,
      rgba(245, 241, 232, 0.035) 0px,
      rgba(245, 241, 232, 0.035) 1px,
      transparent 1px,
      transparent 7px
    );
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* ---------- 显现动效 ---------- */
[data-reveal],
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .footer__col--brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-header__hint { display: none; }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--line);
  }

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

  .site-nav__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .site-nav__link {
    display: block;
    padding: 0.6rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
  }

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

  .site-nav__link[aria-current="page"] {
    border-color: var(--gold-500);
    color: var(--gold-300);
  }

  .site-nav__cta { width: 100%; }
}

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

  .brand__subline { display: none; }

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

  .footer__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .site-footer__inner { padding-top: var(--space-md); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-progress::after { transition: none; }
}
