/* =========================================================================
   ایران‌گاه — انیمیشن معرفی (partials/intro-animation.blade.php)
   صفحهٔ اصلی و «درباره ما». زمان‌بندی درون هر صحنه همین‌جاست؛ js/intro-anim.js
   فقط صحنه را عوض می‌کند (کلاس is-active)، شمارنده‌ها و تایپ را می‌سازد و با
   کلاس is-paused همه‌چیز را نگه می‌دارد. حالت پایهٔ هر عنصر «پایان انیمیشن» است
   تا بدون حرکت (کاهش حرکت) هم صحنه کامل دیده شود. سایت راست‌به‌چپ است.
   ========================================================================= */

.ig-intro {
    --ig-primary: var(--ir-primary, #0044bb);
    --ig-primary-soft: var(--ir-primary-soft, #eef4ff);
    --ig-ink: var(--ir-ink, #0f172a);
    --ig-body: var(--ir-body, #475569);
    --ig-muted: var(--ir-muted, #64748b);
    --ig-line: var(--ir-line, #e2e8f0);
    --ig-success: var(--ir-success, #0f8a4d);
    --ig-star: #f59e0b;
    --ig-card-shadow: 0 10px 28px rgba(15, 23, 42, .09);
    --ig-ease: cubic-bezier(.2, .8, .2, 1);
    color: var(--ig-ink);
}

.ig-intro *,
.ig-intro *::before,
.ig-intro *::after {
    box-sizing: border-box;
}

.ig-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.ig-ico {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- سر بخش ---------- */
.ig-intro__head {
    margin-bottom: 24px;
}

/* تیتر با کلاس خود صفحه (ir-section__title، about-block-title)؛ فاصلهٔ زیرش را این‌جا یکی می‌کنیم */
.ig-intro__head > h2 {
    margin-bottom: 0;
}

.ig-intro__title {
    margin: 0;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    line-height: 1.6;
    color: var(--ig-ink);
}

.ig-intro__lead {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 2;
    color: var(--ig-muted);
}

/* ---------- چیدمان: مراحل کنار سکو (دسکتاپ)، بالای آن (موبایل) ---------- */
.ig-intro__body {
    display: grid;
    grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "steps view"
        "cta view";
    gap: 18px 28px;
}

.ig-steps {
    grid-area: steps;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.ig-intro__view {
    grid-area: view;
    position: relative;
    min-width: 0;
}

.ig-intro__cta {
    grid-area: cta;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- مراحل ---------- */
.ig-step {
    position: relative;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: background-color .3s, border-color .3s, box-shadow .3s;
}

.ig-step.is-active {
    background: #fff;
    border-color: var(--ig-line);
    box-shadow: var(--ig-card-shadow);
}

.ig-step__btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 14px 16px 20px;
    border: 0;
    border-radius: inherit;
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.ig-step__btn:focus-visible {
    outline: 3px solid rgba(29, 78, 216, .45);
    outline-offset: 2px;
}

.ig-step__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ig-primary-soft);
    color: var(--ig-primary);
    font-size: 15px;
    font-weight: 700;
    transition: background-color .3s, color .3s;
}

.ig-step.is-active .ig-step__num {
    background: var(--ig-primary);
    color: #fff;
}

.ig-step__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* گام‌های غیرفعال فقط عنوانشان کم‌رنگ می‌شود؛ متن زیرش کنتراست کافی (WCAG AA) را نگه می‌دارد */
.ig-step__copy strong {
    opacity: .72;
    transition: opacity .3s;
}

.ig-step.is-active .ig-step__copy strong,
.ig-step__btn:hover .ig-step__copy strong {
    opacity: 1;
}

.ig-step__copy strong {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
    color: var(--ig-ink);
}

.ig-step__copy span {
    font-size: 14px;
    line-height: 1.9;
    color: var(--ig-muted);
}

.ig-step__bar {
    position: absolute;
    inset-inline: 16px;
    bottom: 9px;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--ig-line);
    opacity: 0;
    transition: opacity .3s;
}

.ig-step.is-active .ig-step__bar {
    opacity: 1;
}

.ig-step__bar i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--ig-primary);
    transform: scaleX(0);
    transform-origin: right center;
}

.ig-step.is-done .ig-step__bar i {
    transform: none;
}

.ig-step.is-active .ig-step__bar i {
    animation: ig-fill var(--ig-dur, 5s) linear both;
}

/* ---------- دکمه‌ها ---------- */
.ig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--ig-primary);
    border-radius: 12px;
    background: #fff;
    color: var(--ig-primary);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.ig-btn:hover {
    background: var(--ig-primary-soft);
    color: var(--ig-primary);
}

.ig-btn--primary,
.ig-btn--primary:hover {
    background: var(--ig-primary);
    color: #fff;
}

.ig-btn--primary:hover {
    filter: brightness(.92);
}

.ig-intro__cta .ig-btn {
    flex: 1 1 auto;
}

.ig-btn .ig-ico {
    font-size: 18px;
}

.ig-toggle {
    position: absolute;
    z-index: 3;
    bottom: 12px;
    inset-inline-end: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ig-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ig-ink);
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.ig-toggle[hidden] {
    display: none;
}

.ig-toggle:focus-visible {
    outline: 3px solid rgba(29, 78, 216, .45);
    outline-offset: 2px;
}

.ig-toggle__play,
.ig-intro.is-held .ig-toggle__pause {
    display: none;
}

.ig-intro.is-held .ig-toggle__play {
    display: block;
}

/* ---------- سکو و صحنه‌ها ---------- */
.ig-stage {
    position: relative;
    height: 100%;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid var(--ig-line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 1px 1px, rgba(0, 68, 187, .1) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(160deg, #f8fbff 0%, #e8f0ff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    isolation: isolate;
    font-size: 14px;
    line-height: 1.7;
    user-select: none;
}

.ig-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility 0s linear .45s;
}

.ig-scene.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .45s ease;
}

/* ---------- ۱) نقشه ---------- */
.ig-scene--map {
    gap: 32px;
}

.ig-map {
    position: relative;
    flex: none;
    height: min(100%, 370px);
    aspect-ratio: 970 / 880;
}

.ig-map svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 12px 22px rgba(0, 68, 187, .14));
}

.ig-map__land {
    fill: #fff;
    stroke: var(--ig-primary);
    stroke-width: 4;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.ig-scene.is-active .ig-map__land {
    animation: ig-draw 1.6s var(--ig-ease) both, ig-land .8s ease .9s both;
}

.ig-pin {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 0;
    height: 0;
}

.ig-pin::before,
.ig-pin::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    margin: -6px;
    border-radius: 50%;
}

.ig-pin::before {
    z-index: 1;
    border: 2px solid #fff;
    background: var(--ig-primary);
    box-shadow: 0 2px 6px rgba(0, 68, 187, .4);
}

.ig-pin::after {
    border: 2px solid var(--ig-primary);
    opacity: 0;
}

.ig-scene.is-active .ig-pin::before {
    animation: ig-pop .45s var(--ig-ease) calc(.9s + var(--i) * .09s) both;
}

.ig-scene.is-active .ig-pin::after {
    animation: ig-ring 2s ease-out calc(1.4s + var(--i) * .09s) infinite;
}

/* برچسب شهر: ظرف بی‌عرض تا برچسب درست وسط نقطه بنشیند */
.ig-pin__tag {
    position: absolute;
    z-index: 2;
    bottom: 10px;
    left: 0;
    display: flex;
    justify-content: center;
    width: 0;
}

.ig-pin__tag span {
    flex: none;
    padding: 1px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--ig-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
}

.ig-scene.is-active .ig-pin__tag span {
    animation: ig-up .4s var(--ig-ease) calc(1.6s + var(--i) * .1s) both;
}

.ig-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ig-stat {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
    min-width: 200px;
    padding: 12px 18px;
    border: 1px solid var(--ig-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--ig-card-shadow);
}

.ig-stat small {
    flex-basis: 100%;
    font-size: 12px;
    color: var(--ig-muted);
}

.ig-stat b {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--ig-primary);
}

.ig-stat > span {
    font-size: 15px;
    font-weight: 700;
    color: var(--ig-body);
}

.ig-scene.is-active .ig-stat {
    animation: ig-side .5s var(--ig-ease) calc(1.9s + var(--i) * .2s) both;
}

/* ---------- ۲) جستجو ---------- */
.ig-scene--search {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-inline: max(28px, calc(50% - 270px));
}

.ig-sbox {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding-inline: 16px 7px;
    border: 2px solid var(--ig-primary);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 68, 187, .16);
}

