@import url('https://fonts.bunny.net/css?family=inter:400,500,600,700,800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/vazirmatn@33.0.3/Vazirmatn-Variable-font-face.css');

:root {
  --bg: #08080f;
  --bg-raised: #0f0f1a;
  --border: #1f2030;
  --border-soft: #171824;
  --text: #eceef5;
  --text-dim: #9497ab;
  --text-faint: #63667a;
  --accent-a: #6d5bf6;
  --accent-b: #a855f7;
  --accent-c: #22d3ee;
  --radius: 14px;
  --max: 1160px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: 'Vazirmatn', 'Inter', Tahoma, sans-serif;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0; }

img { max-width: 100%; display: block; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 15, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  flex-shrink: 0;
}

.brand-mark svg { width: 18px; height: 18px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); }

.lang-switch {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-login {
  background: var(--text);
  color: #08080f;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--text-dim); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
}

.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border-soft);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(109, 91, 246, 0.35), transparent 70%);
  top: -180px;
  inset-inline-end: -160px;
}

.hero::after {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 70%);
  bottom: -220px;
  inset-inline-start: -140px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-c);
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(109, 91, 246, 0.6);
}

/* mock chat panel in hero */

.hero-mock {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-raised), #0b0b16);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.hero-mock-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.hero-mock-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.hero-mock-row {
  display: flex;
  margin-bottom: 12px;
}

.hero-mock-row.user { justify-content: flex-end; }

.hero-mock-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.hero-mock-row.user .hero-mock-bubble {
  background: var(--text);
  color: #08080f;
}

.hero-mock-row.assistant .hero-mock-bubble {
  background: #14141f;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
}

.hero-mock-tag {
  font-size: 0.72rem;
  color: var(--accent-c);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ---------- sections ---------- */

section { padding: 84px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-dim);
  font-size: 1.02rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  background: var(--bg);
  padding: 32px 28px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(109, 91, 246, 0.12);
  color: var(--accent-a);
  margin-bottom: 18px;
}

.feature-icon svg { width: 19px; height: 19px; }

.feature-card h3 { font-size: 1.04rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

/* how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step { position: relative; padding-inline-start: 46px; }

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-a);
}

.step h3 { font-size: 0.98rem; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* cta band */

.cta-band {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(135deg, rgba(109, 91, 246, 0.08), rgba(34, 211, 238, 0.04));
}

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 56px 24px;
}

.cta-band h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { color: var(--text-dim); margin: 0; }

/* ---------- pricing page ---------- */

.rate-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 16px;
  margin-top: 22px;
}

.rate-note strong { color: var(--accent-c); font-weight: 600; }

.pricing-table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: auto;
}

table.pricing-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.pricing-table th {
  text-align: start;
  padding: 16px 20px;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-raised);
}

.pricing-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-table td.model-name { font-weight: 600; white-space: normal; }

.price-tag { color: var(--text-dim); }
.price-tag strong { color: var(--text); font-weight: 600; }

.notice {
  border: 1px solid var(--border-soft);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.94rem;
}

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
}

.faq-item h3 { font-size: 0.98rem; margin-bottom: 8px; }
.faq-item p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* ---------- contact page ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr);
  gap: 48px;
  align-items: start;
}

.contact-form {
  border: 1px solid var(--border-soft);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-a);
}

.field textarea { resize: vertical; min-height: 130px; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

.alert {
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.contact-side {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-side h3 { font-size: 1rem; margin-bottom: 10px; }
.contact-side p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 20px; }

.contact-side a.email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent-c);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-name { font-weight: 700; font-size: 0.95rem; }
.footer-tagline { color: var(--text-faint); font-size: 0.82rem; }

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--text-faint);
  font-size: 0.8rem;
  width: 100%;
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  margin-top: 8px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mock { max-width: 480px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .contact-layout { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset-inline: 0;
    top: 68px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .site-nav a.lang-switch, .site-nav a.btn-login {
    margin-top: 12px;
    border-bottom: none;
    text-align: center;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  section { padding: 56px 0; }
  .cta-band .wrap { padding: 40px 24px; text-align: center; justify-content: center; }
}
