/* انباریار — product page and demo sign-up. Uses the site's tokens from style.css. */
.ay {
    --ay-ink: #0f172a;
    --ay-soft: #eff4ff;
    --ay-ok: #15803d;
    --ay-low: #b45309;
    --ay-bad: #b91c1c;
    --ay-radius: 18px;
    padding: 40px 0 72px;
}

.ay .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.ay h1, .ay h2, .ay h3 { color: var(--ay-ink); line-height: 1.35; }
.ay h2 { font-size: 1.6rem; margin-bottom: 26px; }
.ay-sub { color: var(--text-muted); margin: -14px 0 22px; }

/* ---------------------------------------------------------------- buttons */
.ay-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px; font: inherit; font-weight: 600;
    border: 1.5px solid transparent; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.ay-btn:active { transform: translateY(1px); }
.ay-btn-primary { background: var(--primary-color); color: #fff; }
.ay-btn-primary:hover { background: var(--primary-hover); }
.ay-btn-primary:disabled { opacity: .6; cursor: wait; }
.ay-btn-ghost { background: var(--card-bg); color: var(--ay-ink); border-color: var(--border-color); }
.ay-btn-ghost:hover { border-color: var(--primary-color); color: var(--primary-color); }
.ay-btn-light { background: #fff; color: var(--primary-color); }
.ay-btn-light:hover { background: var(--ay-soft); }
.ay-btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .55); }
.ay-btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.ay-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- hero */
.ay-hero {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
    padding-bottom: 56px;
}
.ay-eyebrow {
    display: inline-block; font-size: .85rem; font-weight: 600; color: var(--primary-color);
    background: var(--ay-soft); padding: 4px 12px; border-radius: 99px; margin-bottom: 14px;
}
.ay-hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 700; margin-bottom: 14px; }
.ay-dot { color: var(--primary-color); }
.ay-lead { font-size: 1.1rem; color: #334155; max-width: 34em; margin-bottom: 26px; }
.ay-note { margin-top: 16px; font-size: .9rem; color: var(--text-muted); max-width: 34em; }

.ay-mock {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--ay-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -12px rgba(15, 23, 42, .18);
    overflow: hidden;
}
.ay-mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); }
.ay-mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-color); }
.ay-mock-body { padding: 18px; }
.ay-mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.ay-mock-stats div { background: var(--bg-color); border-radius: 12px; padding: 10px 12px; }
.ay-mock-stats small { display: block; color: var(--text-muted); font-size: .75rem; }
.ay-mock-stats b { display: block; font-size: 1rem; color: var(--ay-ink); }
.ay-mock-stats em { font-style: normal; font-size: .72rem; color: var(--text-muted); }
.ay-row {
    display: grid; grid-template-columns: 1.6fr 1fr .6fr; gap: 8px; padding: 9px 4px;
    font-size: .88rem; border-bottom: 1px solid var(--border-color);
}
.ay-row:last-child { border-bottom: 0; }
.ay-row-head { color: var(--text-muted); font-size: .78rem; }
.ay-row .ok { color: var(--ay-ok); font-weight: 600; }
.ay-row .low { color: var(--ay-low); font-weight: 700; }

/* ---------------------------------------------------------------- sections */
.ay-section { padding: 48px 0; border-top: 1px solid var(--border-color); }
.ay-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ay-features article {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px;
}
.ay-features h3 { font-size: 1rem; margin-bottom: 8px; }
.ay-features p { font-size: .9rem; color: var(--text-muted); }

.ay-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ay-chips li {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 99px;
    padding: 8px 16px; font-weight: 500;
}

