/* =============================================================
   Kyren Labs — بخش‌های صفحه‌ی اصلی
   ============================================================= */

/* ---------------- قهرمان ---------------- */
.hero {
  position: relative;
  isolation: isolate;
  /* عمداً کوتاه‌تر از یک صفحه‌ی کامل تا لبه‌ی بخش محصولات
     از پایین صفحه پیدا باشد و کاربر بفهمد پایین‌تر چیزی هست. */
  min-height: min(66vh, 540px);
  /* ستونی، تا معرفیِ وسط‌چین بالای گرید دوستونی بنشیند نه کنارش.
     مرکز کردنِ عمودی از align-items به justify-content منتقل شد. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  /* فاصله‌ی بالا عمداً زیاد است تا قهرمان به منوی بالای سایت نچسبد */
  padding-block: var(--sp-16) var(--sp-8);
  overflow: hidden;
}

/* فاصله‌ی هیرو تا بخش محصولات کمتر از فاصله‌ی استاندارد بخش‌هاست */
@media (min-width: 701px) {
  #products { padding-top: var(--sp-10); }
}

/* درخشش پس‌زمینه به سمت متن جابه‌جا شده تا پشت لوگو
   کادر روشنی تشکیل ندهد؛ لوگو باید روی زمینه‌ی خالی بنشیند. */
.hero::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -40%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(46% 46% at 72% 46%, var(--c-glow), transparent 70%);
  pointer-events: none;
}
[dir="ltr"] .hero::before {
  background: radial-gradient(46% 46% at 28% 46%, var(--c-glow), transparent 70%);
}

.hero-circuit {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  /* خطوط در وسط محو می‌شوند تا دور متن قاب نسازند */
  -webkit-mask-image: radial-gradient(72% 62% at 50% 50%, transparent 30%, #000 78%);
  mask-image: radial-gradient(72% 62% at 50% 50%, transparent 30%, #000 78%);
}

/* دو ستون: متن یک سمت، لوگو سمت دیگر */
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: var(--sp-12);
}
.hero-art { display: flex; justify-content: center; }
.hero-mark {
  height: clamp(170px, 17vw, 270px);
  width: auto;
  filter: var(--logo-filter);
  animation: mark-in 1s var(--ease-out) both;
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* معرفیِ کل صفحه. از ستون متن بیرون کشیده شده تا وسطِ صفحه
   بنشیند و سرصفحه‌ی کل قهرمان باشد، نه eyebrowِ h1. طراحی‌اش هم
   عمداً با بقیه فرق دارد: گرادیان به‌جای رنگ تخت، و دو خط مویی
   که از دو طرف به آن می‌رسند. هم‌خانواده‌ی .bhero-intro در
   صفحه‌ی Kyren Onyx. */
.hero-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--sp-4), 3vw, var(--sp-8));
  margin-bottom: var(--sp-10);
}
.hero-intro::before,
.hero-intro::after {
  content: "";
  flex: 0 1 clamp(32px, 12vw, 150px);
  height: 1px;
  background: linear-gradient(to left, var(--c-accent), transparent);
}
.hero-intro::after { background: linear-gradient(to right, var(--c-accent), transparent); }

