/* =========================================================
   万象城 ALLWINCITY · /assets/site.css
   共享外壳 + 基础组件
   ========================================================= */

:root {
  --forest: #0E2A24;
  --forest-deep: #091E1A;
  --forest-soft: #16362E;
  --gold: #C9A45C;
  --gold-ink: #8A6A2C;
  --champagne: #E9D8B4;
  --ivory: #F7F3EA;
  --mist: #E4E7E4;
  --haze: #A9B8C3;
  --terracotta: #B86B5A;
  --terracotta-ink: #8C4A3B;
  --electric: #18C7B8;
  --violet: #5B4B8A;
  --ink: #18211F;

  --line-light: rgba(14, 42, 36, 0.12);
  --line-light-soft: rgba(14, 42, 36, 0.07);
  --line-dark: rgba(233, 216, 180, 0.18);
  --line-dark-soft: rgba(233, 216, 180, 0.10);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "SimSun", "Source Han Serif SC",
    "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shell: 1280px;
  --gutter: clamp(18px, 4.5vw, 56px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

button {
  font: inherit;
  color: inherit;
}

address {
  font-style: normal;
}

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

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 8vw, 112px);
}

.section--tight {
  padding-block: clamp(36px, 5vw, 64px);
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

.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)); }
.grid--split {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--line-light), transparent);
}

.rule--dark {
  background: linear-gradient(90deg, var(--line-dark), transparent);
}

/* ---------- 排版工具 ---------- */
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

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

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.28;
  color: var(--forest);
}

.section-title--serif {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.85;
  color: rgba(24, 33, 31, 0.72);
}

.muted {
  color: rgba(24, 33, 31, 0.58);
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: absolute;
  left: clamp(18px, 4.5vw, 56px);
  top: -120px;
  z-index: 200;
  display: inline-block;
  padding: 10px 20px;
  background: var(--gold);
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  border-radius: 0 0 12px 12px;
  transition: top 0.22s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease,
    border-color 0.22s ease, box-shadow 0.22s ease;
}

.btn--gold {
  background: var(--gold);
  color: var(--forest);
}

.btn--gold:hover {
  background: var(--champagne);
  box-shadow: 0 10px 26px rgba(201, 164, 92, 0.32);
}

.btn--outline {
  background: transparent;
  border-color: rgba(233, 216, 180, 0.42);
  color: var(--ivory);
}

.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--forest {
  background: var(--forest);
  color: var(--ivory);
}

.btn--forest:hover {
  background: var(--forest-soft);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(201, 164, 92, 0.35);
  border-radius: 999px;
  background: rgba(201, 164, 92, 0.16);
  color: var(--gold-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag--terracotta {
  background: rgba(184, 107, 90, 0.14);
  border-color: rgba(184, 107, 90, 0.35);
  color: var(--terracotta-ink);
}

.tag--violet {
  background: rgba(91, 75, 138, 0.12);
  border-color: rgba(91, 75, 138, 0.30);
  color: var(--violet);
}

.tag--mist {
  background: rgba(169, 184, 195, 0.22);
  border-color: rgba(169, 184, 195, 0.50);
  color: #4C6373;
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: #FFFFFF;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 8px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(201, 164, 92, 0.55);
  box-shadow: 0 18px 40px rgba(14, 42, 36, 0.10);
}

.card__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold-ink);
}

.card__title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--forest);
}

.card__body {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(24, 33, 31, 0.66);
}

/* ---------- 图片容器（页面阶段放图占位） ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 8px;
  background:
    radial-gradient(circle at 24% 18%, rgba(201, 164, 92, 0.30), transparent 58%),
    linear-gradient(155deg, #17362E 0%, #0E2A24 62%, #102F28 100%);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(
    to right,
    rgba(233, 216, 180, 0.10) 1px,
    transparent 1px
  );
  background-size: 48px 100%;
  pointer-events: none;
}

.media-frame img,
.media-frame video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(24, 33, 31, 0.50);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
}

.breadcrumb a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.breadcrumb a:hover {
  border-bottom-color: var(--gold);
  opacity: 1;
}

.breadcrumb__sep {
  opacity: 0.5;
}

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

/* =========================================================
   头部 · 框架式导航
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--forest);
  color: var(--ivory);
  border-bottom: 1px solid rgba(201, 164, 92, 0.26);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 164, 92, 0.55),
    transparent
  );
  pointer-events: none;
}

.site-header.is-stuck {
  box-shadow: 0 16px 38px rgba(9, 30, 26, 0.32);
}

.site-header[data-open] {
  border-bottom-color: rgba(201, 164, 92, 0.55);
}

/* 顶部索引栏 */
.header-rail {
  background: var(--forest-deep);
  border-bottom: 1px solid var(--line-dark-soft);
}

