:root {
    --bg-color: #ffffff;
    --bg-subtle: #f7f8fa;
    --text-primary: #111418;
    --text-secondary: #5f6368;
    --line-hairline: #d0d5dd;
    --line-axis: #b8bec8;
    --accent-dark: #111418;
    --accent-blue: #0A58CA;
    --card-bg: #101215;
    --transition: 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    --hero-pad-x: 24px;
}

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

/* 开场期间锁定页面滚动 */
body.locked { overflow: hidden; }

/* ---------------- 首屏主容器 ---------------- */
#hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 540px;
    overflow: hidden;
    background: var(--bg-color);
}

/* 图层通用样式 */
.hero-layer {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hero-body .btn.primary::after {
    display: none;
}

/* ---------------- 顶部极简导航与控制区 ---------------- */
#hero-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 36px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
#hero-topbar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.topbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}
.topbar-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    display: block;
}
.topbar-brand-fallback {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
.topbar-link,
.topbar-replay {
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.topbar-link:hover,
.topbar-replay:hover {
    color: var(--text-primary);
    background: rgba(17, 20, 24, 0.05);
}

/* 跳过按钮：高辨识度毛玻璃胶囊，始终位于最顶层 */
#skip-intro {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(17, 20, 24, 0.22);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    pointer-events: auto;
}
#skip-intro:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}
#skip-intro:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ---------- 层级 1：开场中心小 Logo 呼吸层（兼容自动化检测钩子） ---------- */
#layer-logo {
    background: transparent;
    z-index: 60;
    pointer-events: none;
}
#logo-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
#hero-logo {
    display: block;
    width: clamp(220px, 32vw, 460px);
    height: auto;
    max-height: 14vh;
    object-fit: contain;
}
.logo-fallback {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

/* ---------- 层级 2：复刻参考视频 100vw 全宽卷帘推拉 + 坍缩成卡层 ----------
   核心纠偏：去掉原有的居中圆角阴影卡片包装，改为 100vw 全宽推拉舞台。
   Stage 1-2: #video-brand 从中心小尺寸呼吸放大为横跨 100vw 的巨幅白底品牌横幅；
   Stage 3  : #video-frame 从屏幕底部向上升起，将 #video-brand 向上顶出屏幕；
   Stage 4  : #video-frame 铺满 100vw × 100vh 全屏播放；
   Stage 5  : #video-frame 直接等比缩小并位移至 12 点钟方向，坍缩为首张环绕卡片。 */
#layer-showcase.video-layer {
    z-index: 45;
    background: transparent;
    overflow: hidden;
}

.video-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: transparent;
}

/* 100vw 巨幅白底 Logo 横幅（参考视频 00:02–00:04 被视频自底向上顶出的巨型字标带） */
.video-brand {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100vw;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3.2vh, 38px) 4vw;
    background: #ffffff;
    border-top: 1px solid rgba(17, 20, 24, 0.08);
    border-bottom: 1px solid rgba(17, 20, 24, 0.08);
    will-change: transform, opacity;
}

.video-brand-logo {
    display: block;
    width: 90vw;
    max-width: 1560px;
    height: auto;
    max-height: 20vh;
    object-fit: contain;
    transform-origin: 50% 50%;
    will-change: transform;
}

.video-brand-fallback {
    font-size: clamp(2.4rem, 9.5vw, 8.2rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--text-primary);
    text-transform: uppercase;
    white-space: nowrap;
}

/* 视频容器：从底部升起铺满 100vw × 100vh，随后在阶段 5 直接缩小归位为顶部卡片 */
.video-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: #0d1014;
    overflow: hidden;
    border-radius: 0px;
    will-change: transform, width, height, border-radius, opacity;
}

.brand-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #0d1014;
    display: block;
}

/* 当本地视频文件不可用时的高精度工业机械动态 Canvas 兜底 */
.video-fallback-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
}