.hero-kicker {
  flex: none;
  font-size: clamp(1.5rem, 1.05rem + 1.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.7;
  /* color اول نوشته می‌شود تا اگر مرورگری background-clip را
     نشناخت، متن ناپدید نشود — دقیقاً مثل .accent در base.css */
  color: var(--c-accent-text);
  background-image: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* بدون این، دنباله‌ی حروف فارسی گاهی بریده می‌شود */
  padding-inline: .08em;
  margin-inline: -.08em;
}
@supports not (background-clip: text) {
  .hero-kicker { -webkit-text-fill-color: currentColor; background-image: none; }
}
.hero h1 { max-width: 17ch; }
.hero-sub {
  max-width: 52ch;
  margin-top: var(--sp-6);
  font-size: var(--fs-md);
  line-height: 2.05;
  color: var(--c-text-soft);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
.hero-trust {
  margin-top: var(--sp-8);
  max-width: 46ch;
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  border-top: var(--hairline) solid var(--c-border);
}

@media (min-width: 940px) and (max-height: 800px) {
  .hero { min-height: 0; padding-block: var(--sp-12) var(--sp-10); }
  .hero-mark { height: clamp(160px, 17vw, 220px); }
  .hero h1 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.375rem); }
  .hero-sub { margin-top: var(--sp-4); }
  .hero-actions, .hero-trust { margin-top: var(--sp-6); }
  .hero-intro { margin-bottom: var(--sp-6); }
}
@media (max-width: 800px) {
  .hero { padding-block: var(--sp-12) var(--sp-10); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-8); text-align: center; }
  .hero-art { order: -1; }
  .hero-mark { height: clamp(120px, 26vw, 170px); }
  .hero h1, .hero-sub, .hero-trust { margin-inline: auto; }
  .hero-intro { margin-bottom: var(--sp-8); }
  .hero-actions { justify-content: center; }
}
@media (max-width: 560px) {
  .hero-actions .btn { width: 100%; }
}

/* ---------------- محصولات ---------------- */
.product {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: var(--sp-10) var(--sp-12);
  padding: var(--sp-10);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.product + .product { margin-top: var(--sp-8); }

/* لهجه‌ی رنگی هر محصول: یک نوار باریک بالا و یک هاله‌ی محو */
.product::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--tint-500), var(--tint-300), var(--tint-500), transparent);
}
.product::after {
  content: "";
  position: absolute;
  inset-inline-end: -12%; top: -40%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tint-glow);
  pointer-events: none;
  z-index: 0;
}
.product > * { position: relative; z-index: 1; }

.product--gold {
  --tint-300: var(--gold-300); --tint-500: var(--gold-500);
  --tint-600: var(--gold-600); --tint-700: var(--gold-700);
  --tint-050: var(--gold-50);
  --tint-glow: radial-gradient(circle, rgba(176, 130, 64, .09), transparent 68%);
  --tint-logo-filter: var(--logo-filter-gold);
}
.product--green {
  --tint-300: var(--green-300); --tint-500: var(--green-500);
  --tint-600: var(--green-600); --tint-700: var(--green-700);
  --tint-050: var(--green-50);
  --tint-glow: radial-gradient(circle, rgba(11, 113, 80, .08), transparent 68%);
  --tint-logo-filter: var(--logo-filter-green);
}
html[data-theme="dark"] .product--gold  { --tint-glow: radial-gradient(circle, rgba(176, 130, 64, .17), transparent 68%); }
html[data-theme="dark"] .product--green { --tint-glow: radial-gradient(circle, rgba(30, 143, 102, .17), transparent 68%); }

.product-head { text-align: center; }
.product-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.product-mark { 
  height: 72px; 
  width: auto; 
  filter: var(--tint-logo-filter);
  object-fit: contain;
}
.product-word {
  height: 48px;
  width: auto; 
  filter: var(--tint-logo-filter);
  object-fit: contain;
}
.product-tag {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  color: var(--c-text-muted); margin-bottom: var(--sp-4);
}
.product-desc { color: var(--c-text-soft); }
.product-badge {
  display: inline-block;
  margin-top: var(--sp-5);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  line-height: 1.7;
  border-radius: var(--r-sm);
  color: var(--c-text-soft);
  background: var(--c-bg-tint);
  border: 1px solid var(--c-border-soft);
  border-inline-start: 3px solid var(--tint-500);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp-6) var(--sp-8);
  align-content: start;
}
.feature { position: relative; padding-inline-start: var(--sp-5); }
.feature::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: .78em;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--tint-500);
}
.feature h3 { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-1); }
.feature p { font-size: var(--fs-xs); line-height: 1.95; color: var(--c-text-soft); }

/* دکمه‌های هر کارت: ته کارت، تمام‌عرض، با خط جداکننده.
   flex:1 باعث می‌شود دو دکمه با هم کل عرض کارت را پر کنند. */
