/* =========================================================
   Fahime landing — Triboon
   HTML/CSS/JS خالص، بدون فریم‌ورک
   ========================================================= */

/* ---------- Fonts (subset: فارسی + لاتین) ---------- */
@font-face { font-family: "IRANYekanX"; src: url("../fonts/iranyekanx-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/iranyekanx-700.woff") format("woff"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/iranyekanx-800.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/iranyekanx-900.woff") format("woff"); font-weight: 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --navy-900: #001f3e;
  --navy-800: #002a52;
  --ink: #0c2d55;
  --ink-2: #2c4566;
  --muted: #3e5677;
  --muted-2: #5a7091;
  --red: #e5232b;
  --red-2: #ff4f56;
  --red-3: #a8121a;
  --bg: #f5f9ff;
  --bg-2: #edf5fe;
  --line: #e6eef9;
  --white: #fff;
  --shadow-sm: 0 10px 26px rgba(64,128,214,.10);
  --shadow-md: 0 18px 44px rgba(64,128,214,.16);
  --shadow-lg: 0 30px 70px rgba(12,45,85,.22);
  --grad-red: linear-gradient(180deg, var(--red-2), var(--red));
  --orb: radial-gradient(circle at 35% 30%, #ff8a8f 0%, var(--red) 45%, var(--red-3) 100%);
  --radius: 16px;
  /* Motion tokens (ui-ux-pro-max: یک ریتم واحد برای همه حرکت‌ها) */
  --dur-fast: 180ms; --dur: 280ms; --dur-slow: 450ms;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-back: cubic-bezier(.34,1.4,.64,1);
  /* Glass */
  --glass-bg: rgba(255,255,255,.62); --glass-border: rgba(255,255,255,.75); --glass-blur: 14px;
  --header-h: 68px;
  --gutter: 20px;
}
@media (max-width: 899px) { :root { --header-h: 60px; --gutter: 16px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: "IRANYekanX", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(22px, 2.4vw + 12px, 30px); font-weight: 900; line-height: 1.45; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 800; line-height: 1.6; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red-2); outline-offset: 3px; border-radius: 8px; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -100px; right: 12px; z-index: 100; background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }
.center { text-align: center; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.lead { font-size: 15.5px; line-height: 2; color: var(--muted); }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius);
  font-weight: 700; font-size: 16px; border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad-red); color: var(--white); box-shadow: 0 12px 28px rgba(229,35,43,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost { background: rgba(255,255,255,.1); color: var(--white); border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; box-shadow: 0 6px 16px rgba(229,35,43,.3); }

/* =========================================================
   HEADER — جدا از هیرو (sticky) تا روی محتوا نیفتد
   ========================================================= */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--header-h);
  background: rgba(0,31,62,.96);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow .2s ease;
}
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(0,31,62,.88); backdrop-filter: blur(10px); } }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }

