/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:      #8b5cf6;
  --purple-dark: #6d28d9;
  --blue:        #3b82f6;
  --blue-dark:   #1d4ed8;
  --teal:        #06b6d4;
  --green:       #10b981;
  --red:         #ef4444;
  --bg:          #080914;
  --surface:     rgba(255,255,255,0.04);
  --border:      rgba(255,255,255,0.08);
  --border-glow: rgba(139,92,246,0.4);
  --text:        #f1f5f9;
  --muted:       #64748b;
  --muted2:      #94a3b8;
  --radius:      16px;
  --font:        'Vazirmatn', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

/* ── Noise Overlay ────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* ── Background Orbs ──────────────────────────────── */
.bg-orbs {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.bg-orbs span {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.18;
  animation: floatOrb 20s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  top: -200px; right: -100px;
  animation-duration: 25s;
}
.bg-orbs span:nth-child(2) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--blue), transparent 70%);
  bottom: -100px; left: -100px;
  animation-duration: 30s; animation-delay: -10s;
}
.bg-orbs span:nth-child(3) {
  width: 350px; height: 350px;
  background: radial-gradient(circle, var(--teal), transparent 70%);
  top: 40%; left: 40%;
  animation-duration: 20s; animation-delay: -5s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -60px) scale(1.1); }
  66%       { transform: translate(-30px, 40px) scale(0.95); }
}

/* ── Utility ──────────────────────────────────────── */
.container   { max-width: 1160px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.gradient-text {
  background: linear-gradient(135deg, #c4b5fd, #818cf8, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(8,9,20,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.navbar.scrolled { background: rgba(8,9,20,0.95); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-logo img { height: 32px; }
.nav-logo span { font-size: 1.25rem; font-weight: 700; letter-spacing: -.5px; }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--muted2); font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: flex; align-items: center; gap: 12px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 22px; border-radius: 10px;
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none; transition: all .2s;
  white-space: nowrap;
}
.btn-ghost {
  background: transparent; color: var(--muted2); border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--purple); color: var(--text); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-dark), var(--blue));
  color: #fff; position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--purple), var(--blue-dark));
  opacity: 0; transition: opacity .2s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; }

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-outline {
  background: var(--surface); color: var(--muted2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: rgba(139,92,246,.5); color: var(--text); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  min-height: 100vh; padding: 140px 0 80px;
  display: flex; align-items: center;
  position: relative;
}

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  border: 1px solid rgba(139,92,246,.35);
  background: rgba(139,92,246,.08);
  font-size: .8rem; color: #c4b5fd; font-weight: 500;
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.8); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.5px; margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem; color: var(--muted2); line-height: 1.8;
  max-width: 480px; margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 32px; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-stat-item strong {
  display: block; font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--muted2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-item span { font-size: .8rem; color: var(--muted); }

/* ── Hero Chart ───────────────────────────────────── */
.hero-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.chart-wrapper {
  position: relative; width: 100%; max-width: 520px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
  box-shadow: 0 0 60px rgba(139,92,246,.12), 0 24px 64px rgba(0,0,0,.5);
  backdrop-filter: blur(10px);
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-header .symbol {
  font-size: .85rem; font-weight: 600; color: var(--muted2);
}
.chart-header .price-display {
  display: flex; align-items: baseline; gap: 6px;
}
.chart-header .price-main { font-size: 1.3rem; font-weight: 700; }
.chart-header .price-change {
  font-size: .8rem; color: var(--green);
  background: rgba(16,185,129,.1); padding: 2px 8px; border-radius: 6px;
}
canvas#heroChart { width: 100%; height: 240px; display: block; border-radius: 10px; }

.chart-metrics {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
  margin-top: 16px;
}
.metric-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
}
.metric-card .label { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.metric-card .val   { font-size: .95rem; font-weight: 600; }
.metric-card .val.green { color: var(--green); }
.metric-card .val.purple { color: #a78bfa; }

/* glow ring */
.chart-wrapper::before {
  content: ''; position: absolute;
  inset: -1px; border-radius: 21px; z-index: -1;
  background: linear-gradient(135deg, rgba(139,92,246,.3), rgba(59,130,246,.2), transparent);
  filter: blur(2px);
}

/* ── Stats Bar ────────────────────────────────────── */
.stats-bar {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.015);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: var(--border);
}
.stat-item {
  background: var(--bg); padding: 32px 24px; text-align: center;
}
.stat-item .num {
  font-size: 2.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block; line-height: 1;
}
.stat-item .desc { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* ── Section common ───────────────────────────────── */
section { padding: 100px 0; position: relative; }

.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--purple); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 16px;
}
.section-label::before {
  content: ''; width: 20px; height: 2px;
  background: linear-gradient(to left, var(--purple), transparent);
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; line-height: 1.2;
  letter-spacing: -.3px; margin-bottom: 16px;
}
.section-sub {
  font-size: 1.05rem; color: var(--muted2); max-width: 540px;
}
.section-head { margin-bottom: 60px; }

/* ── Features ─────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  cursor: default; position: relative; overflow: hidden;
}
.feat-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.07), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.feat-card:hover {
  border-color: rgba(139,92,246,.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(139,92,246,.1);
}
.feat-card:hover::after { opacity: 1; }

.feat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.feat-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; position: relative; z-index: 1; }
.feat-card p  { font-size: .875rem; color: var(--muted2); line-height: 1.7; position: relative; z-index: 1; }

.icon-purple { background: rgba(139,92,246,.15); }
.icon-blue   { background: rgba(59,130,246,.15); }
.icon-green  { background: rgba(16,185,129,.15); }
.icon-teal   { background: rgba(6,182,212,.15); }
.icon-orange { background: rgba(249,115,22,.15); }
.icon-pink   { background: rgba(236,72,153,.15); }

/* ── How it works ─────────────────────────────────── */
.how-section { background: rgba(255,255,255,.015); }

.steps-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 32px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute; top: 28px; right: calc(100% / 6);
  width: calc(100% * 2 / 3); height: 1px;
  background: linear-gradient(to left, transparent, var(--purple), var(--blue), transparent);
}