.ig-sbox__icon {
    font-size: 20px;
    color: var(--ig-muted);
}

.ig-sbox__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--ig-ink);
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}

.ig-sbox__caret {
    display: inline-block;
    width: 2px;
    height: 22px;
    margin-inline-start: 2px;
    vertical-align: middle;
    background: var(--ig-primary);
}

.ig-scene.is-active .ig-sbox__caret {
    animation: ig-blink 1s steps(1) infinite;
}

.ig-sbox__go {
    flex: none;
    display: grid;
    place-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--ig-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.ig-scene.is-active .ig-sbox {
    animation: ig-down .45s var(--ig-ease) both;
}

.ig-scene.is-active .ig-sbox__go {
    animation: ig-tap .3s ease 1.7s;
}

.ig-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ig-res {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ig-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.ig-scene.is-active .ig-res {
    animation: ig-up .5s var(--ig-ease) calc(2s + var(--i) * .18s) both;
}

.ig-res__thumb {
    flex: none;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dce8ff, #b8cffc);
    color: var(--ig-primary);
    font-size: 26px;
}

.ig-res__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ig-res__name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-res__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--ig-muted);
    font-size: 12.5px;
    line-height: 1.85;
    white-space: nowrap;
}

.ig-stars {
    color: var(--ig-star);
    letter-spacing: 1px;
}

