/* ============================================================
   saas.css — استایل صفحه اصلی SaaS یار
   مکمل ui.css است و توکن‌های همان سیستم طراحی را مصرف می‌کند.
   سبز ملایم · RTL · ریسپانسیو · بدون شلوغی بصری
   ============================================================ */

:root {
  --sx-max: 1200px;
  --sx-gap: 24px;
  --sx-sec: 88px;
}

.sx { background: var(--yar-bg); color: var(--yar-ink); }

.sx-wrap {
  max-width: var(--sx-max);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ==================== هدر ==================== */

.sx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid transparent;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.sx-header.is-scrolled {
  border-block-end-color: var(--yar-line);
  box-shadow: 0 1px 20px -12px rgba(20, 33, 27, .22);
}
.sx-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.sx-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--yar-green); }
.sx-brand strong { font-size: 19px; font-weight: 800; color: var(--yar-ink); }

/* ناوبری دسکتاپ */
.sx-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 14px; }
.sx-nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-radius: 9px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--yar-ink-2); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.sx-nav__link:hover { background: var(--yar-green-soft); color: var(--yar-green); }
.sx-nav__link i { font-size: 10px; opacity: .55; }

/* منوی بازشو */
.sx-nav__item { position: relative; }
.sx-drop {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-start: 0;
  display: none;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 8px 22px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--yar-line);
  border-radius: var(--yar-r);
  box-shadow: var(--yar-shadow-lg);
  z-index: 120;
}
.sx-nav__item.is-open .sx-drop { display: grid; }
.sx-drop__title {
  font-size: 11.5px; font-weight: 700; color: var(--yar-subtle);
  margin-block-end: 8px; letter-spacing: .02em;
}
.sx-drop__col { display: flex; flex-direction: column; gap: 2px; }
.sx-drop__col a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--yar-ink-2); text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.sx-drop__col a:hover { background: var(--yar-green-soft); color: var(--yar-green); }
.sx-drop__col a i { width: 15px; text-align: center; color: var(--yar-green); opacity: .8; }

