/* هدر صفحهٔ اول — سه طرح (a/c/d). موبایل‌اول؛ از ۹۰۰px به بالا دو ستونه.
   همهٔ کلاس‌ها با hero- شروع می‌شوند تا با main.css قاطی نشوند. */

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.hero-in {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 22px 0 28px;
    display: grid;
    /* minmax(0,…) لازم است؛ وگرنه ستون به اندازهٔ max-content متن باز می‌شود
       و روی موبایل هدر از عرض صفحه بیرون می‌زند. */
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.hero-eyebrow {
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.hero-title {
    font-size: clamp(25px, 6.4vw, 44px);
    font-weight: 900;
    line-height: 1.45;
    margin: 0;
    text-wrap: balance;
}

.hero-sub {
    margin: 0;
    font-size: clamp(14px, 3.4vw, 17px);
    line-height: 1.9;
    max-width: min(52ch, 100%);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform .15s ease, box-shadow .2s ease;
}

.hero-btn:hover,
.hero-btn:focus-visible {
    transform: translateY(-2px);
    text-decoration: none;
}

.hero-note {
    font-size: 12.5px;
    margin: 0;
}

@media (min-width: 900px) {
    .hero-in {
        grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
        align-items: center;
        gap: 52px;
        padding: 52px 0 56px;
    }

    .hero-text {
        display: grid;
        gap: 18px;
        align-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero *,
    .hero *::before,
    .hero *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================ طرح الف — معلمِ نیمه‌شب ============================ */

.hero-a {
    background: radial-gradient(120% 80% at 85% 0%, #2a1b4e 0%, #140e24 60%);
    color: #f3eeff;
}

.hero-a .hero-eyebrow { color: #ffc24b; }

.hero-a .hero-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffc24b;
    box-shadow: 0 0 0 4px rgba(255, 194, 75, .18);
}

.hero-a .hero-title em {
    font-style: normal;
    color: #ffc24b;
    background: linear-gradient(transparent 70%, rgba(255, 194, 75, .25) 70%);
}

.hero-a .hero-sub { color: #bdb3d6; }
.hero-a .hero-note { color: #a99fc4; }

.hero-a .hero-btn-main { background: #ffc24b; color: #1b1030; }
.hero-a .hero-btn-main:hover { box-shadow: 0 12px 26px -12px rgba(255, 194, 75, .8); }

.hero-a .hero-btn-ghost {
    border-color: rgba(243, 238, 255, .35);
    color: #f3eeff;
}

.hero-a .hero-btn-ghost:hover { border-color: #f3eeff; }

.hero-chat {
    background: #1e1636;
    border: 1px solid #2e2450;
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.hero-chat-you {
    justify-self: start;
    background: #8b5cf6;
    color: #fff;
    padding: 9px 14px;
    border-radius: 16px 16px 16px 4px;
    font-size: 14px;
    line-height: 1.9;
    min-height: 40px;
    max-width: 92%;
}

.hero-caret {
    display: inline-block;
    width: 2px;
    height: 15px;
    background: #fff;
    vertical-align: -2px;
    margin-inline-start: 2px;
    animation: hero-blink .8s steps(1) infinite;
}

@keyframes hero-blink { 50% { opacity: 0; } }

.hero-chat-ai {
    justify-self: end;
    background: #2a2046;
    padding: 12px 14px 14px;
    border-radius: 16px 16px 4px 16px;
    font-size: 14px;
    line-height: 1.9;
    width: 94%;
    display: grid;
    gap: 10px;
    transition: opacity .35s ease;
}

.hero-chat-ai .hero-who {
    color: #a99fc4;
    font-size: 11.5px;
}

.hero-grid100 {
    direction: ltr;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-auto-rows: 1fr;   /* تا خانه‌ها مربع بمانند */
    gap: 3px;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    justify-self: center;
}

.hero-grid100 span {
    background: #3a2f5c;
    border-radius: 2px;
    transition: background .25s ease;
}

.hero-grid100 span.hero-half { background: #8b5cf6; }
.hero-grid100 span.hero-quarter { background: #ffc24b; }

.hero-chat-result {
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffc24b;
    transition: opacity .3s ease;
}

@media (min-width: 900px) {
    .hero-grid100 { max-width: 230px; }
    .hero-chat { padding: 22px; }
}

/* ============================ طرح پ — سؤالِ اول ============================ */

.hero-c {
    background: linear-gradient(180deg, #f5f1ff 0%, #ffffff 100%);
    color: #1e1433;
}

.hero-c .hero-eyebrow { color: #6d28d9; }
.hero-c .hero-sub { color: #5e5475; }
.hero-c .hero-note { color: #7a7191; }

.hero-c .hero-btn-main { background: #1e1433; color: #fff; }
.hero-c .hero-btn-main:hover { box-shadow: 0 12px 26px -12px rgba(30, 20, 51, .7); }

.hero-c .hero-btn-ghost { border-color: #d9cef5; color: #4c1d88; }
.hero-c .hero-btn-ghost:hover { border-color: #6d28d9; }

.hero-quiz {
    background: #fff;
    border: 1px solid #e3daf7;
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 14px;
    box-shadow: 0 24px 48px -32px rgba(76, 29, 136, .45);
}

.hero-quiz-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.hero-quiz-head p {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
}

.hero-ring {
    width: 62px;
    height: 62px;
    position: relative;
    flex: none;
}

.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.hero-ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.hero-matrix {
    /* راست‌به‌چپ می‌ماند تا خواننده فارسی الگو را ۱، ۲، ۳ ببیند و «؟» آخرین خانه باشد. */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    background: #faf8ff;
    border: 1px solid #ede7fb;
    border-radius: 16px;
    padding: 9px;
}

.hero-cell {
    aspect-ratio: 1.5 / 1;
    border-radius: 10px;
    background: #fff;
    display: grid;
    place-items: center;
}

.hero-cell svg { width: 78%; max-width: 100%; height: 62%; }

.hero-cell-ask {
    border: 2px dashed #b9a3ee;
    color: #6d28d9;
    font-size: 26px;
    font-weight: 900;
    transition: background .3s ease, border-color .3s ease;
}

.hero-cell-ask.hero-ok {
    border: 2px solid #0e9f6e;
    background: #e9f8f2;
}

.hero-opts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.hero-opt {
    appearance: none;
    border: 1.5px solid #e3daf7;
    background: #fff;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 5px;
    cursor: pointer;
    transition: border-color .2s ease, transform .15s ease;
}

.hero-opt:hover,
.hero-opt:focus-visible {
    border-color: #6d28d9;
    transform: translateY(-2px);
}

.hero-opt svg { width: 88%; max-width: 100%; height: 70%; }
.hero-opt.hero-good { border-color: #0e9f6e; background: #e9f8f2; }
.hero-opt.hero-bad { border-color: #d9485f; background: #fdeef1; }

.hero-msg {
    min-height: 46px;
    font-size: 13.5px;
    line-height: 1.8;
    border-radius: 12px;
    padding: 8px 14px;
    background: #ede5ff;
    color: #3b1f74;
}

.hero-msg.hero-good { background: #e9f8f2; color: #0b6e4d; }
.hero-msg.hero-bad { background: #fdeef1; color: #9e2439; }

@media (min-width: 900px) {
    .hero-quiz { padding: 24px; }
    .hero-opts { gap: 12px; }
}

/* ============================ طرح ت — من … هستم ============================ */

.hero-d {
    --hero-role: #6d28d9;
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
    color: #17111f;
    transition: background .5s ease;
}

.hero-d .hero-sub { color: #574d6b; }

.hero-say {
    font-size: clamp(40px, 12vw, 84px);
    font-weight: 900;
    line-height: 1.22;
    margin: 0;
}

.hero-slot {
    display: block;
    height: 1.25em;
    overflow: hidden;
    color: var(--hero-role);
    transition: color .5s ease;
}

.hero-slot > span {
    display: inline-block;
    white-space: nowrap;
}

.hero-slot > span.hero-in-anim { animation: hero-up .5s cubic-bezier(.2, .9, .3, 1); }

@keyframes hero-up {
    from { transform: translateY(60%); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.hero-promise {
    margin: 0;
    font-size: clamp(16px, 4vw, 21px);
    font-weight: 700;
    line-height: 1.85;
    min-height: 3.7em;
}

.hero-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.hero-perks li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 14.5px;
    line-height: 1.85;
}

.hero-perks li::before {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--hero-role);
    transform: rotate(45deg) translateY(-1px);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hero-chip {
    appearance: none;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid #ddd5ea;
    background: #fff;
    color: #17111f;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.hero-chip[aria-pressed="true"] {
    background: var(--hero-role);
    border-color: var(--hero-role);
    color: #fff;
}

.hero-d .hero-btn-main {
    background: var(--hero-role);
    color: #fff;
    transition: background .5s ease, transform .15s ease;
}

.hero-d .hero-btn-ghost { border-color: #ddd5ea; color: #17111f; }
.hero-d .hero-btn-ghost:hover { border-color: var(--hero-role); }

.hero-d-visual {
    display: grid;
    gap: 16px;
    align-content: center;
}

@media (min-width: 900px) {
    .hero-d .hero-in { align-items: center; }
    .hero-promise { min-height: 2.6em; }
}
