/* ==========================================================================
   Happyview 设计系统层 — 排版与配色
   方向：Industrial Precision / 工业精密 + 编辑式排版
   作用域：首页 body.hvp-redesign-home 与子页 .hvp-root
   说明：站点累积了 20+ 插件的硬编码样式，且 theme.css 用
         body[data-theme="dark"] h1..h6 { ... !important } 压制，
         故本层统一提到 body[data-theme] 层级并配合 !important 取胜。
   例外：橙色按钮（.hvp-primary / .hvp-v2-btn / .hvp-shell-quote）为白字，不参与改色。
   ========================================================================== */

:root {
  /* 字体：Archivo 展示字 + Public Sans 正文 + Noto Sans SC 中文 */
  --hv-font-display: "Archivo", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --hv-font-body: "Public Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 字阶：1.25 模块化比例 */
  --hv-fs-display: clamp(2.25rem, 6vw, 3.85rem);
  --hv-fs-h2: clamp(1.75rem, 3.4vw, 2.6rem);
  --hv-fs-h3: clamp(1.2rem, 1.9vw, 1.45rem);
  --hv-fs-h4: clamp(1.05rem, 1.4vw, 1.15rem);
  --hv-fs-body: clamp(1rem, 1.1vw, 1.08rem);
  --hv-fs-small: 0.9375rem;
  --hv-fs-kicker: 0.8125rem;

  /* 行高：中文需要比拉丁文更大的行距 */
  --hv-lh-display: 1.22;
  --hv-lh-h2: 1.28;
  --hv-lh-h3: 1.36;
  --hv-lh-body: 1.75;
  --hv-lh-small: 1.7;

  /* 字距 */
  --hv-ls-display: -0.015em;
  --hv-ls-h2: -0.01em;
  --hv-ls-body: 0.015em;
  --hv-ls-kicker: 0.14em;

  /* 配色：暖近黑（非纯黑）+ 单一橙色强调 */
  --hv-ink: #1f1e1c;
  --hv-ink-soft: #35322e;
  --hv-body: #4a4844;
  --hv-muted: #78746e;
  --hv-accent: #ee7800;
  --hv-bg: #faf9f7;
  --hv-surface: #ffffff;
  --hv-band: #f5f3f0;
}

/* --------------------------------------------------------------------------
   基础排版
   -------------------------------------------------------------------------- */

body[data-theme].hvp-redesign-home,
body[data-theme] .hvp-root.hvp-root {
  font-family: var(--hv-font-body) !important;
  font-size: var(--hv-fs-body) !important;
  line-height: var(--hv-lh-body) !important;
  letter-spacing: var(--hv-ls-body);
  color: var(--hv-body) !important;
  background: var(--hv-bg);
}

body[data-theme].hvp-redesign-home.hvp-redesign-home h1,
body[data-theme] .hvp-root.hvp-root h1 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-display) !important;
  line-height: var(--hv-lh-display) !important;
  letter-spacing: var(--hv-ls-display) !important;
  font-weight: 700 !important;
  color: var(--hv-ink) !important;
  text-wrap: balance;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home h2,
body[data-theme] .hvp-root.hvp-root h2 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-h2) !important;
  line-height: var(--hv-lh-h2) !important;
  letter-spacing: var(--hv-ls-h2) !important;
  font-weight: 700 !important;
  color: var(--hv-ink) !important;
  text-wrap: balance;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home h3,
body[data-theme] .hvp-root.hvp-root h3 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-h3) !important;
  line-height: var(--hv-lh-h3) !important;
  font-weight: 700 !important;
  color: var(--hv-ink) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home h4,
body[data-theme] .hvp-root.hvp-root h4 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-h4) !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  color: var(--hv-ink-soft) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home p,
body[data-theme].hvp-redesign-home.hvp-redesign-home li,
body[data-theme].hvp-redesign-home.hvp-redesign-home figcaption,
body[data-theme] .hvp-root.hvp-root p,
body[data-theme] .hvp-root.hvp-root li,
body[data-theme] .hvp-root.hvp-root figcaption {
  font-family: var(--hv-font-body) !important;
  font-size: var(--hv-fs-body) !important;
  line-height: var(--hv-lh-body) !important;
  letter-spacing: var(--hv-ls-body);
  color: var(--hv-body) !important;
}

body[data-theme] .hvp-root.hvp-root strong,
body[data-theme].hvp-redesign-home.hvp-redesign-home strong {
  color: var(--hv-ink) !important;
  font-weight: 600;
}

