/* ============================================================
   电影级滚动叙事首页 — 邓中和 DDFilm
   仅作用于 body.cinematic，不影响其它页面
   ============================================================ */

body.cinematic {
    --ink: #06060b;
    --ink-2: #0a0a12;
    --ink-3: #11111c;
    --text: #ecedf5;
    --text-dim: #a6a7be;
    --text-faint: #6f7088;
    --blue: #5b82ff;
    --cyan: #38d3d3;
    --violet: #9a86ff;
    --brand: #ff3b3b;
    --brand-deep: #d62828;
    --glass: rgba(255, 255, 255, 0.035);
    --glass-strong: rgba(255, 255, 255, 0.06);
    --hair: rgba(255, 255, 255, 0.1);

    background: var(--ink);
    color: var(--text);
    overflow-x: hidden;
    font-family: var(--font-display);
    -webkit-font-smoothing: antialiased;
}

/* 背景层：粒子 canvas + 噪点 + 径向辉光 */
.cine-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(91, 130, 255, 0.12), transparent 55%),
        radial-gradient(90% 70% at 85% 110%, rgba(154, 134, 255, 0.1), transparent 60%),
        radial-gradient(70% 60% at 5% 90%, rgba(56, 211, 211, 0.07), transparent 60%),
        var(--ink);
}

#particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.cine-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 鼠标光斑 */
.cine-cursor-glow {
    position: fixed;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(91, 130, 255, 0.1), transparent 65%);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: left, top;
}

body.cinematic .cine-content {
    position: relative;
    z-index: 2;
}

/* ---------------- 导航（深色玻璃） ---------------- */
body.cinematic .navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}
body.cinematic .navbar.scrolled {
    background: rgba(8, 8, 14, 0.72);
    backdrop-filter: saturate(140%) blur(18px);
    border-bottom: 1px solid var(--hair);
}
body.cinematic .nav-link {
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
body.cinematic .nav-link:hover { color: #fff; }
body.cinematic .hamburger span { background: #fff; }
body.cinematic .nav-dropdown {
    background: rgba(12, 12, 20, 0.96);
    border-color: var(--hair);
}
body.cinematic .nav-dropdown a { color: var(--text) !important; }
body.cinematic .nav-dropdown a:hover { background: rgba(91,130,255,0.16); color: #fff !important; }
@media (max-width: 768px) {
    body.cinematic .nav-menu { background: rgba(8, 8, 14, 0.97); }
}

/* ---------------- Scene 通用 ---------------- */
.scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(72px, 12vh, 140px) clamp(20px, 5vw, 80px);
}
.scene-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}
.scene-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 22px;
}
.scene-eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), transparent);
}
.scene-title {
    font-size: clamp(2.2rem, 5.4vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: #fff;
}
.scene-sub {
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    font-weight: 500;
    color: var(--text);
    margin: 0 0 18px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.scene-text {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.85;
    color: var(--text-dim);
    max-width: 720px;
}

/* 文字逐行揭示 */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.9s ease;
}
.in .reveal-line > span,
.reveal-line.in > span { transform: translateY(0); opacity: 1; }

/* 元素带景深的进入 */
.reveal {
    opacity: 0;
    transform: translateY(46px) scale(0.965);
    filter: blur(8px);
    transition: opacity 1s ease, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), filter 1s ease;
    will-change: transform, opacity, filter;
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* ---------------- 玻璃卡片 + 渐变描边 ---------------- */
.glass {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(150deg, rgba(124, 156, 255, 0.4), rgba(56, 214, 214, 0.12) 42%, rgba(154, 134, 255, 0.32));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ---------------- 按钮 ---------------- */
.cine-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.cine-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
}
.cine-btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    box-shadow: 0 10px 30px rgba(214, 40, 40, 0.32);
}
.cine-btn-primary:hover { box-shadow: 0 16px 44px rgba(255, 59, 59, 0.45); }
.cine-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--hair);
    color: #fff;
    backdrop-filter: blur(8px);
}
.cine-btn-ghost:hover {
    border-color: rgba(124, 156, 255, 0.6);
    box-shadow: 0 0 30px rgba(91, 130, 255, 0.25);
}