.ig-stars em {
    color: #d7dce4;
    font-style: normal;
}

.ig-res__open {
    color: var(--ig-success);
    font-weight: 600;
}

.ig-res__open::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.ig-res__call {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--ig-primary-soft);
    color: var(--ig-primary);
    font-size: 14px;
    font-weight: 700;
}

.ig-res__call .ig-ico {
    font-size: 16px;
}

.ig-res:first-child .ig-res__call {
    background: var(--ig-primary);
    color: #fff;
}

.ig-scene.is-active .ig-res:first-child .ig-res__call {
    animation: ig-press .25s ease 3.55s both;
}

.ig-res--ghost .ig-res__thumb {
    background: var(--ig-line);
}

.ig-res--ghost .ig-res__body {
    gap: 8px;
}

.ig-res--ghost i {
    display: block;
    width: 55%;
    height: 10px;
    border-radius: 6px;
    background: var(--ig-line);
}

.ig-res--ghost i + i {
    width: 35%;
}

.ig-cursor {
    position: absolute;
    z-index: 2;
    top: 55%;
    left: 40%;
    color: var(--ig-ink);
    font-size: 26px;
    line-height: 0;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .3));
}

.ig-cursor .ig-ico {
    stroke: none;
}

.ig-cursor::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    margin: -12px 0 0 -12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    opacity: 0;
}

.ig-scene.is-active .ig-cursor {
    animation: ig-cursor .7s var(--ig-ease) 2.8s both;
}

.ig-scene.is-active .ig-cursor::after {
    animation: ig-click .5s ease-out 3.55s both;
}

