/* ============================================================
   پیوند — سیستم طراحی پایه
   کاغذی روشن، جوهری تیره، نارنجی آجری، سبز مریم‌گلی
   تخت، خط‌های ۱ پیکسلی، تایپوگرافی قوی، فضای خالی سخاوتمند
   ============================================================ */

@font-face {
  font-family: 'Vazirmatn';
  src: url("../fonts/Vazirmatn-Regular.b081631ab16d.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url("../fonts/Vazirmatn-Medium.e055d62c2037.woff2") format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url("../fonts/Vazirmatn-Bold.8b77661bc09e.woff2") format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F3EE;
  --paper-2: #EFEAE1;
  --paper-3: #E7E1D5;
  --ink: #161616;
  --ink-2: #5C5750;
  --ink-3: #8A8479;
  --accent: #E4572E;
  --accent-strong: #B5431C; /* برای متن روی کاغذ — کنتراست AA */
  --accent-tint: #F7E5DC;
  --sage: #7C8F7A;
  --sage-strong: #5F705E;
  --sage-tint: #E9EDE7;
  --line: #DAD3C6;
  --line-strong: #161616;
  --radius: 10px;
  --radius-s: 6px;
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
  --speed: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191817;
    --paper-2: #201E1C;
    --paper-3: #2A2724;
    --ink: #EDE7DC;
    --ink-2: #A7A198;
    --ink-3: #79736A;
    --accent-strong: #F0744D;
    --accent-tint: #33221B;
    --sage-tint: #232922;
    --line: #393632;
    --line-strong: #EDE7DC;
  }
}

/* ---------- بازنشانی ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: inline-block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #FFF8F2; }

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-s);
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius-s);
  transition: inset-block-start var(--speed);
}
.skip-link:focus { inset-block-start: 12px; }

/* ---------- تایپوگرافی ---------- */
.h-display { font-size: clamp(34px, 6vw, 56px); font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; line-height: 1.3; }
.h2 { font-size: clamp(21px, 3vw, 26px); font-weight: 700; line-height: 1.35; }
.h3 { font-size: 18px; font-weight: 700; line-height: 1.5; }
.lead { font-size: clamp(16px, 2vw, 18px); color: var(--ink-2); line-height: 1.9; }
.small { font-size: 13.5px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent-strong);
  letter-spacing: 0;
}
.kicker::before { content: ''; width: 22px; height: 1.5px; background: var(--accent); }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- چیدمان ---------- */
.container { max-width: 1080px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 44px); }
.container-narrow { max-width: 720px; }
.stack > * + * { margin-block-start: 1.15em; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hairline { border: 0; border-block-start: 1px solid var(--line); }
.section { padding-block: clamp(52px, 9vw, 104px); }
.section-head { margin-block-end: clamp(28px, 4vw, 44px); }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color var(--speed), color var(--speed), border-color var(--speed), transform var(--speed);
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #FFF8F2; }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--line); }
.btn-danger { border-color: var(--accent); color: var(--accent-strong); }
.btn-danger:hover { background: var(--accent); color: #FFF8F2; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-lg { padding: 14px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }

/* ---------- فرم‌ها ---------- */
.field { display: grid; gap: 7px; }
.field > label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.input, .field input[type='text'], .field input[type='email'], .field input[type='password'],
.field input[type='tel'], .field input[type='number'], .field input[type='url'],
.field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color var(--speed);
}
.input:hover, .field :is(input, textarea, select):hover { border-color: var(--ink-3); }
.input:focus, .field :is(input, textarea, select):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field textarea { resize: vertical; min-height: 84px; }
.field .help { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.field .error { font-size: 13px; color: var(--accent-strong); line-height: 1.7; }
.field .error::before { content: '⚠ '; }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--accent); }
.form-banner {
  border: 1px solid var(--accent);
  border-radius: var(--radius-s);
  background: var(--accent-tint);
  color: var(--accent-strong);
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.7;
}
.form-banner:empty { display: none; }
.otp-input { text-align: center; font-size: 22px; letter-spacing: 0.55em; padding-inline-start: 0.55em; }