.step-card { text-align: center; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dark), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(139,92,246,.35);
  position: relative; z-index: 1;
}
.step-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.step-card p  { font-size: .875rem; color: var(--muted2); line-height: 1.7; }

/* ── CTA Banner ───────────────────────────────────── */
.cta-section { padding: 80px 0; }
.cta-card {
  border-radius: 24px; padding: 72px 48px;
  text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a0f3a 0%, #0f1f4a 50%, #0d2a2a 100%);
  border: 1px solid rgba(139,92,246,.25);
}
.cta-card::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(139,92,246,.2), transparent),
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(59,130,246,.15), transparent);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; margin-bottom: 16px; }
.cta-card p  { font-size: 1.05rem; color: var(--muted2); margin-bottom: 36px; max-width: 480px; margin-right: auto; margin-left: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.foot-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.foot-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.foot-logo img { height: 28px; }
.foot-logo span { font-size: 1.1rem; font-weight: 700; }
footer p { font-size: .82rem; color: var(--muted); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── Mobile menu button ───────────────────────────── */
.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 1.2rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .2s, color .2s;
}
.menu-btn:hover { border-color: var(--purple); color: var(--text); }

@media (max-width: 768px) {
  .hero-inner      { grid-template-columns: 1fr; }
  .hero-visual     { display: none; }
  .stats-grid      { grid-template-columns: repeat(2,1fr); }
  .features-grid   { grid-template-columns: 1fr; }
  .steps-grid      { grid-template-columns: 1fr; gap: 48px; }
  .steps-grid::before { display: none; }
  .foot-inner      { flex-direction: column; gap: 12px; text-align: center; }
  .hero-stats      { flex-wrap: wrap; gap: 20px; }
  .cta-card        { padding: 48px 24px; }

  .menu-btn { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 65px;
    right: 0; left: 0;
    background: rgba(8,9,20,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }

  .nav-cta { display: none; }
}
