/* ZedGate landing page. Same Telegram colours as the app (theme.css). The hero shows the real
   product: a customer's receipt that gets stamped "paid", and the merchant's bot message.
   Headlines use Lalezar, the face of the stamps; everything else is Estedad. */

:root {
  --font: "Estedad", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Lalezar", "Estedad", system-ui, sans-serif;
  --display-weight: 400;
  --bubble: #182533;
  --code-bg: #0b141d;
}
:root[data-theme="light"] { --bubble: #ffffff; --code-bg: #101b26; }
:root[lang="en"] { --font: -apple-system, system-ui, "Segoe UI", Roboto, "Estedad", sans-serif; }
:root[lang="ru"] { --font: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; --display: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; --display-weight: 800; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.display { font-family: var(--display); font-weight: var(--display-weight); line-height: 1.2; margin: 0; }
:root[lang="ru"] .display { letter-spacing: -0.01em; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--link);
  font-family: "Lalezar", system-ui, sans-serif; font-size: 18px; line-height: 1; padding-top: 3px;
  border: 2px solid currentColor; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3.5px currentColor; transform: rotate(-12deg);
}
.top-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav-docs { color: var(--subtle); }
.langs { display: flex; gap: 12px; font-size: 14px; }
.langs a { color: var(--hint); }
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--subtle); cursor: pointer; padding: 0; }
.theme-btn svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .theme-btn .i-moon, :root[data-theme="light"] .theme-btn .i-sun { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn.quiet { background: var(--surface); color: var(--link); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; padding-top: 44px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 72px); }
.hero h1 .line { display: block; }
:root[lang="en"] .hero h1, :root[lang="ru"] .hero h1 { font-size: clamp(38px, 5.2vw, 62px); }
:root[lang="en"] .hero h1 .line, :root[lang="ru"] .hero h1 .line { display: inline; }
:root[lang="en"] .hero h1 .line + .line::before, :root[lang="ru"] .hero h1 .line + .line::before { content: " "; }
.hero .lede { font-size: 18px; color: var(--subtle); max-width: 32em; margin: 22px 0 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--subtle); font-size: 14.5px; }
.facts li { display: inline-flex; align-items: center; gap: 7px; }
.facts svg { width: 18px; height: 18px; color: var(--ok); flex-shrink: 0; }

.hero-art { position: relative; padding-bottom: 104px; }  /* the bot message hangs just below the receipt */
.receipt {
  position: relative; max-width: 380px; margin-inline-start: auto; padding: 22px 22px 24px; border-radius: 20px;
  background: var(--surface); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .55);
}
.r-top { display: flex; justify-content: space-between; font-weight: 700; }
.r-shop { display: inline-flex; align-items: center; gap: 5px; }
.vmark { display: inline-flex; color: var(--link); }
.vtick { width: 18px; height: 18px; }
.r-item { margin: 10px 0 0; color: var(--subtle); font-size: 14.5px; }
.r-price { font-weight: 800; font-size: 34px; line-height: 1.3; }
.perf {
  position: relative; height: 22px; margin: 14px -22px 10px;
  background: radial-gradient(circle, var(--track) 1.5px, transparent 2px) center / 12px 22px repeat-x;
}
.perf::before, .perf::after { content: ""; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); }
.perf::before { left: -11px; }
.perf::after { right: -11px; }
.r-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--field); font-size: 13px; font-weight: 700; color: var(--subtle); }
.r-tabs span { flex: 1; text-align: center; padding: 6px 2px; border-radius: 9px; white-space: nowrap; }
.r-tabs .on { background: var(--accent-wash); color: var(--link); }
.r-crypto { margin-top: 16px; text-align: center; font-weight: 800; font-size: 30px; }
.r-crypto .ref { color: var(--link); background: var(--accent-wash); border-radius: 6px; padding: 0 3px; margin-inline-start: 1px; }
.r-crypto small { font-size: 16px; font-weight: 600; color: var(--subtle); }
.r-btn { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); text-align: center; font-weight: 700; font-size: 15px; }
.r-stamp { position: absolute; top: 12px; inset-inline-end: 12px; width: 118px; height: 118px; pointer-events: none; }