/* دکمه‌ها */
.sx-actions { display: flex; align-items: center; gap: 9px; margin-inline-start: auto; }
.sx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all .18s ease; white-space: nowrap;
}
.sx-btn--primary { background: var(--neon, var(--brand, #8FE04A)); color: var(--on-neon, var(--on-brand, #14210A)); }
.sx-btn--primary:hover { background: var(--neon-hover, var(--brand-hover, #7AC636)); box-shadow: 0 6px 20px -10px rgba(31,209,111,.6); }
.sx-btn--ghost { background: transparent; border-color: var(--yar-line); color: var(--yar-ink-2); }
.sx-btn--ghost:hover { border-color: var(--yar-green-line); color: var(--yar-green); background: var(--yar-green-soft); }
.sx-btn--lg { padding: 13px 24px; font-size: 14.5px; }
.sx-mobile-dash { display: none; }

.sx-burger {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 19px; color: var(--yar-ink); padding: 8px;
}

/* ==================== منوی موبایل ==================== */

.sx-mobile[hidden] {
  display: none !important;
}

.sx-mobile {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,33,27,.4); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-start;
}
.sx-mobile__panel {
  width: min(86vw, 360px);
  height: 100%;
  background: #fff;
  display: flex; flex-direction: column;
  animation: sxSlide .24s ease;
}
@keyframes sxSlide { from { transform: translateX(-16px); opacity: .6; } to { transform: none; opacity: 1; } }
.sx-mobile__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-block-end: 1px solid var(--yar-line);
}
.sx-mobile__head strong { font-size: 15px; }
.sx-mobile__head button { background: none; border: 0; font-size: 20px; color: var(--yar-subtle); cursor: pointer; }
.sx-mobile__body { flex: 1; overflow-y: auto; padding: 12px 0; }
.sx-mobile__group { padding: 10px 0; border-block-end: 1px solid var(--color-surface-sunken, #F6F8FA); }
.sx-mobile__group:last-child { border-block-end: 0; }
.sx-mobile__title {
  font-size: 11.5px; font-weight: 700; color: var(--yar-subtle);
  padding: 4px 20px 8px;
}
.sx-mobile__group a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 20px; font-size: 14px; color: var(--yar-ink-2); text-decoration: none;
}
.sx-mobile__group a i { width: 17px; text-align: center; color: var(--yar-green); opacity: .8; }
.sx-mobile__group a:active { background: var(--yar-green-soft); }
.sx-mobile__foot {
  display: flex; gap: 10px; padding: 16px 20px;
  border-block-start: 1px solid var(--yar-line);
}
.sx-mobile__foot .sx-btn { flex: 1; }

/* ==================== Hero ==================== */

.sx-hero {
  padding-block: 74px 60px;
  background:
    radial-gradient(900px 420px at 84% -10%, rgba(31,209,111,.09), transparent 62%),
    radial-gradient(700px 340px at 8% 6%, rgba(31,209,111,.055), transparent 60%);
}
.sx-hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 52px;
  align-items: center;
}
.sx-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--yar-green-line);
  font-size: 12.5px; font-weight: 500; color: var(--yar-green);
  margin-block-end: 22px;
}
.sx-h1 {
  font-size: clamp(29px, 4.4vw, 46px);
  font-weight: 800; line-height: 1.34;
  letter-spacing: -.015em;
  margin: 0 0 20px;
}
.sx-h1__accent { color: var(--yar-green); display: inline; }
.sx-lede {
  font-size: clamp(14.5px, 1.5vw, 16.5px);
  line-height: 2.06; color: var(--yar-ink-2);
  max-width: 56ch; margin: 0 0 30px;
}
.sx-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.sx-trust {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-block-start: 26px; font-size: 12.5px; color: var(--yar-subtle);
}
.sx-trust span { display: inline-flex; align-items: center; gap: 7px; }
.sx-trust i { color: var(--yar-green); font-size: 12px; }

/* پیش‌نمایش محصول */
.sx-mock {
  background: #fff; border: 1px solid var(--yar-line);
  border-radius: var(--yar-r); box-shadow: var(--yar-shadow-lg);
  overflow: hidden;
}
.sx-mock__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: var(--color-surface-sunken, #F6F8FA);
  border-block-end: 1px solid var(--yar-line);
}
.sx-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0e6e3; }
.sx-mock__title { font-size: 11.5px; color: var(--yar-subtle); margin-inline-start: 8px; }
.sx-mock__body { padding: 18px; }
.sx-mock__kpis {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-block-end: 16px;
}
.sx-mock__kpi {
  padding: 13px 15px; border: 1px solid var(--yar-line);
  border-radius: 10px; background: var(--color-surface-sunken, #F6F8FA);
}
.sx-mock__kpi b { display: block; font-size: 18px; font-weight: 700; color: var(--yar-ink); }
.sx-mock__kpi span { font-size: 11.5px; color: var(--yar-subtle); }
.sx-mock__rows { display: flex; flex-direction: column; gap: 9px; }
.sx-mock__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 9px; background: var(--color-surface-sunken, #F6F8FA);
  font-size: 12.5px; color: var(--yar-ink-2);
}
.sx-mock__row i { color: var(--yar-green); opacity: .75; width: 15px; }
.sx-mock__row span { flex: 1; }
.sx-mock__row b { font-size: 11.5px; font-weight: 600; color: var(--yar-subtle); }
.sx-ok { color: var(--yar-ok) !important; }
.sx-warn { color: var(--yar-warn) !important; }

/* ==================== نوار اعتماد ==================== */

.sx-strip { border-block: 1px solid var(--yar-line); background: #fff; padding-block: 22px; }
.sx-strip__inner {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  justify-content: center;
}
.sx-strip__label { font-size: 12.5px; color: var(--yar-subtle); }
.sx-strip__items { display: flex; gap: 26px; flex-wrap: wrap; }
.sx-strip__items span {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--yar-ink-2); opacity: .8;
}
.sx-strip__items i { color: var(--yar-green); }

/* ==================== بخش‌ها ==================== */

.sx-section { padding-block: var(--sx-sec); }
.sx-section--alt { background: #fff; border-block: 1px solid var(--yar-line); }
.sx-head { max-width: 720px; margin-block-end: 46px; }
.sx-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--yar-green); letter-spacing: .04em; margin-block-end: 12px;
}
.sx-h2 {
  font-size: clamp(23px, 3vw, 34px); font-weight: 800;
  line-height: 1.42; letter-spacing: -.01em; margin: 0 0 14px;
}
.sx-sub { font-size: 15px; line-height: 2.02; color: var(--yar-ink-2); margin: 0; }

.sx-grid { display: grid; gap: var(--sx-gap); }
.sx-grid--3 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.sx-grid--4 { grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); }

