/* ==========================================================================
   主题侧静态页面 · 联系我们 / 推广合作
   --------------------------------------------------------------------------
   ★ 路由：由 ThemePages 插件做短链转发（插件只转发地址，不含内容与样式）：
       /about      → Pages/About.html
       /affiliate  → Pages/Affiliate.html
     为什么需要插件：核心 User::theme() 只认主题 Config.php THEME 里
     登记过的 8 个键，URL 别名硬编码在 kernel/Kernel.php，主题没有
     注册路由的入口 —— 想要干净短链只能由一个插件把地址转发进来。

   ★ 内容写死在模板里（2026-10-16 定案），本文件只管样式。

   ★ 基础骨架（.aff-hero / .aff-card / .aff-grid / .aff-feat / .aff-stats /
     .aff-cta / .aff-btn）来自原插件落地页，2026-10-16 已整体迁入主题。
     全部使用设计令牌（--nv-*），自动跟随深色模式。

   ★ 类名一律 aff- / about- 前缀，不与主题 .nv-* 冲突。
   ========================================================================== */

/* ── 页面底色：比纯白略灰，卡片才"浮"得起来 ─────────────────────────── */
.aff {
  background: var(--nv-page);
  padding-bottom: var(--nv-space-8, 48px);
}

/* ── 头部 ──────────────────────────────────────────────────────────── */
.aff-hero {
  padding: 56px 24px 40px;
  text-align: center;
  /* ★ 2026-10-16 修：原插件版残留 `var(--nv-soft) 100%)`，
     多出的 `100%)` 让整条 background 声明无效（浏览器直接丢弃），
     表现为该区块没有浅底。迁移时一并修正。 */
  background: var(--nv-soft);
  border-radius: var(--nv-radius-lg, 20px);
  margin-bottom: 24px;
}
.aff-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--nv-text-primary);
}
.aff-hero__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--nv-text-muted);
}

/* ── 内容宽度 ──────────────────────────────────────────────────────── */
.aff-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 页面内的卡片垂直间距（模板直接用 <main class="aff"> 承载时生效） */
.aff > .aff-card,
.aff > .aff-cta {
  margin-top: 24px;
}

/* ── 卡片 ──────────────────────────────────────────────────────────── */
.aff-card {
  padding: 32px 36px;
  border-radius: 20px;
  background: var(--nv-elevated);
  box-shadow: var(--nv-shadow-1);
}

/* 标题左侧蓝色竖条（视觉关键元素） */
.aff-card__title {
  position: relative;
  margin: 0 0 24px;
  padding-left: 16px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--nv-text-primary);
}
.aff-card__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 26px;
  border-radius: 3px;
  background: var(--nv-brand-solid);
}

.aff-card__desc {
  margin: -12px 0 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--nv-text-muted);
}

/* ── 优势网格（三列）────────────────────────────────────────────────── */
.aff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 900px) {
  .aff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .aff-grid { grid-template-columns: minmax(0, 1fr); }
}

.aff-feat {
  padding: 26px 22px 24px;
  border: 1px solid var(--nv-border-soft);
  border-radius: 14px;
  background: var(--nv-soft);
  text-align: center;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.aff-feat:hover {
  border-color: var(--nv-border);
  background: var(--nv-elevated);
  transform: translateY(-2px);
}

/* 圆形浅底图标 */
.aff-feat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--nv-brand-softer);
  color: var(--nv-brand-solid);
}
.aff-feat__icon .material-icons-outlined { font-size: 22px; }

.aff-feat__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--nv-text-primary);
}

.aff-feat__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--nv-text-muted);
}

/* ── 佣金比例 ──────────────────────────────────────────────────────── */
.aff-rates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 600px) {
  .aff-rates { grid-template-columns: minmax(0, 1fr); }
}

.aff-rate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  border-radius: 14px;
  background: var(--nv-soft);
  border: 1px solid var(--nv-border-soft);
}

.aff-rate__lv {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--nv-brand-soft);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--nv-brand-solid);
}

.aff-rate__num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--nv-brand-ink);
}
.aff-rate__num > i {
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  margin-left: 1px;
  color: var(--nv-brand);
}

.aff-rate__desc {
  font-size: 12.5px;
  color: var(--nv-text-muted);
}

.aff-rates__note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--nv-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--nv-text-muted);
}
.aff-rates__note .material-icons-outlined { font-size: 16px; color: var(--nv-text-faint); flex: 0 0 auto; }

/* ── 数据亮点 ──────────────────────────────────────────────────────── */
.aff-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 600px) {
  .aff-stats { grid-template-columns: minmax(0, 1fr); }
}
.aff-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px;
  border-radius: 14px;
  background: var(--nv-soft);
  border: 1px solid var(--nv-border-soft);
}
.aff-stat__num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--nv-brand-ink);
  letter-spacing: -.02em;
}
.aff-stat__label { font-size: 12.5px; color: var(--nv-text-muted); }

/* ── CTA ───────────────────────────────────────────────────────────── */
.aff-cta {
  padding: 44px 36px;
  border-radius: 20px;
  background: var(--nv-elevated);
  box-shadow: var(--nv-shadow-1);
  text-align: center;
}

.aff-cta__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--nv-text-primary);
}

.aff-cta__text {
  max-width: 520px;
  margin: 0 auto 26px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--nv-text-muted);
}

