/* =========================================================
   /assets/site.css — 新葡萄京中心 共享外壳样式
   1 重置 / 2 变量 / 3 中文排版 / 4 轨道头部 / 5 页脚
   6 通用组件 / 7 图片容器 / 8 动效与响应式
   ========================================================= */

/* ---------- 1. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --lake: #0F6E7C;
  --lake-deep: #0A4A55;
  --lake-mist: #CBE2E6;
  --grape: #5B2A6E;
  --grape-mist: #E6D7EC;
  --sand: #D79A3F;
  --paper: #F5EFE3;
  --paper-deep: #E9E0CF;
  --ink: #1C2026;
  --ink-soft: #59616A;
  --highlight: #FFFDF8;

  --rail-w: 19rem;
  --gutter: clamp(1.15rem, 4vw, 4.5rem);
  --maxw: 1240px;

  --fs-h1: clamp(2.5rem, 7vw, 5.5rem);
  --fs-h2: clamp(1.85rem, 4vw, 3rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.75rem);

  --r-organic: 28px 28px 28px 8px;
  --r-organic-alt: 8px 28px 28px 28px;
  --r-pill: 999px;

  --shadow-card: 0 1px 0 rgba(28, 32, 38, .06), 0 16px 34px -26px rgba(10, 74, 85, .65);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Source Han Mono SC", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 中文排版与页面底色 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(58rem 40rem at 108% -6%, rgba(203, 226, 230, .58), rgba(203, 226, 230, 0) 62%),
    radial-gradient(44rem 34rem at -8% 44%, rgba(230, 215, 236, .50), rgba(230, 215, 236, 0) 64%),
    radial-gradient(36rem 28rem at 72% 106%, rgba(215, 154, 63, .16), rgba(215, 154, 63, 0) 66%);
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.14; letter-spacing: -.022em; color: var(--ink); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.15rem; }
p { max-width: 68ch; }

::selection { background: var(--grape); color: var(--highlight); }

:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 跳至主内容 */
.skip-link {
  position: fixed;
  top: -4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: .7rem 1.15rem;
  background: var(--grape);
  color: var(--highlight);
  font-size: .875rem;
  font-weight: 700;
  border-radius: 0 0 12px 12px;
  transition: top 180ms var(--ease);
}
.skip-link:focus { top: 0; }

#main-content { display: block; scroll-margin-top: 1rem; }

/* ---------- 4. 侧边轨道头部 ---------- */
.site-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem 1.5rem 1.9rem;
  color: var(--paper);
  background-color: var(--lake-deep);
  background-image:
    radial-gradient(32rem 32rem at 128% 4%, rgba(91, 42, 110, .62), rgba(91, 42, 110, 0) 62%),
    radial-gradient(26rem 26rem at -28% 96%, rgba(203, 226, 230, .22), rgba(203, 226, 230, 0) 60%),
    linear-gradient(184deg, #0A4A55 0%, #0F6E7C 100%);
  background-repeat: no-repeat;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 26px 0 60px -52px rgba(10, 74, 85, .95);
  transition: transform 260ms var(--ease);
}

.rail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }

.rail-brand { display: grid; gap: .3rem; padding-right: .5rem; }
.rail-brand__mark {
  width: 42px; height: 42px;
  border-radius: 44% 56% 54% 46% / 52% 46% 54% 48%;
  background: linear-gradient(140deg, var(--sand) 4%, var(--grape) 82%);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .34), 0 10px 20px -14px #000;
}
.rail-brand__name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--highlight); }
.rail-brand__tagline { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; color: rgba(203, 226, 230, .8); }

.rail-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(203, 226, 230, .45);
  color: var(--paper);
  font-size: .8125rem;
  letter-spacing: .06em;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.rail-toggle:hover { border-color: var(--sand); background: rgba(215, 154, 63, .16); }
.rail-toggle__bars { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: background-color 180ms var(--ease); }
.rail-toggle__bars::before, .rail-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: top 200ms var(--ease), transform 200ms var(--ease);
}
.rail-toggle__bars::before { top: -6px; }
.rail-toggle__bars::after { top: 6px; }
.site-rail[data-open] .rail-toggle__bars { background: transparent; }
.site-rail[data-open] .rail-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-rail[data-open] .rail-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.rail-toggle__label { white-space: nowrap; }

