/* ==========================================================================
   دورهم — صفحه معرفی و نصب
   ========================================================================== */
@font-face {
  font-family: "VazirLocal";
  src: local("Vazirmatn"), url("../fonts/Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
:root {
  --bg: #FBFAFF; --bg-2: #F3F0FF; --surface: #FFFFFF; --surface-2: #F1EEF8;
  --ink: #14121E; --ink-2: #4A4660; --muted: #827E98; --line: rgba(20, 16, 50, .08);
  --brand: #6D4AFF; --brand-2: #8F72FF; --brand-3: #C046D8; --brand-soft: #EEEAFF;
  --ok: #0C9A5F; --warn: #C77600;
  --sh-1: 0 1px 2px rgba(23, 16, 60, .05);
  --sh-2: 0 10px 30px rgba(40, 20, 120, .08), 0 2px 6px rgba(40, 20, 120, .04);
  --sh-3: 0 30px 80px rgba(40, 20, 120, .22), 0 8px 20px rgba(40, 20, 120, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "VazirLocal", "Vazirmatn", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0B13; --bg-2: #15122A; --surface: #17151F; --surface-2: #211E2E;
    --ink: #F3F1FA; --ink-2: #C4C0D6; --muted: #8E8AA6; --line: rgba(255, 255, 255, .08);
    --brand: #8E73FF; --brand-2: #A68FFF; --brand-soft: #241E45;
    --sh-2: 0 10px 30px rgba(0, 0, 0, .4); --sh-3: 0 30px 80px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; overflow-x: clip; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.85; font-size: 16px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 16px;
  min-height: 48px; padding: 0 22px; font-weight: 800; font-size: 15.5px; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s, background .2s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 13px; }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 17px; border-radius: 19px; }
.btn-block { width: 100%; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, #5B3DF5);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 10px 26px color-mix(in srgb, var(--brand) 42%, transparent);
}
.btn-primary .i { width: 21px; height: 21px; stroke-width: 2.3; }
@media (hover: hover) { .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 14px 34px color-mix(in srgb, var(--brand) 50%, transparent); } }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); border: 1px solid var(--line); }
.btn-light { background: #fff; color: #3B23C9; box-shadow: 0 12px 30px rgba(0,0,0,.18); }

/* ناوبری */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: calc(10px + var(--safe-t)) max(18px, calc((100vw - 1140px) / 2)) 10px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 20px; color: var(--ink); }
.brand img { border-radius: 10px; }
.nav-links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav-links a { color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--brand); }
.nav .btn { margin-inline-start: 8px; }
@media (max-width: 760px) { .nav-links { display: none; } .nav .btn { margin-inline-start: auto; } }

