/* صفحه آموزش STEP — نسخه ۲. همه‌ی قواعد زیر .stp محصورند تا با استایل سایت تداخل نکنند. */

@font-face {
    font-family: "StepVazir";
    src: url("Vazirmatn-VF.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

.stp {
    --ink: #001534;
    --ink-2: #0b2350;
    --step: #2e02c2;
    --step-lt: #a08aff;
    --sun: #ffc93c; /* زرد قطعات و ابزارهای عکس‌ها */
    --mist: #f3f4fb;
    --line: #dcdff0;
    --muted: #4a5272;
    --ease: cubic-bezier(.2, .7, .2, 1);
    overflow-x: clip;
    color: var(--ink);
    font-family: "StepVazir", Vazirmatn, Tahoma, sans-serif;
    line-height: 2;
    scroll-behavior: smooth;
    margin-bottom: 0;
    background: #fff;
}

    .stp *, .stp *::before, .stp *::after {
        box-sizing: border-box;
    }

    .stp h1, .stp h2, .stp h3, .stp p, .stp ul, .stp ol, .stp figure {
        margin: 0;
        padding: 0;
    }

    .stp ul, .stp ol {
        list-style: none;
    }

    .stp a {
        text-decoration: none;
    }

    .stp img {
        display: block;
        max-width: 100%;
    }

    .stp .wrap {
        width: min(1180px, calc(100% - 48px));
        margin-inline: auto;
    }

    .stp .sec {
        padding: 104px 0;
        background: #fff;
    }

        .stp .sec.sec--mist {
            background: var(--mist);
        }

    .stp h2.title {
        text-wrap: balance;
        font-size: clamp(1.7rem, 3.4vw, 2.6rem);
        font-weight: 900;
        line-height: 1.5;
    }

    .stp .lede {
        margin-top: 10px;
        color: var(--muted);
        font-size: 17px;
        max-width: 34em;
    }

    /* ───────── دکمه‌ها ───────── */
    .stp .btn {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        padding: 15px 30px;
        border-radius: 999px;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.6;
        background: var(--sun);
        color: var(--ink);
        transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    }

        .stp .btn svg {
            width: 18px;
            height: 18px;
            transition: transform .25s var(--ease);
        }

        .stp .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 30px -10px rgba(255, 201, 60, .55);
            color: var(--ink);
        }

            .stp .btn:hover svg {
                transform: translateX(-4px);
            }

    .stp .ghost {
        color: #fff;
        font-weight: 700;
        padding: 6px 2px;
        border-bottom: 2px solid rgba(255, 255, 255, .45);
        transition: border-color .2s;
    }

        .stp .ghost:hover {
            border-color: var(--sun);
            color: #fff;
        }

    .stp a:focus-visible {
        outline: 3px solid var(--sun);
        outline-offset: 4px;
    }

    /* ───────── هیرو ───────── */
    .stp .hero {
        position: relative;
        background: var(--ink);
        color: #fff;
        isolation: isolate;
        overflow: hidden;
    }

        .stp .hero::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.6px) 0 0 / 26px 26px;
            -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
        }

    .stp .hero__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 56px;
        align-items: center;
        padding: 76px 0 92px;
    }

    .stp .hero__text > * {
        animation: stp-in .9s var(--ease) backwards;
    }

    .stp .hero__text > :nth-child(1) {
        animation-delay: .05s;
    }

    .stp .hero__text > :nth-child(2) {
        animation-delay: .15s;
    }

    .stp .hero__text > :nth-child(3) {
        animation-delay: .25s;
    }

    .stp .hero__text > :nth-child(4) {
        animation-delay: .35s;
    }

    .stp .hero__text > :nth-child(5) {
        animation-delay: .45s;
    }

    .stp .hero__logo {
        width: 150px;
        height: auto;
        margin-bottom: 18px;
    }

    .stp .hero h1 {
        font-size: clamp(2.5rem, 6vw, 4.6rem);
        font-weight: 900;
        line-height: 1.3;
        letter-spacing: -.01em;
    }

    .stp .hero .lead {
        margin-top: 10px;
        font-size: clamp(1.15rem, 2.2vw, 1.6rem);
        font-weight: 700;
        color: var(--step-lt);
        line-height: 1.7;
    }

    .stp .hero .sub {
        margin-top: 18px;
        max-width: 31em;
        color: #c3c9e4;
        font-size: 16.5px;
    }

    .stp .hero .actions {
        margin-top: 34px;
        display: flex;
        flex-wrap: wrap;
        gap: 18px 30px;
        align-items: center;
    }

    /* عکس پله‌ای: چهار برش از یک عکس که یکی‌یکی بالا می‌آیند */
    .stp .hero__visual {
        position: relative;
        aspect-ratio: 560 / 520;
        direction: ltr;
    }

    .stp .strip {
        position: absolute;
        inset: 0;
        overflow: hidden;
        clip-path: inset(var(--t) var(--r) 0 var(--l));
        animation: stp-build 1.1s var(--ease) backwards;
        animation-delay: calc(.3s + var(--k) * .15s);
    }

        .stp .strip img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: grayscale(1) contrast(1.12) brightness(1.08);
        }

        .stp .strip::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(200deg, rgba(70, 30, 230, .72), rgba(0, 21, 52, .92));
            mix-blend-mode: multiply;
        }

        .stp .strip:nth-child(1) {
            --l: 0%;
            --r: 75%;
            --t: 0%;
            --k: 3;
        }

        .stp .strip:nth-child(2) {
            --l: 25%;
            --r: 50%;
            --t: 11%;
            --k: 2;
        }

        .stp .strip:nth-child(3) {
            --l: 50%;
            --r: 25%;
            --t: 22%;
            --k: 1;
        }

        .stp .strip:nth-child(4) {
            --l: 75%;
            --r: 0%;
            --t: 33%;
            --k: 0;
        }

    .stp .trace {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        pointer-events: none;
    }

        .stp .trace path {
            fill: none;
            stroke: rgba(255, 255, 255, .85);
            stroke-width: 2.5;
            stroke-linejoin: round;
            stroke-dasharray: 1;
            stroke-dashoffset: 1;
            animation: stp-draw 1.8s .9s ease-out forwards;
        }

        .stp .trace circle {
            fill: var(--ink);
            stroke: var(--sun);
            stroke-width: 3;
            opacity: 0;
            transform-box: fill-box;
            transform-origin: center;
            animation: stp-pop .45s var(--ease) forwards;
        }

            .stp .trace circle:nth-of-type(1) {
                animation-delay: 1.0s;
            }

            .stp .trace circle:nth-of-type(2) {
                animation-delay: 1.3s;
            }

            .stp .trace circle:nth-of-type(3) {
                animation-delay: 1.6s;
            }

            .stp .trace circle:nth-of-type(4) {
                animation-delay: 1.9s;
            }

    .stp .glass {
        position: absolute;
        left: 18px;
        bottom: 22px;
        direction: rtl;
        text-align: right;
        padding: 16px 22px;
        border-radius: 18px;
        max-width: 220px;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .26);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        animation: stp-in .9s 1.5s var(--ease) backwards;
    }

        .stp .glass b {
            display: block;
            font-size: 2rem;
            font-weight: 900;
            line-height: 1.3;
            color: var(--sun);
        }

        .stp .glass span {
            font-size: 14px;
            line-height: 1.8;
            color: #e5e8f7;
        }

