/* =========================================================
   PRODUCT TOUR / PARALLAX SHOWCASE
   ========================================================= */
.parallax-container {
    /* Taller = more scroll distance per screenshot = longer dwell between photos */
    height: 850vh;
    position: relative;
    z-index: 5;
    margin-bottom: 25vh;
}

.parallax-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(56, 145, 166, 0.1), transparent 85%);
}

.item-container {
    will-change: transform;
}

/* PHONE CHASSIS */
.parallax-chassis {
    width: 310px;
    aspect-ratio: 9 / 19.5;
    background: #000;
    border-radius: 54px;
    padding: 8px;
    position: relative;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), 0 0 80px rgba(56, 145, 166, 0.18);
    border: 2px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    will-change: transform;
}

.phone-screen-container {
    width: 100%;
    height: 100%;
    /* Brand backdrop so a missing/slow screenshot never shows pure black */
    background:
        radial-gradient(circle at 50% 35%, rgba(56, 145, 166, 0.25), transparent 70%),
        #0C1B2A;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
}

.parallax-screen-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    will-change: opacity;
}
.parallax-screen-layer.active { opacity: 1; }

/* glow halo behind phone */
.phone-halo {
    position: absolute;
    width: 460px; height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 145, 166, 0.35), rgba(45, 212, 255, 0.12) 45%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ALTERNATING CAPTIONS (desktop) — bigger, kept close to the phone */
.feature-step-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 370px;
    max-width: 32vw;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    padding: 2.3rem 2.5rem;
    border-radius: 2.25rem;
    background: rgba(12, 27, 42, 0.62);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    text-align: left;
}
.feature-step-text.left  { left: 7%; }
.feature-step-text.right { right: 7%; }

.feature-step-text h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.05rem;
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1.1;
    margin: 0 0 1rem;
    letter-spacing: -0.5px;
}
.feature-step-text p {
    font-size: 1.1rem;
    color: #b8c8d8;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

/* MOBILE CAPTION (shown below the phone on small screens) */
.tour-mobile-caption {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 5%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    z-index: 100;
    padding: 1.5rem 1.6rem;
    border-radius: 1.75rem;
    background: rgba(12, 27, 42, 0.78);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}
.tour-mobile-caption h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1.15;
    margin: 0 0 0.6rem;
    letter-spacing: -0.5px;
}
.tour-mobile-caption p {
    font-size: 1.02rem;
    color: #b8c8d8;
    line-height: 1.55;
    font-weight: 500;
    margin: 0;
}

/* SCROLL PROGRESS RAIL */
.tour-rail {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 130;
}
.tour-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: all 0.4s var(--ease-out);
}
.tour-dot.on {
    background: var(--accent-cyan);
    box-shadow: 0 0 14px var(--accent-cyan);
    transform: scale(1.5);
}

/* =========================================================
   MOBILE: stack the phone (top) + a single caption (bottom)
   ========================================================= */
@media (max-width: 1100px) {
    .feature-step-text { display: none; }

    /* Zoom the screenshots out only on mobile so the full app + borders show */
    .parallax-screen-layer { object-fit: contain; object-position: center; }

    /* Stack a tight column near the top: phone -> dots -> caption */
    .parallax-sticky {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 2vh;
        gap: 1.2rem;
    }
    .item-container { order: 1; }
    .tour-rail {
        order: 2;
        position: static;
        transform: none;
        flex-direction: row;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
    }
    .tour-mobile-caption {
        order: 3;
        display: block;
        position: static;
        transform: none;
        bottom: auto;
        width: 90%;
    }
    /* Smaller, thinner phone */
    .parallax-chassis {
        width: 168px;
        padding: 5px;
        border-radius: 40px;
        border-width: 1.5px;
    }
}
