@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f8f2;
  --bg-alt: #edf1e6;
  --surface: #ffffff;
  --text: #0e1216;
  --muted: #5a6258;
  --line: #dde4d3;
  --accent: #96f20d;
  --on-accent: #0e1216;
  --accent-strong: #4a8c00;
  --accent-text: #3b7300;
  --grad-1: #2f6a00;
  --grad-2: #5fae00;
  --glow: rgba(150, 242, 13, .28);
  --chat-bg: #cfe0c8;
  --bubble: #ffffff;
  --bubble-text: #111;
  --link: #2a7fd4;
  --shadow: 0 24px 60px -24px rgba(14, 18, 22, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e10;
    --bg-alt: #101418;
    --surface: #151a1f;
    --text: #f1f5ee;
    --muted: #9aa49c;
    --line: #232b31;
    --accent-strong: #96f20d;
    --accent-text: #b4ff45;
    --grad-1: #d8ff85;
    --grad-2: #96f20d;
    --glow: rgba(150, 242, 13, .13);
    --chat-bg: #0f1a2b;
    --bubble: #1d2a3d;
    --bubble-text: #eef3f8;
    --link: #6ab3f3;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0e10;
  --bg-alt: #101418;
  --surface: #151a1f;
  --text: #f1f5ee;
  --muted: #9aa49c;
  --line: #232b31;
  --accent-strong: #96f20d;
  --accent-text: #b4ff45;
  --grad-1: #d8ff85;
  --grad-2: #96f20d;
  --glow: rgba(150, 242, 13, .13);
  --chat-bg: #0f1a2b;
  --bubble: #1d2a3d;
  --bubble-text: #eef3f8;
  --link: #6ab3f3;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
p { margin: 0; }
code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .9em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 .35em;
  direction: ltr;
  unicode-bidi: isolate;
}

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 32px); }

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .8em 1.5em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px -12px var(--accent-strong);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px var(--accent-strong); }
.btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.btn--small { padding: .45em 1.1em; font-size: .9rem; box-shadow: none; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border: 2px solid var(--accent-strong);
  padding: calc(.8em - 2px) calc(1.5em - 2px);
}
.btn--ghost:hover { box-shadow: none; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.i { width: 1.2em; height: 1.2em; }

/* --- header --- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.top__nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: .95rem; }
.theme-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-btn:hover { border-color: var(--accent-strong); }
.theme-btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.theme-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The button shows where a tap would take you. */
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.top__nav a { color: var(--muted); text-decoration: none; }
.top__nav a:hover { color: var(--text); }

/* --- hero --- */

.hero {
  position: relative;
  padding: 72px 0 96px;
  /* clip, not hidden: hidden would trap the sticky copy inside the hero. */
  overflow: clip;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
/* The phone runs taller than the copy once a real poster is in it: the copy
   starts at the top and stays in view while the phone scrolls past. */
.hero__copy { align-self: start; position: sticky; top: 112px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 22px;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .6);
  animation: pulse 2s infinite;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.01em; }
.grad {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { margin-top: 20px; color: var(--muted); font-size: 1.1rem; max-width: 34em; }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 32px; }
.cta__note { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.cta--center { justify-content: center; margin-top: 0; }
.fallback { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.fallback a { color: var(--accent-text); }

/* --- phone demo --- */

.hero__demo { position: relative; justify-self: center; width: min(360px, 100%); }
.phone {
  border-radius: 34px;
  padding: 10px;
  background: #0a0a14;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.phone__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 26px 26px 0 0;
  background: #17212b;
  color: #fff;
  line-height: 1.3;
}
.phone__bar img { border-radius: 50%; }
.phone__bar small { display: block; color: #8b9bab; font-size: .75rem; }
.chat {
  padding: 16px 12px 18px;
  border-radius: 0 0 26px 26px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .08), transparent 40%),
    var(--chat-bg);
  min-height: 420px;
}
.msg {
  background: var(--bubble);
  color: var(--bubble-text);
  border-radius: 14px 14px 14px 4px;
  overflow: hidden;
  font-size: .8rem;
  line-height: 1.7;
  animation: arrive .7s cubic-bezier(.2, .8, .2, 1) .3s both;
}
.msg__poster { width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; }
/* A real poster is shown whole, as Telegram does, whatever its shape. */
.msg__poster--real { aspect-ratio: auto; }
.msg__body { padding: 10px 12px 6px; }
.msg__body .gap { margin-top: .8em; }
.msg__body .link { color: var(--link); }
.msg__body time { display: block; text-align: left; font-size: .68rem; opacity: .55; }
.msg__btn {
  margin-top: 6px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .25);
  color: #fff;
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  animation: arrive .7s cubic-bezier(.2, .8, .2, 1) .5s both;
}
.toast {
  position: absolute;
  top: -48px;
  inset-inline: 0;
  margin-inline: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(290px, 92%);
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: .78rem;
  line-height: 1.5;
  animation: drop 5s ease-in-out 1.2s infinite;
  opacity: 0;
}
.toast img { border-radius: 8px; }

.demo-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
}
.demo-caption[hidden] { display: none; }
.demo-caption span {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .85rem;
}
.toast div { min-width: 0; }
.toast span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- channel --- */

.channel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  padding: 40px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 100%, var(--glow), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.channel__i {
  width: 64px;
  height: 64px;
  padding: 14px;
  border-radius: 18px;
  background: var(--accent);
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.channel p { margin-top: 12px; color: var(--muted); }
.channel .channel__vs { color: var(--text); font-weight: 600; }
.channel .cta { margin-top: 24px; }

/* --- sections --- */

.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.section__lead { color: var(--muted); margin-top: 10px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.card {
  padding: 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-strong); }
.card__i {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--accent);
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 16px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .95rem; }

.steps {
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: none;
}
.steps li { position: relative; padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.steps__n {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-strong);
  color: var(--accent-text);
  font-weight: 800;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .95rem; }

.plan {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
  padding: 44px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, var(--glow), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.plan p { margin-top: 14px; color: var(--muted); }
.plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plan__list li { display: flex; gap: 10px; align-items: baseline; }
.plan__list li::before { content: '✓'; color: var(--accent-text); font-weight: 800; }

details {
  margin-top: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 22px;
}
details:first-of-type { margin-top: 36px; }
summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent-text); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: 16px; }

.final { padding: 96px 0; text-align: center; }
.final__in { display: grid; justify-items: center; gap: 22px; }
.final img { border-radius: 16px; box-shadow: 0 16px 40px -14px var(--accent-strong); }

.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .85rem; }
.foot__in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* --- motion --- */

@keyframes arrive {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes drop {
  0%, 100% { opacity: 0; transform: translateY(-10px); }
  10%, 60% { opacity: 1; transform: none; }
  70% { opacity: 0; transform: translateY(-10px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .toast { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* --- narrow screens --- */

@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero__in { grid-template-columns: 1fr; gap: 64px; }
  .hero__copy { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 1fr; padding: 30px; }
  .top__nav { display: none; }
  .top__in .theme-btn { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .section, .final { padding: 64px 0; }
  /* The hero's own button is right below; the name needs the room. */
  .top .btn--small { display: none; }
  .plan { padding: 24px; }
  .channel { grid-template-columns: 1fr; padding: 24px; gap: 18px; }
}
