/* FoxyNet website: Persian, RTL, dark, phone first. Same tokens as the app
   (client/ui/style.css) and docs/branding/foxynet-brand.md:
   orange = the brand and what you do (buttons, links, focus);
   turquoise = only "works / good". The two never mix. */

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

:root {
  --bg: #0D1530;        /* شب */
  --surface: #16224A;   /* سطح */
  --raised: #1E2D5C;
  --line: #2A3A66;      /* خط */
  --text: #F4F6FB;
  --muted: #9AA6C4;
  --brand: #FF7A1A;     /* نارنجی روباه */
  --on-brand: #0D1530;  /* text on orange (6.9:1) */
  --good: #2EC4B6;      /* فیروزه‌ای: فقط وضعیت خوب */
  --warn: #F2B544;
  --bad: #F2878D;
  --cream: #FFF4E8;
  --brand-soft: rgba(255, 122, 26, 0.1);
  --good-soft: rgba(46, 196, 182, 0.14);
  --warn-soft: rgba(242, 181, 68, 0.14);
  --bad-soft: rgba(242, 135, 141, 0.14);

  --fs-s: 14px; --fs-b: 16px; --fs-m: 18px; --fs-l: 22px; --fs-xl: 28px;
  --r-ctl: 10px; --r-panel: 14px;
  --gutter: 16px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-b)/1.8 "Vazirmatn", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.45; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.mt-s { margin-top: 16px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace; letter-spacing: 0.04em; }
.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; }
.nowrap { white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 10; padding: 8px 14px; background: var(--brand); color: var(--on-brand); border-radius: var(--r-ctl); font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 20px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
}
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.btn--primary:hover { border-color: var(--text); background: #FF8A33; }
.btn--outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn--outline:hover { border-color: var(--brand); }
.btn--lg { min-height: 52px; padding: 10px 24px; font-size: var(--fs-m); }
.btn--block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-in {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo cta" "nav nav";
  align-items: center;
  column-gap: 12px;
  padding-top: 10px;
}
.logo { grid-area: logo; display: inline-flex; align-items: center; min-height: 48px; border-radius: 6px; }
.logo img { display: block; width: 107px; height: 40px; }
.btn--top { grid-area: cta; justify-self: end; min-height: 44px; padding: 6px 16px; font-size: var(--fs-s); }
.nav { grid-area: nav; display: flex; justify-content: space-between; margin-inline: -8px; }
.nav a {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 8px;
  color: var(--muted); font-weight: 500; text-decoration: none;
}
.nav a:hover { color: var(--text); }

/* ---------- sections ---------- */
.sec { padding-block: 56px; }
.sec--band { background: var(--surface); border-block: 1px solid var(--line); }
.sec--form { padding-block: 40px 64px; }
.sec-title { font-size: var(--fs-xl); margin-bottom: 20px; }
.page-title { font-size: var(--fs-xl); margin-bottom: 12px; }
.sub-title { font-size: var(--fs-m); margin: 32px 0 12px; }
.lead { color: var(--muted); font-size: var(--fs-m); max-width: 62ch; margin-bottom: 24px; }
.eyebrow { color: var(--muted); font-size: var(--fs-s); font-weight: 500; margin-bottom: 8px; }
.aside { margin-top: 24px; color: var(--muted); }

/* ---------- hero: the fox, once ---------- */
.hero { padding-block: 32px 56px; overflow: hidden; }
.hero-in { display: flex; flex-direction: column; gap: 24px; }
.hero-mark { order: -1; position: relative; width: 132px; height: 132px; }
.hero-mark::before {
  content: ""; position: absolute; inset: -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 122, 26, 0.16), rgba(255, 122, 26, 0) 70%);
}
.hero-mark img { position: relative; display: block; width: 100%; height: 100%; }
.hero-title { font-size: clamp(28px, 7.4vw, 50px); line-height: 1.35; margin-bottom: 16px; text-wrap: balance; }
.hero-sub { color: var(--muted); font-size: var(--fs-m); max-width: 52ch; margin-bottom: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark img { animation: arrive 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes arrive { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }

/* ---------- how it works ---------- */
.steps { list-style: none; display: grid; gap: 16px; }
.step { position: relative; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.step h3 { font-size: var(--fs-m); margin: 12px 0 4px; }
.step p { color: var(--muted); }
.step-n {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--brand); color: var(--brand);
  font-weight: 700; line-height: 1;
}
.note { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; font-weight: 500; }
.note .ico { color: var(--muted); margin-top: 4px; }

/* ---------- games ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg);
  font-weight: 500;
  line-height: 1.6;
}

/* ---------- pricing ---------- */
.plans { list-style: none; display: grid; gap: 16px; }
.plan {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.plan-name { font-size: var(--fs-l); }
.plan-price { color: var(--muted); }
.plan-price b { color: var(--text); font-size: 34px; line-height: 1.3; font-weight: 700; margin-inline-end: 4px; }
.plan-terms { font-weight: 500; }
.plan-extra { color: var(--muted); font-size: var(--fs-s); margin-bottom: 16px; }
.plan .btn { margin-top: auto; }
.fine { list-style: none; display: grid; gap: 10px; margin-top: 28px; }
.fine li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.fine .ico { margin-top: 4px; }

/* ---------- download ---------- */
.dl { display: grid; gap: 32px; }
.dl-main .btn { margin-bottom: 24px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0 0 20px; }
.facts dt { color: var(--muted); font-size: var(--fs-s); }
.facts dd { margin: 0; font-weight: 500; }
.facts--order { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); grid-template-columns: 1fr; }
.hash-v {
  display: block;
  margin-top: 6px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-ctl);
  font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  word-break: break-all;
  user-select: all;
  text-align: left;
}
.dl-notes { display: grid; gap: 16px; align-content: start; }
.card { padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-panel); }
.card h3 { font-size: var(--fs-m); margin-bottom: 6px; }
.card p { color: var(--muted); }
.mini-steps { margin-top: 10px; padding-inline-start: 24px; display: grid; gap: 4px; list-style: persian; }
.mini-steps b { color: var(--text); font-weight: 700; }
.card .mini-steps { color: var(--muted); }
.mini-steps + .btn { margin-top: 20px; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0;
  font-weight: 700; font-size: var(--fs-m); line-height: 1.5;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 10px; height: 10px;
  margin-top: -4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.faq details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 64ch; }

