/* ==========================================================================
   وب‌سایت شخصی — استایل اصلی
   تم: تاریک (پیش‌فرض) / روشن | راست‌به‌چپ | فونت: وزیرمتن (خودمیزبان)
   ========================================================================== */

/* ---------- فونت ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- توکن‌های طراحی ---------- */
:root {
  --font-sans: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;

  /* رنگ پایه — تم تاریک */
  --bg: #0b0b14;
  --bg-soft: #10101c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ececf4;
  --text-muted: #b6b6ca;
  --text-faint: #8f8fa6;

  --accent-1: #8b5cf6;   /* بنفش */
  --accent-2: #22d3ee;   /* فیروزه‌ای */
  --accent-3: #f472b6;   /* صورتی */
  --gradient: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --gradient-soft: linear-gradient(120deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.16));

  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 44px rgba(139, 92, 246, 0.22);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --nav-h: 72px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f7f8fd;
  --bg-soft: #eef0f9;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(23, 23, 45, 0.09);
  --border-strong: rgba(23, 23, 45, 0.16);

  --text: #191927;
  --text-muted: #4d4d66;
  --text-faint: #7c7c96;

  --shadow-sm: 0 2px 12px rgba(30, 30, 70, 0.08);
  --shadow-md: 0 10px 36px rgba(30, 30, 70, 0.13);
  --shadow-glow: 0 0 44px rgba(139, 92, 246, 0.16);
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 16.5px;
  overflow-x: hidden;
  transition: background 0.45s ease, color 0.45s ease;
}

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

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
  border-radius: 8px;
  border: 3px solid var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -64px;
  z-index: 2000;
  background: var(--accent-1);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 14px; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon { width: 20px; height: 20px; }

/* ==========================================================================
   پس‌زمینهٔ اورورا
   ========================================================================== */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora__blob--1 {
  width: 46vw; height: 46vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 65%);
  top: -14%; inset-inline-start: -10%;
}
.aurora__blob--2 {
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 65%);
  bottom: -16%; inset-inline-end: -8%;
  animation-delay: -8s;
  animation-duration: 32s;
}
.aurora__blob--3 {
  width: 30vw; height: 30vw;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.3), transparent 65%);
  top: 38%; inset-inline-start: 42%;
  animation-delay: -16s;
  animation-duration: 38s;
}

[data-theme="light"] .aurora__blob { opacity: 0.32; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.12); }
  100% { transform: translate(-4vw, -5vh) scale(0.94); }
}

.aurora__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 55%, transparent 100%);
}
[data-theme="light"] .aurora__grid {
  background-image:
    linear-gradient(rgba(25, 25, 50, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 25, 50, 0.05) 1px, transparent 1px);
}

.aurora__noise {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   پیش‌بارگذار
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__logo { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.86); opacity: 0.65; }
}

/* ==========================================================================
   نوار پیشرفت اسکرول + ناوبری
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; inset-inline: 0;
  height: 3px;
  z-index: 1200;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: right center;
  transform: scaleX(0);
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
  border-radius: 0 0 0 8px;
}

/* نوار پیشرفت با انیمیشن اسکرول‌محور CSS — بدون JS و بدون استایل درون‌خطی */
@supports (animation-timeline: scroll()) {
  .scroll-progress span {
    animation: progress-grow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes progress-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

.nav {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 1100;
  height: var(--nav-h);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
}
.nav__brand-text { letter-spacing: 0.3px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.25s ease, background 0.25s ease;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  inset-inline: 30%;
  height: 2.5px;
  border-radius: 3px;
  background: var(--gradient);
}
.nav__link--cta {
  color: #fff;
  background: var(--gradient);
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}
.nav__link--cta:hover { color: #fff; transform: translateY(-1px); }
.nav__link--cta::after { display: none; }

.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-strong); }

/* تعویض آیکون خورشید/ماه */
#themeToggle .icon--sun { display: none; }
#themeToggle .icon--moon { display: block; }
[data-theme="light"] #themeToggle .icon--sun { display: block; }
[data-theme="light"] #themeToggle .icon--moon { display: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav__burger-line {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__burger.is-open .nav__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open .nav__burger-line:nth-child(2) { opacity: 0; }
.nav__burger.is-open .nav__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   بخش‌ها — عمومی
   ========================================================================== */
.section { padding: 104px 0; position: relative; }

.section__head { text-align: center; margin-bottom: 56px; }
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 14px;
}
.section__title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.4px;
}
.section__desc { color: var(--text-muted); max-width: 560px; margin: 14px auto 0; }

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ظاهر شدن هنگام اسکرول */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* تاخیر پله‌ای از روی صفت data-delay — سازگار با CSP (بدون استایل درون‌خطی) */
[data-delay="1"] { --d: 1; }
[data-delay="2"] { --d: 2; }
[data-delay="3"] { --d: 3; }
[data-delay="4"] { --d: 4; }
[data-delay="5"] { --d: 5; }

