/* 首页 Hero — 获奖向浅色展厅 + Three.js */

.hero.hero-award {
    position: relative;
    overflow: hidden;
    color: #1e293b;
    text-align: left;
    padding: 4.5rem 0 5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background:
        radial-gradient(120% 80% at 78% 42%, rgba(96, 165, 250, 0.16) 0%, transparent 55%),
        radial-gradient(90% 70% at 12% 20%, rgba(226, 232, 240, 0.9) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 48%, #e8eef5 100%);
}

.hero.hero-award::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, #000 20%, transparent 75%);
    pointer-events: none;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .hero.hero-award { padding: 4.75rem 0 4.25rem; }
}
@media (min-width: 1024px) {
    .hero.hero-award { padding: 5.25rem 0 4.5rem; }
}

.hero-three-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    -webkit-mask-image: linear-gradient(
        105deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.4) 52%,
        rgba(0, 0, 0, 0.9) 78%,
        #000 100%
    );
    mask-image: linear-gradient(
        105deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.4) 52%,
        rgba(0, 0, 0, 0.9) 78%,
        #000 100%
    );
}

.hero.hero-three-ready .hero-three-bg {
    opacity: 0.9;
}

.hero.hero-award > .container {
    position: relative;
    z-index: 2;
}

.hero-award-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero.hero-award .hero-content {
    text-align: left;
    max-width: 34rem;
}

.hero-brand-line {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #86868b !important;
}

.hero.hero-award h1,
.hero.hero-award .hero-award-title {
    margin: 0 0 0.85rem;
    font-size: clamp(2.6rem, 5.2vw, 4.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #1d1d1f !important;
    text-shadow: none !important;
}

.hero.hero-award p,
.hero.hero-award .hero-award-sub {
    margin: 0 0 2rem;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.5;
    color: #6e6e73 !important;
    text-shadow: none !important;
}

.hero.hero-award .hero-brand-line {
    color: #86868b !important;
}

.hero-award-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero-btn-primary,
a.btn.hero-btn-primary,
.btn.hero-btn-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.85rem 1.85rem;
    border-radius: 9999px !important;
    background: #0071e3 !important;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.hero-btn-primary:hover,
a.btn.hero-btn-primary:hover,
.btn.hero-btn-primary:hover {
    background: #0077ed !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35);
    color: #fff !important;
}

.hero-btn-primary:active,
a.btn.hero-btn-primary:active,
.btn.hero-btn-primary:active {
    background: #0062c4 !important;
    transform: scale(0.97);
}

.hero-btn-primary i,
.hero-btn-primary span,
.btn.hero-btn-primary i,
.btn.hero-btn-primary span {
    color: #fff !important;
    position: relative;
    z-index: 1;
}

.hero-btn-ghost,
a.btn.hero-btn-ghost,
.btn.hero-btn-ghost {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.85rem 1.85rem;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    color: #1d1d1f !important;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease;
}

.hero-btn-ghost:hover,
a.btn.hero-btn-ghost:hover,
.btn.hero-btn-ghost:hover {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px);
}

.hero-btn-ghost:active,
a.btn.hero-btn-ghost:active,
.btn.hero-btn-ghost:active {
    transform: scale(0.97);
}

.hero-btn-ghost i,
.hero-btn-ghost span,
.btn.hero-btn-ghost i,
.btn.hero-btn-ghost span {
    color: #1d1d1f !important;
    position: relative;
    z-index: 1;
}

/* 舞台：Three.js 展厅画布 + KV 垫底（不用 filter:drop-shadow） */
.hero-stage {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    aspect-ratio: 4 / 3;
    border-radius: 22px;
    box-shadow:
        0 28px 64px rgba(15, 23, 42, 0.16),
        0 8px 20px rgba(15, 23, 42, 0.06);
    overflow: visible;
    background: transparent;
    opacity: 1 !important;
    visibility: visible !important;
}