/* ---------------- Scene 1 开场 ---------------- */
#scene-hero {
    height: 240vh;
    align-items: flex-start;
    padding: 0;
}
.hero-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    will-change: transform, filter, opacity;
}
.hero-video-wrap video,
.hero-video-wrap .video-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-video-wrap .video-fallback {
    background:
        radial-gradient(80% 60% at 50% 30%, rgba(91, 130, 255, 0.22), transparent 60%),
        radial-gradient(70% 70% at 80% 90%, rgba(154, 134, 255, 0.18), transparent 60%),
        linear-gradient(160deg, #0a0a16, #05050a);
}
.hero-video-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(4, 4, 8, 0.72) 100%),
        linear-gradient(180deg, rgba(4,4,8,0.35) 0%, rgba(4,4,8,0.55) 60%, var(--ink) 100%);
}
.hero-center {
    position: relative;
    text-align: center;
    padding: 0 24px;
    max-width: 1000px;
    will-change: transform, opacity;
}
.hero-h1 {
    font-size: clamp(4rem, 14vw, 11rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 0.98;
    margin: 0;
    color: #fff;
    text-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
}
.hero-roles {
    margin: 26px 0 10px;
    font-size: clamp(1.05rem, 2.6vw, 1.7rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #fff;
}
.hero-roles .sep { color: var(--cyan); margin: 0 4px; }
.hero-lead {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--text);
    margin: 0 auto 8px;
}
.hero-fine {
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    color: var(--text-faint);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}
.scroll-cue {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-faint);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}
.scroll-cue .mouse {
    width: 24px;
    height: 38px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    position: relative;
}
.scroll-cue .mouse::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 7px;
    border-radius: 2px;
    background: var(--cyan);
    transform: translateX(-50%);
    animation: cueScroll 1.8s infinite;
}
@keyframes cueScroll {
    0% { opacity: 0; transform: translate(-50%, 0); }
    40% { opacity: 1; }
    80% { opacity: 0; transform: translate(-50%, 12px); }
    100% { opacity: 0; }
}

