/* The topic pages' sheet (abshode.html and the pages after it): the home
   page's tokens, type and dark notch, kept in one file the pages share so a
   change here reaches them all. The home page keeps its own inline styles. */

@font-face { font-family: "Koochak"; src: url("../fonts/BonyadeKoodakKoochak-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-002B, U+002D, U+003B-065F, U+066A, U+066D-06EF, U+06FA-10FFFF; }
@font-face { font-family: "Koochak"; src: url("../fonts/BonyadeKoodakKoochak-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; unicode-range: U+0000-002B, U+002D, U+003B-065F, U+066A, U+066D-06EF, U+06FA-10FFFF; }
@font-face { font-family: "DanaFaNum"; src: url("../fonts/dana-fanum-medium.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "DanaFaNum"; src: url("../fonts/dana-fanum-demibold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "DanaFaNum"; src: url("../fonts/dana-fanum-black.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  --primary: #7f63f5;
  --primary-ink: #6147e3;
  --primary-deep: #4a33c4;
  --primary-50: #f5f2ff;
  --primary-100: #ebe6fe;
  --buy: #22b455;
  --buy-ink: #157f3b;
  --sell: #f2545b;
  --sell-ink: #c9323a;
  --ink: #171717;
  --ink-2: #4f5765;
  --ink-3: #646d7c;
  --page: #fafafa;
  --surface: #ffffff;
  --soft: #f5f6f8;
  --stroke: #eff0f4;
  --stroke-2: #e3e5ec;
  --gold-2: #fcd774;
  --gold-3: #eeb33f;
  --notch: #1d1a36;
  --r-card: 28px;
  --r-tile: 20px;
  --shadow-card: 0 1px 2px rgb(23 23 23 / 0.04), 0 18px 40px -26px rgb(74 51 196 / 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Koochak", "DanaFaNum", "IRANSans", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.95;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--primary-ink); }
img, svg { max-width: 100%; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.nums { font-family: "DanaFaNum", "Koochak", Tahoma, sans-serif; }
:focus-visible { outline: 3px solid rgb(127 99 245 / 0.55); outline-offset: 3px; border-radius: 10px; }

/* ---- the notch: the home page's dark shape, top centre ----------------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.notch {
  pointer-events: auto;
  display: flex; align-items: center; gap: clamp(12px, 3vw, 28px);
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 10px;
  background: var(--notch);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 18px 40px -26px rgb(29 26 54 / 0.55);
  max-width: calc(100% - 24px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; line-height: 1; padding-inline-start: 4px; }
.brand img { width: 34px; height: 34px; }
.notch nav { display: none; gap: 2px; }
.notch nav a { color: rgb(255 255 255 / 0.72); text-decoration: none; font-weight: 700; font-size: 0.92rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.notch nav a:hover, .notch nav a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / 0.08); }
@media (min-width: 900px) { .notch nav { display: flex; } }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #fff; border: 0;
  background: linear-gradient(226.94deg, #9a84f8 0%, var(--primary) 42%, var(--primary-deep) 100%);
  box-shadow: 0 14px 28px -14px rgb(97 71 227 / 0.75);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--stroke-2); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 0.92rem; }

/* ---- breadcrumb + hero ------------------------------------------------- */
.crumbs { margin-top: 22px; font-size: 0.86rem; color: var(--ink-3); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--stroke-2); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--primary-ink); }

.hero { padding-block: clamp(28px, 6vw, 64px) clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: var(--primary-50); color: var(--primary-ink);
  font-size: 0.85rem; font-weight: 700; line-height: 1.7;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--buy); flex: none; }
.hero h1 { margin-top: 16px; font-size: clamp(1.9rem, 1.1rem + 3vw, 3.1rem); font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--primary-ink); }
.answer { margin-top: 18px; max-width: 60ch; font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem); color: var(--ink-2); line-height: 2.05; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 560px) { .hero-ctas .btn { flex: 1 1 100%; } }
.facts { list-style: none; padding: 0; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: 0.92rem; font-weight: 700; }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--primary); }

/* a drawn picture beside the hero text (scripts/landing-art) */
.hero-art { display: grid; justify-items: center; gap: 6px; }
.hero-art img { width: min(100%, 400px); height: auto; filter: drop-shadow(0 30px 40px rgb(74 51 196 / 0.18)); }
@media (max-width: 959px) { .hero-art img { width: min(80%, 340px); } }

/* the order card: what a dealer actually sees, with demo figures */
.order {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: 20px; display: grid; gap: 14px;
}
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--buy-ink); background: rgb(34 180 85 / 0.1); padding: 2px 10px; border-radius: 999px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--buy); }
/* A row: the item across the top, then its buy and sell side by side. */
.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-radius: 16px; background: var(--soft); }
.rate-row > div { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rate-row b { font-weight: 800; }
.rate-row small { color: var(--ink-3); font-size: 0.78rem; line-height: 1.5; }
.px { display: grid; gap: 0; text-align: center; font-family: "DanaFaNum", sans-serif; font-weight: 700; font-size: 0.98rem; padding: 6px 10px; border-radius: 12px; }
.px::before { font-family: "Koochak", sans-serif; font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.px.buy::before { content: "خرید"; }
.px.sell::before { content: "فروش"; }
.px.buy { color: var(--buy-ink); background: rgb(34 180 85 / 0.1); }
.px.sell { color: var(--sell-ink); background: rgb(242 84 91 / 0.1); }
.ticket { border: 1px dashed var(--stroke-2); border-radius: 18px; padding: 12px 14px; font-size: 0.9rem; color: var(--ink-2); }
.ticket strong { color: var(--ink); }
.ticket-actions { display: flex; gap: 8px; margin-top: 10px; }
.ticket-actions span { flex: 1; text-align: center; padding: 6px; border-radius: 12px; font-weight: 800; font-size: 0.88rem; }
.ticket-actions .ok { background: var(--buy); color: #fff; }
.ticket-actions .no { background: var(--soft); color: var(--ink-2); }
.demo-note { font-size: 0.75rem; color: var(--ink-3); text-align: center; }

/* ---- sections ---------------------------------------------------------- */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section + .section { padding-top: 0; }
.head { max-width: 720px; display: grid; gap: 10px; margin-bottom: clamp(24px, 4vw, 40px); }
.head.center { margin-inline: auto; text-align: center; }
.kicker { font-size: 0.85rem; font-weight: 800; color: var(--primary-ink); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem); font-weight: 800; line-height: 1.5; }
.head p { color: var(--ink-2); }

.prose { max-width: 72ch; display: grid; gap: 14px; color: #2b2f36; }
.prose strong { color: var(--ink); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-tile); padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 1.08rem; font-weight: 800; line-height: 1.6; }
.card p { color: var(--ink-2); font-size: 0.95rem; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-ink); }
.ico svg { width: 22px; height: 22px; }

.steps { list-style: none; padding: 0; display: grid; gap: 14px; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-tile); padding: 20px; display: grid; gap: 6px; align-content: start; }
.steps li::before {
  content: counter(step, persian); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(226.94deg, #9a84f8, var(--primary-deep)); color: #fff; font-weight: 800;
}
.steps b { font-size: 1.02rem; }
.steps span { color: var(--ink-2); font-size: 0.95rem; }

.compare { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.compare > div { border-radius: var(--r-card); padding: 24px; display: grid; gap: 12px; align-content: start; }
.compare .before { background: var(--soft); border: 1px solid var(--stroke-2); }
.compare .after { background: linear-gradient(160deg, var(--primary-50), #fbfaff); border: 1px solid var(--primary-100); }
.compare h3 { font-size: 1.05rem; font-weight: 800; }
.compare ul { padding: 0; list-style: none; display: grid; gap: 10px; }
.compare li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; color: var(--ink-2); }
.compare li::before { font-weight: 900; line-height: 1.95; }
.compare .before li::before { content: "✕"; color: var(--sell-ink); }
.compare .after li::before { content: "✓"; color: var(--buy-ink); }

.note {
  border-radius: var(--r-tile); padding: 16px 18px; background: #fff8e6; border: 1px solid #f6e3ad; color: #6b4e0c; font-size: 0.95rem;
}
.note strong { color: #4a3505; }

/* FAQ: plain details, no script */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--stroke); border-radius: 18px; padding: 4px 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 12px 0; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary-ink); font-weight: 900; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 14px; color: var(--ink-2); }

.related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.related a {
  display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--ink);
}
.related a:hover { border-color: var(--primary-100); box-shadow: var(--shadow-card); }
.related b { font-weight: 800; }
.related span { color: var(--ink-3); font-size: 0.9rem; }

.cta-band {
  border-radius: 32px; padding: clamp(28px, 5vw, 52px); color: #fff; text-align: center;
  background: radial-gradient(120% 140% at 100% 0%, #9a84f8 0%, var(--primary) 38%, var(--primary-deep) 100%);
  display: grid; gap: 14px; justify-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgb(255 255 255 / 0.86); max-width: 56ch; }
.cta-band .btn { background: #fff; color: var(--primary-deep); box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
