/* Factorasion website: landing page and web panel share these tokens. */
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --paper: #F3F5F4;
  --sheet: #FFFFFF;
  --ink: #0C1A16;
  --muted: #56675F;
  --line: #D8E0DD;
  --subtle: #E7ECEA;
  --brand: #0A8064;
  --brand-deep: #06614B;
  --brand-soft: #E2F5EE;
  --forest: #05241E;
  --forest-2: #073A30;
  --mint: #3EDCAA;
  --on-forest: #EAF7F2;
  --on-forest-muted: #A9CFC3;
  --amber: #975A04;
  --amber-soft: #FFF2DA;
  --danger: #B42335;
  --danger-soft: #FDECEE;
  --focus: #10A07C;
  --radius: 14px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --tear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 0h24v6c-3 0-3 6-6 6s-3-6-6-6-3 6-6 6-3-6-6-6z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.9; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.45; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--sheet); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
html[lang="en"] body { line-height: 1.7; }

/* ---------- Brand and buttons ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-forest); }
.brand .mark { width: 34px; height: 37px; flex: none; }
.brand-text b { display: block; font-size: 19px; font-weight: 800; line-height: 1.2; }
.brand-text small { display: block; font-size: 11px; font-weight: 700; opacity: .7; direction: ltr; text-align: end; line-height: 1.3; }
.brand.dark { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 8px 18px; border-radius: 12px;
  font: 700 15px/1.4 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .15s; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.big { min-height: 52px; padding: 12px 24px; font-size: 16.5px; border-radius: 14px; }
.btn.mint { background: var(--mint); color: #04251D; }
.btn.mint:hover { background: #6BEAC4; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-deep); }
.btn.ghost-light { border-color: #ffffff3d; color: var(--on-forest); background: #ffffff0d; }
.btn.ghost-light:hover { background: #ffffff1f; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--sheet); }
.btn.ghost:hover { border-color: var(--brand); }
.btn.danger { border-color: #E9B8BF; color: var(--danger); background: var(--sheet); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:active { transform: translateY(1px); }

/* ---------- Landing header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #05241ee0; backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid #ffffff14; }
.top-inner { width: min(1180px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 28px; min-height: 68px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--on-forest-muted); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--on-forest); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions .btn { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.lang { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ffffff2e; background: transparent; color: var(--on-forest); font: 700 13px var(--font); cursor: pointer; }
.lang:hover { background: #ffffff14; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--on-forest); padding: 64px 0 120px;
  background:
    repeating-linear-gradient(180deg, transparent 0 39px, #ffffff08 39px 40px),
    radial-gradient(900px 520px at 15% 20%, #0B8C7740, transparent 70%),
    linear-gradient(160deg, var(--forest) 0%, var(--forest-2) 100%); }
.hero::after { content: ""; position: absolute; z-index: 1; inset-inline: 0; bottom: -1px; height: 12px; background: var(--paper);
  -webkit-mask: var(--tear) repeat-x bottom / 24px 12px; mask: var(--tear) repeat-x bottom / 24px 12px; transform: scaleY(-1); }
.hero-grid { width: min(1180px, 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.hero-version { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--on-forest-muted);
  padding: 4px 14px; border: 1px solid #ffffff22; border-radius: 999px; }
.hero-version .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px #3edcaa30; }
.hero-version .sep { width: 1px; height: 12px; background: #ffffff33; }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; line-height: 1.32; margin: 22px 0 18px; max-width: 13ch; text-wrap: balance; }
html[lang="en"] .hero h1 { line-height: 1.12; max-width: 15ch; letter-spacing: -0.02em; }
.lede { font-size: 18px; color: var(--on-forest-muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--on-forest-muted); }
.hero-facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: var(--mint); margin-inline-end: 9px; vertical-align: middle; }

.hero-stage { position: relative; z-index: 2; padding-bottom: 40px; }
.window { position: relative; border-radius: 14px; background: #0E1A17; border: 1px solid #ffffff1f; box-shadow: 0 40px 90px #0009; overflow: visible; }
.window img { border-radius: 0 0 13px 13px; }
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding-inline: 14px; border-bottom: 1px solid #ffffff14; font-size: 12px; color: #8FB0A6; direction: ltr; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff26; }
.window-bar span { margin-inline-start: auto; direction: rtl; }
.slot { position: absolute; inset-inline-end: 7%; bottom: -5px; width: 37%; height: 10px; border-radius: 6px; background: #020C0A; box-shadow: inset 0 2px 3px #000; }
.receipt-wrap { position: absolute; inset-inline-end: calc(7% + 1.5%); top: calc(100% - 46px); width: 34%; overflow: hidden; padding-bottom: 14px; }
.receipt { background: #FFFFFF; color: #111; padding: 14px 14px 22px; font-size: 12px; line-height: 1.7; box-shadow: 0 18px 30px #0006;
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 10px) no-repeat, var(--tear) repeat-x bottom / 16px 8px;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 10px) no-repeat, var(--tear) repeat-x bottom / 16px 8px;
  transform: translateY(-100%); animation: print 2.4s cubic-bezier(.3, .7, .2, 1) .5s forwards; }
@keyframes print { 0% { transform: translateY(-100%); } 70% { transform: translateY(-6%); } 100% { transform: translateY(0); } }
.receipt p { display: flex; justify-content: space-between; gap: 8px; }
.receipt .r-shop { justify-content: center; font-weight: 800; font-size: 14px; }
.receipt .r-meta { color: #555; font-size: 11px; }
.receipt .r-rule { border-top: 1px dashed #999; margin: 6px 0; }
.receipt .r-total { font-weight: 800; font-size: 13px; }
.receipt .r-pay, .receipt .r-rate { font-size: 10.5px; color: #444; }
.receipt .r-pay b { direction: ltr; font-weight: 500; }
.receipt .r-thanks { justify-content: center; margin-top: 8px; font-size: 11px; color: #555; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 76px; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2, .counter h2, .move h2, .download h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; text-wrap: balance; }
.section-head p { margin-top: 12px; font-size: 17px; color: var(--muted); }
.trades { padding: 100px 0 90px; }

.trade-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 28px; }
.trade-switch button { font: 600 14.5px/1.4 var(--font); color: var(--muted); background: none; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; }
.trade-switch button:hover { color: var(--ink); }
.trade-switch button[aria-selected="true"] { background: var(--forest); color: var(--on-forest); }
.trade-pane { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--sheet); box-shadow: 0 24px 60px #0c1a1614; }
.renamed { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
html[lang="en"] .install { list-style: decimal; }
.renamed b { display: block; font-size: 30px; font-weight: 800; color: var(--brand-deep); line-height: 1.5; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-inline-start: 30px; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 18px; height: 18px; border-radius: 6px; background: var(--brand-soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%2306614B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }

.features { padding: 30px 0 100px; }
.sheet { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--sheet); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 16px 16px 0 0; padding: 8px 8px 34px; }
.sheet::after { content: ""; position: absolute; inset-inline: -1px; bottom: -11px; height: 12px; background: var(--sheet);
  -webkit-mask: var(--tear) repeat-x top / 24px 12px; mask: var(--tear) repeat-x top / 24px 12px; filter: drop-shadow(0 1px 0 var(--line)); }
.sheet-col { padding: 26px 26px 6px; }
.sheet-col + .sheet-col { border-inline-start: 1px dashed var(--line); }
.sheet-col h3 { font-size: 13.5px; font-weight: 700; color: var(--brand); padding-bottom: 12px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.sheet dl { margin: 0; }
.sheet dt { font-weight: 700; font-size: 16.5px; margin-top: 16px; }
.sheet dd { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.showcase { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 90px; }
.showcase h3 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.showcase p { color: var(--muted); font-size: 16.5px; }

.band { position: relative; color: var(--on-forest); background: linear-gradient(160deg, var(--forest), var(--forest-2)); }
.band::before, .band::after { content: ""; position: absolute; inset-inline: 0; height: 12px; background: var(--paper); -webkit-mask: var(--tear) repeat-x top / 24px 12px; mask: var(--tear) repeat-x top / 24px 12px; }
.band::before { top: -1px; }
.band::after { bottom: -1px; transform: scaleY(-1); }
.counter { padding: 110px 0; }
.counter-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.counter-text p { margin-top: 16px; color: var(--on-forest-muted); font-size: 16.5px; }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 14px; border-radius: 999px; border: 1px solid #ffffff26; font-size: 14px; color: var(--on-forest-muted); }
.chips li.on { background: var(--mint); color: #04251D; border-color: transparent; font-weight: 700; }
.chips.plain li { border-color: var(--line); color: var(--ink); background: var(--sheet); }
.note { font-size: 13.5px !important; opacity: .85; }
.counter-art { position: relative; min-height: 430px; }
.card-shot { position: absolute; inset-inline-end: 0; top: 30px; width: 82%; border-radius: 14px; box-shadow: 0 30px 70px #0009; border: 1px solid #ffffff1a; }
.mini-receipt { position: absolute; inset-inline-start: 4%; top: 120px; width: 40%; background: #fff; padding: 6px; transform: rotate(-4deg); box-shadow: 0 24px 50px #0008;
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, var(--tear) repeat-x bottom / 14px 8px;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, var(--tear) repeat-x bottom / 14px 8px; }
html[dir="ltr"] .mini-receipt { transform: rotate(4deg); }
.mini-receipt img { max-height: 380px; width: 100%; object-fit: cover; object-position: top; }

.security { padding: 100px 0 80px; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; position: relative; }
.flow li { position: relative; padding: 0 0 0 28px; padding-inline: 0 28px; }
.flow li + li { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.flow .step { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--forest); color: var(--mint); font-weight: 800; font-size: 18px; margin-bottom: 16px; }
.flow h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.flow p { color: var(--muted); font-size: 15px; }
.aside { margin-top: 40px; padding: 16px 20px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 500; }

.move { padding: 40px 0 110px; }
.move-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.move p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }

.download { padding: 110px 0; }
.download-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.download .ver { margin: 10px 0 24px; color: var(--on-forest-muted); display: flex; gap: 14px; font-size: 15px; }
.download .ver b { color: var(--mint); }
.download .small { margin-top: 16px; font-size: 14px; color: var(--on-forest-muted); max-width: 48ch; }
.install { list-style: persian; margin: 24px 0 0; padding-inline-start: 22px; color: var(--on-forest-muted); font-size: 14.5px; display: grid; gap: 6px; }
.whatsnew { background: #ffffff0b; border: 1px solid #ffffff1c; border-radius: 16px; padding: 26px; }
.whatsnew h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.whatsnew .notes { white-space: pre-line; color: var(--on-forest-muted); font-size: 15px; }
.link { display: inline-block; margin-top: 18px; color: var(--mint); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

.foot { padding: 50px 0 40px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot nav a:hover { color: var(--ink); }
.foot p { margin-inline-start: auto; color: var(--muted); font-size: 13.5px; }

@media (max-width: 1020px) {
  .nav { display: none; }
  .top-actions { margin-inline-start: auto; }
  .hero-grid, .trade-pane, .showcase, .counter-grid, .move-grid, .download-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 44px 0 150px; }
  .hero-stage { margin-bottom: 170px; }
  .sheet { grid-template-columns: 1fr; }
  .sheet-col + .sheet-col { border-inline-start: 0; border-top: 1px dashed var(--line); }
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow li, .flow li + li { padding: 0; border: 0; }
  .counter-art { min-height: 380px; }
}
@media (max-width: 560px) {
  .top-actions .ghost-light { display: none; }
  .brand-text small { display: none; }
  .hero h1 { max-width: none; }
  .lede { font-size: 16.5px; }
  .hero-actions .btn { width: 100%; }
  .receipt-wrap { width: 48%; }
  .receipt { font-size: 9.5px; padding: 10px 10px 18px; }
  .trade-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .renamed b { font-size: 25px; }
}
