/* ============================================================
   امرتات استور — Development page (توسعه اختصاصی)
   Uses :root tokens + shared components from styles.css
   ============================================================ */

/* ---- Intro: copy + dev-studio mockup ---- */
.dev-intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.dev-intro .di-copy { max-width: 540px; }
.dev-intro .di-copy h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 16px; letter-spacing: -0.02em; }
.dev-intro .di-copy > p { color: var(--text-2); font-size: 16.5px; line-height: 1.95; margin-bottom: 22px; }
.dev-points { display: flex; flex-direction: column; gap: 14px; }
.dev-point { display: flex; align-items: flex-start; gap: 13px; }
.dev-point .dp-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; }
.dev-point .dp-ico i { font-size: 23px; color: var(--primary); }
.dev-point .dp-title { font-weight: 700; font-size: 15.5px; }
.dev-point .dp-desc { font-size: 13.5px; color: var(--text-2); margin-top: 2px; line-height: 1.7; }

/* ---- Dev studio mockup ---- */
.dev-stage { position: relative; padding: 30px 14px 54px; }
.ds-badge {
  position: absolute; top: 2px; right: 24px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 100px;
  box-shadow: var(--shadow-md); padding: 7px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.ds-badge .dsb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
html.anim .ds-badge .dsb-dot { animation: dsbPulse 1.8s ease-in-out infinite; }
@keyframes dsbPulse { 0%,100% { box-shadow: 0 0 0 3px var(--primary-soft); } 50% { box-shadow: 0 0 0 7px rgba(108,99,255,0.08); } }

/* editor window */
.editor {
  background: #15131F; border-radius: var(--r-xl); border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative; z-index: 2;
}
.ed-bar { display: flex; align-items: center; gap: 16px; padding: 10px 15px; border-bottom: 1px solid rgba(255,255,255,.06); background: #100E18; direction: ltr; }
.ed-dots { display: flex; gap: 6px; }
.ed-dots span { width: 11px; height: 11px; border-radius: 50%; }
.ed-dots span:nth-child(1){ background: #FF5F57; } .ed-dots span:nth-child(2){ background: #FEBC2E; } .ed-dots span:nth-child(3){ background: #28C840; }
.ed-tabs { display: flex; align-items: stretch; gap: 2px; margin-bottom: -10px; }
.ed-tab { display: flex; align-items: center; gap: 7px; padding: 9px 14px; font-family: var(--font-en); font-size: 12px; font-weight: 500; color: rgba(255,255,255,.4); border-radius: 9px 9px 0 0; }
.ed-tab i { font-size: 15px; }
.ed-tab.active { color: #fff; background: #15131F; }
.ed-tab.active i { color: #8B5CF6; }
.ed-body { margin: 0; padding: 18px 18px 22px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 2.1; color: rgba(255,255,255,.86); background: #15131F; overflow: hidden; }
.cl { display: block; white-space: pre; }
.cn { display: inline-block; width: 22px; color: rgba(255,255,255,.24); user-select: none; }
.t-kw { color: #F0ABFC; }
.t-var { color: #C4B5FD; }
.t-prop { color: #A5B4FC; }
.t-str { color: #6EE7B7; }
.t-fn { color: #7DD3FC; }
.ed-caret { display: inline-block; width: 7px; height: 14px; background: #8B5CF6; margin-inline-start: 2px; vertical-align: -2px; animation: devBlink 1.1s steps(1) infinite; }

/* terminal panel (floats bottom-left) */
.terminal {
  position: absolute; bottom: 6px; left: -18px; z-index: 5; width: 290px; direction: ltr; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 26px 54px -18px rgba(15,14,23,.4); overflow: hidden;
  animation: devFloaty 6s ease-in-out infinite .6s;
}
.trm-bar { display: flex; align-items: center; gap: 8px; padding: 9px 13px; background: var(--surface); border-bottom: 1px solid var(--border); font-family: var(--font-en); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.trm-bar .trm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.trm-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.trm-line { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 7px; }
.trm-prompt { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; color: var(--text-2); }
.trm-line.ok i { color: var(--green); font-size: 16px; }
.trm-line.run { color: var(--primary); font-weight: 600; }
.trm-line.run i { color: var(--primary); font-size: 15px; }
.trm-caret { display: inline-block; width: 6px; height: 13px; background: var(--primary); margin-inline-start: 3px; animation: devBlink 1.1s steps(1) infinite; }

@keyframes devFloaty { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }
@keyframes devBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .terminal { animation: none !important; }
  .ed-caret, .trm-caret, .ds-badge .dsb-dot { animation: none !important; }
}

/* ---- Stats band ---- */
.dev-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px;
}
.dev-stat { text-align: center; }
.dev-stat .dvs-num { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.dev-stat .dvs-num small { font-size: 19px; color: var(--primary); font-weight: 700; }
.dev-stat .dvs-lab { font-size: 13.5px; color: var(--text-2); margin-top: 9px; }
.dev-stat + .dev-stat { border-inline-start: 1px solid var(--border); }

/* ---- Services (reuse shared .feature in a 3-col grid) ---- */
.dev-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ---- What we built (example modules) ---- */
.dev-examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dev-ex {
  display: flex; align-items: flex-start; gap: 15px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 22px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.dev-ex:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.dev-ex .dx-ico { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; }
.dev-ex .dx-ico i { font-size: 27px; color: var(--primary); }
.dev-ex h3 { font-size: 16px; margin-bottom: 6px; }
.dev-ex p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* ---- Integrations chips ---- */
.dev-integrations { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 880px; margin-inline: auto; }
.di-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 100px;
  padding: 12px 20px; font-size: 14.5px; font-weight: 600; color: var(--text);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s, background .22s;
}
.di-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--primary); background: var(--surface); }
.di-chip i { font-size: 21px; color: var(--primary); }

/* ---- Process steps (5-step connected timeline) ---- */
.dev-process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.dev-process::before {
  content: ''; position: absolute; top: 36px; right: 9%; left: 9%; height: 2px;
  background: repeating-linear-gradient(to left, var(--border-strong) 0 8px, transparent 8px 16px); z-index: 0;
}
.dev-step { text-align: center; position: relative; z-index: 1; }
.dev-step-ic {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 20px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; position: relative;
}
.dev-step-ic i { font-size: 32px; color: var(--primary); }
.dev-step-ic .badge {
  position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 700; font-size: 13px; box-shadow: var(--shadow-primary);
}
.dev-step h3 { font-size: 16.5px; margin-bottom: 8px; }
.dev-step p { color: var(--text-2); font-size: 13.5px; line-height: 1.7; max-width: 200px; margin-inline: auto; }

/* sequenced entrance: steps pop right→left, line fills */
.dev-progress { display: none; }
html.anim .dev-process .dev-progress {
  display: block; position: absolute; top: 36px; right: 9%; width: 0; height: 2px; z-index: 0;
  background: linear-gradient(to left, var(--primary), var(--primary-dark)); border-radius: 2px;
}
html.anim .dev-process .dev-step-ic { opacity: 0; transform: scale(.55); }
html.anim .dev-process .dev-step h3,
html.anim .dev-process .dev-step p { opacity: 0; transform: translateY(9px); }

html.anim .dev-process.in .dev-step-ic { animation: devStepPop .55s cubic-bezier(.34,1.5,.45,1) forwards; }
html.anim .dev-process.in .dev-step h3,
html.anim .dev-process.in .dev-step p { animation: devStepText .5s ease forwards; }
html.anim .dev-process.in .dev-progress { animation: devLineFill 2.1s cubic-bezier(.4,0,.2,1) .4s forwards; }

html.anim .dev-process.in .dev-step:nth-child(1) .dev-step-ic { animation-delay: .1s; }
html.anim .dev-process.in .dev-step:nth-child(2) .dev-step-ic { animation-delay: .55s; }
html.anim .dev-process.in .dev-step:nth-child(3) .dev-step-ic { animation-delay: 1s; }
html.anim .dev-process.in .dev-step:nth-child(4) .dev-step-ic { animation-delay: 1.45s; }
html.anim .dev-process.in .dev-step:nth-child(5) .dev-step-ic { animation-delay: 1.9s; }
html.anim .dev-process.in .dev-step:nth-child(1) h3, html.anim .dev-process.in .dev-step:nth-child(1) p { animation-delay: .25s; }
html.anim .dev-process.in .dev-step:nth-child(2) h3, html.anim .dev-process.in .dev-step:nth-child(2) p { animation-delay: .7s; }
html.anim .dev-process.in .dev-step:nth-child(3) h3, html.anim .dev-process.in .dev-step:nth-child(3) p { animation-delay: 1.15s; }
html.anim .dev-process.in .dev-step:nth-child(4) h3, html.anim .dev-process.in .dev-step:nth-child(4) p { animation-delay: 1.6s; }
html.anim .dev-process.in .dev-step:nth-child(5) h3, html.anim .dev-process.in .dev-step:nth-child(5) p { animation-delay: 2.05s; }
html.anim .dev-process.force-show:not(.in) .dev-step-ic,
html.anim .dev-process.force-show:not(.in) .dev-step h3,
html.anim .dev-process.force-show:not(.in) .dev-step p { opacity: 1; transform: none; }

@keyframes devStepPop { to { opacity: 1; transform: scale(1); } }
@keyframes devStepText { to { opacity: 1; transform: none; } }
@keyframes devLineFill { to { width: 82%; } }

/* ---- Packages note ---- */
.dev-pkg-note { display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 22px; font-size: 13.5px; color: var(--text-2); }
.dev-pkg-note i { font-size: 18px; color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .dev-intro { grid-template-columns: 1fr; gap: 64px; }
  .dev-intro .di-copy { max-width: 620px; }
  .dev-services { grid-template-columns: repeat(2, 1fr); }
  .dev-examples { grid-template-columns: repeat(2, 1fr); }
  .dev-process { gap: 10px; }
  .dev-process .dev-step p { font-size: 12.5px; }
}
@media (max-width: 760px) {
  .dev-stats { grid-template-columns: 1fr 1fr; gap: 26px; }
  .dev-stat:nth-child(3) { border-inline-start: none; }
  .dev-process { grid-template-columns: 1fr; gap: 36px; }
  .dev-process::before { display: none; }
  html.anim .dev-process .dev-progress { display: none; }
  .terminal { width: 250px; left: 0; }
}
@media (max-width: 480px) {
  .dev-services { grid-template-columns: 1fr; }
  .dev-examples { grid-template-columns: 1fr; }
  .dev-stats { grid-template-columns: 1fr; }
  .dev-stat + .dev-stat { border-inline-start: none; border-top: 1px solid var(--border); padding-top: 26px; }
  .ds-badge { right: 12px; font-size: 11px; }
  .terminal { position: relative; left: 0; bottom: 0; width: 100%; margin-top: 16px; }
  .dev-stage { padding-bottom: 14px; }
}