/* ---------------- Scene 2 双时间线 ---------------- */
.origin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 6vw, 90px);
    margin-top: 50px;
    position: relative;
}
.origin-col h3 {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.origin-col.film h3 { color: var(--cyan); }
.origin-col.ai h3 { color: var(--violet); text-align: right; }
.origin-col.ai { text-align: right; }
.tl-item {
    display: block;
    padding: 14px 20px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--hair);
    font-size: 1.05rem;
    color: var(--text);
}
.origin-merge {
    text-align: center;
    margin-top: 40px;
    font-size: clamp(1.1rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: #fff;
}
.origin-merge .grad {
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------------- Scene 3 产品系统图 ---------------- */
.product-system {
    position: relative;
    margin-top: 56px;
    min-height: 460px;
    display: grid;
    place-items: center;
}
.product-core {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    color: #fff;
    background: radial-gradient(circle at 50% 40%, rgba(91,130,255,0.35), rgba(154,134,255,0.12) 70%, transparent);
    border: 1px solid rgba(124,156,255,0.5);
    box-shadow: 0 0 60px rgba(91,130,255,0.3), inset 0 0 40px rgba(91,130,255,0.15);
    z-index: 2;
}
.product-core span { font-size: 1.15rem; line-height: 1.3; }
.product-core small { display:block; color: var(--cyan); font-weight: 600; letter-spacing:0.1em; margin-top:4px; font-size:0.7rem; }
.node-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.p-node {
    position: absolute;
    width: 150px;
    margin-left: -75px;
    margin-top: -32px;
    left: 50%;
    top: 50%;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--glass);
    border: 1px solid var(--hair);
    opacity: 0.25;
    transition: opacity 0.6s ease, color 0.6s ease, box-shadow 0.6s ease, border-color 0.6s ease;
}
.p-node.lit {
    opacity: 1;
    color: #fff;
    border-color: rgba(124,156,255,0.55);
    box-shadow: 0 0 26px rgba(91,130,255,0.3);
}
.product-grid-fallback { display: none; }

/* ---------------- Scene 4 GEO 搜索路径 ---------------- */
.geo-flow {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: clamp(10px, 2vw, 26px);
}
.geo-node { padding: 18px 18px; border-radius: 14px; text-align: center; }
.geo-node .lbl { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.geo-node .val { font-weight: 700; color: #fff; font-size: 1rem; line-height: 1.4; }
.geo-node.model .val { color: var(--cyan); }
.geo-node.out .val { color: var(--violet); }
.geo-arrow { position: relative; height: 2px; background: var(--hair); overflow: hidden; border-radius: 2px; }
.geo-arrow::after {
    content: "";
    position: absolute; left: 0; top: 0; height: 100%;
    width: var(--p, 0%);
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 12px var(--cyan);
    transition: width 0.2s linear;
}
.geo-methods {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 44px;
}
.geo-chip {
    padding: 10px 20px; border-radius: 999px; border: 1px solid var(--hair);
    background: var(--glass); color: var(--text); font-weight: 600; font-size: 0.95rem;
}

/* ---------------- Scene 5 智能体流程 ---------------- */
.agent-flow {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    counter-reset: af;
}
.agent-step {
    flex: 1 1 160px;
    position: relative;
    padding: 22px 18px;
    text-align: center;
}
.agent-step .dot {
    width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 14px;
    display: grid; place-items: center; font-weight: 700; color: #fff;
    background: rgba(91,130,255,0.16); border: 1px solid rgba(124,156,255,0.4);
}
.agent-step h4 { color: #fff; font-size: 1rem; margin-bottom: 6px; }
.agent-step p { color: var(--text-faint); font-size: 0.85rem; line-height: 1.5; }
.agent-line {
    height: 2px; margin: 36px 0 8px; border-radius: 2px;
    background: var(--hair); position: relative; overflow: hidden;
}
.agent-line::after {
    content:""; position:absolute; inset:0; width: var(--p,0%);
    background: linear-gradient(90deg, var(--violet), var(--cyan)); box-shadow: 0 0 12px var(--violet);
    transition: width 0.2s linear;
}
.agent-scenes { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top: 30px; }
.agent-scenes .geo-chip { border-color: rgba(154,134,255,0.3); }

/* ---------------- Scene 6 Vibe Coding ---------------- */
.vibe-flow { display: grid; grid-template-columns: 1fr auto 1.3fr; gap: clamp(16px,3vw,40px); align-items: center; margin-top: 50px; }
.vibe-prompt {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem; line-height: 1.8; color: var(--cyan);
    padding: 24px; border-radius: 14px;
}
.vibe-prompt .pl { color: var(--text-faint); }
.vibe-arrow { font-size: 1.6rem; color: var(--violet); text-align:center; }
.vibe-outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vibe-card {
    padding: 18px; border-radius: 14px; font-weight: 600; color: #fff;
    background: var(--glass); border: 1px solid var(--hair);
}
.vibe-card span { display:block; color: var(--cyan); font-size: 0.75rem; letter-spacing:0.12em; margin-bottom:6px; }

/* ---------------- Scene 7 项目证据 ---------------- */
.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 22px;
    margin-top: 50px;
}
.proof-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.proof-tag {
    align-self: flex-start; font-size: 0.72rem; letter-spacing: 0.08em; font-weight: 700;
    color: var(--cyan); background: rgba(56,211,211,0.12); padding: 5px 14px; border-radius: 999px;
}
.proof-card h3 { color: #fff; font-size: 1.2rem; line-height: 1.4; }
.proof-card dl { margin: 0; display: grid; gap: 9px; }
.proof-card dl > div { display: flex; gap: 10px; font-size: 0.9rem; line-height: 1.5; }
.proof-card dt { flex: 0 0 76px; color: var(--blue); font-weight: 700; }
.proof-card dd { margin: 0; color: var(--text-dim); }

/* ---------------- Scene 8 收束 ---------------- */
#scene-contact .scene-inner { text-align: center; }
.contact-services { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin: 30px 0 8px; }
.contact-actions { display:flex; flex-wrap:wrap; gap:16px; justify-content:center; margin-top: 36px; }
.contact-social { display:flex; gap:18px; justify-content:center; margin-top: 34px; }
.contact-social .social-link {
    width: 52px; height: 52px; border-radius: 50%; display:grid; place-items:center;
    background: var(--glass); border: 1px solid var(--hair); color: #fff; font-size: 1.3rem;
    position: relative; cursor: pointer; transition: all 0.3s ease;
}
.contact-social .social-link:hover { border-color: rgba(124,156,255,0.6); box-shadow: 0 0 24px rgba(91,130,255,0.3); }
.contact-social .qr-tooltip {
    position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%) translateY(8px);
    background: #0c0c16; border: 1px solid var(--hair); border-radius: 12px; padding: 10px;
    opacity: 0; visibility: hidden; transition: all 0.3s ease; width: 160px; text-align:center;
}
.contact-social .social-link:hover .qr-tooltip { opacity:1; visibility:visible; transform: translateX(-50%) translateY(0); }
.contact-social .qr-tooltip img { width: 140px; height: 140px; border-radius: 8px; }
.contact-social .qr-text { display:block; font-size:0.75rem; color: var(--text-dim); margin-top:6px; }
.contact-meta { margin-top: 30px; color: var(--text-faint); font-size: 0.92rem; line-height: 1.9; }
.contact-meta a { color: var(--cyan); text-decoration: none; }

/* ---------------- 页脚（深色） ---------------- */
body.cinematic .footer {
    position: relative; z-index: 2;
    background: rgba(6,6,11,0.9);
    border-top: 1px solid var(--hair);
}

/* ---------------- 背景音乐按钮（深色已在 styles.css，微调） ---------------- */
body.cinematic .bgm-toggle { z-index: 1500; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
    .product-system { display: block; min-height: auto; }
    .product-core { margin: 0 auto 26px; }
    .node-ring { position: static; }
    .p-node { position: static; left: auto; top: auto; width: auto; margin: 0 0 12px; transform: none !important; opacity: 1; }
    .origin-grid { grid-template-columns: 1fr; }
    .origin-col.ai, .origin-col.ai h3 { text-align: left; }
    .geo-flow { grid-template-columns: 1fr; }
    .geo-arrow { height: 28px; width: 2px; justify-self: center; }
    .geo-arrow::after { width: 100% !important; height: var(--p,0%); }
    .vibe-flow { grid-template-columns: 1fr; }
    .vibe-arrow { transform: rotate(90deg); }
    .agent-step { flex: 1 1 45%; }
    #scene-hero { height: 160vh; }
}
@media (max-width: 520px) {
    .vibe-outputs { grid-template-columns: 1fr; }
    .hero-h1 { letter-spacing: 0.02em; }
}

/* ---------------- 降级：用户关闭动效 ---------------- */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-line > span { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
    .p-node { opacity: 1 !important; }
    .geo-arrow::after { width: 100% !important; }
    .agent-line::after { width: 100% !important; }
    .scroll-cue .mouse::after { animation: none; }
    #scene-hero { height: auto; }
    .hero-sticky { position: relative; }
}
