/* PixNexa site: the same dark-and-orange palette as the apps. */
:root {
  --bg: #110D0A;
  --bg-2: #16110D;
  --panel: #1F1813;
  --panel-2: #2B221B;
  --border: #3A2E24;
  --fg: #F5EEE8;
  --muted: #A99B8E;
  --orange: #F97316;
  --orange-2: #FB923C;
  --orange-3: #EA580C;
  --on-orange: #1A0E05;
  --ok: #4ADE80;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFF8F3;
    --bg-2: #FFF1E6;
    --panel: #FFFFFF;
    --panel-2: #FBEADD;
    --border: #EBD7C6;
    --fg: #1F1410;
    --muted: #6E5A4C;
    --orange: #EA580C;
    --orange-2: #F97316;
    --orange-3: #C2410C;
    --on-orange: #FFFFFF;
    --ok: #15803D;
    --shadow: 0 20px 50px rgba(120, 60, 20, .18);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .9em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 .35em;
  direction: ltr;
  unicode-bidi: isolate;
}
h1, h2, h3 { line-height: 1.35; margin: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: .4rem 0 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 800; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 10px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--fg); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--orange); color: var(--on-orange);
  border: 1px solid var(--orange); border-radius: 14px;
  font-weight: 700; font-size: 1rem;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--orange-2); text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-small { min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: .92rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, color-mix(in srgb, var(--orange-3) 12%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: .88rem; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; margin-top: 18px; }
.accent { color: var(--orange); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; margin-top: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.meta { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* Phone mock-up (pure HTML/CSS, mirrors the real app screen) */
.phone {
  justify-self: center;
  width: 300px; padding: 12px;
  border-radius: 42px;
  background: #0A0806;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.phone-screen {
  border-radius: 32px; overflow: hidden;
  background: #110D0A; color: #F5EEE8;
  padding: 18px 12px 12px; font-size: 12px; line-height: 1.6;
  display: flex; flex-direction: column; gap: 8px;
}
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 0 4px 4px; font-size: 15px; }
.ph-bar img { width: 26px; height: 26px; border-radius: 8px; }
.ph-summary { background: #3B2213; color: #FED7AA; border-radius: 12px; padding: 8px 10px; font-weight: 500; }
.ph-item { display: flex; align-items: center; gap: 10px; background: #16110D; border: 1px solid #3A2E24; border-radius: 12px; padding: 7px; }
.ph-item > div { flex: 1; min-width: 0; }
.ph-item b { display: block; font-weight: 500; direction: ltr; text-align: right; }
.ph-item small { color: #A99B8E; }
.ph-item em { font-style: normal; font-weight: 700; color: #4ADE80; background: rgba(74, 222, 128, .14); border-radius: 99px; padding: 0 6px; margin-inline-start: 4px; }
.t { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.t1 { background: linear-gradient(160deg, #FDBA74, #7C2D12); }
.t2 { background: linear-gradient(160deg, #94A3B8, #1E293B); }
.t3 { background: linear-gradient(180deg, #FB923C 0 45%, #9A3412 45%); }
.t4 { background: radial-gradient(circle at 50% 45%, #F97316 0 30%, #2B221B 31%); }
.bar { display: block; height: 4px; border-radius: 4px; margin-top: 4px; background: linear-gradient(90deg, #F97316 60%, #3A2E24 60%); }
.ph-panel { background: #1F1813; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.ph-panel small { color: #A99B8E; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #5A4A3D; border-radius: 99px; overflow: hidden; direction: ltr; }
.seg span { text-align: center; padding: 4px 0; }
.seg span + span { border-left: 1px solid #5A4A3D; }
.seg .on { background: #F97316; color: #1A0E05; font-weight: 700; }
.row { display: flex; justify-content: space-between; }
.row b { color: #F97316; }
.slider { height: 4px; border-radius: 4px; background: #3A2E24; position: relative; margin: 4px 0 6px; }
.slider span { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 85%; background: #F97316; border-radius: 4px; }
.slider span::after { content: ""; position: absolute; inset-inline-end: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #F97316; }
.ph-btns { display: flex; gap: 6px; }
.ph-btns span { border-radius: 99px; padding: 8px 10px; font-weight: 700; text-align: center; }
.ph-btns .b1 { flex: 1; background: #F97316; color: #1A0E05; }
.ph-btns .b2 { background: #2B221B; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.sub { color: var(--muted); margin-top: 8px; max-width: 46em; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.card, .product, .dl, .note {
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 22px;
}
.card p, .product p, .note p { color: var(--muted); font-size: .95rem; }
.ic {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange);
  font-size: 1.3rem; font-weight: 800;
}

.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.product { display: flex; flex-direction: column; gap: 4px; }
.product h3 { font-size: 1.3rem; direction: ltr; text-align: right; }
.product .link { margin-top: auto; padding-top: 12px; font-weight: 700; }
.product.featured { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.product.muted { opacity: .7; }
.tag {
  align-self: flex-start; font-size: .8rem; font-weight: 700;
  padding: 2px 10px; border-radius: 99px; margin-bottom: 6px;
  background: var(--panel-2); color: var(--orange-2);
}

.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.dl { display: flex; flex-direction: column; gap: 14px; }
.dl-head { display: flex; align-items: center; gap: 14px; }
.dl-head svg { width: 44px; height: 44px; fill: var(--orange); flex: none; }
.dl-head h3 { font-size: 1.25rem; direction: ltr; text-align: right; }
.dl-head small { color: var(--muted); }
.link.small { text-align: center; font-size: .92rem; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; counter-reset: step; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px 22px; padding-inline-start: 76px;
}
.steps li::before {
  content: counter(step, persian);
  position: absolute; inset-inline-start: 20px; top: 18px;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--orange); color: var(--on-orange); font-weight: 800; font-size: 1.1rem;
}
.steps p { color: var(--muted); }
.steps b, .note b { color: var(--fg); }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }

details {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 20px; margin-top: 12px;
}
details:first-of-type { margin-top: 32px; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--orange); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); }

.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer p { margin: 0; }
.footer .brand img { border-radius: 8px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .products, .notes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .topbar-inner .btn-small { margin-inline-start: auto; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 56px 0; }
  .grid, .downloads { grid-template-columns: 1fr; }
  .cta .btn { flex: 1 1 100%; }
  .phone { width: min(300px, 100%); }
  .steps li { padding-inline-start: 22px; padding-top: 66px; }
}

/* PixNexa Web converter */
.convert { padding-top: 64px; }
.convert .tag { margin-bottom: 10px; display: inline-block; }
.tool {
  margin-top: 28px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 24px;
  padding: 20px; display: grid; gap: 16px;
}
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 180px; padding: 24px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border); border-radius: 18px; background: var(--bg-2);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible, .drop.over {
  border-color: var(--orange); outline: none;
  background: color-mix(in srgb, var(--orange) 8%, var(--bg-2));
}
.drop svg { width: 40px; height: 40px; fill: var(--orange); margin-bottom: 6px; }
.drop small { color: var(--muted); }
.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.field { display: grid; gap: 6px; min-width: 220px; }
.field[hidden] { display: none; }
.label { color: var(--muted); font-size: .9rem; }
.label b { color: var(--orange); margin-inline-start: 6px; }
.choice { display: inline-flex; direction: ltr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.choice button {
  font: inherit; font-weight: 700; color: var(--fg); background: transparent;
  border: 0; padding: 8px 18px; cursor: pointer;
}
.choice button + button { border-left: 1px solid var(--border); }
.choice button.on { background: var(--orange); color: var(--on-orange); }
.choice button:disabled:not(.on) { opacity: .45; cursor: not-allowed; }
input[type="range"] { width: 100%; accent-color: var(--orange); }
.hint { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .88rem; min-height: 0; }
.hint:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-inline-start: auto; }
.actions .btn[hidden] { display: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button.btn { font-family: inherit; cursor: pointer; }
.summary {
  margin: 0; padding: 12px 16px; border-radius: 14px; font-weight: 500;
  background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--fg);
}
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file {
  display: flex; align-items: center; gap: 12px; padding: 8px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
}
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex: none; }
.info { flex: 1; min-width: 0; display: grid; }
.name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.status { color: var(--muted); }
.status em { white-space: nowrap; font-style: normal; font-weight: 700; border-radius: 99px; padding: 0 8px; margin-inline-start: 8px; }
.status em.down { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.status em.up { color: #F87171; background: rgba(248, 113, 113, .15); }
.status .note { font-size: .85em; }
.progress { display: none; height: 4px; border-radius: 4px; margin-top: 4px; background: var(--border); overflow: hidden; position: relative; }
.file.working .progress { display: block; }
.file.working .progress::after {
  content: ""; position: absolute; inset-block: 0; width: 40%; background: var(--orange); border-radius: 4px;
  animation: slide 1s ease-in-out infinite;
}
@keyframes slide { from { inset-inline-start: -40%; } to { inset-inline-start: 100%; } }
.file.failed .status { color: #F87171; }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 1.1rem; font-weight: 700;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
}
.icon-btn:hover { color: var(--fg); border-color: var(--muted); }
.file.done .icon-btn { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
@media (max-width: 640px) {
  .tool { padding: 14px; }
  .field { min-width: 100%; }
  .actions { margin-inline-start: 0; width: 100%; }
  .actions .btn { flex: 1 1 auto; white-space: nowrap; padding: 0 14px; }
  .actions #convertBtn { flex-basis: 100%; }
}
