/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
/*
Theme Name: Net158 Child
Template: hello-elementor
Version: 2026.01.06.v2
*/

/* =============================================
   1. 字体声明 (@font-face) - 引入字符范围锁定
   ============================================= */

/* 英文/数字范围代码 (Unicode Range) */
/* U+0000-00FF 覆盖了所有基础拉丁字母、数字和符号 */
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
/* 其他 Inter 变体依此类推，同样建议加上 unicode-range */
@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF; }

/* =============================================
   2. 响应式流体字号 (390px -> 1440px)
   ============================================= */
:root {
    --fluid-12: clamp(0.75rem, 0.05vw + 0.73rem, 0.75rem);
    --fluid-14: clamp(0.8125rem, 0.2vw + 0.75rem, 0.875rem);
    --fluid-16: clamp(0.9375rem, 0.2vw + 0.85rem, 1rem);
    --fluid-18: clamp(1rem, 0.3vw + 0.9rem, 1.125rem);
    --fluid-20: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
    --fluid-22: clamp(1.1875rem, 0.8vw + 1rem, 1.375rem);
    --fluid-24: clamp(1.25rem, 1vw + 1rem, 1.5rem);
    --fluid-26: clamp(1.3125rem, 1.2vw + 1rem, 1.625rem);
    --fluid-28: clamp(1.375rem, 1.5vw + 1rem, 1.75rem);
    --fluid-32: clamp(1.5rem, 2.5vw + 0.8rem, 2rem);
	--fluid-30: clamp(1.4375rem, 2vw + 1rem, 1.875rem);
    --fluid-36: clamp(1.625rem, 2.5vw + 1.1rem, 2.25rem);
    --fluid-42: clamp(1.875rem, 2.5vw + 1.25rem, 2.625rem);
    --fluid-48: clamp(2.125rem, 6vw + 0.7rem, 3rem);
    --fluid-50: clamp(2.25rem, 6.5vw + 0.6rem, 3.125rem);
    --fluid-56: clamp(2.25rem, 7vw + 0.5rem, 3.5rem);
    --fluid-60: clamp(2.25rem, 7.5vw + 0.5rem, 3.75rem);
    --fluid-64: clamp(2.25rem, 8vw + 0.5rem, 4rem);


    /* 语义化映射 */
    --fs-h1: var(--fluid-42); --fs-h2: var(--fluid-32); --fs-h3: var(--fluid-28);
    --fs-h4: var(--fluid-24); --fs-h5: var(--fluid-20); --fs-h6: var(--fluid-18);
    --fs-body: var(--fluid-16); --fs-small: var(--fluid-14);

    --fluid-py: clamp(2.5rem, 4vw + 1.5rem, 5rem);
    --fluid-px: 1.25rem;
}

/* =============================================
   3. 核心感应逻辑 (中英混排黑科技)
   ============================================= */

/* 默认状态 (英文站逻辑) */
:root {
    --font-main: 'Poppins', -apple-system, system-ui, sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

/* 中文站逻辑：数字/英文优先用专业字体，汉字用系统字体 */
:root:lang(zh) {
    --font-main: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-heading: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* =============================================
   4. 底层渲染分配 (锁定字体族)
   ============================================= */

/* 渲染平滑优化 */
*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .elementor-heading-title, .elementor-button, .elementor-nav-menu a {
    font-family: var(--font-heading) !important;
}
body, p, .elementor-text-editor, .elementor-widget-text-editor {
    font-family: var(--font-main) !important;
}

/* =============================================
   5. 中文排版精修 (制造业质感)
   ============================================= */
:root:lang(zh) body { line-height: 1.8; }
:root:lang(zh) :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title) { line-height: 1.4; letter-spacing: 0; }

/* 强制中文版正文不加粗 + 增加微小字间距 */
:root:lang(zh) :is(p, .elementor-widget-text-editor, body) {
    font-weight: 400 !important;
    letter-spacing: 0.02em; 
}

/* =============================================
   6. 布局类 */
.site-section {
    padding: var(--fluid-py) var(--fluid-px);
    width: 100%;
    box-sizing: border-box;
}
