/* فرم عضویت برند در سما — انتهای مقاله «فضای فروش اشتراکی» (rem = 10px در قالب) */

@font-face {
    font-family: 'Lalezar';
    src: url('fonts/lalezar/Lalezar.woff2') format('woff2');
    font-display: swap;
}

.bj {
    --bj-teal: #00a59f;
    --bj-teal-dark: #0f766e;
    --bj-green: #10b981;
    --bj-ink: #12312f;
    --bj-text: #3d5452;
    --bj-muted: #7f9593;
    --bj-line: #d9ebe9;
    --bj-soft: #effaf8;
    --bj-error: #e0465e;
    position: relative;
    overflow: hidden;
    margin: 3.2rem 0 2.4rem;
    padding: 3.2rem 2.8rem 2.8rem;
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 100% 0%, #dff6f2 0%, rgba(223, 246, 242, 0) 60%),
        linear-gradient(180deg, #f7fdfc 0%, #ffffff 100%);
    border: 1px solid var(--bj-line);
    box-shadow: 0 24px 50px -28px rgba(15, 118, 110, .35);
    color: var(--bj-text);
    font-family: yekan, inherit;
    scroll-margin-top: 90px;
}
.bj__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.bj__blob--a { width: 220px; height: 220px; top: -90px; left: -70px; background: radial-gradient(circle, rgba(16, 185, 129, .16), rgba(16, 185, 129, 0) 70%); }
.bj__blob--b { width: 160px; height: 160px; bottom: -60px; right: 30%; background: radial-gradient(circle, rgba(0, 165, 159, .12), rgba(0, 165, 159, 0) 70%); }

.bj__head, .bj__form, .bj__done { position: relative; }

/* ---------- سربرگ ---------- */
.bj__badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem 1.2rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--bj-line);
    color: var(--bj-teal-dark);
    font-size: 1.2rem;
    font-weight: 700;
}
.bj__title {
    margin: 1.2rem 0 .6rem;
    font-family: 'Lalezar', yekan, sans-serif;
    font-size: 3.4rem;
    line-height: 1.35;
    color: var(--bj-ink);
}
.bj__title span {
    background: linear-gradient(90deg, var(--bj-teal), var(--bj-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bj__title--sm { font-size: 2.6rem; }
.bj__lead { margin: 0; font-size: 1.45rem; line-height: 2; color: var(--bj-text); }
.bj__perks {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin: 1.6rem 0 0;
    padding: 0;
    list-style: none;
}
.bj__perks li {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 1.2rem;
    border-radius: 12px;
    background: var(--bj-soft);
    color: var(--bj-teal-dark);
    font-size: 1.25rem;
    font-weight: 600;
}
.bj__perks i { font-size: 1.2rem; color: var(--bj-green); }

/* ---------- فیلدها ---------- */
.bj__form { margin-top: 2.4rem; }
.bj__trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.bj__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 1.6rem;
}
.bj__field { display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.bj__field--wide { margin-top: 1.8rem; }
.bj__field--full { grid-column: 1 / -1; }
.bj__label {
    display: block;
    padding: 0;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bj-ink);
}
.bj__label em { font-style: normal; font-weight: 400; color: var(--bj-muted); font-size: 1.15rem; margin-right: .3rem; }
.bj__control { position: relative; display: block; }
.bj__control > i {
    position: absolute;
    top: 50%;
    right: 1.4rem;
    transform: translateY(-50%);
    color: #a5b9b7;
    font-size: 1.4rem;
    pointer-events: none;
    transition: color .2s ease;
}
.bj input[type="text"], .bj input[type="tel"], .bj textarea {
    width: 100%;
    margin: 0;
    padding: 1.1rem 4rem 1.1rem 1.4rem;
    min-height: 48px;
    border: 1.5px solid var(--bj-line);
    border-radius: 14px;
    background: #fff;
    color: var(--bj-ink);
    font-family: inherit;
    font-size: 1.45rem;
    line-height: 1.6;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.bj input[dir="ltr"] { text-align: right; }
.bj input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.bj textarea { padding: 1.2rem 1.4rem; resize: vertical; min-height: 90px; }
.bj input::placeholder, .bj textarea::placeholder { color: #b4c3c1; }
.bj input:focus, .bj textarea:focus {
    outline: none;
    border-color: var(--bj-teal);
    box-shadow: 0 0 0 4px rgba(0, 165, 159, .12);
}
.bj__control:focus-within > i { color: var(--bj-teal); }
.bj__field.is-invalid input, .bj__field.is-invalid textarea { border-color: var(--bj-error); background: #fff8f9; }
.bj__error { min-height: 0; font-size: 1.15rem; color: var(--bj-error); line-height: 1.6; }
.bj__error:empty { display: none; }

/* ---------- چیپ‌ها ---------- */
.bj__group { margin: 2rem 0 0; padding: 0; border: 0; min-width: 0; }
.bj__group legend { margin-bottom: 1rem; float: none; width: auto; }
.bj__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.4rem; }
.bj__chips { display: flex; flex-wrap: wrap; gap: .8rem; }
.bj__chip { position: relative; margin: 0; cursor: pointer; }
.bj__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bj__chip span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border: 1.5px solid var(--bj-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bj-text);
    font-size: 1.3rem;
    line-height: 1.5;
    user-select: none;
    transition: all .2s ease;
}
.bj__chip:hover span { border-color: #a9dcd7; color: var(--bj-teal-dark); }
.bj__chip input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, var(--bj-teal), var(--bj-teal-dark));
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(15, 118, 110, .8);
}
.bj__chip input[type="checkbox"]:checked + span::before { content: "✓"; font-size: 1.1rem; }
.bj__chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(0, 165, 159, .2); }

/* ---------- ارسال ---------- */
.bj__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
    margin-top: 2.4rem;
}
.bj__submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-width: 220px;
    min-height: 54px;
    padding: 0 3rem;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bj-green) 0%, var(--bj-teal) 55%, var(--bj-teal-dark) 100%);
    background-size: 160% 100%;
    color: #fff;
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px -14px rgba(15, 118, 110, .9);
    transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease;
}
.bj__submit:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 32px -14px rgba(15, 118, 110, .95); }
.bj__submit:active { transform: translateY(0) scale(.98); }
.bj__submit:focus-visible { outline: 3px solid rgba(0, 165, 159, .35); outline-offset: 3px; }
.bj__submit-icon { transition: transform .25s ease; }
.bj__submit:hover .bj__submit-icon { transform: translateX(-4px); }
.bj__spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bj-spin .7s linear infinite;
}
.bj__submit.is-loading { pointer-events: none; opacity: .9; }
.bj__submit.is-loading .bj__submit-icon { display: none; }
.bj__submit.is-loading .bj__spinner { display: inline-block; }
.bj__note { margin: 0; font-size: 1.2rem; color: var(--bj-muted); }
.bj__note i { margin-left: .4rem; }
.bj__alert {
    margin: 1.4rem 0 0;
    padding: 1rem 1.4rem;
    border-radius: 12px;
    background: #fff1f3;
    color: var(--bj-error);
    font-size: 1.3rem;
}

