:root {
  --bg: #0c0d24;
  --bg-2: #141536;
  --card: rgba(22, 20, 52, .82);
  --ink: #f8fafc;
  --muted: #9aa3c7;
  --line: rgba(255, 255, 255, .08);
  --purple: #7c5cfc;
  --purple-2: #6d4aff;
  --yellow: #f5c542;
  --mci: #22d3ee;
  --mtn: #fbbf24;
  --rtl: #c084fc;
  --ok: #34d399;
  --bad: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
html.light {
  --bg: #eef0fb;
  --bg-2: #ffffff;
  --card: #ffffff;
  --ink: #1e1b4b;
  --muted: #64748b;
  --line: #e4e7f4;
  --shadow: 0 12px 30px rgba(30, 27, 75, .08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Vazirmatn, sans-serif;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(124, 92, 252, .22), transparent 50%), var(--bg);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }
.dir-ltr { direction: ltr; text-align: left; }
.mt-2 { margin-top: .85rem; }
[hidden] { display: none !important; }
.wrap { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

.blob {
  position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; opacity: .45;
}
.blob-a { width: 420px; height: 420px; background: #7c5cfc; top: -80px; left: -60px; }
.blob-b { width: 380px; height: 380px; background: #4f46e5; bottom: 10%; right: -80px; }
html.light .blob { opacity: .18; }

.t2-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  width: min(1160px, calc(100% - 2rem)); margin: 0 auto;
  padding: 1rem 0; background: rgba(12, 13, 36, .86);
  backdrop-filter: blur(16px);
}
html.light .t2-nav { background: rgba(238, 240, 251, .9); }
.logo { display: flex; align-items: center; gap: .65rem; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  color: #111; display: grid; place-items: center;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo strong { display: block; font-size: 1.15rem; }
.logo small { display: block; color: var(--muted); font-size: .72rem; }
.nav-links { display: flex; gap: 1.4rem; margin-inline: auto; }
.nav-links a { color: var(--muted); font-size: .9rem; font-weight: 600; padding: .4rem 0; }
.nav-links a.active, .nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: .55rem; }
.nav-buy {
  background: var(--purple); color: #fff; font-weight: 800; font-size: .85rem;
  padding: .5rem 1rem; border-radius: 12px; box-shadow: 0 8px 20px rgba(124, 92, 252, .35);
}
.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle svg { width: 18px; height: 18px; }
.mobile-menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; }

.stage {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.2rem;
  align-items: start; padding: 1.6rem 0 2rem;
}
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; line-height: 1.3; margin-bottom: .55rem; }
.hero-copy h1 span { color: var(--yellow); }
.hero-ops { color: var(--muted); margin-bottom: 1.3rem; font-size: 1.02rem; }
.mini-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 2rem; }
.mini-feats li {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .9rem .8rem;
  backdrop-filter: blur(12px);
}
.mini-feats svg { width: 18px; height: 18px; color: var(--yellow); margin-bottom: .4rem; }
.mini-feats strong { display: block; font-size: .88rem; }
.mini-feats span { color: var(--muted); font-size: .75rem; }

.pack-stack { position: relative; height: 230px; }
.pack {
  position: absolute; width: 190px; height: 118px; border-radius: 18px; color: #fff;
  padding: 1rem 1.1rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}