.ay-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.ay-steps li {
    counter-increment: s; background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.ay-steps li::before {
    content: counter(s, persian); width: 32px; height: 32px; border-radius: 50%;
    background: var(--ay-soft); color: var(--primary-color); font-weight: 700;
    display: grid; place-items: center; margin-bottom: 6px;
}
.ay-steps span { color: var(--text-muted); font-size: .92rem; }

.ay-cta {
    margin-top: 24px; background: var(--primary-color); color: #fff; border-radius: 22px;
    padding: 44px 40px; text-align: center;
}
.ay-cta h2 { color: #fff; margin-bottom: 8px; }
.ay-cta p { opacity: .9; margin-bottom: 22px; }
.ay-cta .ay-actions { justify-content: center; }

/* ---------------------------------------------------------------- demo sign-up */
.ay-start { max-width: 560px; margin: 0 auto; padding-top: 24px; }
.ay-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--ay-radius);
    padding: 32px; box-shadow: 0 12px 32px -16px rgba(15, 23, 42, .18);
}
.ay-back-link { font-size: .85rem; color: var(--primary-color); font-weight: 600; }
.ay-wizard h1, .ay-continue h1 { font-size: 1.45rem; margin: 6px 0 8px; }
.ay-wizard .ay-sub { margin: 0 0 18px; font-size: .92rem; }
.ay-continue p { color: var(--text-muted); margin-bottom: 20px; }

.ay-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.ay-progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--border-color); transition: background-color .25s; }
.ay-progress span.done { background: var(--primary-color); }

.ay-step { border: 0; min-width: 0; margin-bottom: 18px; }
.ay-step legend { font-weight: 700; font-size: 1.05rem; color: var(--ay-ink); margin-bottom: 14px; }
.ay-step label:not(.ay-choice) { display: block; font-size: .9rem; font-weight: 600; margin: 14px 0 6px; }
.ay-step input[type=text], .ay-step input[type=tel] {
    width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--border-color);
    border-radius: 12px; background: #fff; color: var(--ay-ink); transition: border-color .2s, box-shadow .2s;
}
.ay-step input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.ay-step-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.ay-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ay-choice { position: relative; cursor: pointer; }
.ay-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ay-choice span {
    display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px;
    padding: 8px; border: 1.5px solid var(--border-color); border-radius: 12px; font-weight: 500; font-size: .92rem;
    transition: border-color .2s, background-color .2s, color .2s;
}
.ay-choice:hover span { border-color: #93b4f5; }
.ay-choice input:checked + span { border-color: var(--primary-color); background: var(--ay-soft); color: var(--primary-color); font-weight: 700; }
.ay-choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(37, 99, 235, .18); }

.ay-error { color: var(--ay-bad); font-size: .85rem; margin-top: 6px; }
.ay-hint { color: var(--text-muted); font-size: .82rem; margin-top: 10px; }

/* Without JavaScript every step shows at once (one long form); with it, one step at a time. */
.ay-wizard.js .ay-step { display: none; }
.ay-wizard.js .ay-step.active { display: block; animation: ay-in .25s ease; }
.ay-wizard:not(.js) .ay-step-actions button[type=button] { display: none; }
.ay-wizard.js .ay-other { display: none; }
.ay-wizard.js .ay-other.open { display: block; }
@keyframes ay-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ay-building { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0 8px; text-align: center; }
.ay-building[hidden] { display: none; }
.ay-building span { color: var(--text-muted); font-size: .9rem; }
.ay-spinner {
    width: 38px; height: 38px; border-radius: 50%; margin-bottom: 8px;
    border: 3px solid var(--ay-soft); border-top-color: var(--primary-color); animation: ay-spin .8s linear infinite;
}
@keyframes ay-spin { to { transform: rotate(360deg); } }

.ay-messages { margin-bottom: 16px; display: grid; gap: 8px; }
.ay-msg { padding: 12px 14px; border-radius: 12px; font-size: .92rem; background: var(--ay-soft); }
.ay-msg-error { background: #fdecec; color: var(--ay-bad); }
.ay-msg-warning { background: #fff5e6; color: var(--ay-low); margin-bottom: 12px; }
.ay-msg-success { background: #e8f6ee; color: var(--ay-ok); }

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

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
    .ay-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .ay-hero { grid-template-columns: 1fr; gap: 32px; }
    .ay-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ay { padding-top: 24px; }
    .ay-features { grid-template-columns: 1fr; }
    .ay-mock-stats { grid-template-columns: 1fr 1fr; }
    .ay-mock-stats div:last-child { display: none; }
    .ay-card { padding: 22px 18px; }
    .ay-choices { grid-template-columns: 1fr 1fr; }
    .ay-cta { padding: 32px 20px; }
    .ay-actions .ay-btn { flex: 1 1 100%; }
}
