body.scrolly-page {
    overflow-x: hidden;
}

/* Scrollytelling Layout */
.scroll-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 2rem;
}

/* The phone on the left (or right) */
.sticky-wrapper {
    position: sticky;
    top: 10vh;
    height: 80vh;
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The iPhone Mockup styling - Premium Photorealistic Device Frame */
.iphone-mockup {
    width: 340px;
    height: 710px;
    background: #080808;
    border-radius: 55px; /* Premium smooth curve */
    border: 12px solid #232227; /* Dark metallic chassis */
    position: relative;
    /* Layered shadows for 3D metallic feel, inner screen bezel, and deep environment drop shadow */
    box-shadow: 
        inset 0 0 0 6px #000, 
        0 0 0 1px #5c5c5e,
        0 0 0 3px #1c1c1e,
        0 40px 80px rgba(0,0,0,0.8);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2;
}

.iphone-mockup:hover {
    transform: translateY(-5px);
}

.iphone-mockup::before {
    /* Screen glass edge reflection */
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border-radius: 40px;
    pointer-events: none;
    z-index: 20;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.08);
}

/* Dynamic Island */
.iphone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 105px;
    height: 32px;
    background: #000;
    border-radius: 20px;
    z-index: 15;
    /* subtle lens reflection */
    box-shadow: inset 0 -1px 3px rgba(255,255,255,0.08);
}

.iphone-screen {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--bg-dark);
    border-radius: 42px; /* Inner screen corner radius */
    overflow: hidden;
    /* ensure inner border matches screen bounds */
    transform: scale(0.97);
    transform-origin: center;
}

.screen-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.05) translateY(20px);
}

.screen-img.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 2;
}

/* The scrolling text on the right */
.scroll-content {
    width: 50%;
    padding-top: 10vh;
    padding-bottom: 50vh;
}

.scroll-step {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.step-card {
    background: #ffffff;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    opacity: 0.2;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card.active {
    opacity: 1;
    transform: scale(1);
    border-color: var(--accent-orange);
    box-shadow: 0 20px 50px rgba(251, 146, 60, 0.1);
}

.step-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-orange);
}

.step-card h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-card p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .scroll-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .sticky-wrapper {
        width: 100%;
        height: 60vh;
        top: 80px; /* Below nav */
        position: sticky;
        z-index: 10;
        pointer-events: none; /* Let scroll pass through */
    }
    
    .iphone-mockup {
        transform: scale(0.85); /* Smaller phone on mobile */
    }
    .iphone-mockup:hover { transform: scale(0.85); }
    
    .scroll-content {
        width: 100%;
        padding-top: 0;
        z-index: 11;
        pointer-events: auto;
    }
    
    .scroll-step {
        align-items: flex-end; /* Push cards below phone on narrow screens */
        padding-bottom: 4rem;
    }
    
    .step-card {
        padding: 2rem;
        background: rgba(255, 255, 255, 0.95); /* More opaque background so it covers smoothly */
        border: 1px solid var(--border);
    }
}
