/*
 * 粤升站点 · 深色模板文字对比度修复
 * 版本 1.1.0
 *
 * 起因（同一个根因，影响五个模板）：
 *   WordPress 全局样式（主题 theme.json 生成）输出两条标签级规则：
 *     h1,h2,h3,h4,h5,h6 { color:#28251f }
 *     a:where(:not(.wp-element-button)) { color:#28251f }
 *   供应商模板大量使用「无 class 的 h2/h3」和「h3 内嵌 a」，本应继承
 *   :root 的 #f2eee7（米白），却被上面两条标签级规则直接覆盖成近黑色，
 *   压在 #191612 / #171510 / #242019 一类深色背景上，对比度 1.06–1.19:1。
 *
 * 做法：按页面（body 类）+ 区块（section id）精确恢复为设计值米白，
 * 并显式排除本身就是浅底的区块，避免把浅底上的深字刷成米白。
 * 只做颜色恢复，不改字体、字号、间距，也不动 hero 渐变主标题。
 */

/* ============================================================
   1. 英文首页（body.yuesheng-motion-homepage）
   ============================================================ */

/* hero 区：容器与 header 链接恢复继承（原始设计值） */
.yuesheng-motion-homepage .hero-section {
	color: #f2eee7;
}

/* WordPress 的 a:where(...) 会直接给链接上色，这里用继承还原；
   不影响 .primary-button（自带米金底 + 深色字）与 .explore-link（自带 --muted）。 */
.yuesheng-motion-homepage .hero-section .site-header a {
	color: inherit;
}

.yuesheng-motion-homepage .hero-section .hero-description,
.yuesheng-motion-homepage .hero-section .hero-description p {
	color: inherit;
}

.yuesheng-motion-homepage .hero-section .site-header .header-contact {
	border-color: rgba(242, 238, 231, 0.42);
}

.yuesheng-motion-homepage .hero-section .site-header .header-contact:hover {
	border-color: #c6a582;
}

/* 深色区块里的标题：#solutions 是浅底区块，故意排除在外 */
.yuesheng-motion-homepage :is(#product-scenes, #about, #applications) :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

/* 页脚不是 section，需要单独声明；.contact-title 是链接，需直接点名 */
.yuesheng-motion-homepage footer#contact {
	color: #f2eee7;
}

.yuesheng-motion-homepage footer#contact .contact-title {
	color: #f2eee7;
}

.yuesheng-motion-homepage footer#contact .contact-title:hover {
	color: #c6a582;
}

/* ============================================================
   2. 产品中心 /products/（body.ys-products）
   全部深底，无浅底标题区块
   ============================================================ */

.ys-products main :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

/* 产品卡标题是 h3 > a，链接被全局 a 规则单独上色 */
.ys-products main h3 a {
	color: inherit;
}

/* ============================================================
   3. 产品详情（body.page-product-detail）
   ============================================================ */

.page-product-detail main :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

.page-product-detail main h3 a {
	color: inherit;
}

/* ============================================================
   4. 知识中心（body.ys-knowledge）
   含 h3 内嵌 button.step-selector，按钮继承 h3 颜色即可
   ============================================================ */

.ys-knowledge main :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

/* ============================================================
   5. 关于我们（body.about-page）
   #chapter-2 是浅底章节，必须保持深色字，单独还原
   ============================================================ */

.about-page main :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

.about-page #chapter-2 :is(h1, h2, h3, h4, h5, h6) {
	color: #191612;
}

/* ============================================================
   6. 工厂与定制（body.factory-only）
   #brief-form 询价表单是浅底卡片，必须保持深色字
   ============================================================ */

.factory-only main :is(h1, h2, h3, h4, h5, h6) {
	color: #f2eee7;
}

.factory-only #brief-form :is(h1, h2, h3, h4, h5, h6),
.factory-only #brief-form legend {
	color: #191612;
}

/* ---------- 1.2.1 补充 ----------
   #brief-result（"Review your message" 面板）位于 #brief-form 之外，
   是浅底卡片上的深色文字面板，提交询价后才会显示；
   上面的深色区块标题规则会把它刷成米白，这里单独还原。 */
.factory-only #brief-result,
.factory-only #brief-result h4 {
	color: #191612;
}