/* 主按钮：蓝色药丸，带箭头
   ★★ 2026-10-16 修两处（深色模式下按钮文字看不见 / hover 无反馈）：

   ① 文字色原本写成 var(--nv-elevated)。那是【卡片底色】令牌，不是
      【实心底上的文字色】：浅色 #ffffff 碰巧正确，深色却是 #1c1c1e（近黑），
      压在 #1d4ed8 深蓝底上对比度仅 2.54:1，远低于 WCAG AA 4.5:1。
      实心品牌按钮的文字色有专用令牌 --nv-text-on-solid，
      它在深浅两套主题里【都是白】，正是这里需要的语义 → 6.70:1。

   ② hover 原本写 background: var(--nv-brand-ink)。浅色模式下
      --nv-brand-ink 与 --nv-brand-solid 同为 #1d4ed8，等于 hover 时
      背景【一个像素都没变】，只剩 1px 上浮，反馈几乎察觉不到。
      改用 filter: brightness() —— 与具体色值无关，
      深浅两套主题都能保证「鼠标压上去」有明确回应。 */
.aff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--nv-brand-solid);
  /* ★ 这个 fallback（#fff）不能省。
     自定义属性一旦【缺失】，整条 color 声明会变成 "invalid at
     computed-value time"；color 属可继承属性 → 直接回退成 inherit，
     于是继承到页面深色正文色（#1d1d1f）压在 #1d4ed8 深蓝底上，
     按钮看起来是空的。写上 fallback，即使令牌没加载上也是白字。 */
  color: var(--nv-text-on-solid, #fff);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--nv-shadow-brand);
  transition: background-color .18s ease, transform .18s ease,
              box-shadow .18s ease, filter .18s ease;
}
.aff-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.aff-btn:active { transform: translateY(0); filter: brightness(.96); }
.aff-btn .material-icons-outlined {
  font-size: 18px;
  transition: transform .18s ease;
}
.aff-btn:hover .material-icons-outlined { transform: translateX(3px); }

.aff-btn--ghost {
  background: var(--nv-elevated);
  color: var(--nv-text-secondary);
  border: 1px solid var(--nv-border);
  box-shadow: none;
}
/* ghost 是浅底按钮，brightness 提亮只会让它更接近白色、看不出变化，
   所以这里显式关掉主按钮那套 hover 处理，只保留底色/文字的切换。 */
.aff-btn--ghost:hover {
  background: var(--nv-page);
  color: var(--nv-text-primary);
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ══════════════════════════════════════════════════════════════════════
   联系我们页专属（/about）
   ══════════════════════════════════════════════════════════════════════ */

/* ── 店铺简介（富文本容器）──────────────────────────────────────────── */
.about-prose {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--nv-text-secondary);
}
.about-prose p { margin: 0 0 1em; }
.about-prose p:last-child { margin-bottom: 0; }
.about-prose :where(h2, h3, h4) {
  margin: 1.4em 0 .6em;
  color: var(--nv-text-primary);
  font-weight: var(--nv-weight-bold);
  line-height: 1.4;
}
.about-prose :where(h2) { font-size: 18px; }
.about-prose :where(h3) { font-size: 16px; }
.about-prose :where(ul, ol) { margin: 0 0 1em; padding-left: 1.4em; }
.about-prose li { margin-bottom: .4em; }
.about-prose a { color: var(--nv-brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.about-prose :where(strong, b) { color: var(--nv-text-primary); font-weight: var(--nv-weight-medium); }
.about-prose :where(img) { max-width: 100%; height: auto; border-radius: var(--nv-radius-md); }
.about-prose :where(blockquote) {
  margin: 1em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--nv-border-brand);
  background: var(--nv-brand-softer);
  border-radius: 0 var(--nv-radius-md) var(--nv-radius-md) 0;
  color: var(--nv-text-secondary);
}
.about-prose :where(code) {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--nv-soft);
  font-family: var(--nv-mono);
  font-size: .92em;
}

/* ── 服务承诺：固定一行三格（1~2 条也不拉伸）────────────────────────── */
.about-promises.aff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.about-promise {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--nv-text-secondary);
}

/* ── 成绩：固定一行三格（覆盖 .aff-stats 的 2 列）──────────────────── */
.about-stats.aff-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ── 联系方式卡片 ──────────────────────────────────────────────────── */
.about-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.about-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--nv-border-soft);
  border-radius: var(--nv-radius-md);
  background: var(--nv-soft);
  color: var(--nv-text-primary);
  font-size: 14px;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.about-contact:hover {
  border-color: var(--nv-border-brand);
  background: var(--nv-brand-softer);
  transform: translateY(-1px);
}
.about-contact__ico {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--nv-radius-chip, 10px);
  background: var(--nv-brand-soft);
  color: var(--nv-brand-ink);
}
.about-contact__ico .material-icons-outlined { font-size: 18px; }
.about-contact__name {
  flex: 1;
  min-width: 0;
  font-weight: var(--nv-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.about-contact__arrow {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--nv-text-faint);
  transition: transform .18s ease, color .18s ease;
}
.about-contact:hover .about-contact__arrow {
  color: var(--nv-brand-ink);
  transform: translateX(2px);
}

/* ── 卡内「去看看」链接 ────────────────────────────────────────────── */
.aff-feat__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: var(--nv-weight-medium);
  color: var(--nv-brand-ink);
}
.aff-feat__link .material-icons-outlined { font-size: 15px; }
.aff-feat__link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── 窄屏 ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* 三格 → 窄屏降为单列，避免每格过窄文字挤成一条 */
  .about-stats.aff-stats { grid-template-columns: minmax(0, 1fr); }
  .about-promises.aff-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .about-contacts { grid-template-columns: 1fr; }
  .about-prose { font-size: 14px; }
}

@media (max-width: 640px) {
  .aff-hero { padding: 40px 20px 28px; }
  .aff-card { padding: 24px 20px; border-radius: 16px; }
  .aff-card__title { font-size: 20px; }
  .aff-cta { padding: 32px 20px; border-radius: 16px; }
  .aff-btn { width: 100%; }
}
