/* ===== 开场动画 · 苹果设计片风格 =====
 * 运动极少，靠留白、字距和溶解推进。
 * 缓动统一用 cubic-bezier(.25,.1,.25,1)（ease），苹果最常用的那条。
 */

#jc-cine {
    position: fixed; inset: 0; z-index: 10070;
    background: #FFFFFF;
    color: #1D1D1F;                 /* 苹果正文色 */
    overflow: hidden;
    font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    opacity: 1;
    transition: opacity 1s cubic-bezier(.25,.1,.25,1);
}
#jc-cine.out { opacity: 0; pointer-events: none; }

/* 背景：一圈极淡的光，缓慢呼吸 */
#jc-cine .halo {
    position: absolute; left: 50%; top: 50%;
    width: 120vmax; height: 120vmax;
    margin-left: -60vmax; margin-top: -60vmax;
    background: radial-gradient(circle,
        rgba(232,52,110,.055) 0%,
        rgba(232,52,110,.02) 34%,
        rgba(255,255,255,0) 68%);
    animation: haloBreath 14s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity;
}
/* 只动 opacity。120vmax 的元素做 scale 会让浏览器大面积重绘，
 * 在低端设备上表现为背景闪动。 */
@keyframes haloBreath {
    0%, 100% { opacity: .7; }
    50%      { opacity: 1; }
}

/* 分镜：交叉溶解，不是硬切 */
#jc-cine .sc {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: clamp(40px, 10vw, 160px);
    opacity: 0; visibility: hidden;
    transition: opacity 1.1s cubic-bezier(.25,.1,.25,1),
                visibility 0s 1.1s;
}
#jc-cine .sc.on {
    opacity: 1; visibility: visible;
    transition: opacity 1.1s cubic-bezier(.25,.1,.25,1), visibility 0s;
}

/* ---- 文字：只做透明度和极轻缩放，不位移 ---- */

#jc-cine .eyebrow {
    font-size: 12px;
    letter-spacing: .42em;          /* 起始字距很宽，出场时收紧 */
    text-transform: uppercase;
    color: #86868B;                 /* 苹果灰 */
    margin-bottom: clamp(28px, 4vw, 48px);
    opacity: 0;
}
#jc-cine .sc.on .eyebrow {
    animation: apFade 1.5s .2s cubic-bezier(.25,.1,.25,1) both;
}

#jc-cine .line {
    font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
    font-weight: 900;
    color: #1D1D1F;
    margin: 0;
    line-height: 1.16;
    letter-spacing: -.02em;
    opacity: 0;
    will-change: opacity, letter-spacing;
    /* 避免字体在动画过程中被重新选字导致宽度突变 */
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}
/* 所有标题统一字距，跟 apType 的终点值一致，避免动画结束后重排 */
#jc-cine .line.lg { font-size: clamp(38px, 8vw, 116px); letter-spacing: -.02em; }
#jc-cine .line.md { font-size: clamp(30px, 6vw, 82px); letter-spacing: -.02em; }
#jc-cine .line .pk { color: #E8346E; }

/* 出场：字距从宽收到正常 + 淡入。苹果最标志性的手法。 */
#jc-cine .sc.on .line {
    animation: apType 1.7s cubic-bezier(.25,.1,.25,1) both;
}
#jc-cine .sc.on .line.d1 { animation-delay: .45s; }
#jc-cine .sc.on .line.d2 { animation-delay: .85s; }
/* 注意：终点不能写 letter-spacing: inherit ——
 * 关键帧里的 inherit 取的是「父元素」的值（一般是 normal），
 * 而 .line 自己是 -.02em，动画结束的一瞬间会跳一下，看起来就是抖。
 * 这里显式写成和 .line 一致的 -.02em。 */
@keyframes apType {
    0%   { opacity: 0; letter-spacing: .16em; }
    55%  { opacity: 1; }
    100% { opacity: 1; letter-spacing: -.02em; }
}

/* 副标题 */
#jc-cine .sub {
    font-size: clamp(13px, 1.5vw, 18px);
    letter-spacing: .16em;
    color: #86868B;
    margin: clamp(28px, 4vw, 44px) 0 0;
    opacity: 0;
}
#jc-cine .sc.on .sub {
    animation: apFade 1.6s 1.25s cubic-bezier(.25,.1,.25,1) both;
}
@keyframes apFade { from { opacity: 0; } to { opacity: 1; } }

/* 细线：极细、极慢 */
/* 用 transform: scaleX 而不是 width ——
 * 动 width 每帧都会触发重排，居中元素的左右位置会跟着抖。 */