.tg-bubble {
  position: absolute; bottom: 0; inset-inline-end: 52%; width: min(300px, 78%); padding: 10px 14px 8px;
  background: var(--bubble); border-radius: 18px 18px 18px 6px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5);
}
:root[dir="rtl"] .tg-bubble { border-radius: 18px 18px 6px 18px; }
.tg-name { display: block; color: var(--link); font-weight: 700; font-size: 14px; }
.tg-bubble p { margin: 2px 0 0; font-size: 15px; line-height: 1.6; }
.tg-bubble p span { display: block; }
.tg-time { display: block; text-align: end; font-size: 12px; color: var(--hint); }

/* ---------- sections ---------- */
.sec { padding-top: 92px; }
.sec-head { max-width: 660px; }
.sec h2 { font-size: clamp(32px, 4.2vw, 46px); }
.sec .lede { color: var(--subtle); font-size: 17px; margin: 14px 0 0; max-width: 36em; }

/* money path: the money row never touches ZedGate */
.flow { margin-top: 36px; padding: 28px; border-radius: 22px; background: var(--surface); display: grid; gap: 28px; }
.flow-row { display: grid; grid-template-columns: 112px minmax(120px, 1fr) minmax(90px, 1.3fr) minmax(120px, 1fr); align-items: center; gap: 16px; }
.row-label { font-size: 13.5px; font-weight: 700; color: var(--hint); }
.node { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 16px; background: var(--field); text-align: center; }
.node svg { width: 28px; height: 28px; color: var(--subtle); }
.node b { font-size: 15.5px; line-height: 1.4; }
.node small { font-size: 12.5px; line-height: 1.5; color: var(--hint); }
.money .node.strong { background: var(--ok-wash); }
.money .node.strong svg { color: var(--ok); }
.edge { position: relative; height: 2px; color: var(--ok); background: currentColor; }
.info .edge { color: var(--link); background: repeating-linear-gradient(90deg, currentColor 0 8px, transparent 8px 14px); }
.edge::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: 0; width: 9px; height: 9px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg);
}
:root[dir="rtl"] .edge::after { transform: translateY(-50%) rotate(-135deg); }
.edge span { position: absolute; bottom: 10px; inset-inline: 0; text-align: center; font-size: 13.5px; font-weight: 700; white-space: nowrap; }

/* fee calculator */
.calc { margin-top: 32px; max-width: 760px; padding: 26px 28px; border-radius: 22px; background: var(--surface); }
.calc-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--subtle); font-weight: 600; }
.calc-amount output { font-family: var(--display); font-weight: var(--display-weight); font-size: 44px; line-height: 1.2; color: var(--text); }
#calc-range { width: 100%; appearance: none; height: 6px; margin: 12px 0 4px; border-radius: 99px; outline: none; background: linear-gradient(to left, var(--accent) var(--fill, 4%), var(--track) var(--fill, 4%)); }
:root[dir="ltr"] #calc-range { background: linear-gradient(to right, var(--accent) var(--fill, 4%), var(--track) var(--fill, 4%)); }
#calc-range::-webkit-slider-thumb { appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); cursor: pointer; }
#calc-range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); cursor: pointer; }
.calc-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sep); }
.calc-label b { display: block; font-size: 15.5px; }
.calc-label span { font-size: 13.5px; color: var(--hint); }
.calc-val { font-size: 26px; font-weight: 800; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--field); overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--ok); transition: width .15s ease; }
.theirs .bar i { background: var(--danger); }
.theirs .calc-val { color: var(--danger); }
.calc-note { margin: 18px 0 0; font-size: 14px; color: var(--hint); }

/* what you get: a ruled list, not a grid of identical cards */
.feats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.feats li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 22px 0; border-top: 1px solid var(--sep); }
.feats svg { width: 26px; height: 26px; color: var(--link); margin-top: 3px; }
.feats b { font-size: 17.5px; }
.feats p { margin: 4px 0 0; color: var(--subtle); font-size: 15px; }

