@font-face {
  font-family: Vazirmatn;
  src: url("assets/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0e17;
  --panel: #101725;
  --ink: #f2f6fc;
  --muted: #a5b2c7;
  --accent: #72e8ef;
  --line: #263247;
  --shell: 1136px;
  --gutter: clamp(20px, 5vw, 44px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse min(800px, 75vw) 520px at 50% 365px, #112539 0%, transparent 88%),
    var(--bg);
  color: var(--ink);
  font: 400 1rem/1.85 Vazirmatn, Tahoma, Arial, sans-serif;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.42; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-inline-size: 100%; }
[dir="ltr"], bdi { unicode-bidi: isolate; }
.sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.icon { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87em; }
.shell { width: min(var(--shell), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: fixed; z-index: 5; inset: .75rem .75rem auto auto; transform: translateY(-150%); background: var(--accent); color: var(--bg); padding: .5rem 1rem; border-radius: .5rem; }
.skip:focus { transform: none; }
section[id] { scroll-margin-top: 34px; }

.site-header { border-bottom: 1px solid #1c293a; background: #0a0e17b3; }
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 75px; gap: 22px; }
.nav > .button { justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 7px; justify-self: start; font: 700 1.19rem/1.2 system-ui, sans-serif; letter-spacing: -.04em; }
.brand img { flex: none; }
nav { display: flex; gap: clamp(22px, 3.2vw, 43px); align-items: center; }
nav a, .footer a:not(.brand) { color: var(--muted); font-size: .9375rem; }
nav a:hover, .footer a:hover { color: var(--ink); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-height: 49px;
  padding: 8px 23px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 690;
  font-size: .9375rem;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button-small { min-height: 39px; padding-inline: 16px; font-size: .875rem; }
.button-primary { background: var(--accent); color: #071d27; box-shadow: 0 6px 28px #53e8f129; }
.button-primary:hover { background: #a1f6f8; box-shadow: 0 8px 30px #53e8f147; }
.button-outline { border-color: #324159; background: #101927; }
.button-outline:hover { border-color: #6697a6; background: #192b3b; }

.hero { padding-block: 56px 0; }
.hero-copy { text-align: center; }
.hero h1 { font-weight: 875; font-size: clamp(2.7rem, 6.1vw, 5.45rem); line-height: 1.14; letter-spacing: -.055em; }
.hero h1 span { color: var(--accent); }
.hero-copy > p { max-width: 36rem; margin: 18px auto 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.17rem); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

.demo {
  position: relative;
  isolation: isolate;
  margin: 38px auto 0;
  max-width: 1000px;
  overflow: hidden;
  border: 1px solid #34475e;
  border-radius: 20px;
  background: #0c1423;
  box-shadow: 0 27px 80px #0007, inset 0 1px #ffffff12;
}
.demo-top, .demo-bottom { position: relative; z-index: 1; display: flex; gap: 14px; align-items: center; padding-inline: 24px; }
.demo-top { min-height: 55px; justify-content: space-between; border-bottom: 1px solid #26374a; background: #111b2b; }
.demo-top h2 { display: flex; align-items: center; gap: 9px; font-size: .95rem; font-weight: 675; }
.demo-tag { color: var(--muted); font-size: .875rem; }

.diagram {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(26px, .39fr) minmax(130px, .7fr) minmax(26px, .39fr) minmax(0, 1fr);
  align-items: center;
  padding: 30px clamp(20px, 5vw, 54px);
  min-height: 217px;
  background:
    radial-gradient(ellipse 290px 150px at 50% 55%, #167eb231, transparent 85%),
    radial-gradient(circle, #46608365 .8px, transparent 1px) center/17px 17px;
}
.node {
  position: relative;
  min-width: 0;
  align-self: center;
  min-height: 104px;
  border: 1px solid #2e4058;
  border-radius: 13px;
  background: #131e30;
  box-shadow: 0 12px 28px #0003;
}
.node-heading { display: flex; align-items: center; gap: 10px; padding: 17px 13px; }
.node-heading > div { min-width: 0; }
.node-label { display: block; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.node-value { display: block; width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; margin-top: 5px; font-size: .85rem; }
.glyph { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid #33556a; border-radius: 10px; background: #162d3e; color: var(--accent); }
.node-chat .node-heading { padding-block-end: 9px; }
.receipt { display: inline-block; line-height: 1.4; margin: 0 13px 13px; padding: 2px 8px; color: #a4eee7; border-radius: 5px; background: #1e3a40; font-size: .78rem; }
.node-app {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 8px 12px;
  min-height: 148px;
  border-color: #44889e;
  background: linear-gradient(150deg,#172e47,#101d2f 78%);
  box-shadow: 0 0 28px #58d5ef20, inset 0 1px #ffffff19;
}
.node-app img { margin-bottom: 1px; }
.node-app strong { font: 700 .95rem/1.25 system-ui, sans-serif; }
.node-app span { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.route-line { position: relative; height: 1px; background: linear-gradient(90deg, #356b8f, #68daeb 54%, #356b8f); }
.route-line i { display: block; position: absolute; inset-inline-start: calc(50% - 3px); inset-block-start: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: #9af5f6; box-shadow: 0 0 13px #63edfa; }
.demo[data-mode="schedule"] .route-line i { inset-inline-start: 24%; }
.demo[data-mode="chat"] .route-line i { inset-inline-start: 72%; }
.demo-bottom { justify-content: space-between; flex-wrap: wrap; border-top: 1px solid #26374a; padding-block: 13px; background: #111b2b; }
.mode-switch { display: flex; align-items: stretch; padding: 3px; gap: 2px; border: 1px solid #2b3a50; border-radius: 9px; background: #0e1726; }
.mode-switch button { min-height: 34px; background: transparent; border: 1px solid transparent; color: var(--muted); padding: 3px 12px; border-radius: 6px; font-size: .875rem; font-weight: 570; cursor: pointer; white-space: nowrap; }
.mode-switch button:hover { color: var(--ink); }
.mode-switch button[aria-pressed="true"] { border-color: #3a6077; background: #1b3547; color: #aef5f7; }
.demo-bottom p { color: var(--muted); font-size: .875rem; }
.demo-bottom bdi { color: var(--ink); }

.section { margin-top: 99px; }
.section-heading { margin-bottom: 25px; }
.section-label { color: var(--accent); font-size: .9375rem; font-weight: 650; margin-bottom: 8px; }
.section-heading h2 { font-size: clamp(1.85rem, 4.1vw, 3.36rem); letter-spacing: -.045em; font-weight: 790; text-wrap: balance; }
.section-heading > p:not(.section-label) { max-width: 23rem; margin-top: 14px; color: var(--muted); }
.how, .faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 7vw, 110px); align-items: start; }
.how { padding-block: 46px 3px; border-top: 1px solid var(--line); }
.how-heading h2 { text-wrap: initial; }
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: flex-start; gap: 16px; border-block-end: 1px solid var(--line); padding: 0 0 21px; margin-bottom: 22px; }
.steps li:last-child { padding-block-end: 0; margin-block-end: 0; border: 0; }
.step-no { color: var(--accent); border: 1px solid #30455d; background: #121d2a; border-radius: 8px; display: grid; place-items: center; font-size: .93rem; flex: none; width: 40px; height: 40px; }
.steps h3, .feature h3 { font-size: 1.24rem; font-weight: 710; }
.steps p, .feature p, .download p, .questions p { color: var(--muted); margin-top: 6px; }
.steps a, .questions a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.features, .downloads { display: grid; gap: 14px; }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature, .download { border: 1px solid var(--line); border-radius: 15px; padding: 24px; background: linear-gradient(145deg, #141f2f, #101725 70%); }
.feature-icon { margin-block-end: 17px; }
.feature-notes { margin-top: 19px; display: flex; flex-wrap: wrap; gap: 7px; }
.feature-notes span { background: #0e1726; border: 1px solid #2b3b51; border-radius: 6px; color: #c3d4e7; padding: 3px 9px; font-size: .875rem; }
.protocols { justify-content: flex-end; }
.protocols span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.download-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.release-link { display: inline-block; color: var(--accent); border: 1px solid #345367; padding: 3px 10px; border-radius: 6px; margin-bottom: 4px; }
.release-link:hover { background: #1c3847; }
.downloads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.download { display: flex; flex-direction: column; align-items: flex-start; }
.download h3 { font: 720 1.55rem/1.3 system-ui, sans-serif; letter-spacing: -.035em; margin-top: 13px; }
.download p { min-height: 3.6em; margin-bottom: 17px; }
.download-button { align-self: stretch; margin-top: auto; }

.faq { padding-bottom: 52px; }
.questions { border-block-start: 1px solid var(--line); }
.questions details { border-block-end: 1px solid var(--line); }
.questions summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 15px; font-weight: 640; cursor: pointer; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; color: var(--accent); font: 400 1.35rem/1 system-ui; flex: none; }
.questions details[open] summary::after { content: "−"; }
.questions p { margin: 0 0 17px; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-block: 19px 29px; }
.footer > div { display: flex; flex-wrap: wrap; align-items: center; column-gap: 22px; row-gap: 5px; }

@media (max-width: 850px) {
  .hero { padding-top: 57px; }
  .section { margin-top: 75px; }
  .demo-bottom { justify-content: flex-start; gap: 9px 14px; }
  .node-heading { gap: 7px; }
  .node-heading .glyph { width: 33px; height: 33px; }
  .node-heading .icon { width: 18px; height: 18px; }
  .how, .faq { gap: 32px; }
}

@media (max-width: 640px) {
  .nav { grid-template-columns: 1fr auto; min-height: 63px; gap: 8px; }
  .nav nav { display: none; }
  .hero { padding-top: 48px; }
  .hero-copy > p { margin-top: 17px; }
  .hero-actions { margin-top: 21px; }
  .hero-actions .button { padding-inline: 14px; }
  .demo { margin-top: 35px; border-radius: 15px; }
  .demo-top, .demo-bottom { padding-inline: 13px; }
  .diagram { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 15px 24px; justify-items: center; }
  .node { width: min(100%, 275px); min-height: 0; }
  .node-heading { padding: 10px 11px; }
  .node-app { min-height: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 8px; text-align: start; padding: 7px 10px; }
  .node-app img { grid-row: span 2; width: 46px; height: 46px; }
  .node-app strong { justify-self: start; align-self: end; }
  .node-app span { margin: 1px 0 0; }
  .node-chat .node-heading { padding-block-end: 7px; }
  .receipt { margin-block-end: 9px; }
  .route-line { height: 17px; width: 1px; background: linear-gradient(#356b8f, #68daeb 54%, #356b8f); }
  .diagram .route-line i { inset-inline-start: -2.5px; inset-block-start: calc(50% - 3px); }
  .demo-bottom { min-height: 102px; align-content: center; }
  .mode-switch { width: 100%; }
  .mode-switch button { flex: 1; padding-inline: 4px; }
  .demo-bottom p { min-height: 2.8em; align-content: center; }
  .section { margin-top: 65px; }
  .how, .faq { grid-template-columns: 1fr; gap: 16px; }
  .section-heading { margin-bottom: 18px; }
  .how .section-heading, .faq .section-heading { margin-bottom: 0; }
  .how { padding-top: 34px; }
  .how-heading h2 br { display: none; }
  .features, .downloads { grid-template-columns: 1fr; }
  .feature, .download { padding: 20px; }
  .download p { min-height: 0; }
  .download-button { width: 100%; }
  .faq { padding-bottom: 36px; }
  .footer { align-items: flex-start; }
  .footer > div { flex-direction: column; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