/* ---------- ۳) صاحب کسب‌وکار ---------- */
.ig-scene--owner {
    gap: 22px;
}

.ig-page {
    flex: none;
    width: min(100%, 340px);
    overflow: hidden;
    border: 1px solid var(--ig-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .1);
}

.ig-scene.is-active .ig-page {
    animation: ig-up .45s var(--ig-ease) both;
}

.ig-page__cover {
    height: 76px;
    background: linear-gradient(120deg, #0044bb 0%, #2f6fe0 55%, #8db8ff 100%);
}

.ig-page__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: -26px;
    padding: 0 16px;
}

.ig-page__logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 3px solid #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #dce8ff, #b8cffc);
    color: var(--ig-primary);
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

.ig-page__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    margin-top: 30px;
}

.ig-page__title b {
    max-width: 100%;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e7f6ee;
    color: var(--ig-success);
    font-size: 12px;
    font-weight: 700;
    line-height: 2;
}

.ig-badge .ig-ico {
    stroke-width: 3;
}

.ig-scene.is-active .ig-badge {
    animation: ig-pop .45s var(--ig-ease) .5s both;
}

.ig-progress {
    display: block;
    padding: 14px 16px 0;
}

.ig-progress__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--ig-body);
    font-size: 13px;
}

.ig-progress__row b {
    color: var(--ig-primary);
    font-weight: 800;
}

.ig-progress__track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--ig-primary-soft);
}

.ig-progress__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(270deg, var(--ig-primary), #22a06b);
    transform-origin: right center;
}

.ig-scene.is-active .ig-progress__track i {
    animation: ig-grow 1.7s ease-in-out .7s both;
}

.ig-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin: 12px 0 0;
    padding: 0 16px 16px;
    list-style: none;
}

.ig-checks li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--ig-body);
    font-size: 13px;
    white-space: nowrap;
}

.ig-checks li::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ig-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.ig-scene.is-active .ig-checks li::before {
    animation: ig-check .4s var(--ig-ease) calc(.9s + var(--i) * .4s) both;
}

.ig-toasts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(100%, 270px);
}

.ig-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ig-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .1);
}

.ig-scene.is-active .ig-toast {
    animation: ig-slide .5s var(--ig-ease) calc(2.5s + var(--i) * .55s) both;
}

.ig-toast b,
.ig-toast small {
    display: block;
    white-space: nowrap;
}

.ig-toast b {
    font-size: 14px;
}

.ig-toast small {
    color: var(--ig-muted);
    font-size: 12px;
}

.ig-toast__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 19px;
}

.ig-toast__icon--call {
    background: #e7f6ee;
    color: var(--ig-success);
}

.ig-toast__icon--star {
    background: #fff4dc;
    color: var(--ig-star);
}

.ig-toast__icon--eye {
    background: var(--ig-primary-soft);
    color: var(--ig-primary);
}

/* ---------- ۴) دانشنامه و پایان ---------- */
.ig-city {
    width: min(100%, 420px);
    overflow: hidden;
    border: 1px solid var(--ig-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .1);
    opacity: 0;
}

.ig-scene.is-active .ig-city {
    animation: ig-city 3.3s var(--ig-ease) both;
}