.header-rail__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  min-height: 36px;
  padding-block: 6px;
}

.rail-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.rail-note {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(247, 243, 234, 0.50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.rail-links a {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.10em;
  color: rgba(247, 243, 234, 0.72);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail-links a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* 主框架栏 */
.header-frame__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 34px);
  min-height: 80px;
  padding-block: 14px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--ivory);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201, 164, 92, 0.65);
  border-radius: 14px 14px 14px 5px;
  background: rgba(201, 164, 92, 0.10);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.brand__line {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  line-height: 1.2;
  color: rgba(247, 243, 234, 0.52);
}

/* 主导航 */
.primary-nav {
  min-width: 0;
  margin-left: auto;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 24px);
}

.primary-nav__item {
  display: flex;
}

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: rgba(247, 243, 234, 0.74);
  white-space: nowrap;
  transition: color 0.22s ease;
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.primary-nav__link:hover {
  color: var(--ivory);
}

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

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

.primary-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.primary-nav__cta {
  display: none;
}

.header-cta {
  flex: 0 0 auto;
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(233, 216, 180, 0.35);
  border-radius: 13px;
  background: rgba(233, 216, 180, 0.06);
  color: var(--ivory);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(201, 164, 92, 0.14);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.26s ease, opacity 0.2s ease;
}

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

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--forest);
  color: rgba(247, 243, 234, 0.76);
  border-top: 1px solid rgba(201, 164, 92, 0.28);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(233, 216, 180, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 216, 180, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(circle at 16% 0%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 16% 0%, #000 0%, transparent 74%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(44px, 6.5vw, 84px) clamp(20px, 3vw, 32px);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(32px, 5vw, 88px);
  padding-bottom: clamp(32px, 4.5vw, 56px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand__line {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.10em;
  color: var(--gold);
}

.footer-brand__intro {
  margin-top: 12px;
  max-width: 40ch;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(247, 243, 234, 0.62);
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-group__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-block;
  padding-left: 0;
  border-left: 1px solid transparent;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: rgba(247, 243, 234, 0.72);
  transition: color 0.2s ease, padding-left 0.2s ease,
    border-color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ivory);
  padding-left: 10px;
  border-left-color: var(--gold);
}

.footer-links a[aria-current="page"] {
  color: var(--gold);
}

/* 联络板 */
.footer-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(26px, 4vw, 46px);
  border-top: 1px solid var(--line-dark);
}

.footer-contact__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact__title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-contact__note {
  max-width: 46ch;
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(247, 243, 234, 0.56);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.contact-item__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233, 216, 180, 0.62);
}

.contact-item__value {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: rgba(247, 243, 234, 0.88);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 底栏 */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: clamp(18px, 2.5vw, 26px);
  border-top: 1px solid var(--line-dark);
}

.footer-copy {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(247, 243, 234, 0.50);
}

.footer-icp {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 234, 0.50);
}

/* =========================================================
   滚动进度指示
   ========================================================= */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(233, 216, 180, 0.10);
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold), var(--electric));
}

/* =========================================================
   滚动显现协议
   ========================================================= */
[data-reveal] {
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(16px);
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1024px) {
  .header-frame__inner {
    flex-wrap: wrap;
  }

  .brand {
    order: 1;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: auto;
  }

  .primary-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line-dark-soft);
  }

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

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__item {
    border-bottom: 1px solid var(--line-dark-soft);
  }

  .primary-nav__link {
    display: block;
    padding: 14px 2px;
    font-size: 14px;
    letter-spacing: 0.14em;
  }

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

  .primary-nav__cta {
    display: block;
    padding: 16px 0 6px;
    border-bottom: 0;
  }

  .primary-nav__cta .btn {
    width: 100%;
  }
}

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

  .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .footer-contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 120px;
  }

  .rail-note {
    display: none;
  }

  .rail-links {
    gap: 14px;
  }

  .header-frame__inner {
    min-height: 64px;
    padding-block: 10px;
    gap: 10px;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
    font-size: 17px;
    border-radius: 12px 12px 12px 4px;
  }

  .brand__line {
    display: none;
  }

  .brand__name {
    font-size: 13.5px;
    letter-spacing: 0.10em;
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .contact-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .footer-icp {
    margin-left: 0;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }
}

/* =========================================================
   减少动效
   ========================================================= */
@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;
  }

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

  .scroll-meter__bar {
    transition: none;
  }
}
