/* ============================================================
   桥云品牌组件样式 brand.css v1.7（2026-08-24 崔杨定：品牌色回退旧蓝红）
   版式A：图形商标左 ＋ 文字右，中英文并排，文字=图形×0.618
   字体：Inter SemiBold(600) ＋ 思源黑体 Medium(500)
   色板（旧公众号运营规则）：深底 #0A1F36 · 主深蓝 #1B3A5C ·
        中蓝 #0F2B47 · 钢蓝 #2980B9 · 品牌红 #E53E3E

   v1.7 变更：品牌色由图形商标提取色回退为旧蓝红（旧公众号运营规则色板）；
   文字商标英文用旧蓝渐变（#0A1F36→#1B3A5C），中文"桥云"红字不渐变（纯色 #E53E3E）；
   字重 600/500 与 0.618 比例不变。
   ============================================================ */

/* 字体自托管（国内环境推荐；也可改用在线加载见交付包3.2） */
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("fonts/NotoSansCJKsc-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("fonts/NotoSansCJKsc-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("fonts/NotoSansCJKsc-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --brand-font-en: "Inter", "Manrope", "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --brand-font-cn: "Source Han Sans SC", "Noto Sans CJK SC", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 图形商标尺寸：页面使用处改此变量即可（40px 页头 / 120~200px 登录首屏）
     文字字号在使用处实时计算 = 当前图形尺寸 × 0.618，随图形同步缩放 */
  --brand-graphic-size: 40px;

  /* ===== 品牌色（旧蓝红，崔杨 2026-08-24 定） =====
     文字商标英文：旧蓝渐变 #0A1F36 → #1B3A5C
     文字商标中文"桥云"：纯色红 #E53E3E（不渐变） */
  --brand-blue-grad: linear-gradient(135deg, #0A1F36 0%, #1B3A5C 100%);

  /* 文字商标：纯色（英文渐变的 fallback；中文恒为纯色） */
  --brand-en-fallback: #1B3A5C;  /* 主深蓝 */
  --brand-cn-fallback: #E53E3E;  /* 品牌红 */
}

/* 图形 + 文字 组合（版式A） */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  text-decoration: none;
  color: var(--c-ink, #1a2733);
  white-space: nowrap;
}
.brand .graphic {
  height: var(--brand-graphic-size);
  width: var(--brand-graphic-size);
  min-height: var(--brand-graphic-size);
  min-width: var(--brand-graphic-size);
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}
.brand .graphic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

/* 中英文并排（同一水平线，baseline 对齐）
   文字字号 = 当前图形尺寸 × 0.618，在使用处实时计算，随图形同步变化 */
.brand .mark,
.mark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--brand-font-en);
  font-weight: 600;
  font-size: calc(var(--brand-graphic-size) * 0.618);
  letter-spacing: -0.01em;
  line-height: 1.25; /* v1.5：由 1 提升，容纳英文 descender */
}

/* 英文 BridgeCloud：纯色 fallback（默认可见） */
.mark .en {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.25;
  color: var(--brand-en-fallback);
}
/* 桥云：纯色 fallback（默认可见） */
.mark .cn {
  font-family: var(--brand-font-cn);
  font-weight: 500;
  margin-left: 0.35em;
  letter-spacing: 0;
  font-feature-settings: "palt" off;
  line-height: 1.25;
  color: var(--brand-cn-fallback);
}

/* 仅英文 BridgeCloud 启用旧蓝渐变（background-clip:text）；
   不支持（部分手机 WebKit / 微信内置浏览器）则保持纯色 #1B3A5C；
   中文"桥云"恒为纯色 #E53E3E，不渐变 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .mark .en {
    background: var(--brand-blue-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
