:root {
  --bg: #0B0E14;
  --bg-soft: #111622;
  --card-bg: rgba(17, 24, 39, 0.65);
  --card-border: rgba(56, 189, 248, 0.15);
  --card-hover: rgba(56, 189, 248, 0.35);
  --primary: #38BDF8;
  --cyan: #22D3EE;
  --primary-glow: rgba(56, 189, 248, 0.35);
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  direction: rtl;
}

body {
  overflow-x: hidden;
  line-height: 1.7;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.hide {
  opacity: 0;
  visibility: hidden;
}
.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Layout & Typography */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 800px;
}
.section {
  padding: 90px 0;
  position: relative;
}
.section-head {
  text-align: center;
  margin-bottom: 50px;
}
.section-tag {
  display: inline-block;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.section-head p {
  color: var(--text-muted);
}
.grad-text {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Glassmorphism Card */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.glass:hover {
  border-color: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #04121F;
  box-shadow: 0 0 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  padding: 12px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark { color: var(--primary); font-size: 1.5rem; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}
.main-nav a:not(.btn):hover,
.main-nav a.active {
  color: var(--primary);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 38px;
  height: 38px;
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  display: block;
  background: var(--text);
  height: 2px;
  border-radius: 2px;
  transition: var(--transition);
  position: absolute;
  width: 24px;
  right: 7px;
}
.menu-toggle span { top: 18px; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active span::after { transform: rotate(-45deg); top: 0; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}
.glow-1 {
  width: 450px;
  height: 450px;
  background: #38bdf8;
  top: 10%;
  left: -100px;
}
.glow-2 {
  width: 500px;
  height: 500px;
  background: #22d3ee;
  bottom: 0;
  right: -100px;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: float 6s ease-in-out infinite alternate;
}
.p1 { top: 20%; left: 15%; animation-duration: 5s; }
.p2 { top: 40%; left: 45%; animation-duration: 7s; }
.p3 { top: 75%; left: 25%; animation-duration: 6s; }
.p4 { top: 30%; right: 20%; animation-duration: 8s; }
.p5 { top: 70%; right: 35%; animation-duration: 5.5s; }
.p6 { top: 85%; right: 15%; animation-duration: 6.5s; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--primary);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}
.hero-text .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
}
.hero-stats {
  list-style: none;
  display: flex;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
}
.hero-stats li strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
}
.hero-stats li span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 3D Sphere Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}
.scene-3d {
  position: relative;
  width: 360px;
  height: 360px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}
.sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #67e8f9, #0284c7 60%, #082f49 100%);
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.6), inset 0 0 30px rgba(255, 255, 255, 0.4);
  animation: pulseSphere 4s ease-in-out infinite alternate;
}
.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}
.ring-1 {
  width: 230px;
  height: 230px;
  margin: -115px 0 0 -115px;
  animation: rotateRing 14s linear infinite;
  border-top-color: var(--cyan);
}
.ring-2 {
  width: 290px;
  height: 290px;
  margin: -145px 0 0 -145px;
  animation: rotateRingRev 20s linear infinite;
  transform: rotateX(65deg);
}
.ring-3 {
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  animation: rotateRing 26s linear infinite;
  transform: rotateY(65deg);
  border-style: dotted;
}
.node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--cyan);
}
.n1 { top: 15%; left: 50%; }
.n2 { top: 50%; right: 10%; }
.n3 { bottom: 15%; left: 50%; }
.n4 { top: 50%; left: 10%; }
.n5 { top: 25%; right: 25%; }
.n6 { bottom: 25%; left: 25%; }

.links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.links line {
  stroke: rgba(56, 189, 248, 0.25);
  stroke-dasharray: 4;
  animation: dash 8s linear infinite;
}
.float-chip {
  position: absolute;
  padding: 6px 14px;
  background: rgba(11, 14, 20, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.chip-1 { top: 20px; right: -10px; animation: float 4s ease-in-out infinite alternate; }
.chip-2 { bottom: 30px; left: -10px; animation: float 5s ease-in-out infinite alternate 1s; }

/* How It Works Steps */
.step-card {
  padding: 32px 24px;
  text-align: center;
}
.step-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
}
.step-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.step-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Pricing */
.price-card {
  padding: 36px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(17, 24, 39, 0.85));
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.15);
}
.pop-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #04121F;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}
.price-card h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.price-card .price {
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-card .price .num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
}
.price-card .price small {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.price-card .features {
  list-style: none;
  margin-bottom: 30px;
  flex-grow: 1;
}
.price-card .features li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.price-card .features li:last-child {
  border-bottom: none;
}

/* Features */
.feature-card {
  padding: 30px;
}
.feature-card .f-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Dashboard Preview */
.dash {
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.dash-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--card-border);
}
.dash-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dash-header .red { background: #ef4444; }
.dash-header .yellow { background: #f59e0b; }
.dash-header .green { background: #10b981; }
.dash-title {
  margin-right: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}
.dash-body {
  padding: 24px;
}
.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}
.dash-row code {
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--primary);
  font-family: monospace;
  font-size: 0.95rem;
}
.status-on {
  color: #10b981;
  font-weight: 600;
}
.dash-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-top: 20px;
  overflow: hidden;
}
.dash-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  border-radius: 4px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 600;
  text-align: right;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
}
.faq-q .arrow {
  transition: transform 0.3s ease;
  color: var(--primary);
  font-size: 1.1rem;
}
.faq-item.active .arrow {
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.faq-item.active .faq-a {
  padding-bottom: 20px;
}

/* CTA Box */
.cta-box {
  text-align: center;
  padding: 60px 30px;
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(34, 211, 238, 0.05));
}
.cta-box h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.cta-box p {
  color: var(--text-muted);
  margin-bottom: 26px;
}

/* Footer */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 60px 0 24px;
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.brand-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul a,
.footer-col p {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col ul a:hover {
  color: var(--primary);
}
.social-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.social-links a:hover {
  background: var(--primary);
  color: #04121F;
  border-color: var(--primary);
}
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Back to top button */
#backTop {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
#backTop.show {
  opacity: 1;
  visibility: visible;
}
#backTop:hover {
  background: var(--primary);
  color: #04121F;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes rotateRingRev {
  0% { transform: rotateX(65deg) rotate(360deg); }
  100% { transform: rotateX(65deg) rotate(0deg); }
}
@keyframes pulseSphere {
  0% { transform: scale(1); box-shadow: 0 0 40px rgba(56, 189, 248, 0.5); }
  100% { transform: scale(1.06); box-shadow: 0 0 65px rgba(34, 211, 238, 0.85); }
}
@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}
@keyframes dash {
  to { stroke-dashoffset: 50; }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 270px;
    height: 100vh;
    background: rgba(11, 14, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 20px;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(56, 189, 248, 0.15);
  }
  .main-nav.open {
    right: 0;
  }
  .nav-cta {
    width: 100%;
  }
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  .hero-text h1 {
    font-size: 2.1rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .scene-3d {
    width: 280px;
    height: 280px;
  }
  .sphere {
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
  }
}
