/* ==========================================================================
   苏州耀德科电磁技术有限公司 — 官网样式
   视觉基调：Apple 极简高级科技感 · 深紫 #3a2454 · 淡紫柔和渐变
   说明：本文件为全站统一设计系统；含浅色/深色双主题。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
    --primary: #3a2454;            /* 主色 深紫 */
    --primary-soft: #5d4680;       /* 柔和紫 */
    --accent: #7a5ba6;             /* 强调紫 */
    --accent-glow: rgba(122, 91, 166, .28);
    --violet-100: #f7f3fc;         /* 淡紫浅 */
    --violet-200: #eee6f8;
    --bg: #ffffff;
    --bg-soft: #f7f3fc;
    --card: #ffffff;
    --text: #17171a;
    --text-mid: #3f3f46;
    --text-alt: #61616a;
    --line: rgba(58, 36, 84, .10);
    --shadow-sm: 0 2px 10px rgba(30, 20, 60, .06);
    --shadow-md: 0 16px 40px rgba(30, 20, 60, .10);
    --shadow-lg: 0 30px 80px rgba(30, 20, 60, .16);
    --nav-glass: rgba(250, 248, 253, .72);
    --nav-line: rgba(58, 36, 84, .08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "San Francisco",
            "PingFang SC", "Source Han Sans CN", "HarmonyOS Sans SC",
            "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

/* 深色主题 */
html[data-theme="dark"] {
    --primary: #9a7bc8;
    --primary-soft: #b39bdd;
    --accent: #b49ae0;
    --accent-glow: rgba(154, 123, 200, .30);
    --violet-100: #1a1524;
    --violet-200: #221b30;
    --bg: #0c0a12;
    --bg-soft: #120f1b;
    --card: #161221;
    --text: #f5f5f7;
    --text-mid: #cfc9dc;
    --text-alt: #9b95a7;
    --line: rgba(255, 255, 255, .08);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, .45);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
    --nav-glass: rgba(15, 12, 24, .72);
    --nav-line: rgba(255, 255, 255, .08);
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background .4s ease, color .4s ease;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--accent-glow); }

/* 平滑滚动 + 隐藏滚动条美化(可选) */

