/* SongWei Home TVC opening film — homepage only, 2026-08-07 */
.tvc-opening {
    --tvc-ink: #17110d;
    --tvc-cream: #f7efe4;
    --tvc-gold: #cda06f;
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 108px clamp(22px, 4vw, 68px) 38px;
    color: var(--tvc-cream);
    background: var(--tvc-ink);
}

.tvc-opening__ambient {
    position: absolute;
    z-index: -3;
    inset: -8%;
    background:
        linear-gradient(90deg, rgba(18, 12, 8, .9), rgba(18, 12, 8, .36) 42%, rgba(18, 12, 8, .42) 58%, rgba(18, 12, 8, .92)),
        url("../assets/video/songwei-craft-film-poster.jpg?v=20260807-tvc-1") center 42% / cover no-repeat;
    filter: blur(34px) saturate(.72);
    transform: scale(1.08);
    opacity: .62;
}

.tvc-opening::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, rgba(205, 160, 111, .16), transparent 42%),
        linear-gradient(180deg, rgba(12, 8, 6, .28), rgba(12, 8, 6, .74));
}

.tvc-opening::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    opacity: .15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
}

.tvc-opening__skip {
    position: absolute;
    z-index: 4;
    top: 96px;
    right: clamp(22px, 3.4vw, 58px);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    color: rgba(255, 255, 255, .88);
    background: rgba(18, 13, 10, .34);
    backdrop-filter: blur(12px);
    font-size: 13px;
    letter-spacing: .06em;
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.tvc-opening__skip:hover,
.tvc-opening__skip:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(18, 13, 10, .66);
    transform: translateY(-2px);
}

.tvc-opening__stage {
    width: min(100%, 1280px);
    min-height: min(760px, calc(100svh - 150px));
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(315px, 420px) minmax(230px, 1fr);
    align-items: center;
    gap: clamp(34px, 5vw, 82px);
}

.tvc-opening__story {
    align-self: center;
    max-width: 390px;
}

.tvc-opening__kicker {
    margin: 0 0 24px;
    color: var(--tvc-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.tvc-opening__title {
    margin: 0;
    color: #fffaf2;
    font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
    font-size: clamp(36px, 3.5vw, 58px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.tvc-opening__lead {
    max-width: 31em;
    margin: 28px 0 0;
    color: rgba(247, 239, 228, .7);
    font-size: 15px;
    line-height: 1.9;
    letter-spacing: .02em;
}

.tvc-opening__film {
    position: relative;
    justify-self: center;
    width: min(100%, 420px);
    aspect-ratio: 9 / 16;
    max-height: min(760px, calc(100svh - 150px));
    overflow: hidden;
    border: 1px solid rgba(255, 245, 230, .2);
    border-radius: 28px;
    background: #0d0a08;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, .46),
        0 0 0 8px rgba(255, 255, 255, .025);
}

.tvc-opening__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0d0a08;
}

.tvc-opening__film::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .16), transparent 24%, transparent 70%, rgba(0, 0, 0, .44));
}

.tvc-opening__sound {
    position: absolute;
    z-index: 3;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 11, 8, .42);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    letter-spacing: .05em;
    transition: background .2s ease, transform .2s ease;
}

.tvc-opening__sound:hover,
.tvc-opening__sound:focus-visible {
    background: rgba(15, 11, 8, .72);
    transform: translateY(-1px);
}

.tvc-opening__sound-icon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tvc-gold);
    box-shadow: 0 0 0 4px rgba(205, 160, 111, .16);
}

.tvc-opening__start {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
    background: linear-gradient(180deg, rgba(12, 8, 6, .28), rgba(12, 8, 6, .82));
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
}

.tvc-opening.is-play-blocked .tvc-opening__start,
.tvc-opening.is-user-left .tvc-opening__start {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tvc-opening.is-play-blocked .tvc-opening__sound,
.tvc-opening.is-user-left .tvc-opening__sound {
    opacity: 0;
    pointer-events: none;
}

.tvc-opening__start > span {
    color: rgba(255, 248, 239, .68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
}

.tvc-opening__start button {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-height: 50px;
    padding: 0 21px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #21150e;
    background: #fff8ef;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .25);
    cursor: pointer;
    font: inherit;
    transition: transform .2s ease, background .2s ease;
}

.tvc-opening__start button:hover,
.tvc-opening__start button:focus-visible {
    background: #fff;
    transform: translateY(-2px);
}

.tvc-opening__start button i {
    font-size: 11px;
    font-style: normal;
}

.tvc-opening__start button strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.tvc-opening__start > a {
    padding: 7px 10px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .28);
    text-underline-offset: 5px;
}

.tvc-opening__progress {
    position: absolute;
    z-index: 3;
    right: 18px;
    bottom: 18px;
    left: 18px;
    height: 2px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
}

.tvc-opening__progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #fff5e7;
    transform-origin: left center;
}