/* ---------- forms ---------- */
.form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label[for], .field > legend { font-weight: 700; padding: 0; }
.field > legend { margin-bottom: 8px; }
.input {
  font: inherit; font-size: var(--fs-m);
  width: 100%; min-height: 52px; padding: 8px 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  letter-spacing: 0.06em;
}
.input::placeholder { color: var(--muted); opacity: 0.7; }
.input:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 0; }
.input--code { text-transform: uppercase; font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.help { color: var(--muted); font-size: var(--fs-s); }
.field-err { color: var(--bad); font-size: var(--fs-s); font-weight: 500; }

.pick { gap: 10px; }
.pick-opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-panel);
  cursor: pointer;
}
.pick-opt:hover { border-color: var(--muted); }
.pick-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pick-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick-opt input { accent-color: var(--brand); width: 20px; height: 20px; margin: 0; flex: none; }
.pick-body { display: grid; flex: 1; min-width: 0; }
.pick-name { font-weight: 700; }
.pick-terms { color: var(--muted); font-size: var(--fs-s); }
.pick-price { white-space: nowrap; color: var(--muted); font-size: var(--fs-s); }
.pick-price b { color: var(--text); font-size: var(--fs-m); }

.notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.notice--err { border-color: var(--bad); background: var(--bad-soft); }

/* ---------- order ---------- */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 2px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: var(--fs-s); font-weight: 500;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--good { color: var(--good); border-color: var(--good); }
.status--warn { color: var(--warn); border-color: var(--warn); }
.status--bad { color: var(--bad); border-color: var(--bad); }
.codes { list-style: none; display: grid; gap: 12px; margin-bottom: 20px; }
.code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--brand); border-radius: var(--r-panel);
}
.code-v {
  font: 700 clamp(19px, 5.6vw, 28px)/1.4 ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  letter-spacing: 0.08em;
  color: var(--cream);
  user-select: all;
  min-width: 0;
}
.copy { flex: none; min-height: 44px; padding: 6px 14px; }
.copy.is-done { border-color: var(--good); color: var(--good); }
.wait { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--brand); }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 1.6s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: 0.3; } }

.contact { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.contact .ico { color: var(--brand); }

.msg { text-align: center; }
.msg .lead { margin-inline: auto; }
.msg .actions { justify-content: center; }
.msg-mark { display: block; width: 72px; height: 72px; margin: 0 auto 20px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 48px 40px; }
.foot-in { display: grid; gap: 32px; }
.foot-title { font-size: var(--fs-l); margin-bottom: 6px; }
.foot-meta { display: grid; gap: 6px; align-content: start; }
.foot-meta img { width: 40px; height: 40px; margin-bottom: 6px; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; --fs-xl: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(4, max-content); }
  .facts--order { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  :root { --fs-xl: 36px; }
  .top-in { grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav cta"; padding-block: 12px; }
  .logo img { width: 118px; height: 44px; }
  .nav { justify-content: flex-start; gap: 8px; margin-inline: 24px 0; }
  .nav a { padding: 0 12px; }
  .btn--top { min-height: 44px; font-size: var(--fs-b); }
  .sec { padding-block: 88px; }
  .hero { padding-block: 72px 40px; }
  .hero-in { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; }
  .hero-text { flex: 1 1 0; max-width: 640px; }
  .hero-mark { order: 0; width: 300px; height: 300px; flex: none; margin-inline-end: 24px; }
  .dl { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .foot-in { grid-template-columns: 1.4fr 1fr; }
}