/* ---------- 3. 排版 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .14em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--text); }
.display-title { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
.section-title { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; }
.section-sub  { font-size: clamp(17px, 1.6vw, 21px); color: var(--text-mid); margin-top: 16px; }
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section--soft { background: linear-gradient(180deg, var(--violet-100), var(--violet-200)); }
.lead { font-size: 19px; color: var(--text-mid); }

/* ---------- 4. 顶部导航（苹果磨砂毛玻璃） ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.navbar.scrolled {
    background: var(--nav-glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--nav-line);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 28px;
    height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-size: 19px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px;
}
.nav-logo b { color: var(--primary); }
.nav-logo span { font-size: 12px; font-weight: 600; letter-spacing: .22em; color: var(--text-alt); }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
    font-size: 15px; color: var(--text-mid); position: relative; padding: 6px 2px;
    transition: color .25s ease;
}
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
    background: var(--accent); border-radius: 2px; transition: right .3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { right: 0; }

/* 主题切换按钮 */
.theme-toggle {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; color: var(--text-mid);
    border: 1px solid var(--line); transition: all .25s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

/* 语言切换按钮 */
.lang-switch {
    display: flex; border: 1px solid var(--line); border-radius: 980px;
    overflow: hidden; margin-right: 10px;
}
.lang-switch button {
    padding: 7px 15px; font-size: 13px; font-weight: 700; line-height: 1;
    color: var(--text-mid); background: transparent; border: none; cursor: pointer;
    transition: background .25s ease, color .25s ease;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.on { background: var(--primary); color: #fff; }

/* 移动端汉堡菜单 */
.nav-toggle {
    display: none; width: 40px; height: 40px; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
    width: 20px; height: 2px; background: var(--text); border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端全屏折叠菜单 */
.mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    background: var(--bg);
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    opacity: 0; transition: opacity .3s ease;
}
.mobile-menu.open { display: flex; opacity: 1; }
.mobile-menu a { font-size: 30px; font-weight: 700; padding: 12px; color: var(--text); }

@media (max-width: 840px) {
    .nav-links, .theme-toggle { display: none; }
    .nav-toggle { display: flex; }
}

/* ---------- 5. 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 600;
    padding: 14px 30px; border-radius: 980px;
    background: var(--primary); color: #fff;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease, opacity .3s ease;
    box-shadow: 0 6px 20px var(--accent-glow);
}
html[data-theme="dark"] .btn { color: #1a1430; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--accent-glow); }
.btn--ghost {
    background: transparent; color: var(--text);
    border: 1.5px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--light { background: #fff; color: var(--primary); box-shadow: 0 6px 20px rgba(0,0,0,.14); }

/* ---------- 6. Hero 首屏（明亮浅紫基调） ---------- */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background:
        radial-gradient(1000px 600px at 82% 12%, rgba(122, 91, 166, .16), transparent 60%),
        radial-gradient(900px 560px at 14% 88%, rgba(122, 91, 166, .14), transparent 60%),
        linear-gradient(165deg, #f8f4fc 0%, #f1eaf9 48%, #e7def4 100%);
    color: var(--text); overflow: hidden;
}
html[data-theme="dark"] .hero {
    background:
        radial-gradient(1000px 600px at 82% 12%, rgba(154, 123, 200, .13), transparent 60%),
        radial-gradient(900px 560px at 14% 88%, rgba(154, 123, 200, .11), transparent 60%),
        linear-gradient(165deg, #181221 0%, #12101d 48%, #0c0a12 100%);
}
html[data-theme="dark"] .hero-badge {
    background: rgba(12, 10, 18, .55);
    border-color: rgba(154, 123, 200, .35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    color: #c9b7ec;
}
html[data-theme="dark"] .hero-scroll {
    border-color: rgba(154, 123, 200, .45);
}
.hero::before {  /* 飘动光斑（更淡，保证可读） */
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(420px 420px at 82% 26%, rgba(122, 91, 166, .10), transparent 70%),
        radial-gradient(520px 520px at 12% 70%, rgba(58, 36, 84, .08), transparent 70%);
    animation: heroDrift 18s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes heroDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}
.hero-inner { position: relative; z-index: 2; padding: 120px 28px 60px; max-width: 980px; }
.hero h1 {
    font-size: clamp(38px, 6.2vw, 76px); font-weight: 800; letter-spacing: -.03em;
    line-height: 1.08; color: var(--text);
    text-shadow: 0 2px 12px rgba(122, 91, 166, .10);
}
.hero p.hero-sub {
    margin: 26px auto 0; max-width: 640px;
    font-size: clamp(17px, 2vw, 22px); line-height: 1.7; color: var(--text-mid);
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; letter-spacing: .04em;
    padding: 10px 22px; border-radius: 980px;
    background: rgba(255, 255, 255, .70); border: 1px solid rgba(122, 91, 166, .28);
    color: var(--primary);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(58, 36, 84, .08);
    margin-bottom: 30px;
}
.hero-badge i { font-style: normal; width: 7px; height: 7px; border-radius: 50%; background: #2fa276; flex: none; }
.hero-actions { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
    position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
    width: 26px; height: 44px; border: 2px solid rgba(58, 36, 84, .35); border-radius: 14px;
    display: flex; justify-content: center; padding-top: 8px;
}
.hero-scroll::before {
    content: ""; width: 3px; height: 8px; border-radius: 2px; background: var(--primary);
    animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* 数据条（数字横幅） */
.stats-bar { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 46px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.stat span { font-size: 15px; color: var(--text-alt); }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 12px; } }

/* ---------- 7. 通用 section 布局 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 40px; } .split.reverse .split-media { order: 0; } }
.split-media { position: relative; }
.split-copy h2 { margin-bottom: 22px; }
.split-copy p { color: var(--text-mid); margin-bottom: 14px; font-size: 17px; }
.check-list li { display: flex; gap: 12px; margin: 12px 0; color: var(--text-mid); }
.check-list li::before { content: "✓"; color: var(--primary); font-weight: 700; flex: none; }

/* ---------- 8. 图片占位容器（本地图未替换前优雅兜底） ---------- */
.ph-img {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(145deg, var(--violet-100), var(--violet-200));
    box-shadow: var(--shadow-md);
}
.ph-img::before {
    content: attr(data-label);
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 22px;
    font-size: 15px; font-weight: 600; color: var(--text-alt);
    background:
        radial-gradient(300px 220px at 70% 20%, var(--accent-glow), transparent 70%),
        linear-gradient(145deg, transparent 55%, rgba(122,91,166,.12));
    text-align: left; letter-spacing: .02em;
}
.ph-img img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.ph-img img.fall { opacity: 0; }

/* ---------- 9. 卡片 ---------- */
.card {
    background: var(--card); border-radius: var(--radius-lg);
    padding: 34px; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card h3 { font-size: 21px; margin: 18px 0 10px; }
.card p  { color: var(--text-mid); font-size: 15.5px; }

/* 产品卡片 */
.prod-card {
    background: var(--card); border-radius: var(--radius-lg);
    border: 1px solid var(--line); overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .35s ease, box-shadow .35s ease;
}
.prod-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.prod-card .ph-img { border-radius: 0; box-shadow: none; aspect-ratio: 4/3; }
.prod-card .prod-body { padding: 22px 24px 26px; }
.prod-card .prod-body h3 { font-size: 18px; margin-bottom: 6px; }
.prod-card .app-tag {
    display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--primary);
    background: var(--violet-200); padding: 4px 12px; border-radius: 980px; margin-top: 10px;
}

/* ---------- 10. 网格 ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 11. 视差区块 ---------- */
.parallax { position: relative; overflow: hidden; }
.parallax-layer { will-change: transform; }

/* ---------- 12. 滚动入场动画 ---------- */
.reveal {
    opacity: 0; transform: translateY(34px);
    transition: opacity .8s cubic-bezier(.2, .7, .3, 1), transform .8s cubic-bezier(.2, .7, .3, 1);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

/* ---------- 13. 产品中心页 ---------- */
.page-hero {
    padding: 150px 0 70px; text-align: center;
    background: radial-gradient(900px 480px at 50% -10%, var(--accent-glow), transparent 65%),
                var(--bg);
}
.page-hero .eyebrow-proof { margin-bottom: 18px; }

.cat-sidebar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 0 auto 56px; }
.cat-sidebar button {
    padding: 12px 26px; border-radius: 980px; font-size: 15px; font-weight: 600;
    color: var(--text-mid); border: 1px solid var(--line); background: var(--card);
    transition: all .25s ease;
}
.cat-sidebar button:hover { color: var(--text); }
.cat-sidebar button.on { background: var(--primary); color: #fff; border-color: transparent; box-shadow: 0 6px 18px var(--accent-glow); }

/* ---------- 14. 新闻页 ---------- */
.news-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.news-card time {
    font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .06em; margin-bottom: 6px;
}
.news-card h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.news-card p { color: var(--text-alt); font-size: 15px; margin-bottom: 12px; }
.news-card .more { color: var(--primary); font-weight: 600; font-size: 14.5px; }

/* 新闻详情浮层 */
.modal-mask {
    position: fixed; inset: 0; z-index: 200; background: rgba(10, 6, 18, .6);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.open { display: flex; }
.modal {
    background: var(--card); border-radius: 26px; max-width: 760px; width: 100%;
    max-height: 86vh; overflow-y: auto; padding: 44px;
    box-shadow: var(--shadow-lg); animation: modalIn .4s ease;
}
@keyframes modalIn { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { font-size: 30px; line-height: 1.2; margin: 12px 0 6px; }
.modal .modal-date { color: var(--text-alt); font-size: 14px; }
.modal .modal-body { margin-top: 22px; color: var(--text-mid); font-size: 16.5px; }
.modal .modal-body p { margin: 12px 0; }
.modal-close {
    float: right; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--text-mid); background: var(--card); font-size: 20px;
}

/* ---------- 15. 走进耀德科 ---------- */
.timeline { position: relative; margin-top: 40px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.timeline li { position: relative; padding: 0 0 34px 26px; }
.timeline li::before {
    content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--bg); border: 3px solid var(--accent);
}
.timeline b { display: block; font-size: 26px; color: var(--primary); letter-spacing: -.01em; }
.timeline span { color: var(--text-mid); }

/* ---------- 16. 页脚 ---------- */
.footer {
    background: var(--bg-soft); border-top: 1px solid var(--line);
    padding: 80px 0 36px;
}
.footer-grid {
    max-width: 1200px; margin: 0 auto; padding: 0 28px;
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 44px;
}
.footer-brand .logo-foot { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 14px; display: block; }
.footer-brand p { color: var(--text-alt); font-size: 14.5px; max-width: 300px; }
.footer-col h4 { font-size: 14px; font-weight: 700; letter-spacing: .05em; margin-bottom: 18px; color: var(--text); }
.footer-col li { margin: 10px 0; }
.footer-col a { color: var(--text-alt); font-size: 14.5px; transition: color .25s ease; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    max-width: 1200px; margin: 44px auto 0; padding: 22px 28px 0;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    color: var(--text-alt); font-size: 13px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 17. 联系我们页 ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card { text-align: center; padding: 42px 26px; }
.contact-card b { display: block; font-size: 22px; color: var(--text); margin: 14px 0 6px; }
.contact-card .c-icon { font-size: 30px; }
.contact-card p { color: var(--text-alt); }
.form-shell { max-width: 720px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-field input, .form-field textarea {
    width: 100%; padding: 15px 18px; font-size: 15px; font-family: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); color: var(--text);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 18. CTA 横幅 ---------- */
.cta-band {
    position: relative; text-align: center; color: #fff; overflow: hidden;
    background: radial-gradient(900px 500px at 50% 120%, rgba(122,91,166,.5), transparent 60%),
                linear-gradient(160deg, #2b1a46, #1b102c);
    border-radius: var(--radius-lg); padding: 80px 40px;
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); }
.cta-band p { color: rgba(255,255,255,.75); margin: 16px auto 32px; max-width: 520px; }

/* ---------- 19. 通用工具类 ---------- */
.center { text-align: center; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; } .mt-64 { margin-top: 64px; }
.hidden { display: none !important; }
.tag {
    display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 16px;
    border-radius: 980px; border: 1px solid var(--accent); color: var(--accent);
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- 20. 悬停发光相框（四边依次画线） ---------- */
.card, .prod-card { position: relative; }

.card-frame {
    position: absolute; inset: 8px;           /* 边框整体内缩一格（8px） */
    pointer-events: none; z-index: 5;
    opacity: 0;
    transition: opacity .28s ease;
}
.card:hover .card-frame, .prod-card:hover .card-frame { opacity: 1; }

.card-frame i {
    position: absolute; display: block; margin: 0; padding: 0;
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent), 0 0 18px rgba(122, 91, 166, .55);
    transition: transform .18s cubic-bezier(.22, .61, .36, 1);
}
/* 四条边：各自从端点画线（scale 0→1），渐变收尾形成描线推进 */
.card-frame .f-t { top: 0;  left: 0;  width: 100%; height: 2px; background: linear-gradient(90deg,  rgba(122, 91, 166, 0), var(--accent) 70%, #fff 100%); transform: scaleX(0); transform-origin: left center; }
.card-frame .f-r { top: 0;  right: 0; height: 100%; width: 2px; background: linear-gradient(180deg, rgba(122, 91, 166, 0), var(--accent) 70%, #fff 100%); transform: scaleY(0); transform-origin: top center; }
.card-frame .f-b { bottom: 0; right: 0; width: 100%; height: 2px; background: linear-gradient(270deg, rgba(122, 91, 166, 0), var(--accent) 70%, #fff 100%); transform: scaleX(0); transform-origin: right center; }
.card-frame .f-l { bottom: 0; left: 0;  height: 100%; width: 2px; background: linear-gradient(360deg, rgba(122, 91, 166, 0), var(--accent) 70%, #fff 100%); transform: scaleY(0); transform-origin: bottom center; }

/* 悬停：上 → 右 → 下 → 左，每边 0.18s 递进 */
.card:hover .card-frame .f-t, .prod-card:hover .card-frame .f-t { transition-delay: 0s;    transform: scaleX(1); }
.card:hover .card-frame .f-r, .prod-card:hover .card-frame .f-r { transition-delay: .18s;  transform: scaleY(1); }
.card:hover .card-frame .f-b, .prod-card:hover .card-frame .f-b { transition-delay: .36s;  transform: scaleX(1); }
.card:hover .card-frame .f-l, .prod-card:hover .card-frame .f-l { transition-delay: .54s;  transform: scaleY(1); }

/* 深色主题：相框发光更亮、更协调 */
html[data-theme="dark"] .card-frame i { box-shadow: 0 0 10px #b49ae0, 0 0 22px rgba(180, 154, 224, .55); }

/* ==========================================================================
   21. 视觉升级组件（2026视觉提升：风格字体 / 动态搜索栏 / Hover Reveal /
       多层阴影 / 返回顶端 / SVG动画 / 动态图像 / 画廊轮播）
   ========================================================================== */

/* ---------- 21.1 风格字体：衬线展示标题 + 渐变文字 ---------- */
:root { --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; }

.hero h1, .display-title {
    font-family: var(--font-display);
    font-weight: 900;
    background: linear-gradient(175deg, #2e1a46 0%, #5d4680 55%, #8a6cc0 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: none;
}
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .display-title {
    background: linear-gradient(175deg, #efe7fb 0%, #b39bdd 55%, #8a6cc0 100%);
    -webkit-background-clip: text; background-clip: text;
}
.hero h1 { letter-spacing: .005em; }

/* 区块标题：渐变装饰线 */
.section-title { position: relative; }
.section-title::after {
    content: ""; position: absolute; left: 0; bottom: -14px;
    width: 56px; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: .55;
    transition: opacity .3s ease, width .45s ease;
}
.section-title:hover::after { opacity: 1; width: 92px; }
.center .section-title::after {
    left: 50%; transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ---------- 21.2 Hover Reveal：图片放大 + 遮罩 + 强调 ---------- */
.prod-card .ph-img img, .card .ph-img img, .gslide-media img {
    transition: transform .65s cubic-bezier(.22, .61, .36, 1);
}
.prod-card:hover .ph-img img,
.card:hover .ph-img img { transform: scale(1.07); }
.prod-card .ph-img { position: relative; overflow: hidden; }
.prod-card .ph-img::after {
    content: ""; position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(180deg, rgba(58, 36, 84, 0) 45%, rgba(58, 36, 84, .18) 100%);
    opacity: 0; transition: opacity .45s ease;
}
.prod-card:hover .ph-img::after { opacity: 1; }
.prod-card .prod-body h3 { transition: color .3s ease, transform .3s ease; }
.prod-card:hover .prod-body h3 { color: var(--accent); transform: translateY(-2px); }
.prod-card .app-tag { transition: background .3s ease, color .3s ease, transform .3s ease; }
.prod-card:hover .app-tag { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* ---------- 21.3 多层阴影立体悬浮 ---------- */
.prod-card:hover, .card:hover {
    box-shadow:
        0 10px 26px rgba(58, 36, 84, .12),
        0 28px 70px rgba(122, 91, 166, .18),
        0 0 0 1px rgba(122, 91, 166, .16);
    transform: translateY(-8px);
}
html[data-theme="dark"] .prod-card:hover, html[data-theme="dark"] .card:hover {
    box-shadow:
        0 10px 26px rgba(0, 0, 0, .4),
        0 28px 70px rgba(122, 91, 166, .22),
        0 0 0 1px rgba(180, 154, 224, .22);
}
#navbar.scrolled {
    box-shadow: 0 10px 30px rgba(58, 36, 84, .10), 0 2px 8px rgba(58, 36, 84, .06);
}
html[data-theme="dark"] #navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
}

/* ---------- 21.4 动态搜索栏 ---------- */
.search-panel { position: relative; max-width: 760px; margin: 0 0 34px; }
.search-box {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 8px 6px 18px;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 980px;
    box-shadow: var(--shadow-sm);
    transition: border-color .3s ease, box-shadow .3s ease;
}
.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 14px 34px rgba(122, 91, 166, .16);
}
.search-box svg { flex: none; width: 20px; height: 20px; stroke: var(--text-alt); }
.search-box input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    font-size: 16px; color: var(--text); padding: 13px 0;
}
.search-box input::placeholder { color: var(--text-alt); }
.search-clear {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    border: 0; background: var(--violet-200); color: var(--primary);
    font-size: 14px; line-height: 1; cursor: pointer;
    opacity: 0; visibility: hidden; transform: scale(.55);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.search-box.has-text .search-clear { opacity: 1; visibility: visible; transform: scale(1); }
.search-hot {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin-top: 14px; font-size: 13px; color: var(--text-alt);
}
.search-hot b { font-weight: 600; color: var(--text-mid); margin-right: 2px; }
.search-hot button {
    border: 1px solid var(--line); background: var(--card);
    color: var(--text-mid); font-size: 12.5px;
    padding: 5px 14px; border-radius: 980px; cursor: pointer;
    transition: all .25s ease;
}
.search-hot button:hover {
    border-color: var(--accent); color: var(--accent);
    background: var(--violet-100); box-shadow: 0 4px 14px var(--accent-glow);
}
.search-count { margin-top: 10px; font-size: 13px; color: var(--text-alt); letter-spacing: .02em; min-height: 18px; }

/* ---------- 21.5 回到顶端（含滚动进度环） ---------- */
.back-top {
    position: fixed; right: 26px; bottom: 26px; z-index: 90;
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 0;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(58, 36, 84, .22);
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top .btt-ring {
    position: absolute; inset: -3px; border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(122, 91, 166, .14) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
}
.back-top svg { width: 20px; height: 20px; stroke: var(--primary); transition: transform .3s ease, stroke .3s ease; }
.back-top:hover svg { transform: translateY(-3px); }
html[data-theme="dark"] .back-top { box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ---------- 21.6 Hero SVG 装饰动画 ---------- */
.hero-deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-deco svg { position: absolute; }
.hero-deco .hd-arc  { top: 5%; right: 3%; width: min(42vw, 480px); color: rgba(122, 91, 166, .55); }
.hero-deco .hd-arc path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.hero-deco .hd-arc .dash  { stroke-dasharray: 44 300; animation: hdFlow 6s linear infinite; }
.hero-deco .hd-arc .dash2 { stroke-dasharray: 12 330; animation: hdFlow 9s linear infinite; }
.hero-deco .hd-star { top: 15%; left: 7%; width: 92px; color: #b49ae0; animation: hdPulse 4s ease-in-out infinite; }
.hero-deco .hd-ring { bottom: 11%; left: 18%; width: 118px; color: rgba(122, 91, 166, .35); animation: hdSpin 26s linear infinite; }
.hero-deco .hd-ring circle { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 9 11; }
.hero-deco .hd-wave { bottom: 7%; right: 9%; width: min(30vw, 340px); color: rgba(180, 154, 224, .5); }
.hero-deco .hd-wave path { fill: none; stroke: currentColor; stroke-width: 1.3; }
@keyframes hdFlow  { to { stroke-dashoffset: -340; } }
@keyframes hdPulse { 0%, 100% { opacity: .2; transform: scale(.85); } 50% { opacity: .9; transform: scale(1.08); } }
@keyframes hdSpin  { to { transform: rotate(360deg); } }
html[data-theme="dark"] .hero-deco .hd-arc { color: rgba(180, 154, 224, .6); }

/* Hero 徽章光泽扫过 */
.hero-badge { position: relative; overflow: hidden; }
.hero-badge::after {
    content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 60%;
    background: linear-gradient(105deg, rgba(122, 91, 166, 0) 0%, rgba(255, 255, 255, .5) 50%, rgba(122, 91, 166, 0) 100%);
    transform: skewX(-20deg) translateX(-160%);
    animation: badgeSheen 5.5s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes badgeSheen { 0%, 60% { transform: skewX(-20deg) translateX(-160%); } 100% { transform: skewX(-20deg) translateX(320%); } }

/* ---------- 21.7 动态图像：数据条扫光 + 悬浮 ---------- */
.stat { transition: transform .4s ease, box-shadow .4s ease; }
.stat:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.stat b {
    background: linear-gradient(120deg, currentColor 35%, var(--accent) 50%, currentColor 65%);
    background-size: 240% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: statShimmer 4.5s ease-in-out infinite;
    display: inline-block;
}
@keyframes statShimmer { 0%, 45% { background-position: 120% 0; } 75%, 100% { background-position: -120% 0; } }

/* ---------- 21.8 画廊 Banner 轮播 ---------- */
.slider-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.slider-head .eyebrow { margin-bottom: 12px; }
.slider-nav { display: flex; gap: 10px; }
.slider-arrow {
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--card);
    color: var(--primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}
.slider-arrow:hover {
    border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}
.slider-arrow svg { width: 18px; height: 18px; stroke: currentColor; }
.slider-viewport {
    position: relative; border-radius: 28px; overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}
.slider-track { display: flex; transition: transform .7s cubic-bezier(.22, .61, .36, 1); }
.gslide {
    flex: 0 0 100%; min-height: 380px;
    display: grid; grid-template-columns: 1.1fr 1fr;
    background:
        radial-gradient(520px 300px at 12% 20%, rgba(122, 91, 166, .16), transparent 70%),
        radial-gradient(420px 320px at 90% 90%, rgba(58, 36, 84, .12), transparent 70%),
        linear-gradient(120deg, var(--violet-100), var(--violet-200));
    overflow: hidden;
}
.gslide-info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(34px, 5vw, 64px); }
.gslide-tag {
    display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
    color: var(--accent); background: rgba(122, 91, 166, .12);
    padding: 6px 16px; border-radius: 980px; margin-bottom: 20px;
    text-transform: uppercase;
}
.gslide h3 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 42px); line-height: 1.22; font-weight: 900; }
.gslide p { margin-top: 14px; color: var(--text-mid); max-width: 430px; }
.gslide .btn { margin-top: 28px; }
.gslide-media { position: relative; min-height: 260px; overflow: hidden; }
.gslide-media img { width: 100%; height: 100%; object-fit: cover; }
.gslide:hover .gslide-media img { transform: scale(1.06); }
.slider-dots {
    position: absolute; left: 0; right: 0; bottom: 18px;
    display: flex; justify-content: center; gap: 8px; z-index: 3;
}
.slider-dots button {
    width: 8px; height: 8px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
    background: rgba(58, 36, 84, .22); transition: all .35s ease;
}
html[data-theme="dark"] .slider-dots button { background: rgba(255, 255, 255, .25); }
.slider-dots button.on { width: 26px; border-radius: 4px; background: var(--accent); }
.slider-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; z-index: 4; background: rgba(122, 91, 166, .14); }
.slider-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #c9b7ec); }
.slider-progress i.run { animation: slideBar linear forwards; }
@keyframes slideBar { from { width: 0; } to { width: 100%; } }
.slider-viewport::after {
    content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: 6;
    border-radius: 18px; opacity: 0; transition: opacity .45s ease;
    box-shadow: inset 0 0 0 1.5px rgba(122, 91, 166, .55), inset 0 0 24px rgba(122, 91, 166, .2);
}
.slider-viewport:hover::after { opacity: 1; }
@media (max-width: 760px) {
    .gslide { grid-template-columns: 1fr; min-height: 0; }
    .gslide-media { order: -1; min-height: 200px; }
}
