/* ============================================================
   دستور — لندینگ «مرکب و کاغذ» · v001
   توکن‌ها عیناً از web/src/styles/tokens.css (ADR-0009)؛
   تیره = معکوس دقیق، نه یک رنگ اضافه.
   حرکت: فقط transform/opacity · هیچ bounce · همه‌چیز می‌نشیند.
   ============================================================ */

/* ── فونت‌ها (سلف‌هاست، OFL) ── */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-var.woff2") format("woff2-variations"),
       url("../fonts/Vazirmatn-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu";
  src: url("../fonts/Ubuntu-Bold.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-var.woff2") format("woff2-variations"),
       url("../fonts/Estedad-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JB Mono";
  src: url("../fonts/JetBrainsMono-var.woff2") format("woff2-variations"),
       url("../fonts/JetBrainsMono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ── توکن‌ها ── */
:root {
  color-scheme: light;
  --paper: #faf9f7;
  --paper-raised: #ffffff;
  --paper-sunken: #f3f1ed;
  --ink: #16150f;
  --hairline: #e5e2da;
  --hairline-strong: #d6d2c6;
  --ink-1: #f4f2ee;  --ink-2: #eae7e0;  --ink-3: #dfdcd2;
  --ink-4: #d0ccc0;  --ink-5: #b8b4aa;  --ink-6: #a19d93;
  --ink-7: #8a867c;  --ink-8: #6e6a62;  --ink-9: #5b5850;
  --ink-10: #454239; --ink-11: #2e2c26; --ink-12: #16150f;
  --text: var(--ink);
  --text-secondary: var(--ink-9);
  --text-muted: var(--ink-8);
  --text-faint: var(--ink-5);
  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --bg-sunken: var(--paper-sunken);
  --border: var(--hairline);
  --border-strong: var(--hairline-strong);
  --selection: #e3dfd5;
  --e-1: 0 1px 2px rgba(22,21,15,.04), 0 1px 6px rgba(22,21,15,.03);
  --e-2: 0 2px 6px rgba(22,21,15,.05), 0 8px 24px rgba(22,21,15,.06);
  --e-3: 0 4px 12px rgba(22,21,15,.07), 0 16px 48px rgba(22,21,15,.09);
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-full: 999px;
  --w-page: 1120px;
  --font-sans: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "IRANSansX D4", "IRANSansX", "IRANSansXFaNum", "IRANSans", "Vazirmatn", sans-serif;
  --font-mono: "JB Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --lh-tight: 1.35; --lh-body: 1.9;
  --ease-ink: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms; --dur: 240ms; --dur-slow: 420ms; --dur-epic: 900ms;
  --rise: 10px;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink-11);
}
[data-theme="ink"] {
  color-scheme: dark;
  --paper: #0e0d0b; --paper-raised: #16150f; --paper-sunken: #131210;
  --ink: #edebe4;
  --hairline: #26241f; --hairline-strong: #35332c;
  --ink-1: #171613; --ink-2: #201e1a; --ink-3: #2a2822;
  --ink-4: #3a372f; --ink-5: #4f4c43; --ink-6: #6b675d;
  --ink-7: #8a867c; --ink-8: #a19d93; --ink-9: #b8b4aa;
  --ink-10: #d0ccc0; --ink-11: #e0ddd4; --ink-12: #edebe4;
  --text: var(--ink);
  --text-secondary: var(--ink-9);
  --text-muted: var(--ink-7);
  --text-faint: var(--ink-5);
  --selection: #2e2c26;
  --e-1: 0 1px 2px rgba(0,0,0,.35), 0 1px 6px rgba(0,0,0,.3);
  --e-2: 0 2px 6px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --e-3: 0 4px 12px rgba(0,0,0,.45), 0 16px 48px rgba(0,0,0,.4);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink-10);
}

/* ── پایه ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--lh-body);
  font-feature-settings: "ss01" 1;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
code, kbd, pre { font-family: var(--font-mono); }
::selection { background: var(--selection); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
* { scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: var(--radius-full); border: 2px solid var(--bg); }

.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;
}
.skip {
  position: fixed; top: 12px; inset-inline-start: 16px; z-index: 200;
  transform: translateY(calc(-100% - 16px));
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--radius-sm);
  transition: transform var(--dur-fast) var(--ease-ink);
}
.skip:focus-visible { transform: translateY(0); }

/* ظهور پلکانی — فقط وقتی JS هست؛ بدون JS همه‌چیز مرئی */
.js .rv {
  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity .8s var(--ease-ink), transform .8s var(--ease-ink);
  transition-delay: var(--d, 0ms);
}
.js .rv.in { opacity: 1; transform: none; }

/* ── قابِ نسخه: نشان‌های برش پایین (بالایی‌ها از ۰۰۵ حذف شدند — تداخل با هدر شناور) ── */
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.frame-mark { position: absolute; width: 18px; height: 18px; opacity: .5; }
.frame-mark::before, .frame-mark::after { content: ""; position: absolute; background: var(--ink-6); }
.frame-mark::before { width: 100%; height: 1px; }
.frame-mark::after  { width: 1px; height: 100%; }
.frame-mark.bl { bottom: 14px; right: 14px; }
.frame-mark.br { bottom: 14px; left: 14px; }
.frame-mark.bl::before { inset-inline-start: 0; }
.frame-mark.br::before { inset-inline-end: 0; }
.frame-mark.bl::after, .frame-mark.br::after { bottom: 0; }

/* ── نوار پیشرفت ── */
.progress {
  position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 120;
  pointer-events: none;
}
.progress i {
  display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
}

/* ── هدر ── */
/* هدر معکوسِ شناور — در تم روشن تیره، در تم تیره روشن */
.head {
  position: fixed; top: 14px; inset-inline: 14px; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  padding: 0 12px 0 16px;
  height: 58px;
  background: color-mix(in srgb, var(--ink) 93%, transparent);
  color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--paper) 14%, transparent);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
}
.head .brand-name { color: var(--paper); }
/* مونوگرام برند داخل هدر معکوس: همیشه معکوسِ زمینهٔ هدر */
.head .brand-mark { display: none; }
[data-theme="paper"] .head .brand-mark.for-ink { display: block; }
[data-theme="ink"] .head .brand-mark.for-paper { display: block; }
.head .head-nav a {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.head .head-nav a:hover {
  color: var(--paper);
  background: color-mix(in srgb, var(--paper) 10%, transparent);
}
.head .cmdk-hint {
  border-color: color-mix(in srgb, var(--paper) 24%, transparent);
  color: color-mix(in srgb, var(--paper) 62%, transparent);
}
.head .cmdk-hint:hover { border-color: color-mix(in srgb, var(--paper) 44%, transparent); color: var(--paper); }
.head .cmdk-hint kbd {
  border-color: color-mix(in srgb, var(--paper) 24%, transparent);
  background: transparent; color: color-mix(in srgb, var(--paper) 62%, transparent);
}
.head .theme-toggle {
  border-color: color-mix(in srgb, var(--paper) 24%, transparent);
  color: color-mix(in srgb, var(--paper) 74%, transparent);
}
.head .theme-toggle:hover { border-color: color-mix(in srgb, var(--paper) 44%, transparent); color: var(--paper); }
.head .btn-ghost {
  border-color: color-mix(in srgb, var(--paper) 30%, transparent);
  color: var(--paper);
}
.head .btn-ghost:hover { border-color: var(--paper); box-shadow: none; }
.head .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.head .btn-primary:hover { border-color: var(--paper); box-shadow: 0 4px 20px color-mix(in srgb, var(--paper) 28%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; }
[data-theme="paper"] .for-ink { display: none; }
[data-theme="ink"] .for-paper { display: none; }
.head-nav { display: flex; gap: 4px; margin-inline: auto; }
.head-nav a {
  padding: 7px 11px; border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-ink), background var(--dur-fast) var(--ease-ink);
}
.head-nav a:hover { color: var(--text); background: var(--ink-1); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.cmdk-hint {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-faint); font-size: .75rem;
  transition: border-color var(--dur-fast) var(--ease-ink), color var(--dur-fast) var(--ease-ink);
}
.cmdk-hint:hover { border-color: var(--border-strong); color: var(--text-muted); }
.cmdk-hint kbd {
  font-size: .6875rem; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--bg-sunken); color: var(--text-muted);
}
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .8125rem; color: var(--text-secondary);
  transition: border-color var(--dur-fast) var(--ease-ink), color var(--dur-fast) var(--ease-ink);
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle svg { width: 14px; height: 14px; }
.tt-ring { fill: none; stroke: currentColor; stroke-width: 1.1; }
.tt-half { fill: currentColor; }

