/* ============================================================
   ZY 2026 · 首页科技肌理层 (tex layer) / 2026-11-18
   「同心圆/轨道/金环」母题: 与首屏 3D 天使之眼同语系。
   - 全部规则挂 html:not(.tex-off): ?tex=off 一键回退
   - 动效一律包 prefers-reduced-motion: no-preference;
     静态纹理(点阵/刻度/序号/连线形状)留在查询外
   - 需要 blur/shadow 处用 !important 对抗 fp2d 全局抹杀
   ============================================================ */

/* tex=off 时, 本层新增的 DOM 元素整体隐藏, 页面完全回到升级前外观 */
html.tex-off .home-portal.fp2d .tex-spark,
html.tex-off .home-portal.fp2d .tex-bus,
html.tex-off .home-portal.fp2d .v3-loop,
html.tex-off .home-portal.fp2d .tex-ring,
html.tex-off .home-portal.fp2d .v3-bar-val,
html.tex-off .home-portal.fp2d .tex-cta {
    display: none !important;
}

/* ============ A. 首屏中轴走廊: 文案 | 眼 | 工作台 ============ */
@media (min-width:1280px) {
    html:not(.tex-off) .home-portal.fp2d .hero .wrap {
        grid-template-columns: 1fr 1.05fr !important;
        gap: clamp(72px, 7vw, 132px) !important;
    }
}
@media (min-width:1460px) {
    html:not(.tex-off) .home-portal.fp2d .hero .wrap {
        gap: clamp(110px, 8vw, 140px) !important;
    }
}

/* ============ B. Kicker 终端化: [ ] + 闪烁光标 ============ */
html:not(.tex-off) .home-portal.fp2d .hero-kicker::before,
html:not(.tex-off) .home-portal.fp2d .sec-head .kicker::after {
    content: "▍";
    color: #0E8F8F;
}
html:not(.tex-off) .home-portal.fp2d .hero-kicker::before { margin-right: 2px; }
html:not(.tex-off) .home-portal.fp2d .sec-head .kicker::after { margin-left: 4px; }

