/* =========================================================
   美建金业 · 基础样式（设计变量 / 重置 / 公共组件 / 头部 / 页脚）
   设计稿基准：桌面 1920px，内容容器 1280px（左右各 48px 内边距）
   ========================================================= */

:root {
  /* 颜色 */
  --ink: #171931;
  --primary: #5341cd;
  --primary-2: #7658f8;
  --primary-3: #9e8cfc;
  --violet: #6c5ce7;
  --s700: #334155;
  --s600: #475569;
  --s500: #64748b;
  --s400: #94a3b8;
  --s300: #cbd5e1;
  --s200: #e2e8f0;
  --s100: #f1f5f9;
  --bg: #f8f9fe;
  --i50: #eef2ff;
  --i100: #e0e7ff;
  --i200: #c7d2fe;
  --green: #10b981;
  --green-6: #059669;
  --green-50: #ecfdf5;
  --rose: #f43f5e;
  --rose-6: #e11d48;
  --rose-50: #fff1f2;
  --amber: #d97706;
  --amber-50: #fffbeb;
  --gold: #fcd34d;
  --gold-2: #f2ca50;
  --gold-3: #ffdc80;

  --grad-hero: linear-gradient(146deg, #745df9 0%, #6853e8 45%, #5942de 100%);
  --shadow-card: 0 16px 36px -6px rgba(83, 65, 205, .08), 0 4px 16px -2px rgba(0, 0, 0, .04);
  --shadow-btn: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --shadow-btn-lg: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
  --shadow-indigo: 0 4px 6px -1px rgba(99, 102, 241, .2), 0 2px 4px -2px rgba(99, 102, 241, .2);

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --pill: 9999px;

  --font-cn: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-en: "Plus Jakarta Sans", var(--font-cn);

  --container: 1280px;
  --gutter: 48px;
  --header-h: 100px;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-cn);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
input { border: 0; outline: 0; background: transparent; }
table { border-collapse: collapse; }
.en { font-family: var(--font-en); }

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container--wide { max-width: 1350px; }
.container--lg { max-width: 1416px; }
.container--xl { max-width: 1446px; }
.container--full { max-width: 1920px; }
.container--narrow { max-width: 896px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--pill);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--lg { padding: 14px 28px; font-size: 20px; }
.btn--md { padding: 13px 25px; font-size: 20px; font-weight: 600; }
.btn--sm { padding: 10px 20px; font-size: 12px; font-weight: 600; }
.btn--white { background: #fff; color: var(--primary); box-shadow: var(--shadow-btn-lg); }
.btn--glass {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .22); }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.btn--dark:hover { background: #23264a; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.btn--primary:hover { background: #4837b8; }
.btn--outline { background: #fff; border: 1px solid var(--s200); color: var(--s700); padding: 9px 17px; font-size: 12px; font-weight: 600; }
.btn--outline:hover { border-color: var(--s300); }
.btn--soft { background: var(--bg); border: 1px solid rgba(226, 232, 240, .7); color: var(--ink); padding: 11px; font-size: 12px; font-weight: 600; gap: 4px; }
.btn--soft:hover { background: var(--i50); }

/* ---------- 标签 / 药丸 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--pill);
  background: var(--i50);
  color: var(--primary);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.tag--cn { font-family: var(--font-cn); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot--lg { width: 8px; height: 8px; }
.dot--green { background: #6ee7b7; }
.dot--gold { background: var(--gold); }

.pill-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 17px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .3px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pill-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(226, 232, 240, .6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- 卡片 / 图标框 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--s100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card--soft { background: var(--bg); }
.ibox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(224, 231, 255, .7);
}
.ibox--40 { width: 40px; height: 40px; border-radius: var(--r-sm); }
.ibox--36 { width: 36px; height: 36px; border-radius: var(--r-sm); }
.ibox--32 { width: 32px; height: 32px; border-radius: var(--r-sm); }
.ibox--56 { width: 56px; height: 56px; }
.ibox--indigo { background: var(--i50); }
.ibox--amber { background: var(--amber-50); }
.ibox--violet { background: #f5f3ff; }
.ibox--green { background: var(--green-50); }
.ibox--primary { background: var(--primary); box-shadow: var(--shadow-indigo); }
.ibox--grad { background: linear-gradient(45deg, #5341cd 0%, #7658f8 100%); box-shadow: var(--shadow-indigo); }

/* ---------- 章节标题 ---------- */
.sec-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 672px;
  margin: 0 auto;
  text-align: center;
}
.sec-head--left { align-items: flex-start; text-align: left; margin: 0; gap: 8px; }
.sec-head h2 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -.75px;
  line-height: 1.2;
}
.sec-head p { font-size: 14px; line-height: 1.625; color: var(--s500); }

/* ---------- 渐变 Hero 公共 ---------- */
.hero-bg {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  color: #fff;
}
.hero-bg__glow { position: absolute; inset: 0; opacity: .35; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; }
.glow--1 { width: 720px; height: 360px; left: 50%; top: -96px; transform: translateX(-50%); background: #fff; filter: blur(65px); }
.glow--2 { width: 420px; height: 420px; right: 40px; bottom: 40px; background: #9e8cfc; filter: blur(70px); }
.glow--3 { width: 320px; height: 320px; left: 40px; top: 243px; background: #381dbb; filter: blur(55px); }

/* =========================================================
   头部导航
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(238, 242, 255, .8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 2400px;
  margin: 0 auto;
  padding: 0 48px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
}
.brand__logo img { width: 32px; height: 32px; }
.brand__name { font-size: 20px; font-weight: 700; letter-spacing: -.4px; line-height: 22px; white-space: nowrap; }
.brand__divider { width: 1px; height: 29px; background: #bebebe; }
.brand__cgse { width: 66px; height: 32px; object-fit: cover; object-position: center; }
.brand__cert {
  width: 85px;
  font-size: 9px;
  line-height: 12px;
  font-weight: 500;
  letter-spacing: .275px;
  color: var(--s400);
}
.nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  padding: 7px;
  background: #f3f4fa;
  border: 1px solid rgba(226, 232, 240, .6);
  border-radius: var(--pill);
}
.nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 31px;
  border-radius: var(--pill);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: var(--s600);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--primary); }
.nav a.is-active { background: var(--primary); color: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3f4fa;
  border: 1px solid rgba(226, 232, 240, .6);
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { left: 0; top: -6px; }
.menu-toggle span::after { left: 0; top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* 行情快讯条 */
.ticker {
  background: rgba(246, 246, 246, .8);
  border-bottom: 1px solid rgba(238, 242, 255, .8);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ticker__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 48px 11px;
}
.ticker__src { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--s500); white-space: nowrap; }
.ticker__src b { font-size: 11px; font-weight: 700; letter-spacing: .55px; color: var(--primary); }
.ticker__live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.ticker__sep { color: var(--s300); font-family: var(--font-en); }
.quotes { display: flex; align-items: center; gap: 32px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.quotes::-webkit-scrollbar { display: none; }
.quote { display: flex; align-items: center; gap: 6px; font-family: var(--font-en); font-size: 12px; line-height: 16px; white-space: nowrap; }
.quote__name { font-weight: 500; color: var(--s600); }
.quote__name.cn { font-family: var(--font-cn); }
.quote__px { font-weight: 700; }
.quote__chg { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.quote__px.up { color: var(--green-6); }
.quote__px.down { color: var(--rose); }
.quote__chg.up { color: var(--green-6); background: var(--green-50); }
.quote__chg.down { color: var(--rose-6); background: var(--rose-50); }
.quote__chg.flat { color: #4f46e5; background: var(--i50); font-family: var(--font-cn); }

/* =========================================================
   页脚（沿用 mjcfd.com 官网页脚：深灰底、居中灰字）
   ========================================================= */
.site-footer {
  background: #444;
  color: #aaa;
  text-align: center;
  font-size: 12px;
  line-height: 30px;
  padding: 25px 0;
}
.site-footer a { color: #aaa; transition: color .15s; }
.site-footer a:hover { color: #fff; }
.footer__inner { max-width: 1150px; margin: 0 auto; padding: 0 24px; }
.footer__nav { font-size: 12px; }
.footer__nav a { font-size: 14px; margin: 0 15px; white-space: nowrap; }
.footer__nav i { font-style: normal; }
.footer__info p { margin: 0; }
.footer__risk { max-width: 1000px; margin: 6px auto 0 !important; line-height: 22px; }

/* 联系我们弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(23, 25, 49, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 28px;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 24px 60px -12px rgba(23, 25, 49, .35);
  color: var(--s600);
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}
.modal__title { margin-bottom: 8px; font-size: 20px; font-weight: 700; color: var(--ink); }
.modal__box a { color: var(--primary); }
.modal__close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--s400);
}
.modal__close:hover { background: var(--s100); color: var(--ink); }
/* 图片弹窗（合约细则）：宽版、内容区可滚动 */
.modal__box--img { max-width: 1400px; padding: 52px 16px 16px; overflow: auto; max-height: calc(100vh - 32px); }
.modal__img { display: block; width: 100%; object-fit: contain; border-radius: var(--r-sm); background: var(--s50, #f6f7fb); cursor: zoom-in; }
.modal__box--img.is-loading .modal__img { min-height: 240px; }
/* 点图放大到原尺寸，在弹窗内横向 / 纵向滚动查看 */
.modal__box--img.is-zoom .modal__img { width: auto; max-width: none; cursor: zoom-out; }

/* =========================================================
   公共 CTA 横幅
   ========================================================= */
.cta { background: var(--bg); padding: 64px 0; }
.cta__banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 56px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(147deg, #745df9 0%, #6853e8 45%, #5942de 100%);
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, .2), 0 8px 10px -6px rgba(99, 102, 241, .2);
  color: #fff;
}
.cta__glow { position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .1); filter: blur(32px); pointer-events: none; }
.cta__copy { position: relative; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.cta__tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .15);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  line-height: 16px;
  backdrop-filter: blur(2px);
}
.cta__title { padding-top: 8px; font-size: 48px; font-weight: 700; line-height: 36px; }
.cta--sm .cta__title { font-size: 30px; line-height: 36px; }
.cta__desc { max-width: 576px; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .85); white-space: nowrap; /* 设计稿：单行不折 */ }
.cta__actions { position: relative; display: flex; gap: 14px; flex-shrink: 0; }
.cta__actions .btn { height: 72px; padding: 12px 28px; font-size: 20px; box-shadow: var(--shadow-btn); }
.cta__actions .btn--white { min-width: 273px; }
.cta__actions .btn--dark { min-width: 282px; font-weight: 600; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 300;
  transform: translate(-50%, 12px);
  padding: 12px 20px;
  border-radius: var(--pill);
  background: rgba(23, 25, 49, .92);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 12px 32px -8px rgba(23, 25, 49, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 工具类 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.text-primary { color: var(--primary); }
.text-green { color: var(--green-6); }
.text-amber { color: var(--amber); }
.text-violet { color: var(--primary-2); }
.text-blue { color: #2563eb; }
.text-rose { color: var(--rose-6); }

/* =========================================================
   头部 / 页脚 / CTA 响应式
   ========================================================= */
@media (max-width: 1439px) {
  .nav a { padding: 0 20px; }
  .brand__cert { display: none; }
}
@media (max-width: 1199px) {
  :root { --header-h: 72px; --gutter: 24px; }
  .header-bar { padding: 0 24px; }
  .brand__divider, .brand__cgse { display: none; }
  .menu-toggle { display: block; }
  .header-actions .btn--outline { display: none; }
  .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + 1px);
    z-index: 5;
    transform: none;
    flex-direction: column;
    padding: 12px 16px;
    border-radius: 0 0 20px 20px;
    border-top: 0;
    background: #fff;
    box-shadow: 0 24px 40px -12px rgba(23, 25, 49, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { height: 48px; padding: 0 16px; border-radius: 12px; }
  .ticker__inner { padding: 8px 24px; }
  .ticker__src span { display: none; }
  .ticker__src .ticker__sep { display: none; }
  .quotes { gap: 24px; flex: 1; justify-content: flex-end; }
  .cta__banner { flex-direction: column; align-items: flex-start; padding: 40px; }
  .cta__title { font-size: 36px; }
  .cta__actions { flex-wrap: wrap; }
  .cta__actions .btn { height: 60px; min-width: 0 !important; padding: 0 28px; font-size: 18px; }
}
/* 较窄桌面收起快讯说明，为黄金、白银报价留出空间。 */
@media (max-width: 1279px) {
  .ticker__src span { display: none; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .header-bar { padding: 0 16px; }
  .header-actions .btn--sm { padding: 9px 14px; }
  .ticker__inner { padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
  .ticker__src { width: 100%; }
  .quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 0 0 100%; gap: 12px; overflow: visible; }
  .quote { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 4px 6px; min-width: 0; }
  .quote__name { grid-column: 1 / -1; text-align: center; font-size: 11px; }
  .quote__px { text-align: right; }
  .quote__chg { text-align: center; }
  .site-footer { padding: 20px 0; line-height: 26px; }
  .footer__inner { padding: 0 16px; }
  .footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
  .footer__nav a { margin: 0 6px; }
  .footer__risk { line-height: 20px; text-align: left; }
  .cta { padding: 40px 0; }
  .cta__banner { padding: 28px 20px; border-radius: 20px; }
  .cta__title { font-size: 26px; line-height: 1.2; }
  .cta__desc { white-space: normal; }
  .cta--sm .cta__title { font-size: 24px; line-height: 1.3; }
  .cta__actions { width: 100%; flex-direction: column; gap: 10px; }
  .cta__actions .btn { width: 100%; height: 52px; font-size: 16px; }
}