#jc-cine .rule {
    width: clamp(120px, 18vw, 260px); height: 1px; background: #D2D2D7;
    margin: clamp(26px, 3.5vw, 40px) auto 0;
    transform: scaleX(0);
    transform-origin: center;
    will-change: transform;
}
#jc-cine .sc.on .rule {
    animation: apRule 1.8s .9s cubic-bezier(.25,.1,.25,1) both;
}
@keyframes apRule { to { transform: scaleX(1); } }

/* ---- 数字：苹果也常把数字放大居中 ---- */
#jc-cine .nums {
    display: flex; gap: clamp(40px, 9vw, 130px);
    justify-content: center; flex-wrap: wrap;
}
#jc-cine .num { opacity: 0; text-align: center; }
#jc-cine .sc.on .num { animation: apFade 1.6s cubic-bezier(.25,.1,.25,1) both; }
#jc-cine .sc.on .num:nth-child(1) { animation-delay: .45s; }
#jc-cine .sc.on .num:nth-child(2) { animation-delay: .70s; }
#jc-cine .sc.on .num:nth-child(3) { animation-delay: .95s; }
#jc-cine .num .v {
    font-family: 'Noto Serif SC', serif; font-weight: 900;
    font-size: clamp(54px, 9vw, 132px); line-height: 1;
    letter-spacing: -.04em; color: #1D1D1F;
    /* 等宽数字：滚动时 1/8 宽度一致，整块数字不会左右跳 */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    min-width: 1.6em;          /* 数字从 0 涨到 4 位时预留宽度 */
    display: inline-block;
}
#jc-cine .num .v em { font-style: normal; color: #E8346E; font-size: .5em; margin-left: 4px; }
#jc-cine .num .k {
    margin-top: 16px; font-size: 12px; letter-spacing: .18em; color: #86868B;
}
#jc-cine .num .k b { font-weight: 600; color: #6E6E73; }

/* 联系方式 */
#jc-cine .contact {
    font-size: clamp(12.5px, 1.35vw, 15px);
    line-height: 2.4; color: #86868B; letter-spacing: .04em;
    opacity: 0;
}
#jc-cine .sc.on .contact { animation: apFade 1.6s 1.3s cubic-bezier(.25,.1,.25,1) both; }
#jc-cine .contact b { color: #1D1D1F; font-weight: 600; }

/* ---- 角标与控件：全部低调 ---- */
#jc-cine .idx {
    position: absolute; left: 50%; bottom: clamp(64px, 8vw, 92px);
    transform: translateX(-50%);
    font-size: 11px; letter-spacing: .3em; color: #D2D2D7;
    z-index: 6;
}
#jc-cine .brand {
    position: absolute; left: 50%; bottom: clamp(30px, 4vw, 46px);
    transform: translateX(-50%);
    font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
    color: #D2D2D7; z-index: 6;
}
#jc-cine .bar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: #F2F2F4; z-index: 6;
}
#jc-cine .bar i { display: block; height: 100%; width: 0; background: #E8346E; opacity: .7; }
#jc-cine .ctrl {
    position: absolute; right: clamp(24px, 4vw, 44px); top: clamp(24px, 4vw, 44px); z-index: 6;
}
#jc-cine .ctrl button {
    border: none; background: none; color: #86868B;
    padding: 8px 4px; font-size: 12.5px; letter-spacing: .1em;
    cursor: pointer; font-family: inherit;
    transition: color .3s ease;
}
#jc-cine .ctrl button:hover { color: #1D1D1F; }

#jc-replay {
    position: fixed; left: 18px; bottom: 74px; z-index: 9996;
    display: none; align-items: center; gap: 6px;
    padding: 9px 14px; border: 1px solid #14110F; background: #fff;
    color: #14110F; font-size: 13px; cursor: pointer;
    font-family: 'Noto Sans SC', sans-serif;
    box-shadow: 3px 4px 0 rgba(20,17,15,.12);
    transition: all .25s cubic-bezier(.25,.1,.25,1);
}
#jc-replay:hover { background: #1D1D1F; border-color: #1D1D1F; color: #fff; }
#jc-replay.show { display: inline-flex; }

@media (max-width: 700px) {
    #jc-cine .nums { gap: 34px; }
    #jc-cine .idx { bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    #jc-cine .halo { animation: none; }
    #jc-cine .line, #jc-cine .sub, #jc-cine .eyebrow,
    #jc-cine .num, #jc-cine .contact { animation: none !important; opacity: 1 !important;
        letter-spacing: inherit !important; transform: none !important; }
    #jc-cine .rule { animation: none !important; transform: scaleX(1) !important; }
}