/* رنگ اختصاصی دسته‌ها از روی صفت data-hue — سازگار با CSP */
[data-hue="25"]  { --h: 25; }
[data-hue="150"] { --h: 150; }
[data-hue="190"] { --h: 190; }
[data-hue="210"] { --h: 210; }
[data-hue="265"] { --h: 265; }
[data-hue="320"] { --h: 320; }

/* ==========================================================================
   هیرو
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
}

.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.55;
}

.hero__inner { text-align: center; position: relative; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  margin-bottom: 26px;
}

.pulse-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3.2); opacity: 0; }
}

.hero__title {
  margin: 0 0 10px;
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -1px;
}

.hero__typing {
  margin: 0 0 22px;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: 700;
  min-height: 2.4em;
  color: var(--text-muted);
}
.hero__typing #typingText { color: var(--accent-2); }

.typing-caret {
  display: inline-block;
  width: 3px;
  height: 1.15em;
  margin-inline-start: 3px;
  background: var(--accent-2);
  vertical-align: -0.18em;
  border-radius: 2px;
  animation: caret 0.85s step-end infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero__lead {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
}
.hero__lead strong { color: var(--text); font-weight: 700; }

.hero__cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 64px;
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 30px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s, background 0.3s;
  will-change: transform;
}
.btn svg { width: 19px; height: 19px; }

.btn--primary {
  background: var(--gradient);
  background-size: 160% 160%;
  color: #fff;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.38);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(139, 92, 246, 0.5);
  background-position: 100% 100%;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { transform: translateY(-3px); background: var(--surface-strong); border-color: var(--accent-1); }

.btn--block { width: 100%; }
.btn--nav { padding: 10px 20px; font-size: 0.92rem; border-radius: 12px; }
.btn--lg { padding: 16px 38px; font-size: 1.08rem; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading .btn__text { opacity: 0.75; }
.btn__spinner {
  display: none;
  width: 19px; height: 19px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* آمار هیرو → نشان‌های اعتماد */
.hero__trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 4vw, 48px);
  margin: 0;
  padding: 24px 10px;
  list-style: none;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-muted);
}
.trust-item .icon { color: var(--accent-2); width: 22px; height: 22px; flex-shrink: 0; }

/* نشانگر اسکرول */
.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
  transition: opacity 0.3s;
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll-mouse {
  display: block;
  width: 25px; height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  position: relative;
}
.hero__scroll-wheel {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--accent-2);
  animation: wheel 1.7s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ==========================================================================
   دسته‌بندی محصولات
   ========================================================================== */
