/* ============================================================
   金沙服务 · 共享站点样式 /assets/site.css
   高原编辑部：暖沙白底 · 深藏红报眼 · 金沙金细线 · 直角网格
   ============================================================ */

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

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

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

ul, ol { list-style: none; }

[hidden] { display: none !important; }

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

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

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

/* ---------- 2. Tokens ---------- */
:root {
  --gold: #C9A227;
  --gold-light: #E6C766;
  --crimson: #8B1E3F;
  --crimson-deep: #5E132A;
  --blue: #2E5E8C;
  --sand: #F5EFE6;
  --mist: #FFFBF4;
  --ink: #1F1A17;
  --teal: #3A7D6E;
  --stone: #8C7B6B;

  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", SimSun, Georgia, serif;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;

  --wrap-max: 1240px;
  --gutter: clamp(18px, 4.2vw, 52px);
  --rule: rgba(31, 26, 23, 0.14);
  --rule-soft: rgba(31, 26, 23, 0.08);
  --rule-gold: rgba(201, 162, 39, 0.45);
  --ease-out: cubic-bezier(0.22, 0.7, 0.3, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  background-color: var(--sand);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.012em;
}

h1 { font-size: clamp(2.15rem, 5.8vw, 4.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-family: var(--font-sans); font-weight: 700; }

p { line-height: 1.85; }

strong, b { font-weight: 700; }

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

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

/* ---------- 4. Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(42px, 6.5vw, 88px); }
.section--mist { background-color: var(--mist); }
.section--crimson { background-color: var(--crimson); color: var(--sand); }
.section--ink { background-color: var(--ink); color: var(--sand); }

.rule {
  height: 1px;
  border: 0;
  background-color: var(--rule);
}

.rule--gold {
  background-image: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0));
  background-color: transparent;
}

/* ---------- 5. Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1.4;
  color: var(--crimson);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 1px;
  background-color: var(--gold);
}

.heading-slab {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 0;
  background-color: var(--crimson);
  color: var(--sand);
  transition: background-color 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.btn:hover { background-color: var(--crimson-deep); }
.btn:active { transform: translateY(1px); }

.btn--gold {
  background-color: var(--gold);
  color: var(--ink);
}
.btn--gold:hover { background-color: var(--gold-light); }

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

.btn--ghost-light {
  background-color: transparent;
  border-color: rgba(245, 239, 230, 0.55);
  color: var(--sand);
}
.btn--ghost-light:hover {
  background-color: var(--sand);
  border-color: var(--sand);
  color: var(--ink);
}

/* ---------- 7. Tags / chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  border: 1px solid var(--rule);
  background-color: var(--mist);
  color: var(--blue);
}

.tag--gold {
  border-color: var(--rule-gold);
  background-color: rgba(201, 162, 39, 0.14);
  color: #8A6D12;
}

.tag--teal {
  border-color: rgba(58, 125, 110, 0.42);
  background-color: rgba(58, 125, 110, 0.1);
  color: #2C6154;
}

/* ---------- 8. Panel / prose / breadcrumb ---------- */
.panel {
  background-color: var(--mist);
  border: 1px solid var(--rule);
  padding: clamp(20px, 3vw, 34px);
}

.prose { max-width: 68ch; }
.prose p { margin-block: 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3 { margin-block: 1.6em 0.6em; }
.prose ul, .prose ol {
  margin-block: 0 1.15em;
  padding-left: 1.4em;
  list-style: disc;
}
.prose li { margin-block: 0.35em; }
.prose a {
  color: var(--blue);
  border-bottom: 1px solid rgba(46, 94, 140, 0.4);
}

.breadcrumb {
  padding-block: 16px 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--stone);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--gold);
}
.breadcrumb a { color: var(--ink); }
.breadcrumb a:hover { color: var(--crimson); }

/* ---------- 9. Media containers ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--rule);
  background-color: #EADFCF;
  background-image:
    repeating-linear-gradient(90deg, rgba(31, 26, 23, 0.045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(31, 26, 23, 0.045) 0 1px, transparent 1px 26px);
}

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

.media--banner { aspect-ratio: 21 / 9; }
.media--wide { aspect-ratio: 16 / 9; }
.media--photo { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }

/* ---------- 10. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 14px;
  z-index: 400;
  padding: 11px 20px;
  background-color: var(--crimson);
  color: var(--sand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  border-bottom: 2px solid var(--gold);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 14px;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 11. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background-color: var(--sand);
  border-bottom: 1px solid var(--rule-gold);
  transition: box-shadow 0.3s ease;
}

.site-header[data-compact] {
  box-shadow: 0 10px 28px -22px rgba(31, 26, 23, 0.6);
}

/* 报眼条 */
.header-utility {
  background-color: var(--crimson-deep);
  color: var(--sand);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.header-utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding-block: 5px;
}

.header-utility__tag {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--gold-light);
  line-height: 1.6;
}

.header-utility__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-utility__links a {
  display: inline-block;
  padding-block: 2px;
  color: rgba(245, 239, 230, 0.82);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.header-utility__links a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

/* 刊头 */
.header-masthead {
  padding-block: clamp(14px, 2.2vw, 26px) clamp(10px, 1.6vw, 18px);
  transition: padding 0.32s var(--ease-out);
}

.site-header[data-compact] .header-masthead {
  padding-block: 8px 6px;
}

.header-masthead__inner {
  display: flex;
  justify-content: center;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--crimson);
  transition: font-size 0.32s var(--ease-out);
}