/* 数字：等宽对齐，工业仪表感 */
.hvp-proof-row strong,
.hvp-v2-stats strong,
.hvp-v2-stats span,
.hvp-contact-cards strong,
.hvp-workshop-item span {
  font-variant-numeric: tabular-nums;
  font-family: var(--hv-font-display);
}

/* --------------------------------------------------------------------------
   配色：kicker 收成单一橙，正文与次要信息分档
   -------------------------------------------------------------------------- */

body[data-theme] .hvp-kicker,
body[data-theme] .hvp-v2-kicker,
body[data-theme] .hvp-section-head > span,
body[data-theme] .hvp-faq-index > span {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-kicker) !important;
  font-weight: 700 !important;
  letter-spacing: var(--hv-ls-kicker) !important;
  text-transform: uppercase;
  color: var(--hv-accent) !important;
}

body[data-theme] .hvp-proof-row article strong,
body[data-theme] .hvp-contact-cards article strong {
  font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
  font-weight: 700;
  color: var(--hv-ink) !important;
}

body[data-theme] .hvp-proof-row article span,
body[data-theme] .hvp-contact-cards article span {
  font-size: var(--hv-fs-small) !important;
  line-height: var(--hv-lh-small) !important;
  color: var(--hv-muted) !important;
}

body[data-theme] .hvp-faq-item summary {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-h4) !important;
  font-weight: 600;
  color: var(--hv-ink) !important;
}

body[data-theme] .hvp-faq-item p {
  color: var(--hv-body) !important;
}

body[data-theme] .hvp-faq-index a {
  font-size: var(--hv-fs-small) !important;
  color: var(--hv-body) !important;
}

body[data-theme] .hvp-faq-index a:hover {
  color: var(--hv-accent) !important;
}

body[data-theme] .hvp-v2-link {
  color: var(--hv-accent) !important;
  font-weight: 600;
}

/* 导航 */
body[data-theme] .hvp-shell-menu a,
body[data-theme] .hvp-mobile-menu__panel a {
  font-family: var(--hv-font-body);
  font-size: var(--hv-fs-small) !important;
  color: var(--hv-body) !important;
}

body[data-theme] .hvp-shell-menu a.is-active,
body[data-theme] .hvp-mobile-menu__panel a.is-active {
  color: var(--hv-accent) !important;
}

/* --------------------------------------------------------------------------
   背景节奏：暖白底 + 交替区块，打破一白到底
   -------------------------------------------------------------------------- */

body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-video-proof,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-quality,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-certifications,
body[data-theme] .hvp-factory-gallery {
  background: var(--hv-band) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-capabilities,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-process {
  background: var(--hv-surface) !important;
}

/* 首页 hero：原规则 :is(body.home) .hvp-v2-hero h1 特异性极高，这里点名覆盖 */
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-hero h1,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-hero__copy h1 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-display) !important;
  line-height: var(--hv-lh-display) !important;
  letter-spacing: var(--hv-ls-display) !important;
  font-weight: 700 !important;
  color: var(--hv-ink) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-hero p,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2-hero__copy p {
  font-size: var(--hv-fs-body) !important;
  line-height: var(--hv-lh-body) !important;
  color: var(--hv-body) !important;
}

/* hero H1 兜底：复刻原规则的选择器形状 + 字面色值，靠更晚的加载顺序取胜 */
body .hvp-v2 .hvp-v2-hero h1,
:is(body.page-id-2348, body.home) .hvp-v2 .hvp-v2-hero h1,
body[data-theme].hvp-redesign-home .hvp-v2-hero h1,
body[data-theme].hvp-redesign-home .hvp-v2-hero__copy h1 {
  color: #1f1e1c !important;
}

/* Tailwind 灰阶工具类：站点用 text-gray-800 等技术债硬写标题色，这里统一回收 */
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-900"],
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-800"],
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-700"] {
  color: var(--hv-ink) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-600"],
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-500"] {
  color: var(--hv-body) !important;
}

body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-root [class*="text-gray-400"] {
  color: var(--hv-muted) !important;
}

/* --------------------------------------------------------------------------
   站点页脚：全站统一，深色收口（暖近黑 #1F1E1C，非纯黑）
   -------------------------------------------------------------------------- */

.hvp-site-footer {
  --hv-footer-fg: #e8e4dc;
  --hv-footer-muted: #a49e94;
  --hv-footer-line: rgba(232, 228, 220, 0.12);
  font-family: var(--hv-font-body);
  background: var(--hv-ink);
  color: var(--hv-footer-fg);
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem) 0;
}