/* ── دکمه‌ها ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9375rem; line-height: 1.4;
  transition: transform var(--dur-fast) var(--ease-ink),
              box-shadow var(--dur-fast) var(--ease-ink),
              border-color var(--dur-fast) var(--ease-ink),
              background var(--dur-fast) var(--ease-ink),
              color var(--dur-fast) var(--ease-ink);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--e-2); border-color: var(--ink-7); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { border-color: var(--ink); opacity: .92; }
.btn-sm { padding: 8px 16px; font-size: .8438rem; }
.btn-big { padding: 15px 32px; font-size: 1.0625rem; }

/* ── چیدمان بخش‌ها ── */
main { position: relative; z-index: 1; }
.sec {
  max-width: var(--w-page);
  margin-inline: auto;
  padding: clamp(72px, 10vw, 128px) clamp(16px, 3vw, 32px) 0;
}
.sec-head {
  display: flex; align-items: baseline; gap: clamp(16px, 3vw, 28px);
  padding-bottom: 22px; margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.sec-head::after {
  content: ""; position: absolute; bottom: -1px; inset-inline-start: 0;
  width: 64px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur-epic) var(--ease-ink) .15s;
}
.sec-head.in::after { transform: scaleX(1); }
.sec-title { font-size: clamp(1.625rem, 3.2vw, 2.25rem); font-weight: 800; line-height: 1.4; letter-spacing: -.01em; }
.sec-lead { color: var(--text-muted); font-size: .9375rem; margin-top: 6px; max-width: 52ch; }

