/* ==========================================================================
   WebVerse Features: sticky "product stage" + scrolling feature steps
   (desktop: media stays in view while the steps scroll past; mobile: one card per step)
   ========================================================================== */
.webverse-platform-section.ws {
    position: relative;
    padding: 110px 0 120px;
    background:
        radial-gradient(60% 30% at 80% 8%, rgba(124, 92, 255, .22), transparent 70%),
        radial-gradient(50% 30% at 10% 60%, rgba(232, 108, 240, .12), transparent 70%),
        #05030f;
}
.ws .container { max-width: 1280px; }

/* ---- header ---- */
.ws-head { text-align: center; max-width: 820px; margin: 0 auto 64px; }
.ws-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #d9ccff;
    background: rgba(155, 92, 246, .14); border: 1px solid rgba(190, 160, 255, .28);
}
.ws-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #e86cf0; box-shadow: 0 0 10px #e86cf0; }
.ws-head .section-title { margin: 18px 0 14px; font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.15; letter-spacing: -.01em; }
.ws-head .section-subtitle { margin: 0 auto; max-width: 640px; font-size: 1.05rem; color: #a9a6c4; }

/* ---- layout ---- */
.ws-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 64px; align-items: start; }
.ws-steps { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; counter-reset: ws; }
.ws-steps::before { content: ''; position: absolute; left: 0; top: 8vh; bottom: 8vh; width: 1px; background: linear-gradient(180deg, transparent, rgba(190, 160, 255, .28) 12%, rgba(190, 160, 255, .28) 88%, transparent); }

.ws-step {
    position: relative;
    min-height: 54vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 28px 0;
    opacity: .34;
    transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
    outline: none; cursor: pointer;
}
.ws-step::before {
    content: ''; position: absolute; left: -29px; top: 50%; width: 3px; height: 0;
    background: linear-gradient(180deg, #8f6bff, #f08bff);
    border-radius: 3px; transform: translateY(-50%);
    transition: height .5s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 0 16px rgba(155, 92, 246, .8);
}
.ws-step.is-active { opacity: 1; transform: translateX(6px); }
.ws-step.is-active::before { height: 56%; }
.ws-step:focus-visible { outline: 2px solid rgba(190, 160, 255, .6); outline-offset: 6px; border-radius: 12px; }

.ws-num {
    font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 3.4rem; line-height: 1; letter-spacing: -.02em;
    background: linear-gradient(180deg, #c9b8ff, rgba(201, 184, 255, .12));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.ws-step.is-active .ws-num { background: linear-gradient(135deg, #a98aff, #f08bff); -webkit-background-clip: text; background-clip: text; }
.ws-step h3 { margin: 10px 0 10px; font-family: 'Poppins', sans-serif; font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 600; color: #f4f2ff; line-height: 1.2; }
.ws-step p { margin: 0 0 20px; max-width: 440px; font-size: 1.02rem; line-height: 1.7; color: #b5b1d3; }
.ws-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.ws-tag {
    padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #cbbcff;
    background: rgba(155, 92, 246, .14); border: 1px solid rgba(190, 160, 255, .26);
}
.ws-cta { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: #fff; text-decoration: none; transition: gap .25s ease, color .25s ease; }
.ws-cta i { font-size: .75rem; transition: transform .25s ease; }
.ws-cta:hover { color: #e9a3ff; }
.ws-cta:hover i { transform: translateX(4px); }

/* ---- sticky stage ---- */
.ws-stage-wrap { position: sticky; top: 96px; align-self: start; }
.ws-stage { position: relative; }
.ws-stage::before {
    content: ''; position: absolute; inset: 8% -6% -10% -6%; z-index: 0;
    background: radial-gradient(closest-side, rgba(124, 92, 255, .42), rgba(232, 108, 240, .14) 60%, transparent);
    filter: blur(30px);
}
.ws-frame {
    position: relative; z-index: 1; overflow: hidden; border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(#070519, #070519) padding-box,
        linear-gradient(140deg, rgba(190, 160, 255, .7), rgba(255, 255, 255, .08) 40%, rgba(232, 108, 240, .55)) border-box;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .03);
}
.ws-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ws-dots { display: inline-flex; gap: 6px; }
.ws-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.ws-dots i:nth-child(1) { background: #ff6b8a; } .ws-dots i:nth-child(2) { background: #ffcf5c; } .ws-dots i:nth-child(3) { background: #5de38d; }
.ws-url { flex: 1; text-align: center; padding: 4px 14px; border-radius: 999px; font-size: .74rem; letter-spacing: .06em; color: #a9a6c4; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); transition: opacity .3s ease; }
.ws-live { font-size: .62rem; font-weight: 700; letter-spacing: .16em; color: #fff; padding: 4px 10px 4px 20px; border-radius: 999px; background: rgba(255, 93, 143, .16); border: 1px solid rgba(255, 93, 143, .4); position: relative; }
.ws-live::before { content: ''; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #ff5d8f; box-shadow: 0 0 8px #ff5d8f; animation: wvPulse 1.6s ease-in-out infinite; }

.ws-screen { position: relative; aspect-ratio: 16 / 10; background: #05030f; overflow: hidden; }
.ws-layer { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.ws-layer.on { opacity: 1; transform: none; pointer-events: auto; }
.ws-layer video, .ws-layer img, .ws-layer iframe { width: 100%; height: 100%; display: block; object-fit: cover; border: 0; background: #0b0820; }
.ws-layer iframe { filter: invert(.92) hue-rotate(200deg) saturate(.8) brightness(.95); }
.ws-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 18%, transparent 80%, rgba(5, 3, 15, .35)); }

.ws-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.ws-progress { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.ws-progress span { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); transition: background .4s ease, box-shadow .4s ease; }
.ws-progress span.on { background: linear-gradient(90deg, #8f6bff, #f08bff); }
.ws-progress span.cur { box-shadow: 0 0 12px rgba(155, 92, 246, .9); }
.ws-count { font-size: .78rem; letter-spacing: .14em; color: #a9a6c4; font-variant-numeric: tabular-nums; }

/* inline media (shown on phones/tablets only) */
.ws-inline { display: none; }

@media (max-width: 960px) {
    .webverse-platform-section.ws { padding: 80px 0 80px; }
    .ws-head { margin-bottom: 36px; }
    .ws-layout { grid-template-columns: 1fr; gap: 0; }
    .ws-stage-wrap { display: none; }
    .ws-steps { padding: 0; display: grid; gap: 22px; }
    .ws-steps::before, .ws-step::before { display: none; }
    .ws-step {
        min-height: 0; opacity: 1; transform: none !important; padding: 16px 16px 22px;
        border-radius: 22px; border: 1px solid transparent;
        background:
            linear-gradient(165deg, rgba(26, 20, 60, .9), rgba(10, 8, 28, .94)) padding-box,
            linear-gradient(140deg, rgba(155, 92, 246, .5), rgba(255, 255, 255, .06) 40%, rgba(232, 108, 240, .4)) border-box;
    }
    .ws-inline { display: block; order: -1; position: relative; aspect-ratio: 16 / 10; margin-bottom: 18px; border-radius: 16px; overflow: hidden; background: #0b0820; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
    .ws-inline video, .ws-inline img, .ws-inline iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
    .ws-inline iframe { filter: invert(.92) hue-rotate(200deg) saturate(.8) brightness(.95); }
    .ws-num { font-size: 2.2rem; }
    .ws-step p { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ws-step, .ws-step::before, .ws-layer { transition: none; }
    .ws-live::before { animation: none; }
}
