/* ==========================================================================
   ریست و پایه‌های سراسری
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--ink);
  font-feature-settings: "ss01";
  /* والپیپر مش رنگی — لازمه‌ی Liquid Glass: پشتِ شیشه باید تنوع رنگ باشد
     تا backdrop-filter چیزی برای نمونه‌برداری و انکسار داشته باشد */
  background-color: #1c0b28;
  background-image:
    radial-gradient(52% 44% at 82% 10%, rgba(212, 70, 228, 0.5), transparent 68%),
    radial-gradient(46% 42% at 10% 22%, rgba(126, 48, 230, 0.55), transparent 70%),
    radial-gradient(38% 36% at 80% 78%, rgba(255, 96, 196, 0.34), transparent 70%),
    radial-gradient(48% 44% at 16% 88%, rgba(64, 24, 168, 0.55), transparent 72%),
    radial-gradient(30% 26% at 50% 50%, rgba(255, 170, 90, 0.12), transparent 70%),
    linear-gradient(175deg, #401457 0%, #250a33 55%, #170524 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  font-weight: 700;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

/* صفت hidden همیشه برنده شود (حتی روی عناصری که display دارند) */
[hidden] {
  display: none !important;
}

/* اسکرول‌بار ظریف */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-300);
  background-clip: content-box;
}

/* فوکوس در دسترس‌پذیر */
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* اعداد فارسی برای فیلدهای عددی و تگ‌های کد غیرفعال شود تا جهت و شکل درستی داشته باشند */
input[type='tel'],
input[type='number'],
input[type='password'],
input.ltr-text,
.ltr-text,
code,
kbd,
samp {
  font-feature-settings: normal;
  direction: ltr;
}
input[type='tel'],
input[type='number'] {
  text-align: right;
}

/* کمکی‌های دسترس‌پذیری */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* انیمیشن‌های مشترک */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(0, -18px) scale(1.05); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* حالت بارگذاری/خطای صفحه (لایه‌ی API) */
.page-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-8) var(--sp-5);
  margin-block: var(--sp-4);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  text-align: center;
}
.page-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--brand-100);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}
.page-state__text {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.page-state__text--err {
  color: var(--danger);
}

/* کلاس‌های کمکی (Utility Classes) برای چیدمان و حذف استایل‌های درون‌خطی */
.flex-col {
  display: flex;
  flex-direction: column;
}
.flex-row {
  display: flex;
  flex-direction: row;
}
.flex-1 {
  flex: 1;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.align-center {
  align-items: center;
}
.align-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.text-center {
  text-align: center;
}
.text-end {
  text-align: end;
}
.margin-0 {
  margin: 0 !important;
}
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.max-w-280 {
  max-width: 280px;
}
.max-w-260 {
  max-width: 260px;
}
.opacity-55 {
  opacity: 0.55;
}
.padding-inline-start-5 {
  padding-inline-start: var(--sp-5);
}
.bp-inv-partner-btn {
  color: var(--brand);
  background: var(--brand-050);
  box-shadow: none;
}

