/* 全站轻量动效 — 清爽精致，尊重 prefers-reduced-motion */

@keyframes motion-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes motion-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes motion-hero-in {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes motion-bar-grow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes motion-pop {
    0% {
        opacity: 0;
        transform: scale(0.82);
    }
    70% {
        transform: scale(1.04);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes motion-line-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes motion-deco-in {
    from {
        opacity: 0;
        transform: scale(0.6) rotate(-12deg);
    }
    to {
        opacity: 0.88;
        transform: scale(1) rotate(0);
    }
}

@keyframes motion-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes hero-text-rise {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: blur(0);
    }
}

@keyframes hero-text-fade {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes home-hero-kenburns {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.06);
    }
}

@keyframes motion-dot-glow {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(201, 169, 98, 0.14),
            0 2px 10px rgba(201, 169, 98, 0.28);
    }
    50% {
        box-shadow:
            0 0 0 5px rgba(var(--dp-brand-rgb, 74, 122, 181), 0.12),
            0 2px 14px rgba(201, 169, 98, 0.38);
    }
}

@keyframes motion-deco-left-in {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(-18deg) translateX(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes motion-deco-right-in {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(18deg) translateX(-12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes motion-soft-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ---------- 滚动入场 ---------- */
.home-reveal,
.motion-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-reveal.is-visible,
.motion-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* 子元素错落渐显 */
.home-stagger > *,
.motion-stagger > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-reveal.is-visible .home-stagger > *,
.motion-reveal.is-visible .motion-stagger > *,
.home-reveal.is-visible.home-stagger > *,
.motion-reveal.is-visible.motion-stagger > *,
.home-stagger.is-replayed > *,
.motion-stagger.is-replayed > * {
    opacity: 1;
    transform: none;
}
.home-reveal.is-visible .home-stagger > *:nth-child(1),
.motion-reveal.is-visible .motion-stagger > *:nth-child(1),
.home-stagger.is-replayed > *:nth-child(1) { transition-delay: 0.04s; }
.home-reveal.is-visible .home-stagger > *:nth-child(2),
.motion-reveal.is-visible .motion-stagger > *:nth-child(2),
.home-stagger.is-replayed > *:nth-child(2) { transition-delay: 0.09s; }
.home-reveal.is-visible .home-stagger > *:nth-child(3),
.motion-reveal.is-visible .motion-stagger > *:nth-child(3),
.home-stagger.is-replayed > *:nth-child(3) { transition-delay: 0.14s; }
.home-reveal.is-visible .home-stagger > *:nth-child(4),
.motion-reveal.is-visible .motion-stagger > *:nth-child(4),
.home-stagger.is-replayed > *:nth-child(4) { transition-delay: 0.19s; }
.home-reveal.is-visible .home-stagger > *:nth-child(5),
.motion-reveal.is-visible .motion-stagger > *:nth-child(5),
.home-stagger.is-replayed > *:nth-child(5) { transition-delay: 0.24s; }
.home-reveal.is-visible .home-stagger > *:nth-child(6),
.motion-reveal.is-visible .motion-stagger > *:nth-child(6),
.home-stagger.is-replayed > *:nth-child(6) { transition-delay: 0.29s; }
.home-reveal.is-visible .home-stagger > *:nth-child(7),
.motion-reveal.is-visible .motion-stagger > *:nth-child(7),
.home-stagger.is-replayed > *:nth-child(7) { transition-delay: 0.34s; }
.home-reveal.is-visible .home-stagger > *:nth-child(8),
.motion-reveal.is-visible .motion-stagger > *:nth-child(8),
.home-stagger.is-replayed > *:nth-child(8) { transition-delay: 0.39s; }
.home-reveal.is-visible .home-stagger > *:nth-child(9),
.motion-reveal.is-visible .motion-stagger > *:nth-child(9),
.home-stagger.is-replayed > *:nth-child(9) { transition-delay: 0.44s; }
.home-reveal.is-visible .home-stagger > *:nth-child(10),
.motion-reveal.is-visible .motion-stagger > *:nth-child(10),
.home-stagger.is-replayed > *:nth-child(10) { transition-delay: 0.49s; }
.home-reveal.is-visible .home-stagger > *:nth-child(11),
.motion-reveal.is-visible .motion-stagger > *:nth-child(11),
.home-stagger.is-replayed > *:nth-child(11) { transition-delay: 0.54s; }
.home-reveal.is-visible .home-stagger > *:nth-child(12),
.motion-reveal.is-visible .motion-stagger > *:nth-child(12),
.home-stagger.is-replayed > *:nth-child(12) { transition-delay: 0.59s; }

/* ---------- 首页 Hero 轮播 ---------- */
.page-home .carousel-item:not(.active) .hero-slide-bg {
    animation: none !important;
    transform: scale(1);
}
.page-home .carousel-item.active .hero-slide-bg {
    animation: home-hero-kenburns 18s ease-out forwards;
}
.page-home .carousel-item:not(.active) .hero-anim {
    animation: none !important;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
}
.page-home .carousel-item.active .hero-anim--title {
    animation: hero-text-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-home .carousel-item.active .hero-anim--lead {
    animation: hero-text-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}
.page-home .carousel-item.active .hero-anim--tag {
    animation: hero-text-fade 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-home .carousel-item.active .hero-anim--eyebrow {
    animation: hero-text-fade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.page-home .carousel-item.active .hero-anim--actions {
    animation: hero-text-fade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}
.page-home .carousel-item.active .hero-content {
    animation: none;
}

.page-home .home-reveal.is-visible .home-trust-grid {
    animation: motion-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.page-home .motion-reveal.is-visible .section-head .section-title::after {
    transform-origin: center;
    animation: motion-bar-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* 统一区块标题入场 */
.page-home .home-reveal.is-visible .section-head-jh__mark-line:first-child {
    animation: motion-line-grow 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.page-home .home-reveal.is-visible .section-head-jh__mark-line:last-child {
    animation: motion-line-grow 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}
.page-home .home-reveal.is-visible .section-head-jh__mark-dot {
    animation:
        motion-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both,
        motion-dot-glow 3.5s ease-in-out 1.2s infinite;
}
.page-home .home-reveal.is-visible .section-head-jh .section-title {
    animation: motion-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}
.page-home .home-reveal.is-visible .section-head-jh .section-sub {
    animation: motion-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.48s both;
    opacity: 1;
    transform: none;
}

.page-home .process-timeline::before {
    transform: scaleX(0);
    transform-origin: left center;
}
.page-home .home-reveal.is-visible .process-timeline::before {
    animation: motion-line-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.page-home .home-reveal.is-visible .process-item .process-num {
    animation: motion-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-home .home-reveal.is-visible .process-item:nth-child(1) .process-num { animation-delay: 0.35s; }
.page-home .home-reveal.is-visible .process-item:nth-child(2) .process-num { animation-delay: 0.45s; }
.page-home .home-reveal.is-visible .process-item:nth-child(3) .process-num { animation-delay: 0.55s; }
.page-home .home-reveal.is-visible .process-item:nth-child(4) .process-num { animation-delay: 0.65s; }
.page-home .home-reveal.is-visible .process-item:nth-child(5) .process-num { animation-delay: 0.75s; }
.page-home .home-reveal.is-visible .process-item:nth-child(6) .process-num { animation-delay: 0.85s; }
.page-home .home-reveal.is-visible .process-item:nth-child(7) .process-num { animation-delay: 0.95s; }
.page-home .home-reveal.is-visible .process-item:nth-child(8) .process-num { animation-delay: 1.05s; }

.page-home .home-advantage-card__visual {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-home .home-advantage-card:hover .home-advantage-card__visual {
    transform: scale(1.03);
}

.page-home .home-honors-frame {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}
.page-home .home-honors-item:hover .home-honors-frame {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(21, 31, 42, 0.12);
}

.case-panel.active {
    animation: motion-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .home-showcase-tabs .nav-link {
    transition: color 0.22s, background 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s;
}
.page-home .home-showcase-tabs .nav-link.active {
    transform: scale(1.02);
}

.page-home .industry-pill {
    transition: color 0.2s, background 0.25s, border-color 0.25s, transform 0.22s, box-shadow 0.25s;
}
.page-home .industry-pill:active {
    transform: scale(0.97);
}

/* ---------- 全站微交互 ---------- */
.motion-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.motion-link-arrow i,
.motion-link-arrow .bi {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion-link-arrow:hover i,
.motion-link-arrow:hover .bi {
    transform: translateX(4px);
}

.btn-primary,
.btn-outline-primary,
.btn-hero-cta {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s, background 0.22s, border-color 0.22s, color 0.22s;
}
.btn-primary:active,
.btn-outline-primary:active,
.btn-hero-cta:active {
    transform: scale(0.97);
}

.float-sidebar-avatar {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.float-sidebar-main:hover .float-sidebar-avatar {
    transform: scale(1.06);
    box-shadow:
        0 0 0 3px rgba(201, 169, 98, 0.35),
        0 0 28px rgba(201, 169, 98, 0.5),
        0 4px 16px rgba(21, 31, 42, 0.18);
}

.product-card .card-img-wrap img {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .faq-item .accordion-button {
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.page-home .faq-item .accordion-collapse {
    transition: height 0.32s ease;
}

.guide-card {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s, border-color 0.32s;
}
.page-home .guide-card:hover {
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    .home-reveal,
    .motion-reveal,
    .home-stagger > *,
    .motion-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    .page-home .carousel-item:not(.active) .hero-anim {
        opacity: 0 !important;
        visibility: hidden;
    }
    .page-home .carousel-item.active .hero-anim {
        opacity: 1 !important;
        visibility: visible;
        transform: none !important;
        animation: none !important;
        filter: none !important;
    }
    .page-home .carousel-item.active .hero-slide-bg,
    .page-home .carousel-item.active .hero-anim,
    .page-home .carousel-item.active .hero-content,
    .page-home .home-reveal.is-visible .home-trust-grid,
    .page-home .home-reveal.is-visible .section-head-jh__mark-line,
    .page-home .home-reveal.is-visible .section-head-jh__mark-dot,
    .page-home .home-reveal.is-visible .section-head-jh .section-title,
    .page-home .home-reveal.is-visible .section-head-jh .section-sub,
    .case-panel.active {
        animation: none !important;
    }
    .page-home .section-head-jh__mark-line {
        transform: scaleX(1);
    }
    .page-home .section-head-jh__mark-dot,
    .page-home .section-head-jh .section-sub {
        opacity: 1;
        transform: none;
    }
    .float-sidebar-jh .float-sidebar-avatar::after {
        animation: none;
    }
    .float-sidebar-main:hover .float-sidebar-avatar,
    .page-home .home-advantage-card:hover .home-advantage-card__visual,
    .page-home .home-honors-item:hover .home-honors-frame,
    .page-home .home-trust-item:hover,
    .page-home .home-trust-item:hover .home-trust-icon,
    .page-home .home-trust-item:hover .home-trust-text {
        transform: none;
    }
    .page-home .home-trust-item::before {
        transition: none;
    }
}