.product-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: calc(var(--sp-2) * -1);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-border-soft);
}
.product-actions .btn { flex: 1 1 200px; min-height: 52px; font-size: var(--fs-md); }
.product .product-actions .btn-primary {
  background: var(--tint-600); border-color: var(--tint-600); color: #fff;
}
.product .product-actions .btn-primary:hover { background: var(--tint-700); border-color: var(--tint-700); }
.product .product-actions .btn-ghost:hover {
  background: var(--tint-050); border-color: var(--tint-600); color: var(--tint-700);
}
html[data-theme="dark"] .product .product-actions .btn-ghost:hover {
  background: transparent; color: var(--tint-300); border-color: var(--tint-300);
}

@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; padding: var(--sp-8) var(--sp-6); gap: var(--sp-8); }
}

/* کارت «محصول بعدی» — کم‌رنگ‌تر و نقطه‌چین، چون هنوز آماده نیست */
.product-next {
  margin-top: var(--sp-8);
  padding: var(--sp-8) var(--sp-10);
  border: var(--hairline) dashed var(--c-hairline);
  border-radius: var(--r-xl);
  background: var(--c-bg-tint);
  text-align: center;
}
.next-label {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-accent-text);
  background: var(--c-accent-soft);
}
.product-next h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.product-next p { max-width: 52ch; margin-inline: auto; font-size: var(--fs-sm); color: var(--c-text-soft); }

/* ---------------- مسیر کار ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-6);
}
.step { 
  position: relative; 
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* خط متصل‌کننده */
.step::after {
  content: "";
  position: absolute;
  top: 28px; /* half of 56px */
  inset-inline-start: 50%;
  width: 100%;
  height: 2px;
  background: var(--c-accent-soft);
  z-index: 1;
}

/* آیتم پنجم (دایره خالی در حال محو) */
.steps::after {
  content: "";
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-accent);
  margin-inline: auto; /* center in the 5th column */
  -webkit-mask-image: linear-gradient(to left, black 30%, transparent);
  mask-image: linear-gradient(to left, black 30%, transparent);
}

/* علامت بی‌نهایت در ستون پنجم، هم‌تراز با توضیحات کمرنگ */
.step:last-child::before {
  content: "∞";
  position: absolute;
  top: 130px; /* Aligns roughly with the paragraph text */
  inset-inline-end: calc(-100% - var(--sp-6));
  width: 100%;
  font-size: 36px;
  color: var(--c-text-soft);
  text-align: center;
  line-height: 1;
}

.step-num {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin-bottom: var(--sp-6);
  border-radius: 50%;
  font-size: var(--fs-lg);
  font-weight: 800;
  /* رنگ متن از توکن خوانده می‌شود نه سفیدِ ثابت؛ در تم طلاییِ تیره
     زمینه‌ی دکمه روشن است و متن سفید روی آن خوانده نمی‌شد. */
  color: var(--c-on-accent);
  background: var(--c-accent);
  box-shadow: 0 8px 24px var(--c-glow);
  transition: transform var(--dur-normal) var(--ease), box-shadow var(--dur-normal) var(--ease);
}
.step:hover .step-num {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--c-glow);
}
.step h3 { 
  margin-bottom: var(--sp-3); 
  font-size: var(--fs-md); 
  color: var(--c-text);
}
.step p { 
  font-size: var(--fs-sm); 
  color: var(--c-text-soft); 
  line-height: 1.6;
}

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr 1fr; gap: var(--sp-10) var(--sp-6); }
  .step:nth-child(2)::after, .step:nth-child(4)::after { display: none; }
  .steps::after, .step:last-child::before { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
}

/* ---------------- اثبات ---------------- */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
}
.proof-card {
  /* پدینگ عمداً صریح نوشته شده؛ قبلاً یک متغیر نامعتبر اینجا بود
     و متن به لبه‌ی بالای کادر می‌چسبید. */
  padding: var(--sp-6);
  border-radius: var(--r-md);
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-top: 3px solid var(--c-accent);
}
.proof-card h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.proof-card p { font-size: var(--fs-sm); color: var(--c-text-soft); }