/* هیرو */
.hero {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px;
  max-width: 1140px; margin: 0 auto; padding: 56px 18px 70px; min-height: min(760px, 92vh);
}
.hero-bg { position: absolute; top: -90px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.hero-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.hero-bg i:nth-child(1) { width: 560px; height: 560px; background: #B9A6FF; top: -60px; left: 14%; }
.hero-bg i:nth-child(2) { width: 420px; height: 420px; background: #FFB3D9; top: 180px; left: 34%; animation-delay: -6s; opacity: .45; }
.hero-bg i:nth-child(3) { width: 380px; height: 380px; background: #9EE7FF; top: 40px; right: 2%; animation-delay: -12s; opacity: .35; }
@media (prefers-color-scheme: dark) { .hero-bg i { opacity: .22 !important; } }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #18C07A; box-shadow: 0 0 0 0 rgba(24,192,122,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(24,192,122,0); } 100% { box-shadow: 0 0 0 0 rgba(24,192,122,0); } }
.hero h1 { font-size: clamp(38px, 6.4vw, 66px); line-height: 1.22; font-weight: 900; margin-top: 18px; }
.grad { background: linear-gradient(120deg, #6D4AFF 10%, #B046E0 55%, #FF5E8A 95%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); margin-top: 18px; max-width: 34em; line-height: 2; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.micro { margin-top: 14px; color: var(--muted); font-size: 13.5px; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 600px; }
.phone {
  position: relative; width: 300px; aspect-ratio: 390 / 844; border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #2B2840, #0E0C18); box-shadow: var(--sh-3), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 36px; }
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #0E0C18; z-index: 2; }
.hero-visual .phone { transform: rotate(-4deg); animation: phone-in 1s var(--ease) both; }
@keyframes phone-in { from { opacity: 0; transform: translateY(40px) rotate(-8deg); } }

.float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--sh-2);
  font-size: 13px; line-height: 1.55; animation: bob 5s ease-in-out infinite, pop .7s var(--ease) both;
}
.float b { display: block; font-size: 13.5px; font-weight: 800; }
.float span { color: var(--muted); }
.float span.warn { color: var(--warn); font-weight: 700; }
.float > .i { width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.float .i.ok { width: 22px; height: 22px; padding: 0; background: none; color: var(--ok); stroke-width: 2.8; }
.float .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--c); }
.f1 { top: 18%; right: -2%; animation-delay: 0s, .5s; }
.f2 { bottom: 24%; left: -4%; animation-delay: -1.5s, .7s; }
.f3 { bottom: 6%; right: 6%; animation-delay: -3s, .9s; }
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes pop { from { opacity: 0; scale: .8; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 30px; gap: 20px; min-height: 0; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .cta-row { justify-content: center; }
  .hero-visual { min-height: 520px; }
  .phone { width: 250px; }
  .f1 { right: 4%; } .f2 { left: 2%; } .f3 { right: 10%; }
}
@media (max-width: 480px) {
  .cta-row .btn { width: 100%; }
  .hero-visual { min-height: 470px; }
  .phone { width: 228px; border-radius: 40px; padding: 9px; }
  .phone img { border-radius: 32px; }
  .float { font-size: 12px; padding: 8px 11px 8px 9px; }
  .f1 { top: 10%; right: -1%; } .f2 { bottom: 26%; left: -2%; } .f3 { bottom: 3%; right: 2%; }
}

/* نوار کاربردها */
.uses { border-block: 1px solid var(--line); background: var(--surface); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 12px; width: max-content; padding: 18px 0; animation: marquee 38s linear infinite; }
.track span { padding: 8px 18px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(50%); } }

/* بخش‌ها */
.section { max-width: 1140px; margin: 0 auto; padding: 90px 18px 0; }
.sec-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 800; font-size: 14px; background: var(--brand-soft); padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.4; font-weight: 900; }

/* مشکل */
.problem { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.chat-old { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--sh-2); display: flex; flex-direction: column; gap: 8px; transform: rotate(1.5deg); }
.bubble { align-self: flex-start; background: var(--surface-2); padding: 8px 14px; border-radius: 18px 18px 18px 6px; font-size: 14.5px; max-width: 80%; }
.bubble.me { align-self: flex-end; background: #DCF8C6; color: #1C2B12; border-radius: 18px 18px 6px 18px; }
@media (prefers-color-scheme: dark) { .bubble.me { background: #1F3A2A; color: #DDF5E5; } }
.bubble.faded { align-self: center; background: none; color: var(--muted); font-size: 13px; }
.problem-copy p { color: var(--ink-2); font-size: 17px; margin-top: 14px; }
@media (max-width: 800px) { .problem { grid-template-columns: 1fr; gap: 30px; } .problem-copy { text-align: center; order: -1; } }

/* مراحل */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 28px 24px; box-shadow: var(--sh-2); overflow: hidden; }
.step .num { position: absolute; top: -10px; left: 14px; font-size: 96px; font-weight: 900; line-height: 1; color: var(--brand); opacity: .07; }
.step-ic { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--brand-2), var(--brand-3)); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.step-ic .i { width: 26px; height: 26px; }
.step h3 { font-size: 20px; font-weight: 850; margin-top: 18px; }
.step p { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* امکانات */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px; transition: transform .25s var(--ease), box-shadow .25s; }
@media (hover: hover) { .feature:hover { transform: translateY(-4px); box-shadow: var(--sh-2); } }
.f-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.feature h3 { font-size: 17px; font-weight: 850; margin-top: 14px; }
.feature p { color: var(--muted); font-size: 14.5px; margin-top: 4px; line-height: 1.85; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .features { gap: 10px; } .feature { padding: 18px 16px; } .feature p { font-size: 13.5px; } }

/* تصاویر */
.shots { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 18px 30px; margin: 0 -18px; scrollbar-width: none; justify-content: safe center; }
.shots::-webkit-scrollbar { display: none; }
.shot { margin: 0; flex: none; scroll-snap-align: center; text-align: center; }
.phone.sm { width: 240px; border-radius: 38px; padding: 9px; }
.phone.sm img { border-radius: 30px; }
.shot figcaption { margin-top: 14px; font-weight: 700; color: var(--ink-2); font-size: 14.5px; }

/* نصب */
.install { max-width: 620px; }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 28px; box-shadow: var(--sh-3); position: relative; overflow: hidden; }
.install-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #6D4AFF, #C046D8, #FF5E8A); }
.install-head { display: flex; gap: 16px; align-items: center; }
.install-head img { border-radius: 20px; box-shadow: var(--sh-2); flex: none; }
.install-head h2 { font-size: 26px; }
.install-head p { color: var(--muted); font-size: 14.5px; line-height: 1.8; margin-top: 2px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--surface-2); padding: 4px; border-radius: 15px; margin: 22px 0 6px; }
.tabs button { border: 0; background: transparent; min-height: 40px; border-radius: 12px; font-weight: 700; color: var(--muted); transition: all .2s; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1), 0 1px 4px rgba(0,0,0,.06); }
.howto { list-style: none; padding: 0; margin: 14px 0 22px; display: flex; flex-direction: column; gap: 12px; }
.howto li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); line-height: 1.9; }
.howto .n { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 900; background: var(--brand-soft); color: var(--brand); margin-top: 1px; }
.howto b { color: var(--ink); }
.kbd { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); vertical-align: middle; color: #2D7DF6; font-weight: 900; }
.kbd .i { width: 17px; height: 17px; stroke-width: 2.2; }
.url-li { padding-inline-start: 42px; }
.url-box { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 13px; border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); color: var(--brand); }
.url-box span { flex: 1; text-align: left; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-link { display: block; text-align: center; margin-top: 14px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.web-link:hover { color: var(--brand); }

/* سوالات */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 20px; transition: box-shadow .25s; }
.faq details[open] { box-shadow: var(--sh-2); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); font-size: 20px; font-weight: 500; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin-top: -4px; }