/* ---------- برچسب‌ها ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}
.tag-accent { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-tint); }
.tag-sage { border-color: var(--sage); color: var(--sage-strong); background: var(--sage-tint); }

/* ---------- پیام و توست ---------- */
.toast-region {
  position: fixed;
  inset-block-end: 18px;
  inset-inline: 0;
  display: grid;
  justify-items: center;
  z-index: 90;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 20px;
  border-radius: var(--radius-s);
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(22, 22, 22, 0.18);
  animation: toast-in 180ms ease-out;
}
.toast-error { background: var(--accent); color: #FFF8F2; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- آیکون ---------- */
.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: -0.2em;
}
[dir='rtl'] .icon-rtl { transform: scaleX(-1); }

/* ---------- سربرگ سایت ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-block-end: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 2px; font-size: 21px; font-weight: 700; }
.wordmark em { font-style: normal; color: var(--accent); }

/* ---------- صفحات ورود / ثبت‌نام ---------- */
.auth-shell { min-height: calc(100svh - 64px); display: grid; align-items: start; padding-block: clamp(36px, 7vh, 80px); }
.auth-card {
  max-width: 460px;
  width: 100%;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(26px, 4vw, 40px);
}
.auth-card .form-banner { margin-block-end: 18px; }
.auth-title { font-size: 22px; font-weight: 700; }
.auth-sub { color: var(--ink-2); font-size: 14px; margin-block: 6px 26px; }
.auth-alt { margin-block-start: 24px; padding-block-start: 20px; border-block-start: 1px solid var(--line); font-size: 14px; color: var(--ink-2); text-align: center; }
.auth-alt a { color: var(--accent-strong); font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

.tabs { display: flex; border-block-end: 1px solid var(--line); margin-block-end: 26px; }
.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-block-end: 2px solid transparent;
  margin-block-end: -1px;
  transition: color var(--speed), border-color var(--speed);
}
.tabs a[aria-current='page'] { color: var(--ink); border-block-end-color: var(--accent); font-weight: 700; }

.dev-hint {
  margin-block-start: 18px;
  border: 1px dashed var(--sage);
  border-radius: var(--radius-s);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--sage-strong);
  background: var(--sage-tint);
  line-height: 1.7;
}