.cat__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 24px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  text-align: center;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -20%, hsl(var(--h) 85% 62% / 0.22), transparent 60%);
  opacity: 0.8;
  transition: opacity 0.35s;
}
.cat-card:hover {
  transform: translateY(-7px);
  border-color: hsl(var(--h) 80% 62% / 0.5);
  box-shadow: var(--shadow-md), 0 0 40px hsl(var(--h) 85% 60% / 0.18);
}
.cat-card__glyph {
  position: relative;
  font-size: 3rem;
  line-height: 1.15;
  filter: drop-shadow(0 6px 18px hsl(var(--h) 80% 55% / 0.45));
  transition: transform 0.4s var(--ease);
}
.cat-card:hover .cat-card__glyph { transform: scale(1.16) rotate(-5deg); }
.cat-card__name {
  position: relative;
  font-size: 1.16rem;
  font-weight: 800;
  margin-top: 8px;
}
.cat-card__desc {
  position: relative;
  color: var(--text-muted);
  font-size: 0.89rem;
}
.cat-card__go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: hsl(var(--h) 85% 68%);
}
.cat-card__go svg { transition: transform 0.3s var(--ease); }
.cat-card:hover .cat-card__go svg { transform: translateX(-5px); }

/* ==========================================================================
   چرا ما
   ========================================================================== */
.why__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.why__text { color: var(--text-muted); font-size: 0.95rem; margin: 0; line-height: 1.95; }

/* ==========================================================================
   نوار CTA
   ========================================================================== */
.cta-band__box {
  padding: 56px 36px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.16), transparent 65%),
    var(--surface);
}
.cta-band__box h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 900; }
.cta-band__box p { margin: 0 0 28px; color: var(--text-muted); font-size: 1.02rem; }

/* ==========================================================================
   سوالات متداول
   ========================================================================== */
.faq {
  max-width: 780px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq__item[open] { border-color: hsl(265 80% 62% / 0.5); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  transition: color 0.25s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-2); }

.faq__chev { flex-shrink: 0; transition: transform 0.3s var(--ease); color: var(--text-faint); }
.faq__item[open] .faq__chev { transform: rotate(180deg); color: var(--accent-1); }

.faq__item > p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 2;
}

/* ==========================================================================
   مهارت‌ها
   ========================================================================== */
.skill-card { padding: 30px 26px; transition: transform 0.35s var(--ease), box-shadow 0.35s ease; }
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.skill-card__icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: hsl(var(--h, 265) 84% 70%);
  background: hsl(var(--h, 265) 84% 60% / 0.13);
  border: 1px solid hsl(var(--h, 265) 84% 60% / 0.3);
}
.skill-card__icon svg { width: 26px; height: 26px; }

.skill-card h3 { margin: 0 0 18px; font-size: 1.18rem; font-weight: 800; }

/* ==========================================================================
   بلاگ
   ========================================================================== */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.post-card__meta .badge {
  color: var(--accent-1);
  background: hsl(265 84% 60% / 0.12);
  border: 1px solid hsl(265 84% 60% / 0.28);
}

.post-card h3 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; line-height: 1.65; }
.post-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; flex-grow: 1; }