.tvc-opening__endcap {
    position: absolute;
    z-index: 3;
    right: 22px;
    bottom: 34px;
    left: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px 15px 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    color: rgba(255, 255, 255, .82);
    background: rgba(18, 12, 8, .72);
    backdrop-filter: blur(16px);
    font-size: 12px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .5s ease, transform .5s ease;
}

.tvc-opening.is-ended .tvc-opening__endcap {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.tvc-opening__endcap a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 999px;
    color: #21150e;
    background: #f7efe4;
    font-weight: 650;
}

.tvc-opening.is-ended .tvc-opening__progress {
    opacity: 0;
}

.tvc-opening__mobile-copy {
    display: none;
}

.tvc-opening__details {
    align-self: center;
    max-width: 320px;
    margin: 0;
}

.tvc-opening__detail {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 15px;
    padding: 19px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.tvc-opening__detail:first-child {
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.tvc-opening__detail dt {
    color: var(--tvc-gold);
    font-size: 11px;
    letter-spacing: .12em;
}

.tvc-opening__detail dd {
    margin: 0;
}

.tvc-opening__detail strong,
.tvc-opening__detail span {
    display: block;
}

.tvc-opening__detail strong {
    color: rgba(255, 250, 242, .92);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .06em;
}

.tvc-opening__detail span {
    margin-top: 5px;
    color: rgba(247, 239, 228, .48);
    font-size: 12px;
    line-height: 1.65;
}

.tvc-opening__continue {
    position: absolute;
    z-index: 4;
    right: clamp(22px, 3.4vw, 58px);
    bottom: 32px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tvc-opening__continue::after {
    content: "↓";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    animation: tvc-float 2.1s ease-in-out infinite;
}

@keyframes tvc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@media (max-width: 1100px) {
    .tvc-opening__stage {
        grid-template-columns: minmax(200px, .9fr) minmax(300px, 400px) minmax(180px, .8fr);
        gap: 34px;
    }
    .tvc-opening__title { font-size: clamp(34px, 4vw, 46px); }
}

@media (max-width: 900px) {
    .tvc-opening {
        min-height: 100svh;
        display: block;
        padding: 70px 0 0;
        background: #0e0a08;
    }
    .tvc-opening__ambient,
    .tvc-opening__story,
    .tvc-opening__details,
    .tvc-opening__continue {
        display: none;
    }
    .tvc-opening::before {
        z-index: 1;
        background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 27%, transparent 63%, rgba(0, 0, 0, .68));
    }
    .tvc-opening__skip {
        top: 84px;
        right: 14px;
        z-index: 5;
        min-height: 38px;
        padding: 0 13px;
        font-size: 11px;
    }
    .tvc-opening__stage {
        display: block;
        width: 100%;
        min-height: 0;
        height: calc(100svh - 70px);
    }
    .tvc-opening__film {
        width: 100%;
        height: 100%;
        max-height: none;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .tvc-opening__video {
        object-fit: cover;
    }
    .tvc-opening__sound {
        top: 14px;
        left: 14px;
        min-height: 38px;
        padding: 0 13px;
        font-size: 11px;
    }
    .tvc-opening__mobile-copy {
        position: absolute;
        z-index: 3;
        right: 18px;
        bottom: 52px;
        left: 18px;
        display: block;
        color: #fff8ef;
        text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
    }
    .tvc-opening__mobile-copy span {
        display: block;
        margin-bottom: 8px;
        color: rgba(255, 248, 239, .7);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .22em;
    }
    .tvc-opening__mobile-copy strong {
        display: block;
        max-width: 12em;
        font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
        font-size: clamp(25px, 8vw, 36px);
        font-weight: 500;
        line-height: 1.28;
        letter-spacing: -.035em;
    }
    .tvc-opening__progress {
        right: 18px;
        bottom: 24px;
        left: 18px;
    }
    .tvc-opening__endcap {
        right: 18px;
        bottom: 22px;
        left: 18px;
    }
    .tvc-opening.is-ended .tvc-opening__mobile-copy {
        opacity: 0;
        transition: opacity .35s ease;
    }
}

@media (max-width: 430px) and (max-height: 720px) {
    .tvc-opening__mobile-copy strong { font-size: 25px; }
    .tvc-opening__mobile-copy { bottom: 45px; }
}

@media (prefers-reduced-motion: reduce) {
    .tvc-opening__continue::after { animation: none; }
    .tvc-opening__skip,
    .tvc-opening__sound,
    .tvc-opening__endcap,
    .tvc-opening__start { transition: none; }
}
