:root {
  --accent: #3949ab;
  --accent-dark: #283593;
  --accent-soft: #e8eaf6;
  --text: #1a1a2e;
  --muted: #6b7280;
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  perspective: 1200px;
}

/* نوار پیشرفت اسکرول */
#progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7986cb);
  z-index: 100;
  box-shadow: 0 0 12px rgba(57, 73, 171, 0.6);
}

/* نوار بالا */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6%;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border), 0 10px 30px -15px rgba(57, 73, 171, 0.25);
}
.logo {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
  text-shadow: 0 2px 10px rgba(57, 73, 171, 0.25);
}
.nav-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 8px 20px -8px var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px var(--accent);
}

/* بخش اصلی */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 120px 6% 60px;
  background:
    radial-gradient(circle at 85% 15%, #c5cae9 0, transparent 40%),
    radial-gradient(circle at 10% 90%, #e8eaf6 0, transparent 40%),
    var(--bg);
  overflow: hidden;
}
#bg3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero > *:not(#bg3d) { position: relative; z-index: 1; }

h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.5;
  transform-style: preserve-3d;
}
.grad-text {
  background: linear-gradient(135deg, var(--accent) 20%, #7986cb 50%, var(--accent-dark) 80%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 20px 0 32px;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* آمار در هیرو */
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 44px;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.stat span { color: var(--muted); font-size: 0.85rem; }

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 12px 24px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,0.25);
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  right: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: right 0.5s ease;
}
.btn-primary:hover::after { right: 130%; }
.btn-3d {
  box-shadow: 0 6px 0 var(--accent-dark), 0 16px 30px -12px var(--accent);
}
.btn-3d:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 var(--accent-dark), 0 8px 18px -10px var(--accent);
}
.btn-disabled {
  background: #eceff1;
  color: #9aa0a6;
  border: 1px dashed #cfd8dc;
  cursor: not-allowed;
  transform: none;
}

/* موکاپ گوشی سه‌بعدی */
.phone-wrap {
  position: relative;
  justify-self: center;
  transform-style: preserve-3d;
}
.phone {
  position: relative;
  width: 260px;
  height: 520px;
  background: linear-gradient(145deg, #1f2937, #111827);
  border-radius: 36px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(57, 73, 171, 0.45), 0 60px 100px -40px rgba(57, 73, 171, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  animation: phoneFloat 5s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
.phone-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50px;
  background: radial-gradient(circle, rgba(57,73,171,0.35) 0%, transparent 70%);
  filter: blur(20px);
  z-index: -1;
}
.screen {
  background: #f5f6fb;
  border-radius: 26px;
  height: 100%;
  padding: 44px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notch {
  position: absolute;
  top: 24px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 8px;
  background: #111827;
  border-radius: 99px;
}
.screen .card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  transform: translateZ(30px);
  box-shadow: 0 6px 14px -8px rgba(26, 26, 46, 0.15);
  animation: float 4s ease-in-out infinite;
}
.screen .card:nth-child(even) { animation-delay: 0.8s; }
.screen .card.done {
  background: var(--accent-soft);
  color: var(--muted);
  text-decoration: line-through;
}
@keyframes float {
  0%, 100% { transform: translateZ(30px) translateY(0); }
  50% { transform: translateZ(30px) translateY(-4px); }
}

/* آیتم‌های مداری دور گوشی */
.orbit {
  position: absolute;
  font-size: 34px;
  filter: drop-shadow(0 8px 12px rgba(57,73,171,0.35));
  z-index: 2;
}
.orbit-1 { top: -8%; right: -14%; animation: orbit1 7s ease-in-out infinite; }
.orbit-2 { bottom: 6%; right: -20%; animation: orbit2 9s ease-in-out infinite; }
.orbit-3 { top: 34%; left: -18%; animation: orbit3 8s ease-in-out infinite; }
@keyframes orbit1 {
  0%, 100% { transform: translate(0,0) rotate(-8deg); }
  50% { transform: translate(-14px, 18px) rotate(10deg); }
}
@keyframes orbit2 {
  0%, 100% { transform: translate(0,0) rotate(6deg); }
  50% { transform: translate(12px, -16px) rotate(-10deg); }
}
@keyframes orbit3 {
  0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); }
  50% { transform: translate(-10px, -14px) rotate(14deg) scale(1.15); }
}

/* بخش‌های عمومی */
section { padding: 90px 6%; }
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 50px;
}

/* امکانات */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: auto;
  perspective: 1000px;
}
.feature {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.3s;
  will-change: transform;
}
.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(57,73,171,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }
.feature:hover {
  box-shadow: 0 24px 48px -20px rgba(57, 73, 171, 0.4);
}
.icon {
  font-size: 30px;
  margin-bottom: 12px;
  transform: translateZ(40px);
  display: inline-block;
}
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; transform: translateZ(25px); }
.feature p { color: var(--muted); font-size: 0.95rem; transform: translateZ(15px); }

/* مراحل */
.steps { max-width: 900px; margin: auto; display: grid; gap: 18px; perspective: 1000px; }
.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.3s;
  will-change: transform;
}
.step:hover {
  box-shadow: 0 20px 44px -20px rgba(57, 73, 171, 0.35);
}
.step-num {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 18px -8px var(--accent);
  transform: translateZ(30px);
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); }

/* دانلود */
.download {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 28px;
  max-width: 1000px;
  margin: 0 auto 60px;
  overflow: hidden;
}
.download::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 60%;
  height: 220%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.download .section-title { color: #fff; }
.download .section-sub { color: #c5cae9; }
.download .hero-actions { justify-content: center; }
.download .btn-primary { background: #fff; color: var(--accent); box-shadow: 0 6px 0 #c5cae9, 0 16px 30px -12px rgba(0,0,0,0.3); }
.download .btn-3d:active { box-shadow: 0 2px 0 #c5cae9, 0 8px 18px -10px rgba(0,0,0,0.3); }
.download .btn-disabled {
  background: rgba(255, 255, 255, 0.12);
  color: #c5cae9;
  border-color: rgba(255, 255, 255, 0.3);
}
.note { margin-top: 20px; font-size: 0.9rem; color: #c5cae9; }

/* پاورقی */
footer {
  text-align: center;
  padding: 40px 6%;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* انیمیشن ظاهر شدن با اسکرول */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* موبایل */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 110px;
  }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .phone-wrap { order: -1; }
  .phone { width: 220px; height: 440px; }
  .orbit { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