@keyframes stp-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

@keyframes stp-build {
    from {
        clip-path: inset(100% var(--r) 0 var(--l));
    }
}

@keyframes stp-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes stp-pop {
    from {
        opacity: 0;
        transform: scale(.3);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ───────── نوار موضوعات ───────── */
.stp .marq {
    background: var(--step);
    color: #fff;
    overflow: hidden;
    direction: ltr;
}

.stp .marq__track {
    display: flex;
    width: max-content;
    animation: stp-marq 42s linear infinite;
}

.stp .marq:hover .marq__track {
    animation-play-state: paused;
}

.stp .marq__track span {
    position: relative;
    direction: rtl;
    white-space: nowrap;
    padding: 16px 34px;
    font-weight: 800;
    font-size: 17px;
}

    .stp .marq__track span::after {
        content: "";
        position: absolute;
        inset-inline-end: -4px;
        top: 50%;
        width: 8px;
        height: 8px;
        background: var(--sun);
        transform: translateY(-50%) rotate(45deg);
    }

@keyframes stp-marq {
    to {
        transform: translateX(-50%);
    }
}

/* ───────── مسیر: شمارنده و خط زمانی ───────── */
.stp .path__grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 72px;
    align-items: start;
}

.stp .path__lead {
    position: sticky;
    top: 40px;
}

.stp .bignum {
    margin-top: 38px;
    line-height: 1;
}

    .stp .bignum b {
        display: block;
        font-size: clamp(6rem, 13vw, 10rem);
        font-weight: 900;
        color: var(--step);
        letter-spacing: -.03em;
        line-height: 1.05;
    }

    .stp .bignum > span {
        display: block;
        margin-top: 6px;
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--ink);
    }