/* فراخوان پایانی */
.final {
  max-width: 1104px; margin: 90px auto 0; padding: 60px 24px; border-radius: 36px; text-align: center; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #FF7AB8 0%, transparent 50%), radial-gradient(90% 90% at 0% 100%, #4A9BFF 0%, transparent 55%), linear-gradient(135deg, #5B3DF5, #8E44E8);
  position: relative; overflow: hidden; margin-inline: max(18px, calc((100vw - 1104px) / 2));
}
.final h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; line-height: 1.45; }
.final p { opacity: .9; margin: 10px 0 26px; font-size: 17px; }

.foot { max-width: 1140px; margin: 0 auto; padding: 40px 18px calc(40px + var(--safe-b)); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.foot .brand { font-size: 17px; }

/* ظاهر شدن هنگام اسکرول */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* شیت */
dialog.sheet {
  border: 0; padding: 12px 22px calc(24px + var(--safe-b)); margin: auto auto 0; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  border-radius: 30px 30px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3);
}
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 30px; } }
dialog.sheet::backdrop { background: rgba(10, 5, 30, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.sheet[open] { animation: up .35s var(--ease); }
@keyframes up { from { transform: translateY(60px); opacity: .3; } }
.grip { width: 42px; height: 5px; border-radius: 99px; background: var(--surface-2); margin: 0 auto 18px; }
.sheet-ic { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; }
.sheet-ic img { border-radius: 20px; box-shadow: var(--sh-2); }
.sheet-ic.ok { background: var(--ok); color: #fff; border-radius: 50%; }
.sheet-ic.ok .i { width: 38px; height: 38px; stroke-width: 2.6; }
.sheet h3 { text-align: center; font-size: 21px; font-weight: 900; }
.sheet .sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.sheet .howto { margin: 20px 0; }
.sheet .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sheet .arrow-hint { text-align: center; color: var(--brand); font-weight: 800; animation: bob 1.4s ease-in-out infinite; margin-top: 6px; }

.toast {
  position: fixed; left: 50%; top: calc(16px + var(--safe-t)); z-index: 300; transform: translate(-50%, -150%); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 15px; font-weight: 700; font-size: 14px;
  box-shadow: var(--sh-3); transition: transform .4s cubic-bezier(.34,1.4,.64,1), opacity .3s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