.hvp-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.hvp-footer-logo {
  font-family: var(--hv-font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
}

.hvp-footer-tagline {
  margin: 0.5rem 0 0;
  font-family: var(--hv-font-display);
  font-size: var(--hv-fs-kicker);
  font-weight: 700;
  letter-spacing: var(--hv-ls-kicker);
  text-transform: uppercase;
  color: var(--hv-accent);
}

.hvp-footer-desc {
  margin: 1rem 0 0;
  max-width: 46ch;
  font-size: var(--hv-fs-small);
  line-height: var(--hv-lh-small);
  color: var(--hv-footer-muted);
}

.hvp-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  border-radius: 2px;
  background: var(--hv-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: var(--hv-fs-small);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hvp-footer-cta:hover {
  background: #d56a00;
  color: #ffffff;
  transform: translateY(-1px);
}

.hvp-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.hvp-footer-col h4 {
  margin: 0 0 0.75rem;
  font-family: var(--hv-font-display);
  font-size: var(--hv-fs-kicker);
  font-weight: 700;
  letter-spacing: var(--hv-ls-kicker);
  text-transform: uppercase;
  color: var(--hv-footer-fg);
}

.hvp-footer-col a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--hv-fs-small);
  color: var(--hv-footer-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hvp-footer-col a:hover {
  color: var(--hv-accent);
}

.hvp-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--hv-footer-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.hvp-footer-copy,
.hvp-footer-meta {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--hv-footer-muted);
}

@media (max-width: 860px) {
  .hvp-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hvp-footer-nav {
    grid-template-columns: 1fr;
  }
  .hvp-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* footer 提权：站点 dark 主题有 body[data-theme="dark"] footer{background:#0d0d0d!important}，
   且本层的 p 规则（深字）会命中 footer 造成深底深字，这里统一夺回控制权 */
body[data-theme] .hvp-site-footer.hvp-site-footer {
  background: var(--hv-ink) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer p {
  font-size: var(--hv-fs-small) !important;
  line-height: var(--hv-lh-small) !important;
  color: var(--hv-footer-muted) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-logo {
  font-family: var(--hv-font-display) !important;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  color: #ffffff !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-tagline {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-kicker) !important;
  font-weight: 700 !important;
  letter-spacing: var(--hv-ls-kicker) !important;
  text-transform: uppercase;
  color: var(--hv-accent) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-desc {
  color: var(--hv-footer-muted) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-col h4 {
  font-family: var(--hv-font-display) !important;
  font-size: var(--hv-fs-kicker) !important;
  font-weight: 700 !important;
  letter-spacing: var(--hv-ls-kicker) !important;
  text-transform: uppercase;
  color: #e8e4dc !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-col a {
  font-size: var(--hv-fs-small) !important;
  color: var(--hv-footer-muted) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-col a:hover {
  color: var(--hv-accent) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-copy,
body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-meta {
  font-size: 0.8125rem !important;
  color: var(--hv-footer-muted) !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-cta {
  font-size: var(--hv-fs-small) !important;
  background: var(--hv-accent) !important;
  color: #ffffff !important;
}

body[data-theme] .hvp-site-footer.hvp-site-footer .hvp-footer-cta:hover {
  background: #d56a00 !important;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   触摸目标：导航与菜单统一到 44px 最小可点区域
   -------------------------------------------------------------------------- */

body[data-theme] .hvp-shell-menu a,
body[data-theme] .hvp-shell-quote,
body[data-theme] .hvp-mobile-menu summary,
body[data-theme] .hvp-mobile-menu__panel a:not(.hvp-mobile-menu__quote),
body[data-theme] .hvp-footer-col a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

body[data-theme] .hvp-mobile-menu summary {
  min-width: 44px;
  justify-content: center;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   图片：统一圆角，消除 7px / 0px 混用（比例按区块保留，不强行统一）
   -------------------------------------------------------------------------- */

/* 原规则 body .hvp-v2 .hvp-v2-card-row img{border-radius:var(--hvp-v2-radius)} 与本层特异性平局，
   靠加载顺序取胜不稳定，这里直接提权统一到 8px */
body[data-theme] .hvp-root img,
body[data-theme].hvp-redesign-home.hvp-redesign-home img,
body[data-theme].hvp-redesign-home.hvp-redesign-home .hvp-v2 img,
body[data-theme] .hvp-root .hvp-v2 img {
  border-radius: 8px !important;
  object-fit: cover;
}

@media (max-width: 767px) {
  :root {
    --hv-lh-display: 1.26;
    --hv-lh-body: 1.72;
  }
}