/* ============ C. 信任条仪表化 ============ */
html:not(.tex-off) .home-portal.fp2d .v3-trust b {
    font-size: 33px !important;
    font-variant-numeric: tabular-nums;
}
html:not(.tex-off) .home-portal.fp2d .v3-trust b .v4-count { font-variant-numeric: tabular-nums; }
html:not(.tex-off) .home-portal.fp2d .v4-spark path { stroke: rgba(14,143,143,.45) !important; }
html:not(.tex-off) .home-portal.fp2d .tex-spark {
    display: block;
    position: relative;
    width: 64px;
    height: 18px;
    margin-top: 6px;
}
/* 数字下的刻度短线 */
html:not(.tex-off) .home-portal.fp2d .tex-spark::before {
    content: "";
    position: absolute;
    left: 0;
    top: -5px;
    width: 24px;
    height: 1px;
    background: rgba(14,143,143,.6);
}
/* 横条卡(strip)较矮: 序号缩小避让按钮 */
html:not(.tex-off) .home-portal.fp2d .bcard.strip::before {
    font-size: 24px !important;
    top: 2px !important;
    right: 14px !important;
}
html:not(.tex-off) .home-portal.fp2d .tex-spark svg { display: block; width: 100%; height: 100%; }
html:not(.tex-off) .home-portal.fp2d .tex-spark path {
    fill: none;
    stroke: rgba(14,143,143,.6);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html:not(.tex-off) .home-portal.fp2d .tex-spark circle { fill: #0E8F8F; }

/* ============ D. Bento: 幽灵序号 + 数据总线 + hover 角括号 ============ */
/* 幽灵描边大序号(升级现有 9px 角落计数器) */
html:not(.tex-off) .home-portal.fp2d .bcard::before {
    right: 12px !important;
    top: 4px !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    color: transparent !important;
    -webkit-text-stroke: 1px rgba(14,143,143,.22);
    pointer-events: none;
    z-index: 0;
}
/* 数据总线: Bento 面板顶缘信号线 + 刻度 + 流光 */
html:not(.tex-off) .home-portal.fp2d .tex-bus {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(14,143,143,.55) 10%, rgba(37,99,235,.42) 84%, transparent);
}
html:not(.tex-off) .home-portal.fp2d .tex-bus::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -3px;
    height: 8px;
    background-image: repeating-linear-gradient(90deg, rgba(14,143,143,.38) 0 1px, transparent 1px 26px);
}
html:not(.tex-off) .home-portal.fp2d .tex-bus i {
    position: absolute;
    top: -2px;
    left: 0;
    width: 28px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #0E8F8F);
}
/* hover 角括号(HUD 锁定语言) */
html:not(.tex-off) .home-portal.fp2d .bcard:hover {
    background-image:
        linear-gradient(#0E8F8F, #0E8F8F), linear-gradient(#0E8F8F, #0E8F8F),
        linear-gradient(#0E8F8F, #0E8F8F), linear-gradient(#0E8F8F, #0E8F8F),
        linear-gradient(#0E8F8F, #0E8F8F), linear-gradient(#0E8F8F, #0E8F8F),
        linear-gradient(#0E8F8F, #0E8F8F), linear-gradient(#0E8F8F, #0E8F8F) !important;
    background-repeat: no-repeat !important;
    background-size:
        10px 2px, 2px 10px,
        10px 2px, 2px 10px,
        10px 2px, 2px 10px,
        10px 2px, 2px 10px !important;
    background-position:
        8px 8px, 8px 8px,
        calc(100% - 8px) 8px, calc(100% - 8px) 8px,
        8px calc(100% - 8px), 8px calc(100% - 8px),
        calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) calc(100% - 8px) !important;
}

/* ============ E. AI 能力区: 闭环图 + accent + 仪表条 + 环形进度 ============ */
html:not(.tex-off) .home-portal.fp2d #ai-capabilities .sec-head { align-items: center; }
html:not(.tex-off) .home-portal.fp2d .v3-loop { width: 280px; height: 96px; flex: none; }
html:not(.tex-off) .home-portal.fp2d .v3-loop svg { width: 100%; height: 100%; display: block; overflow: visible; }
html:not(.tex-off) .home-portal.fp2d .v3-loop .lp {
    fill: none;
    stroke: rgba(14,143,143,.55);
    stroke-width: 1.3;
    stroke-dasharray: 4 4;
}
html:not(.tex-off) .home-portal.fp2d .v3-loop .lp-node rect { fill: #fff; stroke: #D5DEE8; stroke-width: 1; }
html:not(.tex-off) .home-portal.fp2d .v3-loop .lp-node text { font-size: 11px; fill: #43536B; text-anchor: middle; }
html:not(.tex-off) .home-portal.fp2d .v3-loop .lp-node.on rect { fill: #0E8F8F; stroke: #0E8F8F; }
html:not(.tex-off) .home-portal.fp2d .v3-loop .lp-node.on text { fill: #fff; font-weight: 600; }

/* 左缘 accent 竖条 */
html:not(.tex-off) .home-portal.fp2d .v3-ai-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #0E8F8F, rgba(37,99,235,.55));
}

/* 仪表化进度条: 刻度轨道 + 端点节点 + 等宽读数 */
html:not(.tex-off) .home-portal.fp2d .v3-bar {
    background-color: rgba(10,22,40,.06);
    background-image: linear-gradient(90deg, rgba(10,22,40,.14) 1px, transparent 1px);
    background-size: 20% 100%;
}
html:not(.tex-off) .home-portal.fp2d .v3-bar i { position: relative; }
html:not(.tex-off) .home-portal.fp2d .v3-bar i::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #0E8F8F;
    box-shadow: 0 0 0 3px rgba(14,143,143,.18) !important;
}
html:not(.tex-off) .home-portal.fp2d .v3-ai-demo { position: relative; }
html:not(.tex-off) .home-portal.fp2d .v3-bar-val {
    float: right;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: #0A6E73;
}
/* 环形进度(S-02 正确率) */
html:not(.tex-off) .home-portal.fp2d .tex-ring {
    position: absolute;
    right: 10px;
    top: 9px;
    width: 40px;
    height: 40px;
    display: block;
}
html:not(.tex-off) .home-portal.fp2d .v3-ai-card:nth-child(2) .v3-ai-demo { padding-right: 58px; }
html:not(.tex-off) .home-portal.fp2d .tex-ring svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
html:not(.tex-off) .home-portal.fp2d .tex-ring .tr-bg { fill: none; stroke: rgba(10,22,40,.08); stroke-width: 4; }
html:not(.tex-off) .home-portal.fp2d .tex-ring .tr-val {
    fill: none;
    stroke: #0E8F8F;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1) .3s;
}
html:not(.tex-off) .home-portal.fp2d .tex-ring b {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    color: #0A6E73;
}

/* ============ F. 收口 CTA 带: 深藏青「瞳孔」句号 ============ */
html:not(.tex-off) .home-portal.fp2d .tex-cta {
    position: relative;
    background: #0A1628;
    border-top: 1px solid #16283E;
    overflow: hidden;
    padding: 58px 0;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta-k {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .16em;
    color: #D4B268;
    margin-bottom: 12px;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta h2 { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
html:not(.tex-off) .home-portal.fp2d .tex-cta p { color: #8FA3BC; font-size: 13px; margin-top: 10px; }
html:not(.tex-off) .home-portal.fp2d .tex-cta-act { text-align: right; flex: none; }
html:not(.tex-off) .home-portal.fp2d .tex-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border: 1px solid #D4B268;
    color: #E8CE93;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta-btn svg { width: 16px; height: 16px; }
html:not(.tex-off) .home-portal.fp2d .tex-cta-btn:hover { background: rgba(212,178,104,.14); color: #F3DFB2; }
html:not(.tex-off) .home-portal.fp2d .tex-cta-sub { display: block; margin-top: 10px; font-size: 11px; color: #5F7490; }
/* 暗金环弧(光环的页面级收束) + 低亮度点阵 */
html:not(.tex-off) .home-portal.fp2d .tex-cta-ring {
    position: absolute;
    right: -150px;
    top: 50%;
    width: 430px;
    height: 430px;
    margin-top: -215px;
    border: 1px solid rgba(212,178,104,.28);
    border-radius: 50%;
    pointer-events: none;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta-ring::after {
    content: "";
    position: absolute;
    inset: 36px;
    border: 1px dashed rgba(14,143,143,.42);
    border-radius: 50%;
}
html:not(.tex-off) .home-portal.fp2d .tex-cta-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(143,163,188,.15) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent 34%, #000);
    mask-image: linear-gradient(90deg, transparent 34%, #000);
}

/* ============ G. 区块点阵肌理(图纸感) ============ */
html:not(.tex-off) .home-portal.fp2d .section {
    background-image: radial-gradient(rgba(14,143,143,.06) 1px, transparent 1.2px) !important;
    background-size: 22px 22px !important;
    background-position: center top;
}
html:not(.tex-off) .home-portal.fp2d .section.v3-ai {
    background-image: radial-gradient(rgba(37,99,235,.055) 1px, transparent 1.2px) !important;
    background-size: 22px 22px !important;
}

/* ============ H. 响应式 ============ */
@media (max-width:1100px) {
    html:not(.tex-off) .home-portal.fp2d .v3-loop { display: none; }
    html:not(.tex-off) .home-portal.fp2d .tex-ring { display: none; }
    html:not(.tex-off) .home-portal.fp2d .v3-ai-card:nth-child(2) .v3-ai-demo { padding-right: 12px; }
}
@media (max-width:900px) {
    html:not(.tex-off) .home-portal.fp2d .tex-cta-in { flex-direction: column; align-items: flex-start; }
    html:not(.tex-off) .home-portal.fp2d .tex-cta-act { text-align: left; }
    html:not(.tex-off) .home-portal.fp2d .tex-cta-ring { display: none; }
}

/* ============ I. 动效(仅允许在无 reduced-motion 时运行) ============ */
@media (prefers-reduced-motion: no-preference) {
    html:not(.tex-off) .home-portal.fp2d .hero-kicker::before,
    html:not(.tex-off) .home-portal.fp2d .sec-head .kicker::after {
        animation: texCaret 1.1s steps(1) infinite;
    }
    /* 信任条走势线: 进入视口描画 */
    html:not(.tex-off) .home-portal.fp2d .v3-trust-in:not(.tex-on) .tex-spark path {
        stroke-dasharray: 70;
        stroke-dashoffset: 70;
    }
    html:not(.tex-off) .home-portal.fp2d .v3-trust-in.tex-on .tex-spark path {
        animation: texDraw .8s ease-out .2s forwards;
    }
    /* Bento 总线流光 */
    html:not(.tex-off) .home-portal.fp2d .tex-bus i {
        animation: texRun 5.6s linear infinite;
    }
    /* 闭环图虚线流动 */
    html:not(.tex-off) .home-portal.fp2d .v3-loop.tex-on .lp {
        animation: texFlow 1.1s linear infinite;
    }
    /* 环形进度: 未进入视口时归零 */
    html:not(.tex-off) .home-portal.fp2d .v3-ai-card:not(.tex-on) .tr-val {
        stroke-dashoffset: 113 !important;
    }
}
@keyframes texCaret {
    50% { opacity: 0; }
}
@keyframes texDraw {
    to { stroke-dashoffset: 0; }
}
@keyframes texRun {
    0% { transform: translateX(-30px); opacity: 0; }
    8% { opacity: .9; }
    88% { opacity: .9; }
    100% { transform: translateX(1240px); opacity: 0; }
}
@keyframes texFlow {
    to { stroke-dashoffset: -16; }
}