.hero-three-card-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    border-radius: 22px;
}

.hero.hero-three-ready .hero-three-card-canvas {
    opacity: 1 !important;
    pointer-events: auto;
}

.hero.hero-award .hero-card-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    z-index: 1;
    display: block;
    border-radius: 22px;
    overflow: hidden;
    background: #eef2f7;
}

.hero.hero-award .hero-card-fallback .hero-card-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    display: block;
    border-radius: 22px;
    box-shadow: none;
    transform: none !important;
}

/* 未就绪时垫底可见；WebGL 就绪后隐藏垫底，只留实时徽章展厅 */
.hero.hero-award .hero-card-fallback,
.hero.hero-award .hero-card-fallback .hero-card-main {
    opacity: 1;
    pointer-events: none;
}

/* 万家 logo 主视觉始终可见；WebGL 只做轻量叠加 */
.hero.hero-award .hero-card-fallback,
.hero.hero-three-ready .hero-card-fallback,
.hero.hero-three-ready .hero-card-fallback .hero-card-main,
.hero.hero-static-fallback .hero-card-fallback,
.hero.hero-static-fallback .hero-card-fallback .hero-card-main {
    opacity: 1 !important;
}

.hero.hero-three-ready .hero-three-card-canvas {
    opacity: 0 !important; /* 暂不叠额外玻璃层，避免遮住原版 logo */
    pointer-events: none !important;
}

.hero.hero-static-fallback .hero-three-card-canvas {
    display: none !important;
}

.hero.hero-award .hero-stage {
    background: #eef2f7;
    overflow: hidden;
}

.hero.hero-award .hero-card-fallback .hero-card-main {
    object-fit: cover;
    object-position: center 42%;
    background: #eef2f7;
}

@media (max-width: 900px) {
    .hero-award-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero.hero-award .hero-content {
        max-width: none;
        text-align: center;
    }

    .hero-award-cta {
        justify-content: center;
    }

    .hero-brand-line {
        letter-spacing: 0.06em;
    }

    .hero-three-bg {
        -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.45) 30%,
            #000 100%
        );
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.45) 30%,
            #000 100%
        );
    }

    .hero.hero-three-ready .hero-three-bg {
        opacity: 0.55;
    }

    .hero-stage {
        margin: 0 auto;
        max-width: 480px;
    }
}