/* 自动播放被阻止时的播放入口 */
.video-play-btn {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 16, 20, 0.42);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}
.video-play-btn[hidden] { display: none; }
.play-trigger {
    padding: 14px 32px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(17, 20, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}
.play-trigger:hover {
    background: #000;
    transform: scale(1.04);
}
.play-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ---------- 层级 3：参考视频同款 1px 极简建筑感经纬线地球 ---------- */
#layer-webgl {
    z-index: 20;
    background: var(--bg-color);
}
#earth-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* ---------- 层级 4：中心品牌主张 + 极简无框环绕画廊卡片 ---------- */
#layer-ui {
    z-index: 30;
    flex-direction: column;
}

/* 中心柔和白晕衬底：保证经纬十字交汇处的文字清晰锐利 */
.hero-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 38% 28% at 50% 50%,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.72) 56%,
        rgba(255, 255, 255, 0) 100%);
}

.hero-body {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 复刻参考视频克制、精致的中心双行排版（Born Global / Open And Connected 比例） */
.text-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 580px;
    padding: 0 var(--hero-pad-x);
    pointer-events: none;
}
#hero-title {
    font-size: clamp(1.85rem, 3.1vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.18;
    color: var(--text-primary);
}
#hero-subtitle {
    font-size: clamp(1.05rem, 1.85vw, 1.55rem);
    font-weight: 500;
    color: var(--text-primary);
    margin: 4px auto 22px;
    max-width: 520px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* 复刻参考视频的黑底长箭头主按钮 + 极简次按钮 */
.btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 22px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 3px;
    transition: var(--transition);
    white-space: nowrap;
    pointer-events: none;
}
.btn.primary {
    background: var(--accent-dark);
    color: #fff;
    border: 1px solid var(--accent-dark);
}
.btn.primary::after {
    content: "───►";
    font-size: 10px;
    letter-spacing: -1px;
    opacity: 0.9;
    transition: transform 0.28s ease;
}
.btn.primary:hover {
    background: #262b33;
    border-color: #262b33;
}
.btn.primary:hover::after {
    transform: translateX(4px);
}
.btn.secondary {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    border: 1px solid rgba(17, 20, 24, 0.22);
}
.btn.secondary:hover {
    border-color: var(--text-primary);
    background: #fff;
}
.btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ---------- 环绕卡片画廊系统（参考视频无框锋利切片 + 悬停玻璃态参数层） ---------- */
#cards-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}
.product-card {
    position: absolute;
    top: 0;
    left: 0;
    width: clamp(185px, 16.5vw, 250px);
    display: block;
    text-decoration: none;
    color: inherit;
    pointer-events: none;
    border: 0;
    background: none;
    will-change: transform, opacity;
}

/* 错落画幅比例：复刻参考视频中横竖交错的工业画廊切片感 */
.product-card[data-index="0"] { width: clamp(200px, 18vw, 270px); }
.product-card[data-index="1"] .card-media,
.product-card[data-index="4"] .card-media { aspect-ratio: 4 / 3; }
.product-card[data-index="2"] .card-media { aspect-ratio: 5 / 4; }

.card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(17, 20, 24, 0.12);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
}
.product-card:hover .card-inner,
.product-card:focus-visible .card-inner {
    transform: scale(1.07) translateY(-4px);
    box-shadow: 0 22px 48px rgba(17, 20, 24, 0.22);
}
.product-card:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #181c22;
    overflow: hidden;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .card-media img {
    transform: scale(1.06);
}

.card-img-placeholder {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, #1b2028 0%, #2a313d 100%);
}

/* 平时隐藏冗余白条，保持参考视频的纯粹切片感；悬停或聚焦时优雅浮现毛玻璃产品名 */
.card-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(13, 16, 20, 0.88) 0%, rgba(13, 16, 20, 0.58) 70%, rgba(13, 16, 20, 0) 100%);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    padding: 20px 10px 8px;
    text-align: left;
    opacity: 0.86;
    transform: translateY(2px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.product-card:hover .card-name,
.product-card:focus-visible .card-name {
    opacity: 1;
    transform: translateY(0);
}

/* 只有进入最终阶段后，UI 与卡片才接受点击 */
#layer-ui.is-interactive .text-content,
#layer-ui.is-interactive .btn,
#layer-ui.is-interactive .product-card,
#layer-ui.is-interactive #cards-wrapper {
    pointer-events: auto;
}