/* لوگو در سمت راست (ابتدای RTL) */
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; height: 100%; }
.brand-logo { height: 42px; width: auto; }
.brand-fallback { display: inline-flex; align-items: center; gap: 10px; }
.brand-fallback img { width: 38px; height: 38px; }
.brand-text { font-weight: 900; font-size: 25px; line-height: 1; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 12px; }
.main-nav a { padding: 8px 14px; border-radius: 10px; font-size: 15px; font-weight: 700; color: rgba(255,255,255,.86); transition: background .15s, color .15s; }
.main-nav a:hover, .main-nav a[aria-current="true"] { background: rgba(255,255,255,.1); color: var(--white); }
.nav-cta-mobile { display: none; }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-900); color: var(--white); }
.hero-media { position: absolute; inset: 0; z-index: -1; max-width: 1600px; margin-inline: auto; }
.hero-media picture { display: contents; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(0,31,62,.6) 0%, rgba(0,31,62,.2) 35%, rgba(0,31,62,0) 50%);
}
.hero-content {
  min-height: clamp(460px, 42vw, 580px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding-block: 56px;
}
.hero-content > * { max-width: 500px; }
.hero h1 { font-size: clamp(38px, 3vw + 18px, 54px); font-weight: 900; line-height: 1.25; }
.hero h1 span { display: block; font-size: .5em; font-weight: 800; margin-top: 6px; }
.hero p { font-size: 17px; line-height: 1.95; color: #c3d3e8; max-width: 450px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding-block: clamp(48px, 6vw, 88px); position: relative; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }

/* About */
.feature-card { margin-top: 8px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow-md); overflow: hidden; }
.feature-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: var(--white); font-size: 15px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--orb); box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; align-items: flex-start; gap: 14px; padding: 18px; }
.feature-list li + li { border-top: 1px solid var(--line); }
.feature-list p { font-size: 14.5px; line-height: 1.85; color: var(--muted-2); }
.num {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 900; font-size: 15px; color: var(--red);
  background: linear-gradient(160deg, #fff, #eef4fd);
  box-shadow: 0 8px 20px rgba(64,128,214,.22), inset 0 1px 0 #fff;
}
.mascot { margin: 0; justify-self: center; width: 100%; max-width: 480px; aspect-ratio: 5 / 6; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: linear-gradient(160deg, #dce9fb, #c4d9f6); }
.mascot img { width: 100%; height: 100%; object-fit: cover; }

/* MCP link */
.mcp { background: linear-gradient(160deg, #f4f9ff 0%, #e8f1fd 55%, #dceafc 100%); overflow: hidden; }
.mcp-bg { position: absolute; inset: 0; pointer-events: none; }
.mcp-bg i { position: absolute; border-radius: 50%; }
.mcp-bg i:nth-child(1) { width: 520px; height: 520px; top: -260px; left: -160px; background: radial-gradient(circle at 60% 60%, rgba(186,214,250,.75), transparent 70%); }
.mcp-bg i:nth-child(2) { width: 460px; height: 460px; bottom: -240px; right: -140px; background: radial-gradient(circle at 40% 40%, rgba(170,204,250,.8), transparent 70%); }
.mcp-bg i:nth-child(3) { width: 24px; height: 24px; top: 84px; left: 18%; background: var(--orb); box-shadow: 0 8px 18px rgba(229,35,43,.35); }
.mcp-bg i:nth-child(4) { width: 20px; height: 20px; bottom: 110px; right: 14%; background: var(--orb); box-shadow: 0 0 0 6px rgba(255,255,255,.6), 0 8px 18px rgba(229,35,43,.35); }
.mcp .container { position: relative; }
.mcp-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(160deg, #fff, #eef4fd); box-shadow: 0 18px 40px rgba(64,128,214,.28), inset 0 1px 0 #fff; }
.mcp-icon span { width: 26px; height: 26px; border-radius: 50%; background: var(--orb); }
.mcp .lead { max-width: 600px; }

.copy-box {
  width: 100%; max-width: 640px; margin-top: 6px;
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 20px; background: rgba(255,255,255,.92); border: 1px solid #fff; box-shadow: var(--shadow-md);
}
.copy-box code {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px; color: var(--ink); text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all;
}
.copy-btn { min-width: 128px; min-height: 50px; border-radius: 14px; font-family: inherit; }
.copy-btn.is-copied { background: linear-gradient(180deg, #2bb673, #1f9d63); box-shadow: 0 12px 28px rgba(31,157,99,.3); }

.mini-steps { list-style: none; margin: 14px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: right; }
.mini-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--white); box-shadow: 0 14px 34px rgba(64,128,214,.12); }
.mini-steps li > span { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 16px rgba(64,128,214,.2); color: var(--red); font-weight: 900; font-size: 18px; }
.mini-steps h3 { font-size: 15.5px; }
.mini-steps p { font-size: 14px; line-height: 1.85; color: var(--muted-2); }

/* Guides */
.guide-alt { background: linear-gradient(180deg, #e6f0fd 0%, var(--bg-2) 100%); }
.guide-alt .split > .video { order: -1; } /* دسکتاپ: زیگزاگ */
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.92); border: 1px solid #fff; box-shadow: var(--shadow-sm);
  font-size: 14.5px; line-height: 1.8; color: var(--ink-2);
}
.steps li::before {
  content: counter(step, persian);
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad-red); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 14px rgba(229,35,43,.3);
}

.video { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.video figcaption { font-size: 14px; color: var(--muted-2); }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(12,45,85,.18);
  background:
    radial-gradient(circle at 75% 25%, rgba(229,35,43,.25), transparent 45%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900));
  display: grid; place-items: center;
}
.video-frame.is-playing { cursor: default; background: #000; }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.play { width: 76px; height: 76px; border-radius: 50%; background: var(--grad-red); box-shadow: 0 14px 34px rgba(229,35,43,.45), 0 0 0 10px rgba(255,255,255,.08); position: relative; transition: transform .2s ease; }
.play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.video-frame:hover .play { transform: scale(1.07); }
.video-label { position: absolute; bottom: 14px; right: 16px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); direction: ltr; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: 18px; background: rgba(255,255,255,.94); border: 1px solid #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 16px; font-size: 15px; line-height: 1.7; font-weight: 700; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: #fff;
  box-shadow: 0 4px 12px rgba(64,128,214,.2); color: var(--red); font-size: 20px; line-height: 32px; text-align: center;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 16px; font-size: 14.5px; line-height: 1.95; color: #4a6283; }

/* Footer */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 22px; }
.site-footer a:hover { color: #fff; }

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 10px; font-size: 14px; }
}

/* =========================================================
   MOBILE / TABLET (< 900px)
   ========================================================= */
@media (max-width: 899px) {
  body { font-size: 14.5px; }

  /* Header: لوگو راست، منوی همبرگری چپ */
  .header-inner { gap: 12px; }
  .brand-logo { height: 36px; }
  .brand-fallback img { width: 32px; height: 32px; }
  .brand-text { font-size: 22px; }
  .header-cta { min-height: 38px; padding: 0 14px; font-size: 13px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 11px; border-radius: 12px; cursor: pointer;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    position: fixed; top: var(--header-h); right: 0; left: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 40px rgba(0,0,0,.3);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .main-nav a { padding: 13px 14px; font-size: 15.5px; border-radius: 12px; }
  .main-nav a + a { border-top: 1px solid rgba(255,255,255,.06); }
  .nav-cta-mobile { display: block; margin-top: 8px; text-align: center; background: var(--grad-red); color: #fff !important; border-top: 0 !important; }
  body.nav-open { overflow: hidden; }

  /* Hero: تصویر بالا، متن پایین */
  .hero-media { position: relative; z-index: 0; aspect-ratio: 1 / 1; max-height: 440px; width: 100%; }
  .hero-media img { object-position: center; }
  .hero-media::after { background: linear-gradient(180deg, rgba(0,31,62,0) 50%, var(--navy-900) 100%); }
  .hero-content { min-height: 0; margin-top: -64px; position: relative; padding-block: 0 44px; gap: 14px; }
  .hero-content > * { max-width: none; }
  .hero p { font-size: 15.5px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; }

  /* Sections */
  .split { grid-template-columns: 1fr; }
  .about .mascot { order: -1; max-width: 300px; }
  .guide .split > .video { order: -1; }
  .lead { font-size: 15px; }
  .mini-steps { grid-template-columns: 1fr; }
  .feature-list li { padding: 16px; }
  .num { width: 42px; height: 42px; border-radius: 12px; }
}

@media (max-width: 420px) {
  .copy-box { flex-direction: column; align-items: stretch; }
  .copy-box code { text-align: center; padding: 8px 6px 4px; font-size: 14px; }
  .copy-btn { width: 100%; }
  .header-cta { display: none; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* =========================================================
   MOTION — حس هوش مصنوعی، آرام و کم
   ========================================================= */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* ---------- Hero: لایه تکنولوژی ---------- */
.hero-content { position: relative; z-index: 1; }
.hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-grid {
  position: absolute; inset: -40px;
  background-image: radial-gradient(rgba(140,190,255,.35) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, rgba(0,0,0,.55) 30%, transparent 55%);
          mask-image: linear-gradient(270deg, #000 0%, rgba(0,0,0,.55) 30%, transparent 55%);
  animation: grid-drift 22s linear infinite;
  opacity: .55;
}
@keyframes grid-drift { to { transform: translate3d(-26px, 26px, 0); } }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(50px); animation: glow 9s ease-in-out infinite alternate; }
.hero-glow.g1 { width: 340px; height: 340px; top: -80px; right: 6%; background: rgba(64,128,214,.35); }
.hero-glow.g2 { width: 220px; height: 220px; bottom: -60px; right: 30%; background: rgba(229,35,43,.22); animation-delay: -4s; }
@keyframes glow { from { transform: translate3d(0,0,0) scale(1); opacity: .7; } to { transform: translate3d(-30px,20px,0) scale(1.15); opacity: 1; } }
.hero-scan {
  position: absolute; top: 0; bottom: 0; width: 140px; right: -160px;
  background: linear-gradient(90deg, transparent, rgba(150,200,255,.08), transparent);
  transform: skewX(-12deg);
  animation: scan 7s ease-in-out infinite 1.5s;
}
@keyframes scan { 0% { right: -160px; } 45%, 100% { right: 60%; opacity: 0; } 5% { opacity: 1; } }

/* ورود متن هیرو به ترتیب */
.hero-content > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-content > :nth-child(1) { animation-delay: .05s; }
.hero-content > :nth-child(2) { animation-delay: .18s; }
.hero-content > :nth-child(3) { animation-delay: .3s; }
.hero-content > :nth-child(4) { animation-delay: .42s; }
.hero-media img { animation: media-in 1.4s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes media-in { from { opacity: 0; transform: scale(1.04); } }

/* چیپ پرامپت با تایپ */
.prompt-chip {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  max-width: 100%; padding: 9px 14px 9px 16px; border-radius: 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  font-size: 14px; color: #dbe7f7; min-height: 42px;
  backdrop-filter: blur(6px);
}
.prompt-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.caret { width: 2px; height: 1.1em; background: var(--red-2); flex: 0 0 auto; animation: blink 1s steps(1) infinite; margin-inline-start: -6px; }
@keyframes blink { 50% { opacity: 0; } }
.spark { flex: 0 0 auto; width: 18px; height: 18px; position: relative; }
.spark::before, .spark::after {
  content: ""; position: absolute; inset: 0; margin: auto; background: linear-gradient(180deg, #ffd1d3, var(--red-2));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.spark::after { transform: scale(.45) translate(110%, -110%); }
.spark { animation: spark 2.6s ease-in-out infinite; }
@keyframes spark { 50% { transform: rotate(90deg) scale(.85); } }

/* ---------- نمایش هنگام اسکرول ---------- */
.reveal-pending { opacity: 0; transform: translateY(22px); }
.reveal-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) ease, transform var(--dur-slow) var(--ease-out); }
[data-reveal="stagger"].reveal-pending { opacity: 1; transform: none; }
[data-reveal="stagger"].reveal-pending > * { opacity: 0; transform: translateY(16px); }
[data-reveal="stagger"].reveal-in > * { animation: pop var(--dur-slow) var(--ease-back) both; }
[data-reveal="stagger"].reveal-in > :nth-child(2) { animation-delay: 50ms; }
[data-reveal="stagger"].reveal-in > :nth-child(3) { animation-delay: 100ms; }
[data-reveal="stagger"].reveal-in > :nth-child(4) { animation-delay: 150ms; }
[data-reveal="stagger"].reveal-in > :nth-child(5) { animation-delay: 200ms; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- ریزتعامل‌ها ---------- */
.main-nav a { position: relative; }
.steps li, .mini-steps li, .feature-list li { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease; }
.steps li:hover, .mini-steps li:hover { transform: translateX(-4px); box-shadow: var(--shadow-md); }
.ico {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--red);
  background: linear-gradient(160deg, #fff, #eef4fd); box-shadow: 0 8px 20px rgba(64,128,214,.22), inset 0 1px 0 #fff;
  transition: background var(--dur) ease, color var(--dur) ease, transform var(--dur) var(--ease-back);
}
.ico svg { width: 22px; height: 22px; }
.feature-list li:hover .ico { color: #fff; background: var(--grad-red); transform: rotate(-6deg) scale(1.05); }

.mascot img { animation: float 6s ease-in-out infinite; transform-origin: 50% 70%; }
@keyframes float { 50% { transform: translateY(-8px) scale(1.01); } }

/* لینک MCP: حاشیه نوری چرخان */
.copy-box { position: relative; isolation: isolate; border-color: transparent; }
.copy-box::before {
  content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 21px;
  background: conic-gradient(from var(--angle), rgba(64,128,214,.15), rgba(64,128,214,.75), rgba(229,35,43,.7), rgba(64,128,214,.15) 60%);
  animation: spin 5s linear infinite;
}
.copy-box::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: rgba(255,255,255,.96); }
@keyframes spin { to { --angle: 360deg; } }

.mcp-icon { animation: bob 4s ease-in-out infinite; }
.mcp-icon span { animation: pulse-orb 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes pulse-orb { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,35,43,.35); } 50% { box-shadow: 0 0 0 9px rgba(229,35,43,0); } }
.mcp-bg i:nth-child(3), .mcp-bg i:nth-child(4) { animation: bob 5s ease-in-out infinite; }
.mcp-bg i:nth-child(4) { animation-delay: -2.5s; }
.mcp-bg .ring { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(96,150,224,.35); animation: rotate 60s linear infinite; }
.mcp-bg .r1 { width: 760px; height: 760px; top: -520px; left: -300px; }
.mcp-bg .r2 { width: 620px; height: 620px; bottom: -440px; right: -240px; animation-direction: reverse; animation-duration: 80s; }
@keyframes rotate { to { transform: rotate(360deg); } }

/* ویدئو: موج دور دکمه پخش */
.play::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,79,86,.6); animation: ripple 2.2s ease-out infinite; }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

@media (max-width: 899px) {
  .hero-grid { -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000 75%); mask-image: linear-gradient(180deg, transparent 40%, #000 75%); opacity: .35; }
  .hero-glow.g1 { top: auto; bottom: 10%; }
  .prompt-chip { align-self: stretch; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-pending, [data-reveal="stagger"].reveal-pending > * { opacity: 1; transform: none; }
  .hero-scan { display: none; }
}

/* =========================================================
   ui-ux-pro-max pass: Glassmorphism + CTA پایانی + دسترس‌پذیری
   ========================================================= */
/* سطوح شیشه‌ای روی پس‌زمینه‌های رنگی */
.feature-card, .mini-steps li, .steps li, .faq details, .cta-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.feature-card { background: rgba(255,255,255,.8); }
.about, .faq { background: radial-gradient(900px 400px at 85% 0%, #e3eefd 0%, transparent 60%), var(--bg); }

/* لمس: حداقل ۴۴ پیکسل */
.main-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.faq summary { min-height: 56px; }
a, button, summary { cursor: pointer; }
.btn:focus-visible, .faq summary:focus-visible { outline-offset: 4px; }

/* چیپ پرامپت با عرض ثابت تا تایپ باعث لرزش نشود */
.prompt-chip { width: min(100%, 430px); }

/* دکمه ثانویه روی زمینه روشن */
.btn-soft { background: #fff; color: var(--ink); border: 1px solid #d6e3f5; box-shadow: 0 8px 20px rgba(64,128,214,.14); font-family: inherit; }
.btn-soft:hover { border-color: #b9cfee; }
.btn-soft.is-copied { background: linear-gradient(180deg, #2bb673, #1f9d63); color: #fff; border-color: transparent; }

/* CTA پایانی */
.final-cta { background: linear-gradient(180deg, var(--bg) 0%, #e3eefd 100%); padding-block: clamp(40px, 5vw, 72px) clamp(56px, 7vw, 96px); }
.cta-card {
  position: relative; overflow: hidden; border-radius: 28px;
  display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 24px;
  padding: clamp(24px, 4vw, 48px); box-shadow: 0 30px 70px rgba(12,45,85,.14);
  background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(240,246,255,.7));
}
.cta-card::before {
  content: ""; position: absolute; width: 420px; height: 420px; left: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,35,43,.12), transparent 65%); pointer-events: none;
}
.cta-copy { position: relative; min-width: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.cta-mascot { justify-self: center; width: 100%; max-width: 260px; height: auto; mix-blend-mode: multiply; animation: float 6s ease-in-out infinite; }

/* توقف انیمیشن‌های بی‌پایان وقتی بخش دیده نمی‌شود */
.is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

@media (max-width: 899px) {
  .cta-card { grid-template-columns: 1fr; text-align: center; }
  .cta-card .eyebrow, .cta-card h2, .cta-card p { margin-inline: auto; }
  .cta-mascot { order: -1; max-width: 180px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .ico { width: 42px; height: 42px; border-radius: 12px; }
}
.main-nav .nav-cta-mobile { display: none; }
@media (max-width: 899px) { .main-nav .nav-cta-mobile { display: flex; justify-content: center; } }

/* =========================================================
   HERO v2 — مسکات باکیفیت + صحنه ساخته‌شده با CSS
   ========================================================= */
.hero {
  background:
    radial-gradient(700px 520px at 28% 55%, rgba(48,110,200,.45), transparent 70%),
    radial-gradient(500px 400px at 95% 0%, rgba(30,80,160,.35), transparent 70%),
    linear-gradient(180deg, #00244a 0%, var(--navy-900) 100%);
}
.hero-grid {
  -webkit-mask-image: radial-gradient(520px 420px at 30% 50%, #000 0%, transparent 75%);
          mask-image: radial-gradient(520px 420px at 30% 50%, #000 0%, transparent 75%);
  opacity: .5;
}
.hero-layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 4vw, 56px);
  min-height: clamp(500px, 44vw, 600px); padding-block: 40px;
}
.hero-content { min-height: 0; padding-block: 0; margin: 0; min-width: 0; }

.hero-visual {
  position: relative; width: 100%; max-width: 500px; aspect-ratio: 1 / 1; justify-self: center;
  display: grid; place-items: center;
  animation: media-in 1s var(--ease-out) both .15s;
}
.hero-mascot {
  position: relative; z-index: 2; width: 84%; height: auto;
  filter: drop-shadow(0 28px 36px rgba(0,10,30,.55));
  animation: hover-float 6s ease-in-out infinite;
}
@keyframes hover-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-1.5deg); } }
.halo { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(90,160,255,.45), rgba(90,160,255,0) 68%); filter: blur(10px); animation: glow 6s ease-in-out infinite alternate; }
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(150,200,255,.22); }
.orbit.o1 { inset: 4%; border-style: dashed; animation: rotate 50s linear infinite; }
.orbit.o2 { inset: 16%; border-color: rgba(150,200,255,.14); animation: rotate 14s linear infinite reverse; }
.orbit.o2 i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--orb); box-shadow: 0 0 14px rgba(255,80,90,.8); }

.glass-chip {
  position: absolute; z-index: 3; display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 16px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(0,10,30,.35), inset 0 1px 0 rgba(255,255,255,.2);
  animation: bob 5s ease-in-out infinite;
}
.glass-chip svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip-idea { top: 10%; left: 4%; }
.chip-idea svg { stroke: #ff7a80; }
.chip-chart { bottom: 16%; left: 0; animation-delay: -1.7s; }
.chip-chart svg { stroke: #8ec3ff; }
.chip-chat { top: 26%; right: 0; width: 72px; height: 46px; border-radius: 14px 14px 14px 4px; display: flex; gap: 6px; justify-content: center; animation-delay: -3.2s; }
.chip-chat i { width: 8px; height: 8px; border-radius: 50%; background: #8ec3ff; animation: typing 1.2s ease-in-out infinite; }
.chip-chat i:nth-child(2) { animation-delay: .15s; } .chip-chat i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.cta-mascot { mix-blend-mode: normal; filter: drop-shadow(0 20px 26px rgba(12,45,85,.25)); }

@media (max-width: 899px) {
  .hero-layout { grid-template-columns: 1fr; min-height: 0; padding-block: 20px 44px; gap: 8px; }
  .hero-visual { order: -1; max-width: 300px; }
  .hero-content { margin-top: 0; }
  .glass-chip { width: 46px; height: 46px; border-radius: 13px; }
  .glass-chip svg { width: 21px; height: 21px; }
  .chip-chat { width: 58px; height: 38px; }
  .hero-grid { -webkit-mask-image: radial-gradient(260px 240px at 50% 28%, #000, transparent 75%); mask-image: radial-gradient(260px 240px at 50% 28%, #000, transparent 75%); }
}

/* راهنماها: تیتر بالا، مراحل و ویدیو هم‌تراز */
.guide-wrap { display: flex; flex-direction: column; gap: 28px; }
.guide-body { align-items: start; }
.guide-body .steps { margin: 0; }
.guide-alt .guide-body > .video { order: -1; }
.guide .split > .video { order: 0; }
.guide-alt .guide-body > .video { order: -1; }
@media (max-width: 899px) {
  .guide-wrap { gap: 20px; }
  .guide .guide-body > .video { order: -1; }
}

/* #########################################################
   V2 — کانسپت «همه‌چیز یک گفتگوست»
   ######################################################### */
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); }
.section-head.center { text-align: center; align-items: center; }
.section-head p { color: var(--muted); line-height: 2; }
.eyebrow-light { color: #ff8a8f; }

/* ---------- Hero additions ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #cfe0f5;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: live 2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 100% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } }
.hero h1 { font-size: clamp(44px, 4.4vw + 16px, 76px); letter-spacing: -.5px; }
.hero-meta { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: #9fb6d4; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: rgba(52,211,153,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 9px no-repeat; }
.speech {
  position: absolute; z-index: 4; top: 6%; right: -2%;
  padding: 10px 16px; border-radius: 18px 18px 4px 18px; font-size: 14.5px; font-weight: 700; color: var(--ink);
  background: #fff; box-shadow: 0 16px 34px rgba(0,10,30,.35); white-space: nowrap;
  animation: speech-in .6s var(--ease-back) both 1.1s, bob 5s ease-in-out infinite 1.7s;
}
@keyframes speech-in { from { opacity: 0; transform: translateY(10px) scale(.85); } }
.hero .chip-chat { top: auto; bottom: 26%; right: -2%; }
.hero .chip-chart { bottom: 12%; left: 2%; }

/* ---------- Demo ---------- */
.demo {
  position: relative; color: #fff; padding-block: clamp(56px, 7vw, 96px);
  background: radial-gradient(800px 400px at 50% 0%, rgba(48,110,200,.28), transparent 70%), linear-gradient(180deg, var(--navy-900), #011a35);
}
.demo h2 { color: #fff; }
.demo .section-head p { color: #a9bfdc; }
.demo-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(20px, 3vw, 40px); align-items: start; max-width: 1060px; margin-inline: auto; }
.chat-window {
  border-radius: 22px; overflow: hidden; background: #f5f8fd; color: var(--ink);
  box-shadow: 0 40px 90px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
}
.chat-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-bar .dots { display: inline-flex; gap: 6px; direction: ltr; }
.chat-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #dfe7f2; }
.chat-bar .dots i:first-child { background: #ff6b70; }
.chat-title { font-weight: 800; font-size: 14.5px; flex: 1; }
.chat-title b { color: var(--red); }
.demo-control { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; transition: background var(--dur-fast); }
.demo-control:hover { background: #f0f5fc; }
.demo-control svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; display: none; }
.demo-control .i-play path { fill: var(--ink); }
.demo-control[data-state="playing"] .i-pause, .demo-control[data-state="paused"] .i-play, .demo-control[data-state="done"] .i-replay { display: block; }
.demo-control:not([data-state]) .i-replay { display: block; }

.chat-log { list-style: none; margin: 0; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 440px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; }
.msg p { margin: 0; }
.msg.user { align-self: flex-start; }
.msg.user p { padding: 11px 15px; border-radius: 18px 18px 18px 4px; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff; font-size: 14.5px; line-height: 1.85; }
.msg.bot { align-self: flex-end; flex-direction: row-reverse; }
.msg.bot .bubble { padding: 12px 15px; border-radius: 18px 18px 4px 18px; background: #fff; box-shadow: 0 8px 22px rgba(64,128,214,.12); font-size: 14.5px; line-height: 1.85; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.msg.bot small { color: var(--muted-2); font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 4px 10px rgba(12,45,85,.18); }
.media-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.mt-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; }
.mt-row + .mt-row { border-top: 1px solid var(--line); }
.mt-row .price { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.mt-row.pick { background: linear-gradient(90deg, rgba(229,35,43,.06), rgba(229,35,43,.0)); }
.mt-row em { font-style: normal; display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--grad-red); vertical-align: 1px; }
.pay-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--grad-red); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 10px 22px rgba(229,35,43,.3); }
.pay-chip svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }
.typing .bubble { flex-direction: row; gap: 5px; padding: 14px 16px; }
.typing .bubble i { width: 7px; height: 7px; border-radius: 50%; background: #8aa7cc; animation: typing 1.1s ease-in-out infinite; }
.typing .bubble i:nth-child(2) { animation-delay: .15s; } .typing .bubble i:nth-child(3) { animation-delay: .3s; }
.chat-input { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 14px 14px; padding: 10px 10px 10px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: #93a7c2; font-size: 14px; }
.chat-input .send { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-red); }
.chat-input .send svg { width: 16px; height: 16px; fill: #fff; transform: scaleX(-1); }

/* حالت‌های پخش دمو */
.chat-log.is-playing .msg { display: none; }
.chat-log.is-playing .msg.shown { display: flex; animation: msg-in var(--dur-slow) var(--ease-back) both; }
.chat-log.is-playing .msg.typing:not([hidden]) { display: flex; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.tracker { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.tracker li {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  transition: background var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease-out);
}
.tracker h3 { color: #fff; font-size: 15.5px; }
.tracker p { color: #a9bfdc; font-size: 13.5px; line-height: 1.85; }
.tracker .ico { width: 42px; height: 42px; border-radius: 12px; color: #8ec3ff; background: rgba(255,255,255,.08); box-shadow: none; }
.tracker .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tracker li.active { background: rgba(255,255,255,.12); border-color: rgba(255,120,128,.45); transform: translateX(-6px); }
.tracker li.active .ico { color: #fff; background: var(--grad-red); }
.tracker.is-playing li:not(.active):not(.done) { opacity: .55; }
.tracker li.done .ico { color: #34d399; }
.demo-note { text-align: center; margin-top: 18px; font-size: 13px; color: #7f98bb; }

/* ---------- Flow diagram ---------- */
.flow { display: grid; grid-template-columns: 1fr minmax(60px, .6fr) 1.1fr minmax(60px, .6fr) 1fr; align-items: center; max-width: 980px; margin-inline: auto; }
.node {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 22px 16px; border-radius: 22px; background: rgba(255,255,255,.8); border: 1px solid #fff;
  box-shadow: var(--shadow-md); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.node h3 { font-size: 16.5px; }
.node p { font-size: 13.5px; color: var(--muted-2); }
.node-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, #fff, #eef4fd); box-shadow: 0 8px 20px rgba(64,128,214,.22); }
.node-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--navy-800); stroke-width: 2; stroke-linejoin: round; }
.node-core { padding-block: 28px; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); border-color: rgba(255,255,255,.1); box-shadow: 0 24px 50px rgba(0,31,62,.35); }
.node-core h3 { color: #fff; font-size: 19px; }
.node-core p { color: #a9bfdc; }
.node-core img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 30px rgba(90,160,255,.5); }
.wire { position: relative; height: 2px; background: repeating-linear-gradient(90deg, #b8cdea 0 6px, transparent 6px 12px); }
.wire span { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px rgba(229,35,43,.7); animation: packet 2.4s linear infinite; }
.wire span:nth-child(2) { background: #3b82f6; box-shadow: 0 0 12px rgba(59,130,246,.7); animation-direction: reverse; animation-delay: -1.2s; }
@keyframes packet { from { right: 0; } to { right: calc(100% - 10px); } }

/* ---------- MCP connector dialog ---------- */
.mcp { background: linear-gradient(160deg, #f4f9ff 0%, #e8f1fd 55%, #dceafc 100%); }
.mcp-layout { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.mcp-copy .mini-steps { grid-template-columns: 1fr; margin-top: 4px; }
.mcp-copy .mini-steps li { padding: 12px 14px; }
.dialog {
  border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: #fff;
  box-shadow: 0 40px 80px rgba(12,45,85,.18), 0 0 0 1px rgba(64,128,214,.08);
  transform: rotate(-1.2deg);
}
.dialog-head { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.dialog-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-red); }
.dialog-ico svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--muted-2); }
.field-box { padding: 12px 14px; border-radius: 14px; background: #f3f7fd; border: 1px solid var(--line); font-weight: 700; }
.url-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; position: relative; isolation: isolate; border-color: transparent; background: #fff; }
.url-box::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 15.5px; background: conic-gradient(from var(--angle), rgba(64,128,214,.15), rgba(64,128,214,.75), rgba(229,35,43,.7), rgba(64,128,214,.15) 60%); animation: spin 5s linear infinite; }
.url-box::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 14px; background: #fff; }
.url-box code { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.url-box .copy-btn { min-height: 44px; min-width: 112px; }
.dialog-foot { display: flex; justify-content: flex-start; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.fake-btn { padding: 8px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 700; }
.fake-btn.ghost { color: var(--muted-2); }
.fake-btn.solid { background: var(--navy-900); color: #fff; }

/* ---------- Guide tabs ---------- */
.guide { background: linear-gradient(180deg, #e6f0fd 0%, var(--bg-2) 100%); }
.anchor { position: absolute; top: 0; }
.guide { position: relative; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 340px); margin: 0 auto 28px; padding: 5px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); direction: ltr; }
.tabs button { position: relative; z-index: 1; min-height: 46px; border: 0; background: none; border-radius: 12px; font-weight: 800; font-size: 15px; color: var(--muted); cursor: pointer; transition: color var(--dur); }
.tabs button[aria-selected="true"] { color: #fff; }
.tab-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px; background: var(--grad-red); box-shadow: 0 8px 18px rgba(229,35,43,.3); transition: transform var(--dur-slow) var(--ease-back); }
.tabs[data-active="1"] .tab-thumb { transform: translateX(100%); }
.tab-panel.is-entering { animation: rise var(--dur-slow) var(--ease-out) both; }
.guide-body { align-items: start; }

/* ---------- FAQ as chat ---------- */
.faq-chat { display: flex; flex-direction: column; gap: 14px; }
.faq .faq-chat details { background: none; border: 0; box-shadow: none; overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; display: flex; flex-direction: column; gap: 10px; }
.faq .faq-chat summary {
  align-self: flex-start; max-width: 85%; min-height: 0;
  padding: 12px 16px; border-radius: 18px 18px 18px 4px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff;
  box-shadow: 0 10px 24px rgba(0,31,62,.18); transition: transform var(--dur-fast) var(--ease-out);
}
.faq .faq-chat summary:hover { transform: translateY(-2px); }
.faq .faq-chat summary::after { content: "+"; width: 26px; height: 26px; line-height: 26px; font-size: 18px; background: rgba(255,255,255,.12); color: #fff; box-shadow: none; border-radius: 8px; }
.faq .faq-chat details[open] summary::after { content: "−"; }
.answer { display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 10px; align-self: flex-end; max-width: 88%; margin-top: 10px; animation: msg-in var(--dur-slow) var(--ease-back) both; }
.answer img { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; }
.faq .faq-chat .answer p { padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: #fff; box-shadow: var(--shadow-sm); font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }

/* ---------- Final CTA ---------- */
.final { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding-block: clamp(56px, 7vw, 96px); background: radial-gradient(600px 400px at 25% 50%, rgba(48,110,200,.4), transparent 70%), linear-gradient(180deg, #00244a, var(--navy-900)); }
.final .hero-grid { -webkit-mask-image: radial-gradient(420px 320px at 25% 50%, #000, transparent 75%); mask-image: radial-gradient(420px 320px at 25% 50%, #000, transparent 75%); }
.final-layout { position: relative; z-index: 1; display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center; }
.final-visual { position: relative; justify-self: center; width: 100%; max-width: 300px; }
.final-visual img { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(0,10,30,.5)); animation: hover-float 6s ease-in-out infinite; }
.final-visual .speech { top: -4%; right: -18%; animation: bob 5s ease-in-out infinite; }
.final h2 { color: #fff; font-size: clamp(26px, 2.6vw + 12px, 40px); }
.final p { color: #b9cce6; font-size: 16px; line-height: 2; }
.final .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.final .btn-ghost { font-family: inherit; }
.final .btn-ghost.is-copied { background: linear-gradient(180deg, #2bb673, #1f9d63); border-color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .hero .speech { top: 2%; right: 0; font-size: 13px; padding: 8px 12px; }
  .hero-meta { gap: 6px 14px; }
  .demo-layout { grid-template-columns: 1fr; }
  .tracker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tracker li { flex-direction: column; align-items: center; text-align: center; padding: 12px 8px; gap: 8px; }
  .tracker li p { display: none; }
  .tracker h3 { font-size: 13px; }
  .tracker li.active { transform: translateY(-3px); }
  .chat-log { min-height: 0; padding: 16px 12px; }
  .msg { max-width: 96%; }
  .mt-row { grid-template-columns: 1fr auto; }
  .mt-row span:nth-child(2) { display: none; }
  .flow { grid-template-columns: 1fr; justify-items: stretch; gap: 0; max-width: 360px; }
  .wire { width: 2px; height: 44px; justify-self: center; background: repeating-linear-gradient(180deg, #b8cdea 0 6px, transparent 6px 12px); }
  .wire span { left: 50%; margin-left: -5px; top: auto; animation-name: packet-v; }
  @keyframes packet-v { from { top: 0; } to { top: calc(100% - 10px); } }
  .mcp-layout { grid-template-columns: 1fr; }
  .dialog { transform: none; order: -1; }
  .final-layout { grid-template-columns: 1fr; text-align: center; }
  .final .cta-actions { flex-direction: column; }
  .final .cta-actions .btn { width: 100%; }
  .final-visual { max-width: 200px; }
  .final-visual .speech { right: -30%; font-size: 13px; }
}
@media (max-width: 420px) {
  .url-box { flex-direction: column; align-items: stretch; padding: 8px; }
  .url-box code { text-align: center; padding: 6px 0; }
  .final-visual .speech { right: -10%; }
}

/* =========================================================
   V2 fixes: مرز هیرو/دمو + بررسی UI/UX
   ========================================================= */
/* اتصال نرم هیرو به دمو */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,31,62,0), var(--navy-900)); }
.hero .hero-glow.g2 { bottom: 22%; }
.demo { margin-top: -1px; background: radial-gradient(800px 420px at 50% 38%, rgba(48,110,200,.22), transparent 70%), linear-gradient(180deg, var(--navy-900), #011a35); }

/* کنتراست: رنگ قرمز متن روی زمینه روشن تیره‌تر شد (۴.۵:۱) */
.eyebrow { color: #c8161e; }
.eyebrow-light { color: #ff8a8f; }

/* اهداف لمسی حداقل ۴۴ پیکسل */
.header-cta { min-height: 44px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }

/* عناصر نمایشی که دکمه واقعی نیستند نباید شبیه دکمه رفتار کنند */
.dialog-foot, .chat-input { pointer-events: none; user-select: none; }
.dialog-foot { opacity: .75; }
.pay-chip { cursor: default; }
.dialog-note { font-size: 12.5px; color: var(--muted-2); text-align: center; margin-top: -4px; }
@media (max-width: 899px) { .nav-toggle { width: 44px; height: 44px; } }

/* #########################################################
   V3 — اعمال کامنت‌ها: هدر و فوتر سایت تریبون
   ######################################################### */
/* ---------- Header (مطابق سایت) ---------- */
.site-header { background: var(--navy-900); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(0,31,62,.94); } }
.header-inner { gap: 20px; }
.main-nav { margin-inline-start: 8px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.has-dd { position: relative; }
.dd-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background var(--dur-fast);
}
.dd-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur) var(--ease-out); }
.dd-toggle:hover, .has-dd.open .dd-toggle { background: rgba(255,255,255,.1); }
.has-dd.open .dd-toggle svg { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 260px; padding: 10px;
  background: #fff; color: var(--ink); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,20,45,.28);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out), visibility var(--dur);
}
.has-dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 900px) {
  .has-dd:hover .dd-panel, .has-dd:focus-within .dd-panel { opacity: 1; visibility: visible; transform: none; }
  .has-dd:hover .dd-toggle svg { transform: rotate(180deg); }
  .has-dd::after { content: ""; position: absolute; top: 100%; right: 0; left: 0; height: 10px; } /* پل هاور */
}
.dd-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.has-dd:first-child .dd-panel { min-width: 560px; }
.has-dd:first-child .dd-panel ul { grid-template-columns: 1fr 1fr; }
.dd-panel a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 700; color: var(--ink); transition: background var(--dur-fast); }
.dd-panel a:hover { background: #f0f5fc; color: var(--red); }
.dd-panel small { font-size: 12.5px; font-weight: 400; color: var(--muted-2); line-height: 1.7; }
.dd-cta { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px !important; color: var(--red) !important; font-size: 13.5px !important; }

.phone-box {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.55); color: #fff; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: background var(--dur-fast);
}
.phone-box:hover { background: rgba(255,255,255,.08); }
.phone-box svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.nav-phone-mobile { display: none; }
.btn-login {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: #fff; color: var(--red); font-weight: 800; font-size: 15px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,0,0,.25); }

@media (min-width: 900px) and (max-width: 1180px) {
  .dd-toggle { padding: 8px 8px; font-size: 14px; }
  .phone-box { font-size: 0; padding: 0; width: 44px; justify-content: center; gap: 0; }
  .phone-box svg { width: 20px; height: 20px; }
}

@media (max-width: 899px) {
  .main-nav { overflow-y: auto; max-height: calc(100dvh - var(--header-h)); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .dd-toggle { width: 100%; justify-content: space-between; min-height: 50px; padding: 12px 14px; font-size: 15.5px; }
  .dd-panel { position: static; min-width: 0 !important; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; background: rgba(255,255,255,.05); border-radius: 14px; margin: 2px 0 8px; padding: 6px; }
  .has-dd.open .dd-panel { display: block; }
  .has-dd:first-child .dd-panel ul { grid-template-columns: 1fr; }
  .dd-panel a { color: #fff; }
  .dd-panel a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .dd-panel small { color: #9fb6d4; }
  .dd-cta { border-color: rgba(255,255,255,.1); color: #ff8a8f !important; }
  .header-actions .phone-box { display: none; }
  .nav-phone-mobile { display: inline-flex; justify-content: center; margin-top: 10px; }
  .btn-login { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
}
@media (max-width: 360px) { .btn-login { padding: 0 10px; font-size: 12.5px; } .brand-logo { height: 30px; } }

/* ---------- Demo: جابه‌جایی چت و ترکر ---------- */
.demo-layout { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); }
.demo-layout .tracker { order: -1; }
.tracker li.active { transform: translateX(6px); }
@media (max-width: 899px) { .demo-layout { grid-template-columns: 1fr; } .tracker li.active { transform: translateY(-3px); } }

/* ---------- MCP: پنجره صاف و وسط ---------- */
.mcp-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px; }
.mcp-copy { align-items: center; max-width: 640px; }
.dialog { transform: none; width: 100%; max-width: 560px; text-align: right; order: 0; }

/* ---------- Footer (مطابق سایت) ---------- */
.site-footer { background: linear-gradient(180deg, #00244a, var(--navy-900)); color: #c3d3e8; font-size: 14.5px; padding-top: clamp(40px, 5vw, 64px); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 32px; }
.f-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.f-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.site-footer .f-col a { display: inline-flex; align-items: center; min-height: 36px; color: #c3d3e8; padding: 0; transition: color var(--dur-fast); }
.site-footer .f-col a:hover { color: #fff; }
.f-contact p { line-height: 2; margin-bottom: 14px; }
.f-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer .f-pills a { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); color: #fff; font-variant-numeric: tabular-nums; }
.site-footer .f-pills a:hover { background: rgba(255,255,255,.08); }
.f-social { display: flex; gap: 8px; margin-top: 16px; }
.site-footer .f-social a { width: 44px; height: 44px; min-height: 44px; justify-content: center; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; }
.site-footer .f-social a:hover { background: var(--red); }
.f-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.f-badges { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 28px; margin-top: 28px; border-top: 1px solid rgba(255,255,255,.1); }
.badge { width: 92px; height: 92px; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 8px; overflow: hidden; text-align: center; }
.badge img { max-width: 100%; max-height: 100%; object-fit: contain; }
.badge span { font-size: 11.5px; line-height: 1.6; color: var(--ink); font-weight: 700; }
.f-copy { background: rgba(0,0,0,.18); }
.f-copy-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 10px; font-size: 13.5px; }
.f-copy a { color: #fff; }
.site-footer .to-top { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 1080px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .f-badges { justify-content: center; }
  .badge { width: 84px; height: 84px; }
  .f-copy-inner { justify-content: center; text-align: center; }
}
.main-nav .nav-phone-mobile { display: none; }
.dd-panel a { text-align: right; align-items: flex-start; }
@media (max-width: 899px) {
  .main-nav .nav-phone-mobile { display: inline-flex; justify-content: center; width: 100%; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.55); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .f-contact { grid-column: 1 / -1; }
}
/* نمادها: چیدمان سه‌تایی مثل سایت */
.f-badges { display: grid; grid-template-columns: repeat(6, 92px); justify-content: start; }
.badge img { width: auto; height: auto; max-width: 78px; max-height: 78px; }
@media (max-width: 680px) { .f-badges { grid-template-columns: repeat(3, 92px); justify-content: center; } }
