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

:root {
  --bg: #0a0e1a;
  --bg-alt: #0e1424;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --text: #e8ecf5;
  --text-dim: #9aa5bd;
  --primary: #6c8cff;
  --accent: #35d0c5;
  --radius: 16px;
  --container: 1140px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 780px; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px; font-weight: 900; color: #0a0e1a;
}
.main-nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; color: var(--text-dim); }
.main-nav a:hover { color: var(--text); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.nav-toggle-bar { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #071021; }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-small { padding: 8px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ============ Hero ============ */
.hero { position: relative; min-height: 92vh; display: grid; place-items: center; overflow: hidden; }
.hero-canvas, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback {
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(108, 140, 255, 0.25), transparent 70%),
    radial-gradient(50% 50% at 25% 70%, rgba(53, 208, 197, 0.18), transparent 70%),
    var(--bg);
  display: none;
}
.hero.is-fallback .hero-canvas { display: none; }
.hero.is-fallback .hero-fallback { display: block; }
.hero-content { position: relative; z-index: 2; text-align: center; padding-block: 120px; }
.hero-kicker { color: var(--accent); font-weight: 600; letter-spacing: 1px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); font-weight: 900; line-height: 1.35; }
.grad-text { background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-dim); max-width: 560px; margin: 18px auto 32px; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ Sections ============ */
.section { padding-block: 96px; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; text-align: center; }
.section-sub { color: var(--text-dim); text-align: center; margin: 10px 0 48px; }

/* ============ Trust ============ */
.trust { padding-block: 48px; border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.trust-item strong { display: block; font-size: 1.9rem; font-weight: 900; color: var(--primary); }
.trust-item span { color: var(--text-dim); font-size: 0.9rem; }

/* ============ Cards ============ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(108, 140, 255, 0.45); }
.card-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-strong); color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.92rem; }

/* ============ Plans ============ */
.plan-switch { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; }
.plan-tab {
  padding: 10px 26px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.plan-tab.is-active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #071021; border-color: transparent; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.plan-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.plan-card.is-featured { border-color: rgba(108, 140, 255, 0.55); box-shadow: var(--shadow); }
.plan-price { color: var(--accent); font-weight: 700; }
.plan-card ul { list-style: none; color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.plan-card li { padding-block: 6px; border-bottom: 1px dashed var(--border); }
.plan-card li:last-child { border-bottom: none; }
.plan-card .btn { margin-top: 8px; }

/* ============ Process ============ */
.process-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.process-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #071021; font-weight: 900; margin-bottom: 12px;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.process-step p { color: var(--text-dim); font-size: 0.92rem; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-inline-end: 28px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; inset-inline-end: 0; top: 0;
  color: var(--accent); font-size: 1.3rem; font-weight: 400; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-dim); margin-top: 10px; font-size: 0.95rem; }

/* ============ Contact ============ */
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-dim); }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(0, 0, 0, 0.25);
  color: var(--text); font: inherit; transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }
.form-status { margin-top: 14px; font-size: 0.95rem; color: var(--accent); min-height: 1.5em; }
.form-status.is-error { color: #ff8095; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding-block: 28px; color: var(--text-dim); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a:hover { color: var(--text); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 68px 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(12, 17, 32, 0.97); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px; display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; margin-top: 12px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .section { padding-block: 64px; }
}

/* ============ Fixes: missing selectors ============ */
.brand-name { font-size: 1.05rem; }
body.menu-open { overflow: hidden; }
.form-field label.is-invalid { color: #ff8095; }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #ff8095; }