.stp .tl {
    position: relative;
    padding-inline-start: 52px;
}

    .stp .tl::before, .stp .tl::after {
        content: "";
        position: absolute;
        inset-block: 10px 48px;
        inset-inline-start: 11px;
        width: 3px;
        border-radius: 3px;
    }

    .stp .tl::before {
        background: var(--line);
    }

    .stp .tl::after {
        background: linear-gradient(var(--step), var(--sun));
        transform-origin: top;
        transform: scaleY(var(--p, 1));
    }

    .stp .tl li {
        position: relative;
        padding-bottom: 54px;
    }

        .stp .tl li:last-child {
            padding-bottom: 0;
        }

        .stp .tl li::before {
            content: "";
            position: absolute;
            inset-inline-start: -52px;
            top: 10px;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background: #fff;
            border: 4px solid var(--line);
            transition: all .5s var(--ease);
        }

        .stp .tl li.is-in::before {
            background: var(--step);
            border-color: var(--step);
            box-shadow: 0 0 0 9px rgba(46, 2, 194, .13);
        }

    .stp .tl b {
        display: block;
        font-size: clamp(2rem, 4vw, 2.9rem);
        font-weight: 900;
        line-height: 1.4;
        color: var(--step);
    }

    .stp .tl h3 {
        font-size: 1.2rem;
        font-weight: 800;
        line-height: 1.8;
    }

    .stp .tl p {
        margin-top: 4px;
        color: var(--muted);
        max-width: 30em;
    }

/* ───────── مخاطبان: پله‌ی عکس ───────── */
.stp .aud__grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: end;
}

.stp .card {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    isolation: isolate;
}

    .stp .card:nth-child(1) {
        min-height: 400px;
    }

    .stp .card:nth-child(2) {
        min-height: 490px;
    }

    .stp .card:nth-child(3) {
        min-height: 580px;
    }

    .stp .card img {
        position: absolute;
        inset: 0;
        z-index: -2;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 1.1s var(--ease);
    }

    .stp .card:nth-child(1) img {
        object-position: 32% 50%;
    }

    .stp .card:nth-child(2) img {
        object-position: 55% 50%;
    }

    .stp .card:nth-child(3) img {
        object-position: 62% 50%;
    }

    .stp .card::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(180deg, rgba(0, 21, 52, 0) 28%, rgba(0, 21, 52, .93) 86%);
    }

    .stp .card:hover img {
        transform: scale(1.07);
    }

.stp .card__body {
    padding: 28px 26px 30px;
}

.stp .card h3 {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.7;
}

.stp .card p {
    margin-top: 4px;
    font-size: 15px;
    line-height: 2;
    color: #d6daef;
}

.stp .card ul {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stp .card li {
    padding: 1px 13px;
    border-radius: 999px;
    font-size: 13.5px;
    line-height: 2;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ───────── گواهی ───────── */
.stp .cert {
    display: flex;
    align-items: center;
    gap: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 26px 32px;
}

    .stp .cert svg {
        flex: none;
        width: 56px;
        height: 56px;
    }

    .stp .cert h2 {
        font-size: 1.3rem;
        font-weight: 900;
        line-height: 1.7;
    }

    .stp .cert p {
        color: var(--muted);
    }

/* ───────── متن قابل ویرایش (PageText) ───────── */
.stp .about {
    padding-top: 88px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 64px;
}

.stp .about__side {
    position: sticky;
    top: 40px;
    align-self: start;
}

    .stp .about__side blockquote {
        margin: 22px 0 0;
        padding: 4px 22px 4px 0;
        border-inline-start: 4px solid var(--sun);
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1.9;
        color: var(--step);
    }

.stp .prose {
    max-width: 46rem;
    font-size: 17px;
    line-height: 2.25;
    color: #1b2340;
    text-align: justify;
    text-justify: inter-word;
}

    .stp .prose h2, .stp .prose h3, .stp .prose h4, .stp .prose li, .stp .prose td, .stp .prose th {
        text-align: start;
    }

.stp .prose--plain {
    white-space: pre-line;
}

.stp .prose p {
    margin: 0 0 1.3em;
}

.stp .prose li {
    margin-bottom: .5em;
}

.stp .prose strong {
    font-weight: 800;
    color: var(--ink);
}

.stp .prose h2, .stp .prose h3, .stp .prose h4 {
    margin: 1.7em 0 .4em;
    font-weight: 900;
    line-height: 1.7;
    color: var(--ink);
}

.stp .prose h2 {
    font-size: 1.5rem;
}

.stp .prose h3 {
    font-size: 1.25rem;
}

.stp .prose ul, .stp .prose ol {
    margin: 0 0 1.15em;
    padding-inline-start: 1.5em;
}

.stp .prose ul {
    list-style: disc;
}

.stp .prose ol {
    list-style: decimal;
}

.stp .prose li::marker {
    color: var(--step);
}

.stp .prose a {
    color: var(--step);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.stp .prose img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.stp .prose blockquote {
    margin: 1.3em 0;
    padding: 6px 22px;
    border-inline-start: 4px solid var(--step);
    background: #fff;
    border-radius: 0 12px 12px 0;
}

.stp .prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.3em;
}

.stp .prose td, .stp .prose th {
    border: 1px solid var(--line);
    padding: 8px 12px;
}

/* ───────── دعوت نهایی ───────── */
.stp .cta-sec {
    padding: 0 0 120px;
}

.stp .cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
    background: var(--ink);
    color: #fff;
    border-radius: 32px;
    padding: 84px 32px 88px;
}

    .stp .cta::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.6px) 0 0 / 26px 26px;
    }

    .stp .cta h2 {
        font-size: clamp(1.8rem, 4vw, 3rem);
        font-weight: 900;
        line-height: 1.5;
    }

    .stp .cta p {
        margin: 8px auto 34px;
        max-width: 30em;
        color: #c3c9e4;
        font-size: 17px;
    }