/* ==================== قبل / بعد ==================== */

.sx-problem {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 22px; align-items: center;
}
.sx-problem__before, .sx-problem__after {
  padding: 26px; border-radius: var(--yar-r); border: 1px solid var(--yar-line); background: #fff;
}
.sx-problem__after { border-color: var(--yar-green-line); background: linear-gradient(180deg, #fff, #fbfdfc); }
.sx-problem__tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; margin-block-end: 14px;
}
.sx-bad { background: var(--color-danger-soft, #FBEBE9); color: var(--yar-err); }
.sx-good { background: var(--yar-green-soft); color: var(--yar-ok); }
.sx-problem__arrow { color: var(--yar-subtle); font-size: 19px; opacity: .5; }

.sx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.sx-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.9; color: var(--yar-ink-2);
}
.sx-list li::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  flex-shrink: 0; margin-block-start: 3px;
}
.sx-list--x li::before { content: "\f00d"; color: var(--yar-err); opacity: .7; font-size: 11px; }
.sx-list--check li::before { content: "\f00c"; color: var(--yar-green); font-size: 11px; }

/* ==================== کارت‌ها ==================== */

.sx-card {
  padding: 26px; background: #fff;
  border: 1px solid var(--yar-line); border-radius: var(--yar-r);
  transition: box-shadow .22s ease, border-color .22s ease, transform .22s ease;
}
.sx-card:hover {
  box-shadow: var(--yar-shadow); border-color: var(--yar-green-line);
  transform: translateY(-2px);
}
.sx-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--yar-green-soft); color: var(--yar-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-block-end: 16px;
}
.sx-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.sx-card p { font-size: 13.5px; line-height: 1.98; color: var(--yar-ink-2); margin: 0 0 16px; }
.sx-tags { list-style: none; display: flex; gap: 7px; flex-wrap: wrap; margin: 0; padding: 0; }
.sx-tags li {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--color-surface-sunken, #F6F8FA); color: var(--yar-subtle);
}

/* ==================== زنجیره ==================== */

.sx-chain {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: center;
  padding: 30px 22px; background: #fff;
  border: 1px solid var(--yar-line); border-radius: var(--yar-r);
}
.sx-chain__step {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 15px 20px; border-radius: 11px; background: var(--yar-green-soft);
  min-width: 118px; text-align: center;
}
.sx-chain__step i { font-size: 18px; color: var(--yar-green); }
.sx-chain__step span { font-size: 12.5px; font-weight: 600; color: var(--yar-green); }
.sx-chain__arrow { color: var(--yar-subtle); opacity: .45; font-size: 15px; }

/* ==================== کارت کوچک امنیت ==================== */

.sx-mini {
  padding: 24px; background: #fff;
  border: 1px solid var(--yar-line); border-radius: var(--yar-r);
}
.sx-mini > i { font-size: 20px; color: var(--yar-green); margin-block-end: 14px; display: block; }
.sx-mini h4 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.sx-mini p { font-size: 12.5px; line-height: 1.94; color: var(--yar-subtle); margin: 0; }

/* ==================== تعرفه ==================== */

