/* ============================================================
   iautn — استایل سراسری
   ============================================================ */

:root {
  --brand: #3f51e3;
  --brand-light: #5468ef;
  --plum: #7b45cc;
  --ink: #241f4b;
  --page: #ffffff;
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  color: #3b3663;
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); }

::selection { background: rgba(84, 104, 239, .18); }

/* ---------- اسکرول‌بار ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f2f1fb; }
::-webkit-scrollbar-thumb { background: #cfd2f4; border-radius: 999px; border: 2px solid #f2f1fb; }
::-webkit-scrollbar-thumb:hover { background: #a9b0ee; }

/* ---------- پس‌زمینه‌ها ---------- */
.bg-grid {
  background-image:
    linear-gradient(to left, rgba(99, 102, 241, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, .07) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bg-mesh {
  background:
    radial-gradient(60% 60% at 12% 8%, rgba(124, 141, 250, .28) 0%, transparent 60%),
    radial-gradient(55% 55% at 88% 4%, rgba(172, 130, 238, .28) 0%, transparent 62%),
    radial-gradient(70% 60% at 50% 100%, rgba(255, 214, 193, .35) 0%, transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f6f5ff 45%, #f3f0ff 100%);
}

.bg-soft { background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%); }

/* ---------- متن گرادیانی ---------- */
.text-gradient {
  background: linear-gradient(270deg, #3f51e3 0%, #6244d6 55%, #8b55e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  padding: .8rem 1.6rem;
  line-height: 1.4;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(270deg, #3f51e3, #5468ef);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(63, 81, 227, .85);
}
.btn-primary:hover { box-shadow: 0 18px 30px -12px rgba(63, 81, 227, .9); }

.btn-plum {
  background: linear-gradient(270deg, #6835ac, #9160e0);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(104, 53, 172, .8);
}

.btn-white { background: #fff; color: #3340be; box-shadow: 0 12px 26px -16px rgba(36, 31, 75, .6); }
.btn-white:hover { color: #262f7a; }

.btn-outline { border: 1.5px solid #d8dcff; color: #3340be; background: #fff; }
.btn-outline:hover { border-color: #7c8dfa; background: #f1f4ff; }

.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---------- برچسب بالای عنوان ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6e4ff;
  color: #6244d6;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: 0 8px 20px -14px rgba(63, 58, 150, .55);
}

/* ---------- کارت‌ها ---------- */
.card {
  background: #fff;
  border: 1px solid #eceafb;
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px -28px rgba(63, 58, 150, .55);
}

.icon-box {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: linear-gradient(200deg, #5468ef, #3f51e3);
  color: #fff;
  flex: none;
  box-shadow: 0 12px 22px -14px rgba(63, 81, 227, .95);
}
.icon-box-plum { background: linear-gradient(200deg, #9160e0, #6835ac); box-shadow: 0 12px 22px -14px rgba(104, 53, 172, .9); }

/* ---------- جای‌گذاری تصویر (src خالی) ---------- */
.img-ph {
  background: linear-gradient(135deg, #eceaff 0%, #f7f1ff 50%, #ffeee6 100%);
  position: relative;
  overflow: hidden;
}
.img-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-ph img[src=""], .img-ph img:not([src]) { opacity: 0; }

/* ---------- منو ---------- */
.nav-link {
  position: relative;
  padding: .55rem .8rem;
  border-radius: .75rem;
  font-size: .95rem;
  font-weight: 600;
  color: #4a4670;
  transition: color .15s ease, background-color .15s ease;
}
.nav-link:hover { color: #3f51e3; background: #f1f4ff; }
.nav-link.is-active { color: #3f51e3; }
.nav-link.is-active::after {
  content: '';
  position: absolute;
  inset-inline: 30%;
  bottom: .1rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, #3f51e3, #9160e0);
}

.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-dropdown:hover .dropdown-panel,
.has-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- انیمیشن ورود ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------- فوکوس ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #5468ef;
  outline-offset: 2px;
  border-radius: .5rem;
}

/* ---------- موبایل ---------- */
.mobile-panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.mobile-panel.open { max-height: 85vh; overflow-y: auto; }

/* ---------- آکاردئون ---------- */
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-body.open { max-height: 600px; }

.btn-green {
  background: linear-gradient(270deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(5, 150, 105, .85);
}
.btn-green:hover { box-shadow: 0 18px 30px -12px rgba(5, 150, 105, .9); }