/* ============================================================
   流光小筑 · 设计系统（2026-10-19 改版）
   参照 liuzongming.cn 的排版节奏：
     · 一屏一主题，屏之间靠留白分隔
     · 居中标题 + 灰副标题 + 一排卡片
     · 卡片无边框无阴影，图占主导
     · 全站深色 #1a1a1a + 白字 + #898989 灰 + #e65616 橙（只做点缀）
   本文件在 style.css 之后加载，只覆盖节奏与新增组件，不改子页布局类。
   ============================================================ */

/* ---------- 全局节奏 ---------- */
:root {
  --w: 1240px;
  --gap: 24px;
  --sec: 112px;
  --nav-h: 72px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

.container { max-width: var(--w); padding: 0 32px; }

/* ---------- 导航：品牌左、菜单居中、右侧留白 ---------- */
.nav {
  background: rgba(26, 26, 26, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(10px);
}
.nav-inner {
  max-width: var(--w);
  height: var(--nav-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 品牌标：两张图叠放，悬停由白切橙（避免 filter 近似色偏） */
.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 51px;
  height: 26px;
}
.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.18s ease;
}
.brand-mark img.is-accent { opacity: 0; }
.brand:hover .brand-mark img.is-accent { opacity: 1; }
.brand-name { line-height: 1; }
.nav-links {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-links a,
.nav-links .nav-more-btn {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: 4px;
  transition: color 0.18s;
}
.nav-links a:hover,
.nav-links .nav-more-btn:hover { color: var(--text); background: transparent; }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav-links a.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---------- Hero：左图右文（C 位瘦身版，整块约 270px） ----------
   左 320×200 案例图 + 右侧文字，不再堆数字汇总
   注意：不要再用 `.hero p` 这种复合选择器，权重会盖掉下面的单类样式 */
.hero {
  padding: 40px 32px 30px;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 56px;
  /* 宽度由内容决定再居中：给 960 宽会让文字区右侧空出一大块 */
  width: fit-content;
  max-width: 960px;
  margin: 0 auto;
}
/* 案例图不是装饰，是「当前这套」——可点进详情 */
.hero-shot {
  position: relative;
  display: block;
  flex: 0 0 360px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}
/* 左侧一条橙线，把图和文字分开 */
.hero-shot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  z-index: 2;
}
.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.hero-shot:hover img { transform: scale(1.04); }
.shot-tag {
  position: absolute;
  left: 13px;
  bottom: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.shot-pano {
  position: absolute;
  right: 11px;
  top: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.hero-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.hero-text h1 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero .hero-slogan {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}
.hero .hero-intro {
  font-size: 14.5px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.hero-cta a {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  padding: 10px 24px;
  border-radius: 6px;
  transition: background-color 0.18s, border-color 0.18s;
}
.hero-cta .btn-solid { background: var(--accent); color: #fff; }
.hero-cta .btn-solid:hover { background: #f06a2c; }
.hero-cta .btn-line { color: var(--text); border: 1px solid var(--border); }
.hero-cta .btn-line:hover { border-color: var(--text-3); background: var(--hover); }
.hero .hero-by {
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  margin-top: 14px;
}

/* ---------- 区块：居中标题 ---------- */
.sec { margin-bottom: var(--sec); }
.sec-head {
  text-align: center;
  margin-bottom: 44px;
}
.sec-head h2 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.sec-head p {
  font-size: 14px;
  color: var(--text-2);
}
.sec-head .sec-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.18s;
}
.sec-head .sec-more:hover { color: var(--accent); }

/* ---------- 行情概览（首屏上半） ---------- */
.market-hero {
  /* 去掉上边框：C 位与行情本是首屏同一块，切开会让两边各自显空 */
  border-bottom: 1px solid var(--border);
  padding: 30px 0 48px;
  margin-bottom: var(--sec);
}
.mh-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}
.mh-head h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.mh-head .mh-meta {
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.mh-head .mh-more {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-2);
}
.mh-head .mh-more:hover { color: var(--accent); }

.mh-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: center;
}
.mh-indexes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.mh-idx .mh-name {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.mh-idx .mh-point {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mh-idx .mh-chg {
  margin-top: 8px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.mh-idx.up .mh-point, .mh-idx.up .mh-chg { color: var(--up); }
.mh-idx.down .mh-point, .mh-idx.down .mh-chg { color: var(--down); }
.mh-idx.up .mh-spark { color: var(--up); }
.mh-idx.down .mh-spark { color: var(--down); }
.mh-idx .mh-spark { color: var(--text-3); }
.mh-spark { display: block; margin-top: 14px; width: 100%; height: 44px; opacity: 0.9; }

.mh-side { display: grid; gap: 22px; }
.mh-side-label {
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.mh-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
}
.mh-bar i { display: block; height: 100%; }
.mh-bar .b-up { background: var(--up); }
.mh-bar .b-flat { background: var(--text-3); }
.mh-bar .b-down { background: var(--down); }
.mh-breadth-nums {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.mh-breadth-nums .n-up { color: var(--up); }
.mh-breadth-nums .n-down { color: var(--down); }
.mh-breadth-nums .n-flat { color: var(--text-3); }
.mh-turnover-num {
  font-size: 26px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mh-turnover-num small {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 400;
  margin-left: 6px;
}
.mh-turnover-split {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- 案例大图带（首屏下半） ---------- */
.case-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.rail-card { display: block; }
.rail-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: #232323;
}
.rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.3s;
}
.rail-card:hover .rail-thumb img { transform: scale(1.04); opacity: 0.92; }
.rail-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.rail-cat,
.rail-title,
.rail-desc { display: block; }
.rail-cat {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.rail-title {
  margin-top: 7px;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.rail-desc {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 工具入口：极简四格 ---------- */
.tool-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.tool-cell {
  display: block;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s, background 0.2s;
}
.tool-cell:hover { border-color: #3a3a3a; background: var(--surface); }
.tool-cell .tc-name,
.tool-cell .tc-desc { display: block; }
.tool-cell .tc-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.tool-cell .tc-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ---------- 页脚：左说明 右联系 ---------- */
.footer {
  display: block;
  max-width: none;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 64px 0 40px;
  font-size: 13px;
}
.footer-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
}
.footer h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.footer p, .footer li, .footer a {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.9;
}
.footer-bottom {
  max-width: var(--w);
  margin: 48px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}
/* 旧样式给备案号设了 flex:0 0 100%（配合旧的 wrap 页脚），这里要收回 */
.footer-bottom > span,
.footer-bottom .footer-beian { flex: 0 0 auto; white-space: nowrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { height: 16px; width: auto; display: block; opacity: 0.5; transition: opacity 0.18s; }
.footer-brand:hover img { opacity: 1; }

/* ---------- 移动端 ---------- */
@media (max-width: 1024px) {
  :root { --sec: 80px; }
  .mh-body { grid-template-columns: 1fr; gap: 32px; }
  .mh-indexes { gap: 24px; }
  .mh-idx .mh-point { font-size: 30px; }
  .case-rail { grid-template-columns: repeat(2, 1fr); }
  .tool-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .nav-inner {
    height: 56px;
    padding: 0 16px;
    gap: 14px;
    flex-wrap: nowrap;
    position: relative;
  }
  .brand { font-size: 14px; flex: 0 0 auto; gap: 8px; }
  .nav-links {
    margin: 0;
    flex: 1 1 auto;
    gap: 2px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a,
  .nav-links .nav-more-btn {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 13px;
  }
  .brand-mark { width: 40px; height: 20px; }
  /* 手机上没法左右并排，图在上、文字在下，整体仍比原来的竖排矮 */
  .hero { padding: 26px 20px 22px; }
  .hero-inner { flex-direction: column; gap: 20px; }
  .hero-shot { flex: none; width: 100%; max-width: 340px; }
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 27px; margin-bottom: 8px; }
  .hero .hero-slogan { font-size: 12.5px; letter-spacing: 0.16em; margin-bottom: 12px; }
  .hero .hero-intro { font-size: 13.5px; line-height: 1.65; }
  .hero .hero-by { font-size: 11px; letter-spacing: 0.08em; margin-top: 13px; }
  .hero-cta { justify-content: center; margin-top: 16px; }
  .hero-cta a { padding: 10px 22px; font-size: 13px; }
  .sec-head h2 { font-size: 24px; }
  .market-hero { padding: 32px 0 34px; }
  .mh-head { flex-wrap: wrap; gap: 6px 10px; margin-bottom: 24px; }
  .mh-head h2 { font-size: 19px; }
  .mh-head .mh-meta { font-size: 11px; letter-spacing: 0; }
  /* 三者挤一行，放不下再整体换行，别让「完整行情」总是独占一行 */
  .mh-head .mh-more { margin-left: auto; width: auto; font-size: 12px; }
  .mh-indexes { grid-template-columns: 1fr; gap: 18px; }
  .mh-idx .mh-point { font-size: 27px; }
  .mh-idx .mh-chg { margin-top: 5px; font-size: 12.5px; }
  .mh-spark { height: 30px; margin-top: 9px; }
  .mh-side { gap: 18px; }
  .case-rail { grid-template-columns: 1fr; gap: 26px; }
  .tool-row { grid-template-columns: 1fr; gap: 12px; }
  .tool-cell { padding: 18px 18px; }
  .sec { margin-bottom: 64px; }
  .footer { padding: 44px 0 30px; }
  .footer-inner, .footer-bottom { padding: 0 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* 小屏（iPhone SE / 360px 档）：再压一档，让 5 项导航不用滚动 */
@media (max-width: 380px) {
  .nav-inner { padding: 0 12px; gap: 10px; }
  .brand { font-size: 13px; gap: 7px; }
  .brand-mark { width: 36px; height: 18px; }
  .nav-links a,
  .nav-links .nav-more-btn { padding: 6px 6px; }
  .hero-text h1 { font-size: 25px; }
  .hero .hero-intro { font-size: 13px; }
}