/* ── ۰۰ جلد ── */
.hero {
  position: relative;
  min-height: 100svh;
  max-width: none;
  padding: 108px clamp(16px, 4vw, 48px) 88px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  overflow: clip;
}
/* ── پری‌لودر: مونوگرام رسمی → حل‌شدن در مهِ هیرو ──
   ماسکِ راست‌به‌چپ (پُرشدن مرکب) → نفس → محو+بلور+بزرگ‌نمایی:
   مونوگرام همان‌جا به مهِ ذراتِ هیرو می‌پیوندد. */
.preload {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: none;
  transition: opacity .58s var(--ease-ink);
  animation: pl-failsafe 3.2s steps(1, end) forwards;
}
.preload.open { opacity: 0; }
.preload.gone { display: none; }
@keyframes pl-failsafe { 0%, 90% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.pl-logo {
  width: 84px; height: 84px;
  -webkit-mask-image: linear-gradient(90deg, transparent 50%, #000 50%);
  mask-image: linear-gradient(90deg, transparent 50%, #000 50%);
  -webkit-mask-size: 200% 100%;
  mask-size: 200% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: pl-ink .5s var(--ease-ink) both, pl-breathe 1.5s var(--ease-in-out) .52s infinite;
}
@keyframes pl-ink {
  from { -webkit-mask-position: 0% 0; mask-position: 0% 0; transform: scale(.96); }
  to   { -webkit-mask-position: 100% 0;  mask-position: 100% 0;  transform: scale(1); }
}
@keyframes pl-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.045); opacity: .88; }
}
.preload.open .pl-logo {
  transition: transform .62s var(--ease-ink), filter .62s var(--ease-ink), opacity .52s var(--ease-ink);
  transform: scale(1.14);
  filter: blur(5px);
  opacity: 0;
  animation: none;
}

/* ── کرسر سفارشی: فلش واقعی با mix-blend difference (وارونِ زمینه) ──
   حالت‌ها: پیکان (پیش‌فرض) · بزرگ‌شده (هاورِ تعاملی) · آی‌بیم (متن) · چهارسویه (درگ) */
html.fine-cursor,
html.fine-cursor * { cursor: none !important; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 230;
  width: 21px; height: 21px;
  transform-origin: 2px 1px;
  pointer-events: none; opacity: 0;
  mix-blend-mode: difference;
  transition: opacity .25s var(--ease-ink);
  will-change: transform;
}
.cursor svg { position: absolute; inset: 0; display: none; width: 100%; height: 100%; }
.cursor .c-arrow { display: block; }
.cursor.is-text .c-arrow, .cursor.is-drag .c-arrow { display: none; }
.cursor.is-text .c-text { display: block; }
.cursor.is-drag .c-drag { display: block; }
.cursor.is-text, .cursor.is-drag { transform-origin: 10.5px 10.5px; }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
  .hero-hint { display: none; }
}