.sx-plan {
  padding: 28px; background: #fff;
  border: 1px solid var(--yar-line); border-radius: var(--yar-r);
  display: flex; flex-direction: column;
}
.sx-plan--featured { border-color: var(--neon, var(--brand, #8FE04A)); box-shadow: 0 14px 44px -22px rgba(31,209,111,.4); }
.sx-plan__badge {
  align-self: flex-start; padding: 3px 11px; border-radius: 999px;
  background: var(--neon, var(--brand, #8FE04A)); color: var(--on-neon, var(--on-brand, #14210A)); font-size: 11px; font-weight: 700;
  margin-block-end: 12px;
}
.sx-plan h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.sx-plan__price { font-size: 27px; font-weight: 800; color: var(--yar-green); margin-block: 8px 4px; }
.sx-plan__price small { font-size: 12.5px; font-weight: 500; color: var(--yar-subtle); }
.sx-plan ul { list-style: none; margin: 18px 0 22px; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sx-plan li { display: flex; gap: 9px; font-size: 13px; color: var(--yar-ink-2); line-height: 1.9; }
.sx-plan li i { color: var(--yar-green); font-size: 11px; margin-block-start: 5px; }

/* ==================== CTA پایانی ==================== */

.sx-cta {
  padding-block: 74px;
  background: linear-gradient(140deg, var(--neon, var(--brand, #8FE04A)), var(--neon-hover, var(--brand-hover, #7AC636)));
  color: var(--on-neon, var(--on-brand, #14210A)); text-align: center;
}
.sx-cta h2 { font-size: clamp(23px, 3.2vw, 33px); font-weight: 800; margin: 0 0 12px; }
.sx-cta p { font-size: 15px; opacity: .9; margin: 0 0 28px; }
.sx-cta .sx-btn--primary { background: #fff; color: var(--yar-green); }
.sx-cta .sx-btn--primary:hover { background: #f2f6f4; }
.sx-cta .sx-btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.sx-cta .sx-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

/* ==================== فوتر ==================== */

.sx-footer { background: #fff; border-block-start: 1px solid var(--yar-line); padding-block: 54px 26px; }
.sx-footer__grid {
  display: grid; grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 34px; margin-block-end: 40px;
}
.sx-footer__col { display: flex; flex-direction: column; gap: 9px; }
.sx-footer__col h4 { font-size: 13px; font-weight: 700; margin: 0 0 5px; color: var(--yar-ink); }
.sx-footer__col a { font-size: 13px; color: var(--yar-subtle); text-decoration: none; transition: color .14s ease; }
.sx-footer__col a:hover { color: var(--yar-green); }
.sx-footer__brand p { font-size: 12.5px; line-height: 1.98; color: var(--yar-subtle); margin: 12px 0 0; max-width: 34ch; }
.sx-footer__brand .sx-brand strong { font-size: 17px; }
.sx-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding-block-start: 22px; border-block-start: 1px solid var(--yar-line);
  font-size: 12.5px; color: var(--yar-subtle);
}
.sx-social { display: flex; gap: 8px; }
.sx-social a {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--yar-line); color: var(--yar-subtle); text-decoration: none;
  transition: all .16s ease;
}
.sx-social a:hover { border-color: var(--neon, var(--brand, #8FE04A)); color: var(--yar-green); background: var(--yar-green-soft); }

/* ==================== ناوبری پایین موبایل ==================== */

.sx-bottomnav {
  display: none;
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 150;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(14px);
  border-block-start: 1px solid var(--yar-line);
  padding-block: 6px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 22px -14px rgba(20,33,27,.25);
}
.sx-bottomnav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 4px; text-decoration: none;
  font-size: 10.5px; font-weight: 500; color: var(--yar-subtle);
  transition: color .16s ease;
}
.sx-bottomnav__item i { font-size: 17px; }
.sx-bottomnav__item.is-active { color: var(--yar-green); font-weight: 700; }
.sx-bottomnav__item:active { background: var(--yar-green-soft); }

/* ==================== ریسپانسیو ==================== */

@media (max-width: 1024px) {
  .sx-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sx-problem { grid-template-columns: minmax(0, 1fr); }
  .sx-problem__arrow { transform: rotate(-90deg); justify-self: center; }
  .sx-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sx-nav, .sx-mobile-dash { display: none; }
  .sx-burger { display: block; }
  .sx-actions .sx-btn--ghost { display: none; }
  :root { --sx-sec: 62px; }
}

@media (max-width: 640px) {
  .sx-wrap { padding-inline: 17px; }
  .sx-header__inner { height: 60px; }
  .sx-brand strong { font-size: 17px; }
  .sx-hero { padding-block: 48px 42px; }
  .sx-hero__cta { flex-direction: column; }
  .sx-hero__cta .sx-btn { width: 100%; }
  .sx-chain { flex-direction: column; }
  .sx-chain__arrow { transform: rotate(-90deg); }
  .sx-mock__kpis { grid-template-columns: minmax(0, 1fr); }
  .sx-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  /* ناوبری پایین + فاصله امن برای محتوا */
  .sx-bottomnav { display: flex; }
  body.sx { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }
  .sx-footer { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .sx-mobile__panel { animation: none; }
  .sx-card { transition: none; }
  .sx-card:hover { transform: none; }
}
