/* ==========================================================================
   月晓科技官网 · 页面加载 + Banner 动态效果原型（对标 Tec-Do）
   基于 03 版浅色原样，只改：①加载动画 ②首屏 Banner 动态
   未合入正式 style.css，仅 index-banner.html 使用
   ========================================================================== */

/* ===== 1. 页面加载动画（深色遮罩，加载完向上收起） ===== */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background:
        radial-gradient(900px 460px at 50% 42%, rgba(30, 111, 255, 0.16), transparent 62%),
        linear-gradient(180deg, #0d1730 0%, #0b1220 100%);
    transition: clip-path 1.05s cubic-bezier(0.77, 0, 0.18, 1) 0.15s, opacity 0.6s ease 1.2s;
    clip-path: inset(0 0 0 0);
}
#preloader.done {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.pl-word { opacity: 0; animation: plIn 0.5s ease forwards; }
.pl-word.d2 { animation-delay: 0.14s; }
@keyframes plIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pl-logo {
    display: flex; align-items: center; justify-content: center;
}
.pl-logo img { height: 44px; }
.pl-slogan {
    margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, 0.55);
    letter-spacing: 3px; font-family: var(--mono);
}
.pl-bar {
    margin-top: 30px; width: 240px; height: 2px; border-radius: 2px;
    background: rgba(255, 255, 255, 0.12); overflow: hidden;
}
.pl-bar i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--blue), var(--orange));
    animation: plFill 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes plFill { to { width: 100%; } }

/* ===== 2. Banner 背景动态光斑（浅色底上流动的蓝橙光） ===== */
.hero {
    background:
        radial-gradient(900px 420px at 78% 8%, rgba(30, 111, 255, 0.10), transparent 60%),
        radial-gradient(720px 420px at 8% 96%, rgba(255, 107, 53, 0.07), transparent 55%),
        linear-gradient(180deg, #f6f9ff 0%, #ffffff 55%);
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(340px 260px at 20% 22%, rgba(30, 111, 255, 0.10), transparent 65%),
        radial-gradient(300px 240px at 82% 68%, rgba(255, 107, 53, 0.09), transparent 65%);
    animation: bannerGlow 9s ease-in-out infinite alternate;
}
@keyframes bannerGlow {
    0%   { opacity: 0.55; transform: translate3d(0, 0, 0); }
    50%  { opacity: 1;    transform: translate3d(-18px, 10px, 0); }
    100% { opacity: 0.75; transform: translate3d(16px, -8px, 0); }
}

/* ===== 3. Banner 粒子网络（浅底上用深蓝/橙色粒子，清晰可见） ===== */
#bannerCanvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
}

/* ===== 4. Banner 右侧动态 AI 视觉装置 ===== */
.banner-visual {
    position: absolute; right: 0; top: 0;
    width: 52%; height: 100%; z-index: 1;
    pointer-events: none; overflow: hidden;
}
.banner-ai {
    position: absolute; right: 5%; top: -3%;
    font-size: clamp(170px, 21vw, 320px);
    font-weight: 900; line-height: 1; letter-spacing: -0.04em;
    font-family: var(--font);
    color: transparent;
    background: linear-gradient(135deg, rgba(30, 111, 255, 0.16) 8%, rgba(122, 168, 255, 0.07) 46%, rgba(255, 107, 53, 0.13) 92%);
    -webkit-background-clip: text; background-clip: text;
    filter: drop-shadow(0 14px 34px rgba(30, 111, 255, 0.14));
    opacity: 0;
}
body.loaded .banner-ai { animation: aiIn 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s forwards, aiFloat 3.6s ease-in-out 1.7s infinite; }
@keyframes aiIn {
    from { opacity: 0; transform: translateX(50px) scale(1.05); }
    to   { opacity: 1; transform: none; }
}
@keyframes aiFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* 旋转圆环（AI 字周边） */
.banner-rings { position: absolute; right: 12%; top: 24%; width: 420px; height: 420px; opacity: 0; }
body.loaded .banner-rings { animation: ringsIn 1.2s ease 0.5s forwards; }
@keyframes ringsIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.banner-rings i {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1.5px dashed rgba(30, 111, 255, 0.28);
}
.banner-rings .ring-1 { animation: ringSpin 26s linear infinite; }
.banner-rings .ring-2 {
    inset: 42px; border-style: solid; border-width: 1.5px;
    border-color: rgba(255, 107, 53, 0.22) transparent rgba(30, 111, 255, 0.16) transparent;
    animation: ringSpin 16s linear infinite reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.banner-rings .rd {
    position: absolute; width: 7px; height: 7px; border-radius: 50%;
    background: var(--blue); box-shadow: 0 0 10px rgba(30, 111, 255, 0.8);
}
.banner-rings .r1 { top: -3px; left: 50%; }
.banner-rings .r2 { bottom: 18%; right: -3px; background: var(--orange); box-shadow: 0 0 10px rgba(255, 107, 53, 0.8); }
.banner-rings .r3 { top: 30%; left: -3px; background: var(--green); box-shadow: 0 0 10px rgba(16, 185, 129, 0.8); }

/* 能力面板半透明化，让背后的 AI 字/圆环透出 */
.hero-viz-panel {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(30, 111, 255, 0.14);
    box-shadow: 0 24px 56px -20px rgba(30, 111, 255, 0.25), inset 0 1px 0 #fff;
}

/* ===== 5. Banner 文字入场 + 扫光 ===== */
.hero .hero-badge,
.hero h1,
.hero .hero-subtitle,
.hero .hero-buttons,
.hero .hero-stats,
.hero .hero-viz-panel { opacity: 0; }
.hero .hero-badge .dot { animation: dotPulse 2.2s ease-in-out infinite; }
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50%      { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}

body.loaded .hero .hero-badge { animation: riseIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s forwards; }
body.loaded .hero h1 { animation: clipReveal 0.95s cubic-bezier(0.77, 0, 0.18, 1) 0.22s forwards; }
body.loaded .hero .hero-subtitle { animation: riseIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.42s forwards; }
body.loaded .hero .hero-buttons { animation: riseIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.57s forwards; }
body.loaded .hero .hero-stats { animation: riseIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.72s forwards; }
body.loaded .hero .hero-viz-panel { animation: panelIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.38s forwards; }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); filter: blur(3px); }
    to   { opacity: 1; transform: none; filter: none; }
}
@keyframes clipReveal {
    from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(22px); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes panelIn {
    from { opacity: 0; transform: translateY(34px) scale(0.97); filter: blur(4px); }
    to   { opacity: 1; transform: none; filter: none; }
}
body:not(.loaded) .hero .hero-viz-panel,
body:not(.loaded) .hero .hero-badge,
body:not(.loaded) .hero h1,
body:not(.loaded) .hero .hero-subtitle,
body:not(.loaded) .hero .hero-buttons,
body:not(.loaded) .hero .hero-stats { opacity: 0; }

/* 主标题扫光 */
.hero h1 { position: relative; }
.hero h1::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 46%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(30, 111, 255, 0.10), transparent);
    transform: translateX(-140%);
}
body.loaded .hero h1::after { animation: shine 1.4s ease 0.55s; }
@keyframes shine {
    0% { transform: translateX(-140%); }
    100% { transform: translateX(340%); }
}

