/* ===== XBX VPN — style.css (Mobile First / RTL) ===== */

/* فونت فارسی: اگر Vazirmatn روی دستگاه نصب باشد استفاده می‌شود، وگرنه فونت‌های فارسی سیستم.
   برای استفاده از فایل فونت خودتان، فایل را در assets/fonts/Vazirmatn.woff2 بگذارید
   و بخش زیر را از حالت کامنت خارج کنید (راهنما: README-FA.md بخش ۹):

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
*/

:root {
  --blue-500: #1d7dff;
  --blue-600: #0a63f0;
  --blue-700: #0749c9;
  --navy: #0a1f4d;
  --navy-2: #0c2a68;
  --text: #0f1e3d;
  --muted: #5a6b8c;
  --line: #e1e9f7;
  --bg: #ffffff;
  --tint: #f2f7ff;
  --ok: #19b36b;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(17, 71, 160, .09);
  --shadow-lg: 0 18px 50px rgba(17, 71, 160, .18);
  --font: "Vazirmatn", "Vazir", "IRANSansX", "IRANSans", Tahoma, "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.9; font-size: 16px; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 820px; }
.ic { width: 22px; height: 22px; flex: none; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); }
.skip:focus { top: 10px; }
.noscript { text-align: center; padding: 12px; background: #fff7e0; }

/* ----- دکمه‌ها ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px; border-radius: 16px; font-weight: 700; font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  user-select: none; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 56px; font-size: 1.05rem; padding-inline: 28px; }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: .95rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--primary { color: #fff; background: linear-gradient(135deg, #2b8cff, var(--blue-700)); box-shadow: 0 10px 24px rgba(10, 99, 240, .32); }
.btn--ghost { color: var(--blue-600); background: #fff; border: 2px solid #b9d4ff; }
.btn--white { color: var(--blue-700); background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10, 99, 240, .42); }
  .btn--ghost:hover { background: var(--tint); border-color: var(--blue-500); transform: translateY(-2px); }
  .btn--white:hover { transform: translateY(-2px); }
}

/* ----- هدر ----- */
.header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__name { font-family: Arial, Helvetica, sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: .5px; color: var(--navy); direction: ltr; }
.brand__name b { color: var(--blue-600); }
.brand--light .brand__name { color: #fff; }
.brand--light .brand__name b { color: #7cc0ff; }

.burger { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--navy); }
.burger .ic--close { display: none; }
.burger[aria-expanded="true"] .ic--open { display: none; }
.burger[aria-expanded="true"] .ic--close { display: block; }

.nav {
  position: absolute; inset-inline: 0; top: var(--header-h); background: #fff;
  display: flex; flex-direction: column; padding: 8px 20px 20px; gap: 2px;
  border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(17, 71, 160, .1);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
}
.nav.open { opacity: 1; visibility: visible; transform: none; }
.nav a { padding: 14px 8px; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav a.active { color: var(--blue-600); }
.nav__cta { margin-top: 14px; }

@media (min-width: 900px) {
  .burger { display: none; }
  .nav { position: static; flex-direction: row; align-items: center; padding: 0; gap: 6px; background: none; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .nav a { border: 0; padding: 8px 14px; border-radius: 12px; position: relative; }
  .nav a.active::after { content: ""; position: absolute; inset-inline: 14px; bottom: 0; height: 3px; border-radius: 3px; background: var(--blue-600); }
  .nav__cta { margin: 0 14px 0 0; }
}

/* ----- Hero ----- */
.hero { position: relative; padding: 28px 0 40px; background:
  radial-gradient(900px 480px at 85% 0%, rgba(43, 140, 255, .14), transparent 60%),
  linear-gradient(#fff, var(--tint)); overflow: hidden; }
.hero__in { display: grid; gap: 12px; align-items: center; }
.hero__text { display: grid; gap: 18px; justify-items: start; }
.pill { display: inline-block; padding: 4px 16px; border-radius: 999px; background: #e4efff; color: var(--blue-600); font-weight: 700; font-size: .9rem; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.6rem); line-height: 1.35; font-weight: 800; color: var(--navy); }
.grad { background: linear-gradient(120deg, #1d7dff, #0749c9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 34rem; }
.hero__btns { display: grid; gap: 12px; width: 100%; max-width: 440px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--navy-2); box-shadow: 0 4px 12px rgba(17, 71, 160, .06); }
.chips .ic { width: 18px; height: 18px; color: var(--blue-600); }
.hero__art { position: relative; max-width: 460px; width: 100%; margin-inline: auto; }
.tagline { position: absolute; inset-inline-end: 0; bottom: 6px; font: italic 700 .8rem Arial, sans-serif; letter-spacing: 1px; color: var(--blue-600); direction: ltr; transform: rotate(-8deg); opacity: .85; }

@media (min-width: 600px) {
  .hero__btns { grid-template-columns: 1fr 1fr; max-width: 520px; }
}
@media (min-width: 900px) {
  .hero { padding: 56px 0 70px; }
  .hero__in { grid-template-columns: 1.05fr .95fr; gap: 20px; }
  .hero__art { max-width: 540px; }
}

/* ----- سکشن‌ها ----- */
.section { padding: 64px 0; }
.section--tint { background: var(--tint); }
.section--tight { padding: 24px 0 64px; }
.sec-head { text-align: center; margin-bottom: 34px; display: grid; gap: 6px; }
.sec-head h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 800; color: var(--navy); line-height: 1.5; }
.sec-head p { color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--4 { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feat { padding: 28px 22px; text-align: center; display: grid; gap: 10px; justify-items: center; transition: transform .25s, box-shadow .25s; }
@media (hover: hover) { .feat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); } }
.feat__ic { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: var(--blue-600); background: radial-gradient(circle at 30% 25%, #fff, #dcebff); border: 1px solid #cfe2ff; }
.feat__ic .ic { width: 30px; height: 30px; }
.feat h3 { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.feat p { color: var(--muted); font-size: .96rem; }

/* ----- لوکیشن‌ها ----- */
.loc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.badge { padding: 6px 14px; border-radius: 999px; background: #e4efff; color: var(--blue-700); font-size: .85rem; font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; font-weight: 600; font-size: .92rem; color: var(--navy-2); }
.switch__knob { width: 46px; height: 26px; border-radius: 999px; background: #c5d3ea; position: relative; transition: background .25s; flex: none; }
.switch__knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: inset-inline-start .25s; }
.switch[aria-checked="true"] .switch__knob { background: var(--blue-600); }
.switch[aria-checked="true"] .switch__knob::after { inset-inline-start: 23px; }

.grid--loc { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid--loc { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 960px) { .grid--loc { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.loc { display: flex; align-items: center; gap: 12px; padding: 14px 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 18px rgba(17, 71, 160, .06); transition: transform .2s, box-shadow .2s, border-color .2s; min-height: 76px; }
@media (hover: hover) { .loc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #b9d4ff; } }
.loc img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.loc__body { display: grid; min-width: 0; flex: 1; line-height: 1.6; }
.loc__name { font-weight: 800; color: var(--navy); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.5; font-size: .85rem; color: var(--muted); }
.loc__ping { white-space: nowrap; font-family: Arial, sans-serif; direction: ltr; font-weight: 700; color: var(--blue-700); transition: background .6s, color .3s; border-radius: 6px; padding: 0 4px; }
.loc__ping.flash { background: #d8ebff; }
.loc__st { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--ok); font-weight: 700; }
.loc__st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(25, 179, 107, .5); animation: dot 2.4s infinite; }
.no-ping .loc__ping { display: none; }
@keyframes dot { 70% { box-shadow: 0 0 0 7px rgba(25, 179, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(25, 179, 107, 0); } }

/* ----- چرا XBX (طراحی تیره) ----- */
.why { display: grid; gap: 26px; padding: 34px 22px; border-radius: 30px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(500px 300px at 10% 0%, rgba(45, 140, 255, .45), transparent 65%), linear-gradient(135deg, var(--navy), var(--navy-2) 60%, #0b3b9a); box-shadow: var(--shadow-lg); }
.why__intro h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; line-height: 1.5; }
.why__intro p { color: #bcd3f5; margin-top: 8px; }
.why__list { display: grid; gap: 14px; }
.why__list li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.why__ic { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #3b9bff, #1263e8); }
.why__list h3 { font-size: 1.05rem; font-weight: 800; }
.why__list p { color: #bcd3f5; font-size: .92rem; }
@media (min-width: 560px) { .why__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .why { grid-template-columns: .8fr 1.2fr; align-items: center; padding: 48px 44px; gap: 40px; } }

/* ----- مراحل ----- */
.steps { display: grid; gap: 16px; counter-reset: s; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px 24px; text-align: center; display: grid; gap: 8px; justify-items: center; box-shadow: var(--shadow); }
.step__num { position: absolute; top: -16px; inset-inline-start: 50%; transform: translateX(50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2b8cff, var(--blue-700)); box-shadow: 0 6px 14px rgba(10, 99, 240, .4); }
[dir="rtl"] .step__num { transform: translateX(50%); }
.step__ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--blue-600); background: var(--tint); border: 1px solid #cfe2ff; margin-top: 6px; }
.step__ic .ic { width: 30px; height: 30px; }
.step h3 { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.step p { color: var(--muted); font-size: .95rem; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .step:not(:last-child)::after { content: ""; position: absolute; top: 50%; inset-inline-end: -34px; width: 34px; border-top: 3px dotted #9cc4ff; }
}

/* ----- سؤالات متداول ----- */
.faq { display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 18px rgba(17, 71, 160, .05); overflow: hidden; }
.faq__q { width: 100%; min-height: 60px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: start; font-weight: 700; font-size: 1.02rem; color: var(--navy); }
.faq__q .ic { color: var(--blue-600); transition: transform .3s; }
.faq__q[aria-expanded="true"] .ic { transform: rotate(45deg); }
.faq__item h3 { font-size: inherit; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 20px 18px; color: var(--muted); }
.faq__q[aria-expanded="true"] + .faq__a, .faq__a.open { grid-template-rows: 1fr; }

/* ----- بنر پشتیبانی ----- */
.cta { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 34px 22px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, var(--navy), #0b3b9a); box-shadow: var(--shadow-lg); }
.cta__ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }
.cta__ic .ic { width: 30px; height: 30px; }
.cta h2 { font-size: 1.5rem; font-weight: 800; }
.cta p { color: #c3d8f7; margin-top: 4px; }
@media (min-width: 800px) {
  .cta { grid-template-columns: auto 1fr auto; text-align: start; padding: 30px 40px; gap: 24px; }
}

/* ----- فوتر ----- */
.footer { background: #07163a; color: #c3d3ef; padding: 40px 0 32px; }
.footer__in { display: grid; gap: 22px; justify-items: center; text-align: center; }
.footer__tag { font: 700 .82rem Arial, sans-serif; letter-spacing: 1.5px; color: #7cc0ff; margin-top: 6px; direction: ltr; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.footer__nav a, .footer__nav button { padding: 10px 14px; border-radius: 10px; font-size: .95rem; }
@media (hover: hover) { .footer__nav a:hover, .footer__nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; } }
.footer__copy { font-size: .85rem; color: #8ea4cc; direction: ltr; }
@media (min-width: 900px) {
  .footer__in { grid-template-columns: auto 1fr auto; text-align: start; justify-items: stretch; align-items: center; }
  .footer__nav { justify-content: center; }
  .footer__brand { justify-self: start; }
  .footer__copy { justify-self: end; }
}

/* ----- پنجره ----- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal__back { position: absolute; inset: 0; background: rgba(6, 18, 48, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.modal__box { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 28px; padding: 40px 26px 26px; text-align: center; display: grid; gap: 14px; justify-items: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .25s, transform .25s; }
.modal.show .modal__back { opacity: 1; }
.modal.show .modal__box { opacity: 1; transform: none; }
.modal__x { position: absolute; top: 12px; inset-inline-start: 12px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--tint); }
.modal__ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3b9bff, var(--blue-700)); box-shadow: 0 10px 24px rgba(10, 99, 240, .35); }
.modal__ic .ic { width: 34px; height: 34px; }
.modal h3 { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1.5; }
.modal p { color: var(--muted); }
.modal__box .btn { margin-top: 6px; }
.modal__warn { font-size: .85rem; color: #b25b00; background: #fff4e0; padding: 8px 12px; border-radius: 12px; }
.btn.is-disabled { pointer-events: none; opacity: .5; box-shadow: none; }
body.lock { overflow: hidden; }

/* ----- ظاهر شدن با اسکرول ----- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid > .reveal:nth-child(2), .js .steps > .reveal:nth-child(2) { transition-delay: .08s; }
.js .grid > .reveal:nth-child(3), .js .steps > .reveal:nth-child(3) { transition-delay: .16s; }
.js .grid > .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (min-width: 640px) { .loc__meta { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; } }
@media (max-width: 899px) { .hero__art { margin-top: -36px; } }
#demoToggle { display: none; }
.hero__in{grid-template-columns:1fr!important}.hero__text{justify-items:center;text-align:center}.chips{justify-content:center}.lead{margin-inline:auto}.hero__btns{margin-inline:auto}.hero{padding:22px 0 26px!important}