.stp .cta__stairs {
    position: absolute;
    z-index: -1;
    left: 0;
    bottom: 0;
    width: min(520px, 70%);
    opacity: .9;
}

    .stp .cta__stairs path {
        fill: none;
        stroke: rgba(160, 138, 255, .55);
        stroke-width: 3;
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        transition: stroke-dashoffset 2.2s .2s ease-out;
    }

.stp .cta.is-in .cta__stairs path {
    stroke-dashoffset: 0;
}

/* ───────── ظاهر شدن هنگام اسکرول (فقط وقتی جاوااسکریپت فعال است) ───────── */
.stp.js [data-reveal] {
    opacity: 0;
    transform: translateY(44px);
    transition: opacity .9s var(--ease), transform 1s var(--ease);
    transition-delay: var(--d, 0s);
}

    .stp.js [data-reveal].is-in {
        opacity: 1;
        transform: none;
    }

.stp.js .tl li > div {
    opacity: .3;
    transform: translateX(14px);
    transition: opacity .6s var(--ease), transform .7s var(--ease);
}

.stp.js .tl li.is-in > div {
    opacity: 1;
    transform: none;
}

/* پارالاکس ملایم کارت‌ها، فقط در مرورگرهای پشتیبان */
@supports (animation-timeline: view()) {
    .stp .card img {
        animation: stp-par linear both;
        animation-timeline: view();
        animation-range: cover;
        transform: none;
    }

    @keyframes stp-par {
        from {
            transform: translateY(-5%) scale(1.12);
        }

        to {
            transform: translateY(5%) scale(1.12);
        }
    }

    .stp .card:hover img {
        animation-play-state: paused;
    }
}

/* ───────── تبلت و موبایل ───────── */
@media (max-width: 920px) {
    .stp .sec {
        padding: 72px 0;
    }

    .stp .hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 48px 0 56px;
    }

    .stp .hero__visual {
        max-width: 520px;
        width: 100%;
        margin-inline: auto;
    }

    .stp .path__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stp .path__lead {
        position: static;
    }

    .stp .aud__grid {
        grid-template-columns: 1fr;
        align-items: stretch;
        margin-top: 40px;
    }

    .stp .card:nth-child(n) {
        min-height: 340px;
    }

    .stp .about {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 56px;
    }

    .stp .about__side {
        position: static;
    }

    .stp .cert {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .stp .cta {
        padding: 56px 22px 60px;
        border-radius: 24px;
    }

    .stp .cta-sec {
        padding-bottom: 80px;
    }
}

/* ───────── کاهش حرکت ───────── */
@media (prefers-reduced-motion: reduce) {
    .stp {
        scroll-behavior: auto;
    }

        .stp *, .stp *::before, .stp *::after {
            animation: none !important;
            transition: none !important;
        }

        .stp .trace path {
            stroke-dashoffset: 0;
        }

        .stp .trace circle {
            opacity: 1;
        }

        .stp .cta__stairs path {
            stroke-dashoffset: 0;
        }

        .stp.js [data-reveal], .stp.js .tl li > div {
            opacity: 1;
            transform: none;
        }
}