/* ---------- 降级动画支持（保留基础悬停色彩反馈，仅关闭位移大动画） ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .product-card,
    .video-frame,
    .video-brand {
        transition: none !important;
    }
}

/* ---------- 响应式：平板与手机（<= 960px） ---------- */
@media (max-width: 960px) {
    :root { --hero-pad-x: 16px; }

    #hero-topbar { padding: 14px 18px; }
    #skip-intro { top: 14px; right: 14px; padding: 7px 14px; font-size: 10px; }

    .video-brand { padding: 16px 5vw; }
    .video-brand-logo { width: 88vw; max-height: 13vh; }

    #layer-ui {
        justify-content: flex-start;
        padding: 72px 0 18px;
        gap: 12px;
    }

    .text-content { margin-top: 8px; }
    #hero-title { font-size: clamp(1.65rem, 6.2vw, 2.2rem); }
    #hero-subtitle { font-size: clamp(0.95rem, 3.4vw, 1.2rem); margin: 6px auto 16px; }

    /* 移动端卡片进入流式网格：3+2 居中排列，5 张全部清晰可见 */
    #cards-wrapper {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0 14px;
        margin-top: auto;
    }
    .product-card,
    .product-card[data-index="0"] {
        position: static;
        width: calc((100% - 20px) / 3);
        min-width: 86px;
    }
    .product-card[data-index="1"] .card-media,
    .product-card[data-index="2"] .card-media,
    .product-card[data-index="4"] .card-media {
        aspect-ratio: 16 / 10;
    }
    .card-name {
        position: static;
        background: #ffffff;
        color: var(--text-primary);
        font-size: 10px;
        font-weight: 700;
        padding: 6px 4px;
        text-align: center;
        opacity: 1;
        transform: none;
    }
    .card-inner {
        background: #ffffff;
        border: 1px solid rgba(17, 20, 24, 0.08);
        border-radius: 6px;
    }
}

@media (max-width: 380px) {
    #layer-ui { padding: 58px 0 12px; }
    .btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        max-width: 230px;
        margin: 0 auto;
    }
    .btn { width: 100%; padding: 9px 14px; font-size: 11.5px; }
    #cards-wrapper { gap: 6px; padding: 0 10px; }
    .product-card,
    .product-card[data-index="0"] {
        width: calc((100% - 12px) / 3);
        min-width: 78px;
    }
}

/* ---------- 网站后续内容（产品画廊与联系方式） ---------- */
.next-content {
    min-height: 100vh;
    padding: 96px 24px;
    text-align: center;
    background: #fff;
    border-top: 1px solid rgba(17, 20, 24, 0.06);
}
.next-content h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.015em;
}
.next-content > p {
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
}

.product-grid {
    margin: 52px auto 0;
    max-width: 1180px;
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.product-item {
    background: #fff;
    border: 1px solid rgba(17, 20, 24, 0.08);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(17, 20, 24, 0.05);
    scroll-margin-top: 32px;
    text-align: left;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(17, 20, 24, 0.1);
}
.product-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f1f3f5;
}
.product-item figcaption {
    font-size: 13.5px;
    font-weight: 700;
    padding: 14px 14px 6px;
    background: #fff;
    color: var(--text-primary);
}
.product-item-spec {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0 14px 14px;
    background: #fff;
}

.contact-content {
    min-height: 48vh;
    padding: 88px 24px;
    text-align: center;
    background: var(--bg-subtle);
    border-top: 1px solid rgba(17, 20, 24, 0.06);
}
.contact-content h2 {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 700;
}
.contact-note {
    color: var(--text-secondary);
    margin-top: 14px;
    font-size: 14px;
}
.contact-line {
    margin-top: 12px;
    font-size: 15px;
}
.contact-label {
    display: inline-block;
    min-width: 72px;
    color: var(--text-secondary);
    font-weight: 600;
}
.contact-line a { color: var(--accent-blue); }