/* ---------- لندینگ ---------- */
.hero { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 8vw, 104px) clamp(40px, 6vw, 80px); }
.hero-copy .lead { margin-block: 18px 30px 34px; max-width: 34em; }
.hero-visual { position: relative; min-height: 380px; }
.mock-nfc {
  position: absolute;
  inset-block-start: -12px;
  inset-inline-end: 6%;
  width: 218px;
  height: 137px;
  transform: rotate(2.6deg);
}
.mock-page {
  position: absolute;
  inset-block-start: 58px;
  inset-inline-start: 0;
  width: min(320px, 88%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  padding: 26px 22px;
  transform: rotate(-1.6deg);
  box-shadow: 0 18px 40px -18px rgba(22, 22, 22, 0.28);
}
.mock-page .mp-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
  margin-block-end: 14px;
  background: var(--sage-tint);
  color: var(--sage-strong);
}
.mock-page .mp-name { font-weight: 700; font-size: 16px; }
.mock-page .mp-bio { font-size: 12px; color: var(--ink-2); margin-block: 2px 16px; line-height: 1.7; }
.mock-page .mp-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-block-end: 8px;
  display: flex; align-items: center; gap: 8px;
}
.mock-page .mp-link b { font-weight: 500; }
.mock-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.rowlist { border-block-start: 1px solid var(--line); }
.rowlist .row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: clamp(14px, 3vw, 34px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 40px);
  border-block-end: 1px solid var(--line);
  transition: background-color var(--speed);
}
.rowlist .row:hover { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.row-num { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; color: var(--accent); line-height: 1.2; }
.row .icon { width: 1.5em; height: 1.5em; color: var(--sage-strong); margin-block-start: 6px; }
@media (max-width: 640px) {
  .rowlist .row { grid-template-columns: 52px 1fr; }
  .row .icon { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 320px; margin-block-start: 8px; }
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.spec-list { display: grid; gap: 0; border-block-start: 1px solid var(--line); margin-block-start: 28px; }
.spec-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 12px;
  border-block-end: 1px solid var(--line);
  font-size: 14px;
}
.spec-list b { font-weight: 500; color: var(--ink-2); }

.themes-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; padding-block: 6px 14px; scroll-snap-type: x proximity; }
.theme-chip {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px;
  display: grid;
  gap: 8px;
  transition: border-color var(--speed), transform var(--speed);
}
.theme-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.theme-chip .tc-frame { height: 96px; border-radius: 6px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.theme-chip .tc-name { font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.theme-chip .tag { padding: 1px 8px; font-size: 11px; }
.tc-bar { position: absolute; border-radius: 3px; }

.pricing { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; align-items: stretch; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; background: var(--paper); }
.price-card.pro { border-color: var(--ink); border-block-start: 3px solid var(--accent); }
.price-card .p-price { font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
.price-card .p-per { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.price-card ul { display: grid; gap: 10px; font-size: 14.5px; }
.price-card li { display: flex; gap: 10px; align-items: start; line-height: 1.7; }
.price-card li .icon { color: var(--sage-strong); margin-block-start: 5px; }
.price-card li.off { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.price-card li.off .icon { color: var(--ink-3); }

.site-footer { border-block-start: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px) 32px; margin-block-start: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(24px, 4vw, 60px); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-block-end: 12px; }
.footer-grid ul { display: grid; gap: 8px; font-size: 14.5px; }
.footer-grid a:hover { color: var(--accent-strong); }
.footer-note { margin-block-start: 44px; padding-block-start: 20px; border-block-start: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }

/* ---------- عمومی: خالی/خطا ---------- */
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); text-align: center; color: var(--ink-2); }
.empty-state .icon { width: 2em; height: 2em; color: var(--sage-strong); margin-block-end: 10px; }

/* ---------- استعاره‌های چاپ: مُهر، سوراخ‌کاری، شمارهٔ سری ---------- */
/* مُهر — فقط برای وضعیت‌های تأییدشده؛ چرخش و بافت عمداً دست‌ساز */
.stamp {
  display: inline-block;
  transform: rotate(-6deg);
  border: 2px solid var(--stamp-color, var(--ink));
  border-radius: var(--radius-s);
  padding: 3px 11px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--stamp-color, var(--ink));
  background:
    repeating-linear-gradient(45deg, transparent 0 3px, color-mix(in srgb, var(--stamp-color, var(--ink)) 4%, transparent) 3px 4px),
    var(--paper);
  line-height: 1.7;
}
/* سوراخ‌کاری بلیت — بین بخش‌های داشبورد؛ خالص CSS */
.perforation {
  border: 0;
  border-block-start: 1px dashed var(--line);
  margin: 30px 0;
  position: relative;
}
.perforation::before, .perforation::after {
  content: '';
  position: absolute;
  inset-block-start: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px dashed var(--line);
}
.perforation::before { inset-inline-start: -6px; }
.perforation::after { inset-inline-end: -6px; }
/* بلوک شمارهٔ سری — گوشهٔ مربع، عمداً */
.serial-block {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--paper-2);
  direction: rtl;
}
.serial-block b { font-weight: 700; letter-spacing: .12em; color: var(--ink); font-size: 14px; }

/* ---------- حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- نشانگر سفارشی سایت اصلی ---------- */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role="button"],
.has-cursor summary, .has-cursor .btn { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 200;
  pointer-events: none; border-radius: 50%;
}
.cursor-dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--accent); opacity: .95;
}
.cursor-ring {
  width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 45%, transparent);
  display: grid; place-items: center;
  transition: width .18s ease, height .18s ease, margin .18s ease,
              border-color .18s ease, background-color .18s ease;
}
.cursor-ring.big {
  width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-color: var(--accent);
}
.cursor-ring.typing { opacity: 0; }
.cursor-label {
  font-size: 10.5px; font-weight: 500; color: #FFF8F2;
  background: var(--accent); border-radius: 6px; padding: 1px 7px;
  opacity: 0; transition: opacity .15s ease; white-space: nowrap;
}
.cursor-ring.labeled {
  width: 86px; height: 86px; margin: -43px 0 0 -43px;
  border-color: transparent; background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.cursor-ring.labeled .cursor-label { opacity: 1; }

/* --- v9 (فاز ۱): بنر نسخهٔ آزمایشی و نشان «به‌زودی» --- */
.demo-banner {
  position: sticky; top: 0; z-index: 90;
  background: var(--accent); color: #FFF8F2;
  text-align: center; font-weight: 700; font-size: .82rem;
  padding: .5rem 1rem; line-height: 1.7;
}
.soon-tag {
  display: inline-block; vertical-align: middle;
  background: var(--accent-tint); color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px; padding: 1px 10px;
  font-size: .68rem; font-weight: 700; margin-inline-start: 8px;
}