/* ── منوی راست‌کلیک سفارشی ── */
/* شیشهٔ معکوس — در تم روشن تیرهٔ شیشه‌ای، برعکس */
.ctx-menu {
  position: fixed; z-index: 220;
  min-width: 204px;
  background: color-mix(in srgb, var(--ink) 76%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.15); backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 55px color-mix(in srgb, #000 32%, transparent);
  padding: 6px;
  animation: ctx-in .16s var(--ease-ink);
}
@keyframes ctx-in { from { opacity: 0; transform: translateY(5px) scale(.985); } }
.ctx-menu[hidden] { display: none; }
.ctx-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; text-align: start;
  padding: 7px 10px; border-radius: 8px;
  font-size: .8125rem; color: color-mix(in srgb, var(--paper) 78%, transparent);
  transition: background var(--dur-fast) var(--ease-ink), color var(--dur-fast) var(--ease-ink);
}
.ctx-menu button:hover, .ctx-menu button:focus-visible {
  background: color-mix(in srgb, var(--paper) 13%, transparent);
  color: var(--paper);
}
.ctx-menu .ctx-k { font-size: .6875rem; color: color-mix(in srgb, var(--paper) 45%, transparent); }
.ctx-menu button:hover .ctx-k, .ctx-menu button:focus-visible .ctx-k { color: color-mix(in srgb, var(--paper) 70%, transparent); }

/* ── هیرو: صحنهٔ GPU («مرکبِ زنده») ── */
.hero-stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.gl-canvas, .fb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* — لایهٔ متنِ جلد روی صحنه (فونت نصب‌شدهٔ کاربر) — */
.hero-kicker, .hero-lead, .hero-cta, .hero-hint {
  position: relative; z-index: 3;
  font-family: "IRANSansX D4", "IRANSansX", "IRANSansXFaNum", "IRANSans", var(--font-sans);
}
.hero-spacer { flex: 1 1 auto; min-height: 36px; }