.ig-city__hero {
    position: relative;
    height: 116px;
    background: linear-gradient(180deg, #ffc98b 0%, #ff9f6e 45%, #8f6bd8 100%);
}

.ig-city__sky {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ig-city__name {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 16px;
    display: flex;
    flex-direction: column;
    color: #fff;
    text-shadow: 0 1px 6px rgba(30, 27, 75, .45);
}

.ig-city__name b {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.4;
}

.ig-city__name small {
    font-size: 12px;
}

.ig-facts {
    margin: 0;
    padding: 6px 16px 10px;
    list-style: none;
}

.ig-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px dashed var(--ig-line);
    font-size: 14px;
    white-space: nowrap;
}

.ig-facts li:last-child {
    border-bottom: 0;
}

.ig-facts .ig-ico {
    color: var(--ig-primary);
    font-size: 20px;
}

.ig-facts b {
    min-width: 104px;
    font-weight: 700;
}

.ig-facts span {
    overflow: hidden;
    color: var(--ig-muted);
    font-size: 13px;
    text-overflow: ellipsis;
}

.ig-scene.is-active .ig-facts li {
    animation: ig-up .4s var(--ig-ease) calc(.35s + var(--i) * .15s) both;
}

.ig-final {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.ig-final__logo {
    width: auto;
    height: 150px;
}

.ig-final__tag {
    color: var(--ig-ink);
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 800;
    line-height: 1.6;
}

.ig-final__ticks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ig-final__ticks span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--ig-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 2;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.ig-final__ticks .ig-ico {
    color: var(--ig-success);
    stroke-width: 3;
}

.ig-scene.is-active .ig-final__logo {
    animation: ig-zoom .6s var(--ig-ease) 3.3s both;
}

.ig-scene.is-active .ig-final__tag {
    animation: ig-up .5s var(--ig-ease) 3.6s both;
}

.ig-scene.is-active .ig-final__ticks {
    animation: ig-up .5s var(--ig-ease) 3.9s both;
}

/* ---------- توقف: تا دیده نشده، با دکمهٔ توقف، یا وقتی زبانه پنهان است ---------- */
.ig-intro.is-paused .ig-stage *,
.ig-intro.is-paused .ig-stage *::before,
.ig-intro.is-paused .ig-stage *::after,
.ig-intro.is-paused .ig-step__bar i {
    animation-play-state: paused !important;
}

/* ---------- حرکت‌ها (حالت پایانی = استایل پایهٔ عنصر) ---------- */
@keyframes ig-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ig-draw { from { stroke-dashoffset: 1; } }
@keyframes ig-land { from { fill: rgba(255, 255, 255, 0); } }
@keyframes ig-pop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } }
@keyframes ig-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(3.4); opacity: 0; } }
@keyframes ig-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes ig-down { from { opacity: 0; transform: translateY(-12px); } }
@keyframes ig-side { from { opacity: 0; transform: translateX(22px); } }
@keyframes ig-slide { from { opacity: 0; transform: translateX(-26px) scale(.96); } }
@keyframes ig-zoom { from { opacity: 0; transform: scale(.82); } }
@keyframes ig-blink { 50% { opacity: 0; } }
@keyframes ig-tap { 50% { transform: scale(.92); } }
@keyframes ig-press { from { background-color: var(--ig-primary-soft); color: var(--ig-primary); } }
@keyframes ig-cursor { from { opacity: 0; transform: translate(-70px, 60px); } 30% { opacity: 1; } }
@keyframes ig-click { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
@keyframes ig-grow { from { transform: scaleX(.18); } }
@keyframes ig-check { from { transform: scale(0); background-color: var(--ig-line); } }
@keyframes ig-city {
    0% { opacity: 0; transform: translateY(16px) scale(.98); }
    12%, 86% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: scale(.95); }
}