.rail-nav { display: grid; gap: .6rem; }
.rail-nav__index,
.rail-quick__index {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .14em;
  color: rgba(203, 226, 230, .66);
}
.rail-nav__list { display: grid; gap: 2px; }
.rail-nav__item { display: block; }
.rail-nav__link {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .5rem .7rem;
  border-radius: 14px 14px 14px 4px;
  border-left: 3px solid transparent;
  color: rgba(245, 239, 227, .86);
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
              transform 160ms var(--ease), border-color 160ms var(--ease);
}
.rail-nav__link:hover { background: rgba(255, 253, 248, .12); color: var(--highlight); transform: translateX(2px); }
.rail-nav__link[aria-current="page"] {
  background: var(--grape);
  color: var(--highlight);
  border-left-color: var(--sand);
  box-shadow: inset 0 0 0 1px rgba(215, 154, 63, .45);
}
.rail-nav__num { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; color: rgba(203, 226, 230, .72); }
.rail-nav__link[aria-current="page"] .rail-nav__num { color: var(--sand); }
.rail-nav__label { font-size: 1.0625rem; font-weight: 600; letter-spacing: .01em; }

.rail-quick { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.rail-quick__index { margin-bottom: .1rem; }
.rail-quick__link {
  padding: .32rem .75rem;
  border: 1px solid rgba(203, 226, 230, .28);
  border-radius: var(--r-pill);
  font-size: .8125rem;
  color: rgba(245, 239, 227, .84);
  transition: border-color 160ms var(--ease), color 160ms var(--ease), background-color 160ms var(--ease);
}
.rail-quick__link:hover { border-color: var(--sand); background: rgba(215, 154, 63, .16); color: var(--highlight); }

.rail-foot { margin-top: auto; display: grid; gap: .6rem; }
.rail-cta {
  display: block;
  text-align: center;
  padding: .72rem 1rem;
  border-radius: var(--r-pill);
  background: var(--sand);
  color: #241703;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.rail-cta:hover { background: #E7AC55; transform: translateY(-2px); }
.rail-foot__meta { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em; color: rgba(203, 226, 230, .55); }

.rail-progress {
  position: fixed;
  left: 0; bottom: 0;
  width: var(--rail-w);
  height: 3px;
  background: rgba(255, 253, 248, .16);
  z-index: 90;
}
.rail-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sand), var(--grape-mist));
}

/* ---------- 5. 页脚 ---------- */
.site-foot {
  position: relative;
  background: var(--paper-deep);
  color: var(--ink);
  border-top: 1px solid rgba(28, 32, 38, .14);
}
.foot-band {
  height: 6px;
  background: linear-gradient(90deg,
    var(--sand) 0 16%,
    var(--paper) 16% 36%,
    var(--lake-mist) 36% 64%,
    var(--lake) 64% 84%,
    var(--grape) 84% 100%);
}
.foot-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--maxw));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}
.foot-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  grid-template-columns: 1fr;
}
.foot-brand { display: grid; gap: .6rem; justify-items: start; }
.foot-brand__name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; color: var(--lake-deep); }
.foot-brand__line { font-size: 1rem; color: var(--ink); }
.foot-brand__meta { font-size: .8125rem; line-height: 1.7; color: var(--ink-soft); max-width: 30ch; }
.foot-brand .btn { margin-top: .7rem; }