.pack b { font-size: 1.05rem; }
.pack span { font-size: .75rem; opacity: .9; }
.pack-mtn { background: linear-gradient(145deg, #fbbf24, #d97706); right: 12%; top: 0; transform: rotate(-12deg); z-index: 3; }
.pack-mci { background: linear-gradient(145deg, #67e8f9, #0891b2); right: 32%; top: 28%; transform: rotate(-4deg); z-index: 2; }
.pack-rtl { background: linear-gradient(145deg, #c084fc, #6d28d9); right: 4%; top: 52%; transform: rotate(9deg); z-index: 1; }

.buy-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 1.35rem 1.4rem 1.2rem; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.buy-head { margin-bottom: 1.15rem; }
.buy-head h2 { font-size: 1.15rem; margin-bottom: .9rem; }
.stepper { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--muted); font-weight: 600; }
.step i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: .7rem; background: rgba(255,255,255,.08); color: var(--muted); font-weight: 800;
}
html.light .step i { background: #eef0fb; }
.step.is-on { color: var(--ink); }
.step.is-on i { background: var(--purple); color: #fff; }
.step-line { flex: 1; min-width: 18px; height: 2px; background: var(--line); }

.form-group { margin-bottom: 1.05rem; }
.form-group label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: .4rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; right: 12px; width: 18px; color: var(--muted); }
.input-wrapper input {
  width: 100%; border: 1px solid var(--line); background: rgba(0, 0, 0, .28); border-radius: 14px;
  padding: 12px 42px 12px 12px; outline: 0; font-size: 1rem; color: var(--ink);
}
html.light .input-wrapper input { background: #f4f5fb; }
.input-wrapper input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(124, 92, 252, .18); }
.input-wrapper.is-ok input { border-color: var(--ok); }
.input-wrapper.is-bad input { border-color: var(--bad); }
.currency-wrapper input { padding-left: 52px; padding-right: 12px; }
.currency { position: absolute; left: 12px; color: var(--muted); font-size: .8rem; }

.operator-logos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.operator-logos::before {
  content: "اپراتور از روی شماره تشخیص داده می‌شود";
  grid-column: 1 / -1; font-size: .8rem; color: var(--muted); font-weight: 700;
}
.op-badge {
  text-align: center; font-size: .8rem; font-weight: 800; color: var(--muted);
  background: rgba(0, 0, 0, .22); border: 1.5px solid var(--line); border-radius: 14px;
  padding: .9rem .3rem; opacity: .55; transition: .2s;
}
html.light .op-badge { background: #f4f5fb; }
.op-badge.active { opacity: 1; }
.op-badge.mci.active { color: var(--mci); border-color: var(--mci); box-shadow: 0 0 18px rgba(34, 211, 238, .35); }
.op-badge.mtn.active { color: var(--mtn); border-color: var(--mtn); box-shadow: 0 0 18px rgba(251, 191, 36, .35); }
.op-badge.rightel.active { color: var(--rtl); border-color: var(--rtl); box-shadow: 0 0 18px rgba(192, 132, 252, .35); }

.extra-options:not([hidden]) { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
.check-option { display: flex; gap: .35rem; align-items: center; font-size: .82rem; cursor: pointer; }

.buy-card .form-group:has(.amount-grid) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
}

.payable-box { background: rgba(124, 92, 252, .12); border-radius: 14px; padding: .8rem 1rem; margin-bottom: .9rem; }
.payable-row { display: flex; justify-content: space-between; font-weight: 700; }
.payable-box small { display: block; margin-top: .25rem; color: var(--muted); font-size: .74rem; }
.field-hint { font-size: .76rem; color: var(--muted); margin-top: .4rem; }
.form-error { color: var(--bad); background: rgba(251, 113, 133, .12); padding: .5rem .7rem; border-radius: 12px; margin-bottom: .6rem; font-size: .82rem; }
.btn-submit {
  width: 100%; border: 0; background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff; font-weight: 800; padding: 1rem; border-radius: 14px; cursor: pointer;
  display: flex; justify-content: center; gap: .4rem; align-items: center;
  box-shadow: 0 12px 28px rgba(124, 92, 252, .38); transition: transform .2s;
}
.btn-submit:hover { transform: translateY(-2px); }
.btn-submit:disabled, .btn-submit.is-loading { opacity: .7; cursor: wait; transform: none; }
.lock-note { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .9rem; color: var(--muted); font-size: .78rem; }
.lock-note svg { width: 14px; height: 14px; color: var(--purple); }

.popular { position: relative; z-index: 1; padding: .4rem 0 2rem; }
.popular h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.popular-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
.amount-btn {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink);
  padding: 1rem .4rem .8rem; cursor: pointer; font-weight: 800; font-size: 1.02rem;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.amount-btn small { font-size: .72rem; font-weight: 600; color: var(--muted); }
.amount-btn.active, .amount-btn:hover { border-color: var(--purple); color: #fff; box-shadow: 0 0 0 2px rgba(124, 92, 252, .25); }
html.light .amount-btn.active, html.light .amount-btn:hover { color: var(--purple); }
.amount-btn:disabled { opacity: .35; cursor: not-allowed; }
.amount-custom {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  background: var(--card); border: 1px dashed var(--purple); border-radius: 16px; padding: .7rem .4rem; text-align: center;
}
.amount-custom svg { width: 16px; height: 16px; color: var(--purple); }
.amount-custom span { font-size: .78rem; font-weight: 700; }
.amount-custom input {
  width: 90%; border: 0; background: transparent; color: var(--ink); outline: 0; text-align: center; font-size: .85rem;
}

.benefits { position: relative; z-index: 1; padding: .2rem 0 2.4rem; }
.benefits-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.benefits-inner > article { text-align: center; }
.benefits svg { width: 22px; height: 22px; color: var(--purple); margin: 0 auto .45rem; }
.benefits strong { display: block; font-size: .9rem; }
.benefits p { color: var(--muted); font-size: .8rem; }

.about, .contact, .trust, .legal { position: relative; z-index: 1; padding-bottom: 1.6rem; text-align: right; }
.about h2, .contact h2, .legal h2 { font-size: 1.25rem; margin-bottom: .7rem; text-align: right; }
.about p { color: var(--muted); max-width: none; }
.contact-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
.contact-grid a, .contact-grid span {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; font-size: .88rem;
}
.contact-grid svg { width: 15px; height: 15px; color: var(--purple); }
.trust {
  display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 1rem 1.15rem; color: var(--muted);
}
.trust img { width: 88px; height: 88px; object-fit: contain; background: #fff; border-radius: 12px; padding: .25rem; }
.trust p { margin: 0; text-align: right; }

.legal .rules-list {
  display: flex; flex-direction: column; gap: .7rem;
  width: 100%; margin: 0; text-align: right;
}
.legal .rules-list article {
  display: block; width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.15rem; text-align: right;
}
.legal .rules-list h4 {
  color: var(--yellow); font-size: .95rem; margin: 0 0 .35rem;
  text-align: right; width: 100%;
}
.legal .rules-list p {
  color: var(--muted); font-size: .88rem; margin: 0; line-height: 1.9;
  text-align: right; width: 100%; max-width: none;
  white-space: normal; overflow: visible; text-overflow: clip;
}

.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); color: var(--muted); padding: 1.2rem 0; font-size: .85rem; }
.foot-end { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.foot-end .enamad { background: #fff; border-radius: 12px; padding: .25rem; }
.foot-end .enamad span { display: block; padding: .35rem .5rem; font-size: .75rem; font-weight: 800; }
.foot-end img { width: 72px; height: 72px; display: block; }

.is-subpage { min-height: 100vh; display: flex; flex-direction: column; }
.subpage {
  position: relative; z-index: 1; flex: 1; width: min(760px, calc(100% - 2rem));
  padding: 2.4rem 0 3rem; text-align: right;
}
.sub-kicker {
  font-size: .78rem; letter-spacing: .18em; color: var(--yellow); font-weight: 800; margin-bottom: .55rem;
}
.subpage > h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; margin-bottom: .7rem; }
.sub-lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.4rem; max-width: 36rem; }
.sub-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.4rem 1.35rem; box-shadow: var(--shadow);
}
.sub-card > p { color: var(--muted); margin-bottom: 1rem; line-height: 1.9; }
.sub-points { display: grid; gap: .7rem; margin-bottom: 1.3rem; }
.sub-points li { display: flex; align-items: center; gap: .55rem; }
.sub-points svg { width: 18px; height: 18px; color: var(--yellow); flex-shrink: 0; }
.contact-page { display: grid; gap: .7rem; padding: 1rem; }
.contact-row {
  display: flex; align-items: flex-start; gap: .85rem;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 14px; padding: .9rem 1rem;
}
html.light .contact-row { background: #f4f5fb; }
.contact-row svg { width: 20px; height: 20px; color: var(--purple); margin-top: .15rem; }
.contact-row b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.contact-row em { font-style: normal; font-weight: 700; }
.subpage.legal .rules-list { margin-top: .4rem; }

@media (max-width: 960px) {
  .stage, .mini-feats, .popular-grid, .benefits-inner { grid-template-columns: 1fr 1fr; }
  .t2-nav { position: relative; flex-wrap: wrap; }
  .nav-links { display: none; width: 100%; }
  .nav-links.is-open { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
  .mobile-menu-btn { display: block; margin-right: auto; }
  .operator-logos, .stage { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .popular-grid, .benefits-inner, .mini-feats { grid-template-columns: 1fr; }
  .nav-buy { display: none; }
  .trust { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
