/* Steps Section */
.steps {
    position: relative;
    background: #000;
    margin: 0;
    padding: clamp(32px, 5vh, 80px) 0 0; /* prevent visual cut of previous section */
    overscroll-behavior: contain;
    touch-action: pan-y;
    will-change: transform;
}

.steps-container {
    height: 300vh;
    position: relative;
    overscroll-behavior: contain;
    will-change: transform;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    overscroll-behavior: contain;
    will-change: transform;
}

/* Steps Header */
.steps-header {
    text-align: center;
    margin-bottom: 60px;
    z-index: 10;
    position: relative;
}

.steps-header h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #e0e0e0 10%,
        #cccccc 20%,
        #b3b3b3 30%,
        #999999 40%,
        #808080 50%,
        #999999 60%,
        #b3b3b3 70%,
        #cccccc 80%,
        #e0e0e0 90%,
        #ffffff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-header p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

/* Animation Container */
.steps-animation {
    position: relative;
    width: 800px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* State Texts */
.state-text {
    position: absolute;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 15;
    pointer-events: none;
    will-change: opacity;
}

.state-text.visible {
    opacity: 1;
}

.state-text h3 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.state-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 20;
    cursor: pointer;
    will-change: opacity;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-icon {
    width: 30px;
    height: 50px;
    border: 2px solid #FF7107;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: #FF7107;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 8px;
        opacity: 1;
    }
    50% {
        top: 20px;
        opacity: 0.5;
    }
    100% {
        top: 8px;
        opacity: 1;
    }
}

/* Progress indicators */
.steps-progress {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 113, 7, 0.3);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #FF7107;
    transform: scale(1.5);
}

/* Mobile Optimizations Only */
@media (max-width: 768px) {
    /* Reduce scroll height on mobile */
    .steps-container {
        height: 250vh;
    }
    
    /* GPU acceleration for mobile */
    .steps-canvas {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .steps-animation {
        width: 100%;
        max-width: 90vw;
        height: 400px;
    }

    .steps-header {
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .steps-header h2 {
        font-size: 42px;
        line-height: 1.2;
    }

    .steps-header p {
        font-size: 18px;
        padding: 0 10px;
    }

    .state-text h3 {
        font-size: 32px;
    }

    .state-text p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    /* Simplified transitions on mobile */
    .state-text {
        transition: opacity 0.3s ease;
    }
    
    /* Disable scroll animation on mobile */
    @media (hover: none) and (pointer: coarse) {
        .scroll-wheel {
            animation: none;
            top: 15px;
        }
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .steps-container {
        height: 220vh;
    }
    
    .steps-animation {
        height: 350px;
    }
    
    .steps-header h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .steps-header p {
        font-size: 16px;
    }
    
    .state-text h3 {
        font-size: 28px;
    }
    
    .state-text p {
        font-size: 14px;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
    
    .scroll-icon {
        width: 25px;
        height: 40px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .state-text,
    .scroll-indicator {
        transition: none !important;
    }
    
    .scroll-wheel {
        animation: none !important;
    }
    
    .steps-canvas {
        opacity: 0.5;
    }
}