.hero-kicker {
  position: relative; z-index: 2;
  font-size: .8125rem; letter-spacing: .14em;
  color: var(--text-muted);
  margin-bottom: clamp(8px, 2vh, 20px);
}
.hero-lead {
  position: relative; z-index: 2;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: var(--text-secondary);
  max-width: 46ch;
  margin-top: clamp(4px, 1.5vh, 14px);
}
.hero-cta {
  position: relative; z-index: 2;
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: clamp(20px, 3.5vh, 34px);
}
.hero-hint { position: relative; z-index: 2; margin-top: 18px; font-size: .8125rem; color: var(--text-faint); }
.linkish { text-decoration: underline; text-underline-offset: 4px; color: var(--text-muted); font-size: inherit; }
.linkish:hover { color: var(--text); }
.hero-scroll {
  position: absolute; bottom: 22px; inset-inline-end: clamp(16px, 4vw, 48px);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; color: var(--text-faint);
}
.hero-scroll svg { width: 12px; height: 12px; animation: bob 2.4s var(--ease-in-out) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ── نوار فرمان (تیکر) ── */
.ticker {
  margin-top: clamp(40px, 6vw, 72px);
  border-block: 1px solid var(--border);
  padding: 15px 0;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: tick 44s linear infinite; }
.ticker-group { display: flex; flex-shrink: 0; }
.ticker-group span {
  display: inline-flex; align-items: center;
  padding-inline: 22px; white-space: nowrap;
  font-size: .875rem; color: var(--text-muted);
  letter-spacing: .02em;
}
.ticker-group i { font-style: normal; font-size: .5rem; color: var(--ink-5); margin-inline-start: 44px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── ۰۲ سه ستون ── */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.pillar {
  display: flex; flex-direction: column; align-items: flex-start;
  border-top: 1px solid var(--border-strong); padding-top: 22px;
}
.pillar h3 { font-size: 1.125rem; font-weight: 800; margin-bottom: 10px; }
.pillar p { font-size: .9063rem; color: var(--text-secondary); flex: 1 1 auto; }
.pillar-tag {
  display: inline-block; margin-top: 14px;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em;
  color: var(--text-faint);
}

/* ── ۰۳ کاتالوگ قابلیت‌ها ── */
.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.cell { background: var(--bg); padding: clamp(20px, 2.6vw, 30px); transition: background var(--dur-fast) var(--ease-ink); }
.cell:hover { background: var(--ink-1); }
.cell h3 { display: flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.ficon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-7); }
.cell p { font-size: .8438rem; color: var(--text-secondary); line-height: 1.85; }
/* گرید ۲ستونه: ۹ خانه = ردیف ناقص — خانهٔ یتیم دوستونه می‌شود تا
   پس‌زمینهٔ hairlineِ کانتینر به‌صورت سنگ‌فرش خاکستری پیدا نکند */
@media (max-width: 900px) {
  .catalog .cell:last-child:nth-child(odd) { grid-column: span 2; }
}

/* ── ۰۴ تیم چندعاملی — ستارهٔ صفحه ── */
.sec-team { position: relative; }
.sec-team > * { position: relative; z-index: 1; }
.team-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.team-copy { font-size: 1.0625rem; line-height: 2.05; color: var(--text-secondary); }
.team-copy em { font-style: normal; font-weight: 700; color: var(--text); }
.team-stats { display: flex; flex-direction: column; }
.team-stats li { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.team-stats li:last-child { border-bottom: 1px solid var(--border); }
.team-stats li strong { flex-shrink: 0; } /* «L۰ تا L۳» وسط توکن نشکند */
.team-stats span { font-size: .8438rem; color: var(--text-muted); }

/* — دیاگرام ورک‌فلو (SVG دست‌ساز، هویت مرکب) — */
.dag {
  margin-top: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-raised); box-shadow: var(--e-1);
  padding: clamp(14px, 2vw, 22px);
  overflow-x: auto;
}
.dag svg { display: block; width: 100%; min-width: 560px; height: auto; }
.dag figcaption { margin-top: 10px; font-size: .7813rem; color: var(--text-faint); text-align: center; }
.dag-n { fill: var(--bg); stroke: var(--border-strong); }
.dag-n-end { fill: var(--ink); stroke: var(--ink); }
.dag-t { font-family: var(--font-display); font-size: 15px; font-weight: 700; fill: var(--text); }
.dag-t-end { fill: var(--paper); }
.dag-s { font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; fill: var(--text-faint); }
.dag-note { font-family: var(--font-sans); font-size: 10.5px; fill: var(--text-faint); }
.dag-flow { stroke: var(--ink-6); stroke-width: 1.2; fill: none; }
.dag-fb { stroke: var(--ink-5); stroke-width: 1; fill: none; stroke-dasharray: 3 4; }
.dag-mk { fill: var(--ink-7); }

/* — دوازده تیم آماده (دادهٔ واقعی: skills/team-presets/index.json) — */
.uc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: clamp(36px, 5vw, 56px); margin-bottom: 20px; }
.uc-head h3 { font-size: 1.25rem; font-weight: 800; }
.uc-head p { font-size: .875rem; color: var(--text-muted); }
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.uc {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-raised);
  padding: 15px 16px 13px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color var(--dur-fast) var(--ease-ink), transform var(--dur-fast) var(--ease-ink), box-shadow var(--dur-fast) var(--ease-ink);
}
.uc:hover { transform: translateY(-2px); box-shadow: var(--e-1); border-color: var(--border-strong); }
/* گوشهٔ light-touch: کمانِ ربع‌دایرهٔ موتیف مونوگرام */
.uc::after {
  content: ""; position: absolute; top: 10px; inset-inline-start: 10px;
  width: 13px; height: 13px;
  background: radial-gradient(circle at 100% 0, transparent 7.5px, var(--hairline-strong) 8px, transparent 9.5px);
}
.uc-badge {
  position: absolute; top: 13px; inset-inline-end: 14px;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .04em;
  color: var(--text-faint); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 7px;
}
.uc h3 { font-size: .9688rem; font-weight: 800; padding-inline-end: 36px; }
.uc p { font-size: .8125rem; color: var(--text-secondary); line-height: 1.8; }
.uc-meta { margin-top: auto; padding-top: 8px; font-size: .7188rem; color: var(--text-faint); }