/* ===== 6. 导航入场 ===== */
body:not(.loaded) .navbar { opacity: 0; transform: translateY(-14px); }
.navbar { transition: opacity 0.6s ease 0.1s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s; }

/* ===== 7. 移动端适配 ===== */
@media (max-width: 900px) {
    .banner-visual { width: 60%; }
    .banner-rings { right: 8%; top: 30%; width: 300px; height: 300px; }
    .banner-rings .ring-2 { inset: 30px; }
    .banner-ai { right: 2%; font-size: clamp(130px, 24vw, 200px); }
}
@media (max-width: 640px) {
    .banner-visual { width: 70%; opacity: 0.75; }
    .banner-rings { display: none; }
    .pl-logo { font-size: 21px; letter-spacing: 4px; }
    .pl-slogan { font-size: 12px; letter-spacing: 2px; }
    .pl-bar { width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero::after, .banner-ai, .banner-rings { animation: none !important; }
}

/* ==========================================================================
   PART B · 全站滚动互动 + 悬停反馈（对标 Tec-Do 整页互动感）
   ========================================================================== */

/* B1 滚动进度条 */
#scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 9500; pointer-events: none;
}
#scroll-progress i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, #1e6fff, #ff6b35);
    box-shadow: 0 0 12px rgba(30, 111, 255, 0.7);
    transform-origin: left;
    transform: scaleX(0);
}

/* B2 鼠标跟随光晕（浅底低饱和蓝光） */
#mouse-glow {
    position: fixed; top: 0; left: 0; width: 520px; height: 520px;
    margin: -260px 0 0 -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 111, 255, 0.10) 0%, rgba(30, 111, 255, 0.03) 40%, transparent 68%);
    pointer-events: none; z-index: 4;
    transform: translate3d(-2000px, -2000px, 0);
    will-change: transform;
}

/* B3 滚动揭示（幅度放大，感知明显） */
.reveal {
    opacity: 0;
    transform: translateY(46px);
    filter: blur(7px);
    transition: opacity 0.75s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.65s ease;
    will-change: opacity, transform, filter;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* 卡片错峰 */
.reveal.in:nth-child(2) { transition-delay: 0.06s; }
.reveal.in:nth-child(3) { transition-delay: 0.12s; }
.reveal.in:nth-child(4) { transition-delay: 0.18s; }
.reveal.in:nth-child(5) { transition-delay: 0.24s; }
.reveal.in:nth-child(6) { transition-delay: 0.3s; }

/* B4 区块标题进入：渐变下划线展开 + 标题轻上移 */
.reveal.in .section-title {
    transform: translateY(0);
}
.section-title { position: relative; transition: transform 0.7s ease; }
.reveal:not(.in) .section-title { transform: translateY(8px); }
.reveal.in .section-title::after {
    content: ''; position: absolute; left: 0; bottom: -11px;
    width: 0; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, #1e6fff, #ff6b35);
    animation: titleLine 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s forwards;
}
@keyframes titleLine { to { width: 64px; } }

/* B5 卡片悬停反馈（发光描边 + 微浮 + 图标放大） */
.entry-card:hover,
.why-card:hover,
.result-case:hover {
    border-color: rgba(30, 111, 255, 0.45);
    box-shadow: 0 18px 48px -20px rgba(30, 111, 255, 0.4), 0 0 0 1px rgba(30, 111, 255, 0.12);
    transform: translateY(-4px);
}
.why-card .icon-wrap,
.entry-icon { transition: transform 0.3s ease; }
.why-card:hover .icon-wrap,
.entry-card:hover .entry-icon { transform: scale(1.1); }
.warn-card:hover { transform: translateY(-3px); }

/* B6 区块编号发光 */
.reveal.in .section-index {
    color: #1e6fff;
    text-shadow: 0 0 16px rgba(30, 111, 255, 0.4);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* B7 统计数字/图标呼吸（Banner 数字） */
.hero-stat .num { transition: text-shadow 0.3s ease; }
.hero-stats:hover .num { text-shadow: 0 0 18px rgba(30, 111, 255, 0.35); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; filter: none; }
    #scroll-progress, #mouse-glow { display: none; }
}