.site-header[data-compact] .brand__name {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.brand__name::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin: 9px auto 8px;
  background-color: var(--gold);
  transition: width 0.32s var(--ease-out), margin 0.32s var(--ease-out);
}

.site-header[data-compact] .brand__name::after {
  width: 34px;
  margin: 5px auto 4px;
}

.brand__line {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  line-height: 1.6;
  color: var(--stone);
}

/* 导航条 */
.header-bar {
  position: relative;
  background-color: var(--mist);
  border-top: 1px solid var(--rule);
}

.header-bar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.nav-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--rule);
  background-color: var(--sand);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

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

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background-color: var(--ink);
  transition: transform 0.26s var(--ease-out), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.5px) 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(-5.5px) rotate(-45deg);
}

.site-nav {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: center;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(6px, 2vw, 28px);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 2px 11px;
  font-size: 14px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--ink);
  transition: color 0.2s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.32s var(--ease-out);
}

.site-nav__link:hover { color: var(--crimson); }
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

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

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1;
}

.header-search {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  background-color: var(--sand);
  font-size: 12px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.header-search:hover {
  border-color: var(--gold);
  background-color: var(--gold-light);
  color: var(--ink);
}

.header-search__icon {
  position: relative;
  flex: none;
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.header-search__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background-color: currentColor;
  transform: rotate(45deg);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(90deg, var(--crimson), var(--gold) 48%, var(--gold-light));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  margin-top: clamp(46px, 8vw, 96px);
  background-color: var(--crimson-deep);
  color: var(--sand);
  border-top: 3px solid var(--gold);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(26px, 4vw, 64px);
  padding-block: clamp(40px, 6vw, 72px);
}

.footer__identity { min-width: 0; }

.footer__brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: 0.2em;
  color: var(--sand);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer__brand:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.footer__statement {
  margin-top: 18px;
  max-width: 26ch;
  font-size: 13.5px;
  line-height: 1.85;
  letter-spacing: 0.06em;
  color: rgba(245, 239, 230, 0.7);
}

.footer__meta {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--gold-light);
  opacity: 0.85;
}

.footer__col { min-width: 0; }

.footer__title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1.6;
  color: var(--gold-light);
  padding-bottom: 11px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.32);
}

.footer__links {
  display: grid;
  gap: 10px;
}

.footer__links a {
  display: inline-block;
  padding-block: 2px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(245, 239, 230, 0.86);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer__links a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.footer__contact {
  display: grid;
}

.footer__contact li {
  display: grid;
  grid-template-columns: 5.8em minmax(0, 1fr);
  gap: 12px;
  padding-block: 9px;
  font-size: 13.5px;
  line-height: 1.75;
  border-bottom: 1px solid rgba(245, 239, 230, 0.1);
}

.footer__contact li:first-child { padding-top: 0; }
.footer__contact li:last-child { border-bottom: 0; padding-bottom: 0; }

.footer__flag {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  line-height: 2.2;
  color: var(--gold-light);
  opacity: 0.85;
}

.footer__value {
  min-width: 0;
  color: rgba(245, 239, 230, 0.84);
  overflow-wrap: anywhere;
}

.footer__base {
  border-top: 1px solid rgba(245, 239, 230, 0.16);
}

.footer__base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 18px 22px;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: rgba(245, 239, 230, 0.58);
}

.footer__icp { color: rgba(245, 239, 230, 0.7); }
.footer__domain { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; }

/* ---------- 13. Reveal protocol ---------- */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
}

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

/* ---------- 14. Responsive ---------- */
@media (max-width: 960px) {
  .header-bar__inner {
    grid-template-columns: auto 1fr auto;
    min-height: 54px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    grid-column: auto;
    grid-row: auto;
    display: none;
    justify-content: flex-start;
    background-color: var(--mist);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 30px 46px -34px rgba(31, 26, 23, 0.65);
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    z-index: 130;
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 20px;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    font-size: 15px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--rule-soft);
  }

  .site-nav__link::after {
    left: 0;
    right: auto;
    bottom: 8px;
    width: 46px;
    height: 2px;
    transform-origin: 0 50%;
  }

  .site-nav__idx { font-size: 11px; }
}

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

  .footer__identity { grid-column: 1 / -1; }

  .footer__statement { max-width: 46ch; }
}

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

  .header-utility__tag { font-size: 10.5px; letter-spacing: 0.16em; }
  .header-utility__links { gap: 14px; }
}

@media (max-width: 560px) {
  .header-utility__inner {
    justify-content: center;
    min-height: 32px;
  }

  .header-utility__tag { display: none; }

  .header-utility__links { gap: 22px; }

  .brand__line { letter-spacing: 0.3em; text-indent: 0.3em; }

  .header-search__text { display: none; }

  .header-search { padding: 8px 11px; }

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

  .footer__base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer__contact li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer__flag { line-height: 1.6; }
}

@media (max-width: 400px) {
  .nav-toggle__label { display: none; }
}

/* ---------- 15. Motion preferences ---------- */
@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;
  }

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

  .scroll-progress { display: none; }
}