/* ---------- حالت ثبت‌شده ---------- */
.bj__done { text-align: center; padding: 1rem 0 .4rem; animation: bj-rise .6s ease both; }
.bj__done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bj-green), var(--bj-teal));
    color: #fff;
    font-size: 2.6rem;
    box-shadow: 0 14px 30px -14px rgba(16, 185, 129, .9);
}

@media (max-width: 767px) {
    .bj { padding: 2.4rem 1.6rem 2rem; border-radius: 20px; }
    .bj__title { font-size: 2.8rem; }
    .bj__grid, .bj__pair { grid-template-columns: 1fr; }
    .bj__submit { width: 100%; }
    .bj__footer { justify-content: center; text-align: center; }
}

/* ============ موشن موفقیت: دایره سبز کشیده می‌شود و لایک وسطش می‌آید ============ */
.bj-success {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
    background: rgba(9, 32, 30, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-family: yekan, inherit;
    animation: bj-fade .3s ease both;
}
.bj-success[hidden] { display: none; }
.bj-success.is-leaving { animation: bj-fade .25s ease reverse both; }
.bj-success__card {
    width: min(360px, 100%);
    padding: 3.2rem 2.4rem 2.4rem;
    border-radius: 28px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35);
    animation: bj-pop .45s cubic-bezier(.2, 1.3, .4, 1) both;
}
.bj-success__badge { position: relative; width: 132px; height: 132px; margin: 0 auto 1.8rem; }
.bj-success__ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.bj-success__track { fill: none; stroke: #e7f7f1; stroke-width: 6; }
.bj-success__circle {
    fill: #10b981;
    fill-opacity: 0;
    stroke: #10b981;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transform-origin: 60px 60px;
    animation:
        bj-draw .85s cubic-bezier(.65, 0, .35, 1) .15s forwards,
        bj-fill .35s ease 1s forwards;
}
.bj-success__like {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin: -30px 0 0 -28px;
    fill: #fff;
    opacity: 0;
    transform: scale(0) rotate(-35deg);
    animation: bj-like .6s cubic-bezier(.2, 1.6, .4, 1) 1.2s forwards;
}
.bj-success__burst { position: absolute; inset: 0; pointer-events: none; }
.bj-success__burst i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0;
    animation: bj-burst .7s ease-out 1.25s forwards;
}
.bj-success__burst i:nth-child(even) { background: #00a59f; width: 6px; height: 6px; margin: -3px; }
.bj-success__burst i:nth-child(1) { --bj-a: 0deg; }
.bj-success__burst i:nth-child(2) { --bj-a: 45deg; }
.bj-success__burst i:nth-child(3) { --bj-a: 90deg; }
.bj-success__burst i:nth-child(4) { --bj-a: 135deg; }
.bj-success__burst i:nth-child(5) { --bj-a: 180deg; }
.bj-success__burst i:nth-child(6) { --bj-a: 225deg; }
.bj-success__burst i:nth-child(7) { --bj-a: 270deg; }
.bj-success__burst i:nth-child(8) { --bj-a: 315deg; }
.bj-success__title {
    margin: 0 0 .6rem;
    font-family: 'Lalezar', yekan, sans-serif;
    font-size: 2.6rem;
    color: #12312f;
    animation: bj-rise .5s ease 1.45s both;
}
.bj-success__title span:not(:empty)::after { content: "، "; }
.bj-success__text { margin: 0 0 2rem; font-size: 1.45rem; line-height: 2; color: #5b706e; animation: bj-rise .5s ease 1.6s both; }
.bj-success__close {
    min-width: 160px;
    min-height: 46px;
    padding: 0 2.4rem;
    border: 0;
    border-radius: 14px;
    background: #effaf8;
    color: #0f766e;
    font-family: inherit;
    font-size: 1.45rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    animation: bj-rise .5s ease 1.75s both;
}
.bj-success__close:hover { background: #0f766e; color: #fff; }

@keyframes bj-spin { to { transform: rotate(360deg); } }
@keyframes bj-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bj-pop { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes bj-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bj-draw { to { stroke-dashoffset: 0; } }
@keyframes bj-fill {
    0% { fill-opacity: 0; transform: scale(1); }
    60% { fill-opacity: 1; transform: scale(1.08); }
    100% { fill-opacity: 1; transform: scale(1); }
}
@keyframes bj-like {
    0% { opacity: 0; transform: scale(0) rotate(-35deg); }
    70% { opacity: 1; transform: scale(1.18) rotate(8deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes bj-burst {
    0% { opacity: 1; transform: rotate(var(--bj-a)) translateY(-48px) scale(1); }
    100% { opacity: 0; transform: rotate(var(--bj-a)) translateY(-80px) scale(.3); }
}

@media (prefers-reduced-motion: reduce) {
    .bj-success, .bj-success__card, .bj-success__title, .bj-success__text, .bj-success__close, .bj__done { animation: none; }
    .bj-success__circle { animation: none; stroke-dashoffset: 0; fill-opacity: 1; }
    .bj-success__like { animation: none; opacity: 1; transform: none; }
    .bj-success__burst { display: none; }
}
