:root {
  --bg: #0a0a12;
  --bg2: #10101c;
  --card: #14141f;
  --border: #23233a;
  --text: #ececf5;
  --muted: #9a9ab5;
  --accent: #7c5cff;
  --accent2: #00d4b8;
  --grad: linear-gradient(120deg, #7c5cff, #00d4b8);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  padding-top: 64px;
}

/* ===== Glow orbs ===== */
.glow { position: fixed; border-radius: 50%; filter: blur(120px); opacity: .25; z-index: 0; pointer-events: none; }
.glow1 { width: 500px; height: 500px; background: var(--accent); top: -150px; right: -100px; }
.glow2 { width: 400px; height: 400px; background: var(--accent2); bottom: 20%; left: -150px; opacity: .15; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== Navbar ===== */
.nav {
  position: fixed; top: 0; right: 0; left: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 18, .8); border-bottom: 1px solid var(--border);
}
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 26px; }
.logo { font-weight: 900; font-size: 1.15rem; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 9px; }
.logo .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(124,92,255,.8); }
.nav-links { display: flex; gap: 20px; margin-inline-start: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent2); }
.nav-cta { padding: 8px 18px !important; background: var(--grad); border-radius: 10px; color: #fff !important; font-weight: 700; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 32px; border-radius: 14px; font-weight: 700;
  font-size: 1.02rem; text-decoration: none; font-family: inherit; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(124,92,255,.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(124,92,255,.5); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-3px); }

/* ===== Hero ===== */
.hero { min-height: 80vh; display: flex; align-items: center; text-align: center; padding: 40px 0; }
.hero-tag {
  display: inline-block; padding: 6px 18px; border: 1px solid var(--border);
  border-radius: 99px; color: var(--accent2); font-size: .85rem; margin-bottom: 26px;
  background: rgba(0,212,184,.06);
}
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 900; line-height: 1.55; margin-bottom: 22px; }
h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 1.12rem; max-width: 640px; margin: 0 auto 36px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 20px; color: var(--muted); font-size: .9rem; }

/* ===== Sections ===== */
section { padding: 80px 0; }
.sec-tag { color: var(--accent2); font-weight: 700; font-size: .9rem; letter-spacing: 1px; margin-bottom: 10px; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem); font-weight: 900; margin-bottom: 16px; }
.sec-sub { color: var(--muted); max-width: 680px; margin-bottom: 46px; font-size: 1.03rem; }
.sec-sub.center, .center { margin-inline: auto; text-align: center; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ===== Page head (sub pages) ===== */
.page-head { padding: 90px 0 30px; text-align: center; }
.page-head .sec-sub { margin: 0 auto 20px; }

/* ===== Chat demo ===== */
.chat-demo { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; max-width: 640px; margin: 0 auto; }
.chat-line { margin-bottom: 14px; display: flex; }
.chat-line .bubble { padding: 10px 18px; border-radius: 14px; font-size: .95rem; max-width: 85%; }
.chat-line.user { justify-content: flex-start; }
.chat-line.user .bubble { background: #1d1d30; color: var(--muted); }
.chat-line.bot { justify-content: flex-end; }
.chat-line.bot .bubble { background: var(--grad); color: #fff; font-weight: 500; }
.typeline { margin-top: 18px; color: var(--muted); font-size: .85rem; }
.typeline .dot { animation: blink 1.2s infinite; color: var(--accent2); }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Steps (setup) ===== */
.timeline { position: relative; padding-right: 30px; border-right: 2px solid var(--border); display: flex; flex-direction: column; gap: 40px; max-width: 780px; }
.t-item { position: relative; }
.t-item::before {
  content: ''; position: absolute; right: -39px; top: 8px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 5px rgba(124,92,255,.18);
}
.t-item h3 { font-size: 1.2rem; margin-bottom: 6px; }
.t-item p { color: var(--muted); margin-bottom: 10px; }
.t-item ul { list-style: none; margin: 8px 0; }
.t-item ul li { color: var(--muted); padding-right: 22px; position: relative; margin-bottom: 4px; }
.t-item ul li::before { content: '◂'; position: absolute; right: 0; color: var(--accent2); }

/* ===== Code ===== */
.code {
  background: #0d0d17; border: 1px solid var(--border); border-radius: 12px; padding: 15px 20px;
  font-family: Consolas, Monaco, monospace; direction: ltr; text-align: left;
  color: #a8f0d8; font-size: .88rem; overflow-x: auto; margin: 12px 0; line-height: 1.7;
}
.code .c { color: #5c5c78; }

/* ===== Cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(124,92,255,.15); }
.card .icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .93rem; }
.card ul { list-style: none; margin-top: 12px; }
.card ul li { color: var(--muted); font-size: .9rem; padding-right: 20px; position: relative; margin-bottom: 5px; }
.card ul li::before { content: '◂'; position: absolute; right: 0; color: var(--accent2); }

/* ===== Steps grid (index) ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; position: relative; transition: transform .25s, border-color .25s; }
.step:hover { transform: translateY(-5px); border-color: var(--accent); }
.step-num {
  position: absolute; top: -16px; right: 20px; background: var(--grad); color: #fff;
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .9rem; box-shadow: 0 4px 14px rgba(124,92,255,.4);
}
.step h3 { font-size: 1.08rem; margin: 10px 0 8px; }
.step p { color: var(--muted); font-size: .92rem; }

/* ===== Scenarios ===== */
.scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.scenario { border-right: 3px solid var(--accent); background: var(--card); border-radius: 12px; padding: 22px 24px; transition: border-color .25s; }
.scenario:hover { border-color: var(--accent2); }
.scenario h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--accent2); }
.scenario p { color: var(--muted); font-size: .92rem; }

/* ===== Tip / quote ===== */
.tip {
  background: rgba(0,212,184,.06); border: 1px solid rgba(0,212,184,.25); border-radius: 12px;
  padding: 16px 22px; color: var(--accent2); margin: 30px 0; font-weight: 500;
}
.quote { text-align: center; color: var(--muted); font-style: italic; margin-top: 34px; font-size: 1.02rem; }

/* ===== Path flow ===== */
.path { margin-top: 40px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.path h3 { margin-bottom: 18px; }
.path-flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.path-item { padding: 8px 18px; background: #1d1d30; border-radius: 10px; font-size: .9rem; border: 1px solid var(--border); }
.path-arrow { color: var(--accent); font-weight: 900; }

/* ===== CTA ===== */
.cta-box {
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(0,212,184,.08));
  border: 1px solid var(--border); border-radius: 24px; padding: 64px 40px; text-align: center;
}
.cta-box .sec-sub { margin: 14px auto 30px; }

/* ===== Next link ===== */
.next-link { text-align: center; margin-top: 54px; }
.next-link a { color: var(--accent2); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.next-link a:hover { text-decoration: underline; }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 36px 0 44px; text-align: center; position: relative; z-index: 1; }
.credits { color: var(--muted); font-size: .98rem; }
.credits strong { color: var(--text); }
.copy { color: #5c5c78; font-size: .8rem; margin-top: 10px; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .nav-inner { gap: 14px; flex-wrap: wrap; }
  .nav-links { gap: 13px; font-size: .84rem; }
  section { padding: 55px 0; }
  .hero { min-height: 70vh; }
  .cta-box { padding: 46px 22px; }
  .timeline { padding-right: 24px; }
  .t-item::before { right: -33px; }
}