/* ── ۰۷ تعرفه ── */
.pricing-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  margin-bottom: 24px;
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 4px;
  font-size: .8438rem; color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-ink), color var(--dur-fast) var(--ease-ink);
}
.seg span i { font-style: normal; font-size: .6875rem; color: var(--text-faint); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:checked + span i { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.seg input:focus-visible + span { box-shadow: var(--focus-ring); }
.seats { display: inline-flex; align-items: center; gap: 10px; }
.seats-label { font-size: .8438rem; color: var(--text-muted); }
.seat-btn {
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-secondary); line-height: 1;
  transition: border-color var(--dur-fast) var(--ease-ink), color var(--dur-fast) var(--ease-ink);
}
.seat-btn:hover:not(:disabled) { border-color: var(--ink-7); color: var(--text); }
.seat-btn:disabled { opacity: .3; cursor: not-allowed; }
#seatsVal { font-family: var(--font-display); font-size: 1.125rem; min-width: 22px; text-align: center; }
.seats-note { font-size: .75rem; color: var(--text-faint); }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan {
  position: relative; text-align: start;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-raised);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color var(--dur-fast) var(--ease-ink), box-shadow var(--dur-fast) var(--ease-ink), transform var(--dur-fast) var(--ease-ink);
}
.plan:hover { transform: translateY(-2px); box-shadow: var(--e-2); }
.plan.is-on { border-color: var(--ink); box-shadow: var(--e-2); }
.plan-flag {
  position: absolute; top: -10px; inset-inline-start: 18px;
  background: var(--ink); color: var(--paper);
  font-size: .6875rem; padding: 2px 10px; border-radius: var(--radius-full);
}
.plan-name { font-weight: 800; font-size: 1.0625rem; }
.plan-base { font-size: 1.0625rem; font-weight: 700; }
.plan-base i, .quote-price i, #quotePrice i { font-style: normal; font-size: .75rem; font-weight: 400; color: var(--text-muted); margin-inline-start: 4px; } /* #quotePrice: جعبهٔ قیمت فقط id دارد — فاصلهٔ رقم و واحد */
.plan-credits { font-size: .8438rem; color: var(--text-secondary); }
.plan-eq { font-size: .75rem; color: var(--text-faint); }
.plan-desc { font-size: .8125rem; color: var(--text-muted); margin-top: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.quote {
  margin-top: 24px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg-raised); box-shadow: var(--e-1);
  padding: 20px 24px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px;
}
.quote-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.quote-main > span { font-size: .875rem; color: var(--text-muted); }
.quote-price { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.3; }
.quote-sub { flex-basis: 100%; font-size: .75rem; color: var(--text-faint); }
.pricing-note { margin-top: 18px; font-size: .8125rem; color: var(--text-faint); max-width: 68ch; }

/* ── ۰۸ پرسش‌ها ── */
.faq-list { max-width: 760px; margin-inline: auto; }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list details:first-child { border-top: 1px solid var(--border); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 4px; cursor: pointer;
  font-weight: 700; font-size: .9688rem;
  transition: color var(--dur-fast) var(--ease-ink);
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--text-secondary); }
.faq-list summary i {
  position: relative; width: 14px; height: 14px; flex-shrink: 0;
  transition: transform var(--dur) var(--ease-ink);
}
.faq-list summary i::before, .faq-list summary i::after {
  content: ""; position: absolute; inset: 0; margin: auto; background: var(--ink-7);
}
.faq-list summary i::before { width: 100%; height: 1.5px; }
.faq-list summary i::after { width: 1.5px; height: 100%; transition: opacity var(--dur) var(--ease-ink); }
/* باز: نیم‌چرخِ کامل — بازوی عمودی محو می‌شود و منها تمیز می‌ماند */
.faq-list details[open] summary i { transform: rotate(180deg); }
.faq-list details[open] summary i::after { opacity: 0; }
.faq-list details p { padding: 0 4px 20px; font-size: .9063rem; color: var(--text-secondary); max-width: 64ch; }
.faq-list details p code { font-size: .7813rem; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 1px 6px; }
@supports selector(::details-content) {
  .faq-list ::details-content {
    block-size: 0; overflow-y: clip;
    transition: content-visibility var(--dur-slow) var(--ease-ink), block-size var(--dur-slow) var(--ease-ink);
    transition-behavior: allow-discrete;
  }
  .faq-list details[open]::details-content { block-size: auto; }
}

