/* =========================================================
   فوتر — مشترک همه‌ی صفحات
   تایپوگرافی: عنوان ستون‌ها و متن‌ها هم‌اندازه‌ی قانون ۲۳/۱۵ (عنوان ستون کوچک‌تر نیست، فقط رنگ نارنجی)
   ========================================================= */

.ft {
  --ft-t: var(--fs-t);
  position: relative;
  isolation: isolate;               /* بدون overflow: hidden — دکمه‌ی بازگشت به بالا روی لبه‌ی فوتر بیرون می‌زند */
  padding: clamp(64px, 8vw, 104px) var(--gutter) 0;
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(255, 106, 0, .10), transparent 60%),
    linear-gradient(180deg, #0b0b0c, #100703);
  color: var(--fg-dim);
}

/* خط نورانی متحرک بالای فوتر */
.ft__line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.ft__line::after {
  content: "";
  position: absolute;
  top: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: ft-sweep 6s linear infinite;
}
@keyframes ft-sweep { from { left: -30%; } to { left: 100%; } }

/* ---------- ستون‌ها ---------- */
.ft__grid {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 1fr 1.25fr;
  gap: clamp(28px, 3.5vw, 56px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 clamp(40px, 5vw, 60px);
}

/* ستون معرفی */
.ft__name {
  display: inline-block;
  margin-bottom: 16px;
  color: #fff;
  font-size: var(--fs-h);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .06em;            /* فقط لاتین — روی فارسی ممنوع */
  text-decoration: none;
  transition: color .3s;
}
.ft__name:hover { color: var(--brand); }
.ft__desc {
  margin: 0;
  font-size: var(--ft-t);
  font-weight: 300;
  line-height: 2.1;
  color: var(--fg-dim);
  text-wrap: pretty;
}

.ft__h {
  margin: 0 0 18px;
  font-size: var(--ft-t);
  font-weight: 700;
  line-height: 1.6;
  color: var(--brand);
}
.ft__links { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ft__links--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.ft__links a {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  color: var(--fg-dim);
  font-size: var(--ft-t);
  font-weight: 400;
  line-height: 1.8;
  text-decoration: none;
  transition: color .3s var(--ease-out), padding .35s var(--ease-out);
}
.ft__links a::before {               /* لوزی کوچکی که با هاور ظاهر می‌شود */
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--brand);
  transform: rotate(45deg) scale(0);
  transition: transform .35s var(--ease-out);
}
.ft__links a:hover, .ft__links a:focus-visible { color: #fff; padding-right: 14px; }
.ft__links a:hover::before, .ft__links a:focus-visible::before { transform: rotate(45deg) scale(1); }

.ft__contact { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; }
.ft__contact li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--ft-t); line-height: 1.8; }
.ft__contact svg { flex: none; width: 18px; height: 18px; margin-top: 4px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ft__contact a { color: var(--fg-dim); text-decoration: none; transition: color .3s; }
.ft__contact a:hover { color: #fff; }

.ft__social { display: flex; gap: 10px; }
.ft__social > * {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  color: #fff;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out), transform .4s var(--ease-out);
}
.ft__social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ft__social svg .dot { fill: currentColor; stroke: none; }
.ft__social a:hover, .ft__social a:focus-visible { background: var(--brand); border-color: var(--brand); transform: translateY(-3px); }
.ft__social .is-off { opacity: .35; }

/* ---------- ردیف پایین ---------- */
.ft__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ft__copy, .ft__credit { margin: 0; font-size: var(--ft-t); line-height: 1.8; color: var(--fg-mute); }
.ft__credit { flex: none; margin-inline-start: auto; }   /* منتهی‌الیه سمت چپ */

/* بازگشت به بالا با حلقه‌ی پیشرفت اسکرول */
.ft__top {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #120803;
  color: #fff;
  cursor: pointer;
  transition: background .3s var(--ease-out);
}
.ft__top > svg:last-child { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease-out); }
.ft__top:hover { background: #2a1206; }
.ft__top:hover > svg:last-child { transform: translateY(-3px); }
.ft__top:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.ft__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ft__ring circle { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 2; }
.ft__ring .ft__ring-fill { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 * (1 - var(--p, 0))); }

/* ---------------------------------------------------------
   ریسپانسیو
   --------------------------------------------------------- */
/* خط عمودی کم‌رنگ بین ستون‌ها (RTL: لبه‌ی چپ هر ستون به‌جز آخری) */
.ft__col { position: relative; }
.ft__col:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: calc(clamp(28px, 3.5vw, 56px) / -2);
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .09) 15%, rgba(255, 255, 255, .09) 85%, transparent);
  pointer-events: none;
}

@media (max-width: 1023px) {
  .ft__grid { grid-template-columns: 1fr 1fr; }
  .ft__col:nth-child(2n)::after { display: none; }      /* فقط بین دو ستون هر ردیف */
}
@media (max-width: 599px) {
  .ft__grid { grid-template-columns: 1fr; }
  .ft__col::after { display: none; }
  .ft__bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ft__credit { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ft__line::after { animation: none; }
}
