* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0b0b0e;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* استایل منوی بالای صفحه */
.top-nav {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 100;
    display: flex;
    gap: 30px;
    pointer-events: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-link {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #e1e4e9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ecf0f1;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1;
}

#scroll-container {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.step {
    position: relative;
    height: 100vh;
    height: 100dvh;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.step-card {
    position: absolute;
    background: transparent;
    padding: 0;
    max-width: 400px;
}

.step-number {
    display: none;
}

.step-card h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.step-card p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #e2e5ea;
    margin-bottom: 20px;
}

.engine-btn {
    font-family: 'Rajdhani', sans-serif;
    background-color: #38bdf8;
    color: #0b0b0e;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    pointer-events: auto;
}

.engine-btn:hover {
    background-color: #0ea5e9;
    transform: scale(1.05);
}

.step[data-step="1"] .step-card { top: 20vh; left: 10%; }
.step[data-step="2"] .step-card { top: 77vh; left: 10%; }
.step[data-step="3"] .step-card { top: 54vh; left: 10%; }
.step[data-step="4"] .step-card { top: 70vh; left: 10%; }
.step[data-step="5"] .step-card { top: 72vh; left: 10%; }

/* ===================== موبایل ===================== */
@media (max-width: 768px) {
    .top-nav {
        top: 20px;
        right: 20px;
        gap: 15px;
    }
    .nav-link {
        font-size: 12px;
    }

    /* اصلاح ارتفاع برای جلوگیری از هنگ کردن اسکرول موبایل */
    .step {
        height: auto;
        min-height: 85vh;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 8vh;
        padding-top: 8vh;
    }

    .step[data-step="1"] .step-card,
    .step[data-step="2"] .step-card,
    .step[data-step="3"] .step-card,
    .step[data-step="4"] .step-card,
    .step[data-step="5"] .step-card {
        position: relative;
        top: auto;
        left: auto;
    }

    .step-card {
        max-width: 90%;
        width: 100%;
        text-align: center;
        pointer-events: auto;
    }

    .step-card h2 {
        font-size: 24px;
    }

    .step-card p {
        font-size: 13px;
        margin-bottom: 14px;
    }

    #hero-title {
        left: 5% !important;
        right: 5% !important;
        top: 18% !important;
        max-width: 90% !important;
        text-align: center;
    }
    #hero-title h1 {
        font-size: 26px !important;
    }
    #hero-title .hero-subtitle {
        font-size: 11px !important;
    }
    #hero-title p {
        font-size: 13px !important;
    }
    #scroll-indicator {
        bottom: 16px !important;
        right: 50% !important;
        transform: translateX(50%);
    }

    .engine-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .step-card h2 {
        font-size: 21px;
    }
    .step-card p {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .step, .top-nav { transition: none; }
}