/* three steps on one dashed rail */
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { position: relative; }
.steps li::before { content: ""; position: absolute; top: 30px; inset-inline: 0; border-top: 2px dashed var(--track); }
.steps .num {
  position: relative; display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 16px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--link); color: var(--link); font-size: 30px; line-height: 1; padding-top: 4px;
}
:root[lang="ru"] .steps .num { padding-top: 0; }
.steps b { display: block; font-size: 18px; }
.steps p { margin: 6px 0 0; color: var(--subtle); font-size: 15px; max-width: 26em; }

/* developers */
.dev { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: center; }
.dev .btn { margin-top: 24px; }
.code {
  margin: 0; padding: 22px 24px; overflow: auto; border-radius: 20px; background: var(--code-bg); color: #d4e1ee;
  font: 13.5px/1.75 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: left; white-space: pre;
}
.c-cmd { color: #ffd479; }
.c-str { color: #8fd6a8; }
.c-key { color: #79b8f3; }
.c-com { color: #6f8498; }

/* faq */
.faq { margin-top: 26px; max-width: 780px; }
.faq details { border-top: 1px solid var(--sep); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--sep); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--link); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: var(--subtle); max-width: 40em; }

/* closing */
.end { padding-top: 110px; padding-bottom: 80px; text-align: center; }
.end-stamp { display: flex; justify-content: center; height: 128px; margin-bottom: 14px; }
.end h2 { font-size: clamp(34px, 5vw, 54px); }
.end p { max-width: 30em; margin: 12px auto 28px; color: var(--subtle); font-size: 17px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--sep); color: var(--hint); font-size: 14px; }
.foot p { margin: 0; }
.foot b { color: var(--subtle); }
.foot nav { display: flex; gap: 18px; }

/* stamps (stamp.js) */
.stamp { display: block; transform: rotate(var(--rot, -13deg)); }
.stamp.green { color: var(--ok); }
.stamp.accent { color: var(--link); }
:root[data-theme="light"] .stamp { mix-blend-mode: multiply; }
.press { animation: press .55s cubic-bezier(.2, .9, .25, 1.25) both; }
@keyframes press {
  0% { transform: scale(2.1) rotate(-34deg); opacity: 0; }
  55% { transform: scale(.92) rotate(-11deg); opacity: 1; }
  100% { transform: scale(1) rotate(var(--rot, -13deg)); opacity: 1; }
}
.receipt.thud { animation: thud .35s ease-out .32s; }
@keyframes thud { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(4px); } }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .receipt { margin-inline: auto; }
  .tg-bubble { inset-inline-end: auto; inset-inline-start: 0; }
  .feats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 60px 1fr; gap: 0 18px; padding-bottom: 26px; }
  .steps li::before { top: 60px; bottom: 0; inset-inline: 29px auto; border-top: 0; border-inline-start: 2px dashed var(--track); }
  .steps li:last-child::before { display: none; }
  .steps .num { grid-row: span 2; margin: 0; }
  .steps b { align-self: end; }
  .dev { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .nav-docs { display: none; }
  .top-nav { gap: 12px; }
  .hero h1 { font-size: 40px; }
  .hero .lede { font-size: 16.5px; }
  .cta-row .btn { flex: 1 1 100%; }
  .sec { padding-top: 72px; }
  .flow { padding: 18px 14px; gap: 22px; }
  .flow-row { grid-template-columns: 1fr minmax(64px, .9fr) 1fr; gap: 10px; }
  .row-label { grid-column: 1 / -1; }
  .node { padding: 12px 6px; }
  .node b { font-size: 14px; }
  .edge span { font-size: 12px; white-space: normal; line-height: 1.3; }
  .calc { padding: 20px 18px; }
  .calc-amount output { font-size: 36px; }
  .code { font-size: 12px; padding: 18px; }
}
@media (max-width: 380px) {
  .top .btn.sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .press, .receipt.thud { animation: none; }
  .bar i { transition: none; }
}