.post-card__more {
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card:hover .post-card__more svg { transform: translateX(-4px); }
.post-card__more svg { transition: transform 0.3s var(--ease); }

/* ==========================================================================
   تماس
   ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 30px;
  align-items: start;
}

.contact__info { display: grid; gap: 16px; }

.contact__channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
a.contact__channel:hover { transform: translateY(-3px); border-color: var(--accent-1); }

.contact__channel-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.contact__channel-icon svg { width: 23px; height: 23px; }

.contact__channel small { display: block; color: var(--text-faint); font-size: 0.8rem; }
.contact__channel strong { font-size: 0.97rem; font-weight: 700; }

.contact__form { padding: 32px 30px; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form__field { margin-bottom: 18px; }
.form__field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.form__field label b { color: var(--danger); }

.form__field input,
.form__field textarea,
.form__field select {
  width: 100%;
  padding: 13px 17px;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1.6px solid var(--border);
  border-radius: 13px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  resize: vertical;
}
.form__field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238f8fa6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  cursor: pointer;
}
.form__field select:invalid { color: var(--text-faint); }
.form__field select option { background: var(--bg-soft); color: var(--text); }
.form__field input::placeholder,
.form__field textarea::placeholder { color: var(--text-faint); }
.form__field input:focus,
.form__field textarea:focus,
.form__field select:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}
.form__field input:focus-visible,
.form__field textarea:focus-visible,
.form__field select:focus-visible { outline: none; }

.form__field input.is-invalid,
.form__field textarea.is-invalid,
.form__field select.is-invalid { border-color: var(--danger); }

.form__error {
  display: block;
  min-height: 1.35em;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 5px;
}

.hp-field {
  position: absolute;
  inset-inline-start: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

.form__note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ==========================================================================
   فوتر
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  backdrop-filter: blur(14px);
  padding: 56px 0 26px;
  margin-top: 40px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.footer__logo { font-size: 1.5rem; font-weight: 900; }
.footer__brand p { color: var(--text-muted); margin: 10px 0 0; font-size: 0.94rem; }

.footer__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.footer__nav a {
  color: var(--text-muted);
  font-size: 0.94rem;
  transition: color 0.25s, padding 0.25s;
}
.footer__nav a:hover { color: var(--accent-2); padding-inline-start: 5px; }

.footer__social {
  display: flex;
  gap: 11px;
  justify-content: flex-end;
}
.footer__social a {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.28s var(--ease);
}
.footer__social a:hover {
  color: #fff;
  background: var(--gradient);
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}
.footer__social svg { width: 19px; height: 19px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.84rem;
  color: var(--text-faint);
}
.footer__bottom p { margin: 0; }
.footer__bottom a { color: var(--text-muted); font-weight: 700; }
.footer__bottom a:hover { color: var(--accent-2); }

/* ==========================================================================
   بازگشت به بالا
   ========================================================================== */
.to-top {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 26px;
  z-index: 900;
  width: 46px; height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  backdrop-filter: blur(12px);
  color: var(--text);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gradient); color: #fff; border-color: transparent; }
.to-top svg { width: 21px; height: 21px; }

/* ==========================================================================
   توست
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  z-index: 2000;
  max-width: min(400px, calc(100vw - 44px));
  padding: 15px 22px;
  border-radius: 15px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-soft) 90%, transparent);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  animation: toastIn 0.4s var(--ease);
}
.toast[hidden] { display: none; }
.toast.is-out { animation: toastOut 0.35s ease forwards; }
.toast--success { border-inline-start: 4px solid var(--success); }
.toast--error { border-inline-start: 4px solid var(--danger); }
.toast--info { border-inline-start: 4px solid var(--accent-2); }

@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px) scale(0.95); } }

/* ==========================================================================
   صفحهٔ ۴۰۴
   ========================================================================== */
.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.notfound__code {
  font-size: clamp(6rem, 22vw, 11rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -4px;
}
.notfound h1 { margin: 10px 0 8px; font-size: clamp(1.3rem, 3.4vw, 1.9rem); font-weight: 800; }
.notfound p { margin: 0 0 34px; color: var(--text-muted); }
.notfound__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ==========================================================================
   واکنش‌گرایی
   ========================================================================== */
@media (max-width: 1024px) {
  .cat__grid, .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .section { padding: 78px 0; }
  .why__grid { grid-template-columns: 1fr; }

  .nav__burger { display: flex; }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    inset-inline: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px) scale(0.98);
    transition: all 0.32s var(--ease);
    z-index: -1;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; z-index: 1050; }
  .nav__link { padding: 12px 18px; font-size: 1.02rem; }
  .nav__link--cta { text-align: center; margin-top: 6px; }

  .contact__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }

  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__social { justify-content: center; }
  .footer__bottom { justify-content: center; text-align: center; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .cat__grid, .blog__grid { grid-template-columns: 1fr; }
  .btn--nav { display: none; }
  .hero__cta .btn { width: 100%; }
  .cta-band__box { padding: 44px 24px; }
  .contact__form { padding: 26px 20px; }
}

/* ==========================================================================
   کاهش حرکت — احترام به تنظیمات کاربر
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__particles { display: none; }
}