/* 暗色主题：首屏锁定浅色展厅，避免标题/舞台被全局暗色打穿 */
[data-theme="dark"] .hero.hero-award {
    color: #1e293b;
    background:
        radial-gradient(120% 80% at 78% 42%, rgba(96, 165, 250, 0.16) 0%, transparent 55%),
        radial-gradient(90% 70% at 12% 20%, rgba(226, 232, 240, 0.9) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 48%, #e8eef5 100%);
    border-bottom-color: rgba(148, 163, 184, 0.28);
}

[data-theme="dark"] .hero.hero-award .hero-award-title,
[data-theme="dark"] .hero.hero-award h1 {
    color: #0f172a !important;
}

[data-theme="dark"] .hero.hero-award .hero-award-sub,
[data-theme="dark"] .hero.hero-award .hero-brand-line,
[data-theme="dark"] .hero.hero-award p {
    color: #475569 !important;
}

[data-theme="dark"] .hero.hero-award .hero-btn-ghost {
    background: rgba(255, 255, 255, 0.85);
    color: #1e293b !important;
    border-color: rgba(148, 163, 184, 0.55);
}

[data-theme="dark"] .products-section .product-card {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .products-section .product-image {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .products-lead {
    color: #94a3b8;
}

/* 与 Hero 同调的产品区 */
.products-lead {
    text-align: center;
    color: #64748b;
    font-size: 1.05rem;
    margin: -0.5rem 0 2.5rem;
    letter-spacing: 0.02em;
}

.products-section .featured-badge--quiet {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.products-section .product-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.products-section .product-image {
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.products-section .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.products-section .product-title {
    color: #1d1d1f;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.products-section .product-description {
    color: #6e6e73;
}

.products-section .btn-download {
    background: #1d1d1f !important;
    border-color: #1d1d1f !important;
    border-radius: 9999px !important;
}

.products-section .btn-download:hover {
    background: #000000 !important;
}

.products-section .btn-download:active {
    transform: scale(0.96);
}

.products-section .product-meta--minimal {
    display: none;
}

.products-section .product-actions {
    gap: 0.65rem;
}

.products-section .btn-primary {
    background: #0071e3 !important;
    border-color: #0071e3 !important;
    border-radius: 9999px !important;
}

.products-section .btn-primary:hover {
    background: #0077ed !important;
}

.products-section .btn-primary:active {
    background: #0062c4 !important;
    transform: scale(0.96);
}

.products-section {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
}

.products-section .section-title {
    color: #1d1d1f !important;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* About / 联系区与 Hero 同色系，避免紫渐变与横向撑破 */
.home-about {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    padding: 4.5rem 0;
    overflow: hidden;
}

.home-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.home-about .about-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin: 0 0 1.5rem;
    color: #0f172a;
}

.home-about .feature-item,
.home-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.home-feature-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.home-about .feature-title {
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.home-about .feature-desc {
    margin: 0;
    color: #64748b;
}

.home-start-card {
    padding: 2rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.home-start-card h3 {
    margin: 0 0 1rem;
    color: #0f172a;
}

.home-start-card > p {
    margin: 0 0 1.25rem;
    color: #64748b;
}

.home-start-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.home-start-actions .hero-btn-primary,
.home-start-actions .hero-btn-ghost,
.home-contact-cta {
    gap: 0.45rem;
}

.home-start-actions .hero-btn-primary,
.home-contact-cta {
    color: #fff !important;
}

.home-start-actions .hero-btn-ghost {
    color: #1e293b !important;
}

/* 关注我们：Apple 极简风格 */
.home-contact {
    padding: 5rem 0;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.home-contact-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 3rem;
}

.home-contact-lead {
    margin: 0.85rem 0 0;
    color: #6e6e73;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.home-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: stretch;
    max-width: 820px;
    margin: 0 auto;
}

.home-contact-qr,
.home-contact-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-contact-info {
    justify-content: center;
}

.home-contact-qr h3,
.home-contact-info h3 {
    margin: 0 0 1.25rem;
    color: #1d1d1f;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.home-qr-box {
    display: inline-flex;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 16px 36px rgba(0, 0, 0, 0.06);
}

.home-qr-box img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    display: block;
}

.home-qr-empty {
    width: 200px;
    height: 200px;
    align-items: center;
    justify-content: center;
    color: #86868b;
    background: #f5f5f7;
    border-radius: 12px;
}

.home-contact-qr > p {
    margin: 1rem 0 0;
    color: #6e6e73;
    font-size: 0.9rem;
}

.home-contact-list {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.home-contact-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #48484a;
    font-size: 0.95rem;
}

.home-contact-empty {
    color: #86868b;
}

.home-contact-cta {
    margin: 0 auto;
    border-radius: 9999px !important;
    background: #0071e3 !important;
    padding: 0.85rem 2rem !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28) !important;
}

.home-contact-cta:hover {
    background: #0077ed !important;
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35) !important;
}

.home-contact-cta:active {
    background: #0062c4 !important;
    transform: scale(0.97) !important;
}

/* 首页底部：去掉 footer 上方大空隙，按钮更可读 */
body:has(.home-contact) .footer {
    margin-top: 0;
    text-align: left;
}

body:has(.home-contact) .footer-bottom {
    text-align: center;
}

body:has(.home-contact) .back-to-top {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.06) !important;
}

@media (max-width: 900px) {
    .home-about-grid,
    .home-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-three-bg {
        display: none !important;
    }

    .hero-stage {
        transform: none !important;
    }
}