.foot-col { min-width: 0; }
.foot-col__title {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--lake);
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(28, 32, 38, .16);
  margin-bottom: .8rem;
}
.foot-col__list { display: grid; gap: .5rem; }
.foot-col__link {
  display: inline-block;
  font-size: .9375rem;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.foot-col__link:hover { color: var(--grape); border-bottom-color: var(--grape); transform: translateX(2px); }
.foot-col__link--mono { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .02em; }
.foot-col--contact .foot-col__link { overflow-wrap: anywhere; }

.foot-legal {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(28, 32, 38, .14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  font-size: .8125rem;
  color: var(--ink-soft);
}
.foot-legal__copy { font-size: .8125rem; color: var(--ink-soft); }
.foot-legal__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot-legal__link { border-bottom: 1px solid transparent; transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.foot-legal__link:hover { color: var(--grape); border-bottom-color: var(--grape); }
.foot-top {
  padding: .42rem 1rem;
  border: 1px solid rgba(28, 32, 38, .28);
  border-radius: var(--r-pill);
  font-size: .8125rem;
  letter-spacing: .04em;
  color: var(--ink);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.foot-top:hover { background: var(--grape); border-color: var(--grape); color: var(--highlight); }

/* ---------- 6. 通用组件 ---------- */
.wrap {
  width: min(calc(100% - 2 * var(--gutter)), var(--maxw));
  margin-inline: auto;
}
.stack { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.grid { display: grid; gap: clamp(1.15rem, 2.4vw, 2.25rem); grid-template-columns: 1fr; }
.rule { height: 1px; border: 0; background: linear-gradient(90deg, rgba(28, 32, 38, .26), rgba(28, 32, 38, 0)); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--lake);
  text-transform: uppercase;
}
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.68;
  color: var(--ink-soft);
  max-width: 52ch;
}

.section-head { display: grid; gap: .5rem; }
.section-head__num { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .14em; color: var(--sand); }
.section-head__title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.025em; }
.section-head__note { font-size: .9375rem; color: var(--ink-soft); max-width: 46ch; }

.card {
  background: var(--highlight);
  border: 1px solid rgba(28, 32, 38, .10);
  border-radius: var(--r-organic);
  padding: clamp(1.1rem, 2vw, 1.6rem);
  display: grid;
  gap: .55rem;
  align-content: start;
  box-shadow: var(--shadow-card);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.card:hover { background: var(--grape-mist); border-color: rgba(91, 42, 110, .35); transform: translateY(-2px); }
.card__title { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.card__text { font-size: .9375rem; color: var(--ink-soft); }
.card__meta { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; color: var(--lake); }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(15, 110, 124, .2);
  background: var(--lake-mist);
  color: var(--lake-deep);
  font-size: .8125rem;
  line-height: 1.5;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.tag:hover { background: var(--grape-mist); border-color: rgba(91, 42, 110, .4); color: var(--grape); }
.tag[aria-pressed="true"] { background: var(--grape); border-color: var(--grape); color: var(--highlight); }

.breadcrumb { font-size: .8125rem; color: var(--ink-soft); }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb__link { color: var(--lake-deep); border-bottom: 1px solid rgba(15, 110, 124, .35); transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.breadcrumb__link:hover { color: var(--grape); border-bottom-color: var(--sand); }
.breadcrumb__sep { font-family: var(--font-mono); color: rgba(89, 97, 106, .6); }
.breadcrumb__current { color: var(--ink); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
              border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn--primary { background: var(--sand); color: #241703; }
.btn--primary:hover { background: #E7AC55; transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--lake); color: var(--lake-deep); }
.btn--ghost:hover { background: var(--lake-mist); transform: translateY(-2px); }
.btn--grape { background: var(--grape); color: var(--highlight); }
.btn--grape:hover { background: #6E3583; transform: translateY(-2px); }

/* ---------- 7. 响应式图片容器 ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-organic);
  border: 1px solid rgba(28, 32, 38, .08);
  aspect-ratio: 16 / 10;
  background-color: var(--lake-mist);
  background-image: linear-gradient(140deg, rgba(203, 226, 230, .95), rgba(230, 215, 236, .88) 55%, rgba(215, 154, 63, .30));
}
.figure > img,
.figure > svg,
.figure > picture,
.figure > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide { aspect-ratio: 21 / 9; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--path { aspect-ratio: 2 / 1; }
.figure__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: .8rem 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--highlight);
  background: linear-gradient(0deg, rgba(10, 74, 85, .88), rgba(10, 74, 85, 0));
}

/* ---------- 8. 动效与断点 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 1ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

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

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail-toggle { display: none; }
  .site-rail { width: var(--rail-w); transform: none; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: 1.35fr 1fr; }
  .foot-grid { grid-template-columns: 1.5fr .9fr .9fr 1.35fr; }
}

@media (max-width: 1023px) {
  .site-rail { width: min(20rem, 88vw); transform: translateX(-102%); }
  .site-rail[data-open] { transform: translateX(0); }
  .rail-progress { display: none; }
  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .card:hover, .btn:hover, .rail-cta:hover, .rail-nav__link:hover, .foot-col__link:hover { transform: none; }
}