/* ---------- موبایل ---------- */
@media (max-width: 767.98px) {
    .ig-intro__head {
        margin-bottom: 16px;
    }

    .ig-intro__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas: "steps" "view" "cta";
        gap: 12px;
    }

    /* چهار نوار مثل «استوری»؛ متن فقط برای مرحلهٔ جاری، با جای ثابت تا صفحه نپرد */
    .ig-steps {
        position: relative;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        /* جای ثابت برای تیتر + سه سطر توضیح مرحلهٔ جاری (گوشی‌های باریک) */
        padding-bottom: 110px;
    }

    .ig-step,
    .ig-step.is-active {
        position: static;
        border: 0;
        background: none;
        box-shadow: none;
    }

    .ig-step__btn {
        display: block;
        height: 24px;
        padding: 0;
        border-radius: 4px;
    }

    .ig-step__num {
        display: none;
    }

    .ig-step__copy {
        display: none;
        opacity: 1;
    }

    .ig-step.is-active .ig-step__copy {
        position: absolute;
        top: 30px;
        inset-inline: 0;
        display: flex;
    }

    .ig-step__copy strong {
        font-size: 16px;
    }

    .ig-step__copy span {
        font-size: 13.5px;
        line-height: 1.85;
    }

    .ig-step__bar,
    .ig-step.is-active .ig-step__bar {
        position: static;
        display: block;
        height: 4px;
        margin-top: 10px;
        opacity: 1;
    }

    .ig-stage {
        min-height: 400px;
        border-radius: 18px;
    }

    /* پایین سکو در موبایل جای آمار و اعلان‌هاست؛ دکمهٔ توقف به گوشهٔ بالا می‌رود */
    .ig-toggle {
        top: 8px;
        bottom: auto;
        inset-inline-end: 8px;
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .ig-scene {
        padding: 16px;
    }

    /* نقشه بالا، آمار زیر آن در یک ردیف */
    .ig-scene--map {
        flex-direction: column;
        gap: 14px;
    }

    .ig-map {
        width: min(100%, 300px);
        height: auto;
    }

    .ig-pin::before,
    .ig-pin::after {
        width: 9px;
        height: 9px;
        margin: -4.5px;
    }

    .ig-pin__tag {
        bottom: 6px;
    }

    .ig-pin__tag span {
        padding: 0 7px;
        font-size: 10.5px;
    }

    .ig-stats {
        flex-direction: row;
        gap: 6px;
        width: 100%;
    }

    .ig-stat {
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        min-width: 0;
        padding: 6px 4px;
        border-radius: 12px;
        text-align: center;
    }

    .ig-stat small {
        display: none;
    }

    .ig-stat b {
        font-size: 17px;
        white-space: nowrap;
    }

    .ig-stat > span {
        font-size: 12px;
    }

    .ig-scene--search {
        padding-inline: 14px;
        gap: 10px;
    }

    .ig-sbox {
        height: 50px;
    }

    .ig-sbox__text {
        font-size: 15px;
    }

    .ig-sbox__go {
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
    }

    .ig-res {
        gap: 9px;
        padding: 10px;
    }

    .ig-res__thumb {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .ig-res__name {
        font-size: 14px;
    }

    .ig-res__meta {
        font-size: 11.5px;
    }

    .ig-res__call {
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .ig-res--ghost {
        display: none;
    }

    .ig-scene--owner {
        flex-direction: column;
        gap: 10px;
    }

    .ig-page {
        width: 100%;
    }

    .ig-page__cover {
        height: 44px;
    }

    .ig-page__logo {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .ig-progress {
        padding-top: 10px;
    }

    .ig-checks {
        margin-top: 8px;
        padding-bottom: 12px;
    }

    .ig-toasts {
        width: 100%;
        gap: 8px;
    }

    .ig-toast {
        padding: 8px 10px;
    }

    .ig-toast:nth-child(3) {
        display: none;
    }

    .ig-city__hero {
        height: 100px;
    }

    .ig-final__logo {
        height: 120px;
    }

    .ig-facts b {
        min-width: 92px;
    }
}

/* ---------- کاهش حرکت: صحنه‌های ثابت که با دکمهٔ مراحل عوض می‌شوند ---------- */
@media (prefers-reduced-motion: reduce) {
    .ig-intro *,
    .ig-intro *::before,
    .ig-intro *::after {
        animation: none !important;
        transition: none !important;
    }

    .ig-city {
        opacity: 1;
    }

    .ig-step.is-active .ig-step__bar i {
        transform: none;
    }

    .ig-final,
    .ig-cursor,
    .ig-toggle {
        display: none !important;
    }
}