/* ── ۰۹ پایان ── */
.finale { text-align: center; padding-bottom: clamp(80px, 10vw, 140px); position: relative; }
.seal {
  position: relative; width: 116px; height: 116px;
  margin: 0 auto 30px;
  display: grid; place-items: center;
}
.seal svg { position: absolute; inset: 0; animation: seal-spin 64s linear infinite; }
@keyframes seal-spin { to { transform: rotate(-360deg); } }
.seal-ring { fill: none; stroke: var(--ink-6); stroke-width: 1; }
.seal-ring2 { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.seal-text { font-family: var(--font-mono); font-size: 8.2px; letter-spacing: .18em; fill: var(--text-faint); direction: ltr; }
.seal-mark { width: 34px; height: 34px; }
.finale-l1 { font-size: clamp(1rem, 1.6vw, 1.1875rem); color: var(--text-muted); }
.finale-l2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.875rem, 4.5vw, 3.25rem); line-height: 1.5;
  margin-top: 6px;
}
.finale-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ── پابرگ ── */
.foot {
  border-top: 1px solid var(--border);
  margin-top: clamp(56px, 8vw, 96px);
  padding: 34px clamp(16px, 3vw, 32px) 46px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  max-width: var(--w-page); margin-inline: auto;
}
.foot-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.foot-note { font-size: .8125rem; color: var(--text-faint); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-inline-start: auto; }
.foot-links a { font-size: .8125rem; color: var(--text-muted); transition: color var(--dur-fast) var(--ease-ink); }
.foot-links a:hover { color: var(--text); }
.foot-copy { flex-basis: 100%; font-size: .75rem; color: var(--text-faint); }

/* ── پالت فرمان ── */
.cmdk-root { position: fixed; inset: 0; z-index: 150; }
.cmdk-scrim {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.cmdk {
  position: absolute; top: 16vh; inset-inline-start: 50%;
  transform: translateX(50%);
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-raised); box-shadow: var(--e-3);
  overflow: hidden;
}
.cmdk-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.cmdk-head input {
  flex: 1; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 1rem; outline: none;
}
.cmdk-head input::placeholder { color: var(--text-faint); }
.cmdk-head kbd { font-size: .6875rem; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-faint); }
.cmdk ul { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  font-size: .9063rem; color: var(--text-secondary);
  cursor: pointer;
}
.cmdk li .ck-no { font-family: var(--font-display); font-size: .6875rem; color: var(--text-faint); min-width: 18px; }
.cmdk li .ck-hint { margin-inline-start: auto; font-size: .6875rem; color: var(--text-faint); }
.cmdk li[aria-selected="true"] { background: var(--ink-1); color: var(--text); }
.cmdk li[aria-selected="true"] .ck-no { color: var(--text); }
.cmdk .ck-empty { padding: 22px; text-align: center; color: var(--text-faint); font-size: .875rem; }
.cmdk-foot {
  padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: .7188rem; color: var(--text-faint);
}
.cmdk-root[hidden] { display: none; }

/* ── توست ── */
.toast {
  position: fixed; bottom: 26px; inset-inline-start: 50%;
  transform: translateX(50%) translateY(16px);
  background: var(--ink); color: var(--paper);
  font-size: .8438rem; padding: 10px 18px; border-radius: var(--radius-sm);
  opacity: 0; pointer-events: none; z-index: 180;
  transition: opacity var(--dur) var(--ease-ink), transform var(--dur) var(--ease-ink);
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ── محصورسازی گریدها: آیتم‌ها حق کوچک‌شدن دارند (خط curl بلند نباید صفحه را سرریز کند) ── */
.three > *, .catalog > *, .uc-grid > *, .team-wrap > *, .plans > * { min-width: 0; }

/* ── گشودگی واکنش‌گرا ── */
@media (max-width: 1080px) {
  .head-nav { display: none; }
  .cmdk-hint { display: none; }
}
@media (max-width: 900px) {
  .three { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .uc-grid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .head { top: 8px; inset-inline: 8px; height: 52px; border-radius: 13px; }
  /* CTA و تم در سمت مقابلِ لوگو */
  .head-actions { margin-inline-start: auto; }
  .head-nav { display: none; }
  .catalog { grid-template-columns: 1fr; }
  .uc-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .head-actions .btn-ghost { display: none; }
  .theme-toggle span { display: none; }
  .pricing-controls { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
}

/* ── کاهش حرکت ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preload { display: none; }
  .js .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sec-head::after { transform: scaleX(1); transition: none; }
}
