 :root {
     --bg-primary: #090514;
     --bg-card: #130b26;
     --purple-main: #9333ea;
     --purple-hover: #a855f7;
     --purple-border: rgba(147, 51, 234, 0.3);
     --text-main: #f3f4f6;
     --text-muted: #9ca3af;
 }

 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;

 }

 body {
     font-family: 'Vazirmatn', sans-serif;
     background-color: var(--bg-primary);
     color: var(--text-main);
     line-height: 1.7;
     overflow-x: hidden;

 }

 header {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     z-index: 1000;
     background: rgba(9, 5, 20, 0.85);
     backdrop-filter: blur(12px);
     border-bottom: 1px solid var(--purple-border);
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 2rem;
 }

 .nav-bar {
     height: 80px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .logo-box {
     display: flex;
     align-items: center;
     gap: 12px;
 }

 .logo-box img {
     width: 42px;
     height: 42px;
     object-fit: contain;
     background: rgba(147, 51, 234, 0.15);
     border-radius: 12px;
     padding: 4px;
     border: 1px solid var(--purple-border);
 }

 .logo-wrapper {
     margin-top: 0;
 }

 .logo-box span {
     font-size: 1.25rem;
     font-weight: 800;
     background: linear-gradient(135deg, #c084fc, #e879f9);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
 }

 .nav-links {
     display: flex;
     gap: 2.5rem;
     list-style: none;
 }

 .nav-links a {
     color: var(--text-muted);
     text-decoration: none;
     font-size: 0.95rem;
     transition: color 0.3s;
 }

 .nav-links a:hover {
     color: #c084fc;
 }

 .btn-primary {
     background: linear-gradient(135deg, #9333ea, #7c3aed);
     color: white;
     padding: 0.75rem 1.75rem;
     border-radius: 14px;
     text-decoration: none;
     font-weight: 500;
     box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.4);
     transition: all 0.3s ease;
     display: inline-block;
 }

 .btn-primary:hover {
     background: linear-gradient(135deg, #a855f7, #9333ea);
     transform: translateY(-2px);
     box-shadow: 0 15px 30px -5px rgba(147, 51, 234, 0.6);
 }

 /* Hero Section */
 .hero {
     padding: 180px 0 100px;
     text-align: center;
     position: relative;
     overflow: hidden;
 }

 .hero::before {
     content: '';
     position: absolute;
     top: 30%;
     left: 50%;
     transform: translate(-50%, -50%);
     width: 450px;
     height: 450px;
     background: rgba(147, 51, 234, 0.2);
     filter: blur(100px);
     border-radius: 50%;
     z-index: -1;
 }

 .badge {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 6px 16px;
     background: rgba(147, 51, 234, 0.1);
     border: 1px solid var(--purple-border);
     border-radius: 50px;
     color: #d8b4fe;
     font-size: 0.85rem;
     margin-bottom: 2rem;
 }

 .badge span {
     width: 8px;
     height: 8px;
     background-color: #c084fc;
     border-radius: 50%;
     box-shadow: 0 0 10px #c084fc;
 }

 .hero h1 {
     font-size: 3.5rem;
     font-weight: 900;
     margin-bottom: 1.5rem;
     line-height: 1.3;
 }

 .hero h1 span {
     background: linear-gradient(135deg, #c084fc, #e879f9, #a855f7);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
 }

 .hero p {
     max-width: 700px;
     margin: 0 auto 2.5rem;
     color: var(--text-muted);
     font-size: 1.15rem;
 }

 /* Features Section */
 .features {
     padding: 100px 0;
     background: rgba(19, 11, 38, 0.4);
     border-top: 1px solid var(--purple-border);
 }

 .section-title {
     text-align: center;
     margin-bottom: 4rem;
 }

 .section-title h2 {
     font-size: 2.5rem;
     font-weight: 800;
     margin-bottom: 1rem;
 }

 .section-title p {
     color: var(--text-muted);
 }

 .grid-3 {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
     gap: 2rem;
 }

 .card {
     background: var(--bg-card);
     border: 1px solid var(--purple-border);
     padding: 2.5rem;
     border-radius: 24px;
     transition: all 0.3s ease;
 }

 .card:hover {
     border-color: rgba(168, 85, 247, 0.6);
     transform: translateY(-5px);
     box-shadow: 0 20px 40px -15px rgba(147, 51, 234, 0.2);
 }

 .card h3 {
     font-size: 1.35rem;
     margin-bottom: 1rem;
     color: white;
 }

 .card p {
     color: var(--text-muted);
 }

 /* Contact Section */
 .contact {
     padding: 100px 0;
 }

 .contact-box {
     max-width: 650px;
     margin: 0 auto;
     background: var(--bg-card);
     border: 1px solid var(--purple-border);
     padding: 3rem;
     border-radius: 28px;
     box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
 }

 .form-group {
     margin-bottom: 1.5rem;
 }

 .form-group label {
     display: block;
     margin-bottom: 0.5rem;
     font-size: 0.9rem;
     color: var(--text-muted);
 }

 .form-control {
     width: 100%;
     background: var(--bg-primary);
     border: 1px solid var(--purple-border);
     padding: 1rem;
     border-radius: 14px;
     color: white;
     font-family: 'Vazirmatn', sans-serif;
     outline: none;
     transition: border-color 0.3s;
 }

 .form-control:focus {
     border-color: #a855f7;
 }

 footer {
     padding: 3rem 0;
     border-top: 1px solid var(--purple-border);
     text-align: center;
     color: var(--text-muted);
     font-size: 0.9rem;
 }

 .logo {
     width: 50px;
     height: 50px;
     object-fit: contain;

     display: block;
 }

 @media (max-width: 768px) {
     .hero h1 {
         font-size: 2.5rem;
     }

     .nav-links {
         display: none;
     }

     .logo-wrapper {
         margin-top: 80px;
     }

     .container {
         padding: 0 1rem;
         /* در موبایل پدینگ کمتر */
     }

     .nav-bar {
         display: flex;
         align-items: center;
         justify-content: space-between;
         /* لوگو راست، دکمه چپ */
     }

     .nav-bar .btn-primary {
         padding: 0.55rem 1.1rem;
         /* کمی کوچک‌تر تا جا شود */
         font-size: 0.9rem;
     }

 }

 /* ─── How It Works Section ───────────────────────────────────── */

 .howtowork {
     padding: 6rem 0;
     background: var(--bg-primary);
     position: relative;
     overflow: hidden;
 }

 /* subtle ambient glow */
 .howtowork::before {
     content: '';
     position: absolute;
     inset: 0;
     background: radial-gradient(ellipse 55% 60% at 75% 50%,
             rgba(147, 51, 234, 0.08) 0%,
             transparent 70%);
     pointer-events: none;
 }

 .howtowork-container {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
     align-items: center;
 }

 /* ─── Image (left column in RTL) ─── */

 .howtowork-visual {
     display: flex;
     justify-content: center;
     align-items: center;
     /* push image to left side in RTL layout */
     order: -1;
 }

 .howtowork-img-wrapper {

     position: relative;

     height: 500px;
     width: 291px;

 }


 .howtowork-img {
     background-color: #d9d6db;
     width: 291px;
     height: 100%;
     object-fit: contain;
     border-radius: 1.25rem;
     border: 1px solid var(--purple-border);
     box-shadow:
         0 0 0 1px rgba(202, 185, 217, 0.1),
         0 8px 48px rgba(172, 170, 172, 0.5);
     position: relative;
     z-index: 1;
 }

 /* decorative glow behind image */
 .howtowork-glow {
     position: absolute;
     inset: -28px;
     border-radius: 2rem;
     background: radial-gradient(ellipse at center,
             rgba(147, 51, 234, 0.25) 0%,
             transparent 65%);
     z-index: 0;
     filter: blur(20px);
 }

 /* ─── Text (right column in RTL) ─── */

 .howtowork-content {
     display: flex;
     flex-direction: column;
     gap: 1.25rem;
 }

 .howtowork-title {
     font-size: clamp(1.2rem, 2.2vw, 1.6rem);
     font-weight: 700;
     color: var(--text-main);
     line-height: 1.6;
     margin: 0;
 }

 .howtowork-title span {
     color: var(--purple-hover);
 }

 .howtowork-body {
     font-size: clamp(0.875rem, 1.4vw, 1rem);
     color: var(--text-muted);
     line-height: 1.9;
     margin: 0;
 }

 .howtowork-list {
     list-style: none;
     padding: 0;
     margin: 0.25rem 0 0;
     display: flex;
     flex-direction: column;
     gap: 0.8rem;
 }

 .howtowork-list li {
     display: flex;
     align-items: flex-start;
     gap: 0.65rem;
     font-size: clamp(0.875rem, 1.4vw, 0.975rem);
     color: var(--text-main);
     line-height: 1.7;
 }

 .howtowork-icon {
     color: var(--purple-main);
     font-size: 0.7rem;
     margin-top: 0.38rem;
     flex-shrink: 0;
 }

 /* ─── Responsive ─────────────────────────────────────────────── */

 @media (max-width: 860px) {
     .howtowork-container {
         grid-template-columns: 1fr;
         gap: 2.5rem;
     }

     /* text on top, image below */
     .howtowork-visual {
         order: 0;
     }

     .howtowork-content {
         order: 1;
     }

     .howtowork-img {
         width: clamp(200px, 68vw, 360px);
     }
 }

 @media (max-width: 480px) {

     .howtowork {
         padding: 3.5rem 0;
     }

     .howtowork-img {
         width: min(280px, 88vw);
     }
 }