/* ===== Variables & reset ===== */
:root {
  --bg: #0b1120;
  --bg-2: #0f172a;
  --surface: #131c33;
  --surface-2: #1a2440;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eaf0ff;
  --text-dim: #9aa7c7;
  --accent: #2aabee;       /* telegram blue */
  --accent-2: #7c5cff;     /* violet */
  --accent-3: #22d3ee;     /* cyan */
  --grad: linear-gradient(135deg, #2aabee 0%, #7c5cff 100%);
  --grad-soft: linear-gradient(135deg, rgba(42,171,238,.18), rgba(124,92,255,.18));
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 20px 50px -20px rgba(42, 171, 238, 0.35);
  --maxw: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
b { color: #fff; font-weight: 700; }

code {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  background: rgba(124, 92, 255, 0.15);
  color: #c9d6ff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }

.accent { color: var(--accent); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Background glow ===== */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 75% -5%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(700px 500px at 10% 10%, rgba(42, 171, 238, 0.18), transparent 55%),
    radial-gradient(500px 500px at 90% 90%, rgba(34, 211, 238, 0.10), transparent 60%);
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  padding: 14px 26px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .2s ease;
  white-space: nowrap;
}
/* Animated shine sweeping across the button on hover */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 70%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.5) 50%, transparent 100%);
  transform: skewX(-22deg);
  pointer-events: none;
  z-index: 2;
  transition: left .6s cubic-bezier(.2,.7,.2,1);
}
.btn:hover::after { left: 140%; }
.btn__icon { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.btn:hover .btn__icon { transform: translateX(2px) rotate(-8deg) scale(1.08); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { box-shadow: 0 24px 60px -18px rgba(124, 92, 255, 0.6); transform: translateY(-3px) scale(1.02); }
.btn--ghost { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: #fff; box-shadow: 0 20px 50px -20px rgba(34, 197, 94, .45); }
.btn--ghost:hover { box-shadow: 0 24px 60px -18px rgba(34, 197, 94, .6); transform: translateY(-3px) scale(1.02); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 17px; }
.btn--store { background: var(--surface-2); border: 1px solid var(--border); color: #fff; margin-top: 14px; white-space: normal; text-align: center; max-width: 100%; }
.btn--store:hover { background: #223054; transform: translateY(-2px); }
.btn--bot { margin-top: 22px; width: 100%; }

/* Pulsing glow on the main call-to-action buttons */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 16px 44px -18px rgba(42, 171, 238, .5); }
  50%      { box-shadow: 0 20px 64px -14px rgba(124, 92, 255, .75); }
}
.btn--primary.btn--lg { animation: pulseGlow 2.8s ease-in-out infinite; }
.btn--primary.btn--lg:hover { animation-play-state: paused; }

/* ===== Inline PNG icons ===== */
.btn__icon, .badge__icon, .btn img, .tab img, .config-note img, .footer__bot img {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.logo__mark { width: 26px; height: 26px; }
.badge__icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
.config-note img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.tab img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px; }
.footer__bot { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.footer__bot:hover { color: var(--accent); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 22px; }
.logo__mark { filter: drop-shadow(0 0 10px rgba(42,171,238,.7)); }
.nav { display: flex; gap: 30px; font-weight: 500; color: var(--text-dim); }
.nav a:hover { color: #fff; }

/* ===== Hero ===== */
.hero { padding: 90px 0 70px; text-align: center; }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: #cdd9ff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 28px;
}
/* Live "active" indicator dot */
.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, .9);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .badge__dot { animation: none; }
}
.hero__title { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; font-weight: 900; letter-spacing: -1.5px; }
.hero__subtitle { max-width: 640px; margin: 26px auto 0; color: var(--text-dim); font-size: 19px; }
.hero__actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.hero__stats { display: flex; gap: 50px; margin-top: 60px; flex-wrap: wrap; justify-content: center; }
.stat__num { font-size: 30px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { color: var(--text-dim); font-size: 14px; }

/* ===== Sections ===== */
.section { padding: 70px 0; }
.section__title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; text-align: center; letter-spacing: -1px; }
.section__title--left { text-align: left; }
.section__lead { text-align: center; color: var(--text-dim); font-size: 18px; margin: 14px auto 0; max-width: 560px; }
.section__lead--left { text-align: left; margin-left: 0; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(42,171,238,.4); box-shadow: var(--shadow); }
.card__icon { margin-bottom: 14px; line-height: 0; }
.card__icon img { width: 46px; height: 46px; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.card:hover .card__icon img { transform: scale(1.12) rotate(-5deg); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 15px; }

/* ===== Config box ===== */
.config-box {
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow);
}
.config-box__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.config-box__chip {
  font-size: 13px; font-weight: 700; color: #4ade80;
  background: rgba(74, 222, 128, .12); border: 1px solid rgba(74,222,128,.3);
  padding: 6px 14px; border-radius: 999px;
}
.config-field { display: flex; gap: 12px; margin-top: 26px; align-items: stretch; flex-wrap: wrap; }
.config-field code {
  flex: 1; min-width: 240px;
  background: #0a0f1e; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  font-size: 13px; color: #9fd0ff; overflow-x: auto; white-space: nowrap;
  display: flex; align-items: center;
}
.btn--copy { flex-shrink: 0; }
.config-note { margin-top: 20px; color: var(--text-dim); font-size: 15px; }
.config-note a { color: var(--accent); font-weight: 600; }
.config-note a:hover { text-decoration: underline; }
.config-trial { margin-top: 22px; font-size: 18px; color: var(--text); }
.config-warn {
  margin-top: 10px; font-size: 15px; font-weight: 700; color: #ff6b6b;
  display: flex; align-items: center; gap: 8px;
}

/* ===== Modal (trial config) ===== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__overlay { position: absolute; inset: 0; background: rgba(5, 8, 18, .72); backdrop-filter: blur(6px); }
.modal__card {
  position: relative; z-index: 1;
  width: min(580px, 100%); max-height: 90vh; overflow-y: auto;
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
  transform: translateY(16px) scale(.97);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
.modal.is-open .modal__card { transform: none; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
  color: var(--text-dim); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.modal__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.modal__chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: #4ade80;
  background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .3);
  padding: 5px 12px; border-radius: 999px;
}
.modal__dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, .9);
  animation: dotBlink 1.2s ease-in-out infinite;
}
@keyframes dotBlink {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(74, 222, 128, .65); }
  50%      { opacity: .3;  box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .modal__dot { animation: none; }
}
.modal__title { font-size: 24px; font-weight: 900; margin-top: 14px; letter-spacing: -.5px; }
.modal__sub { color: var(--text-dim); font-size: 15px; margin-top: 8px; }
.modal__card .config-field { margin-top: 22px; }
.modal__qr { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 20px; }
.modal__qr-img { background: #fff; padding: 12px; border-radius: 16px; line-height: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.modal__qr-img img { display: block; width: 180px; height: 180px; }
.modal__qr-cap { color: var(--text-dim); font-size: 13px; }
.modal__guide { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 18px; }
.modal__guide h4 { font-size: 16px; margin-bottom: 12px; }
.modal__guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.modal__guide-h {
  display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700;
  color: var(--accent-3); text-transform: uppercase; letter-spacing: .4px;
}
.modal__guide-col ol { margin: 0; padding-left: 17px; color: var(--text-dim); font-size: 13.5px; line-height: 1.35; }
.modal__guide-col li { margin-bottom: 3px; }
.modal__guide-col li::marker { color: var(--accent); font-weight: 700; }
@media (max-width: 560px) {
  .modal__card { padding: 26px 20px; }
  .modal__guide-cols { grid-template-columns: 1fr; gap: 14px; }
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 44px auto 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}
.tab {
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 16px; color: var(--text-dim);
  background: transparent; padding: 12px 26px; border-radius: 999px;
  transition: all .2s ease;
}
.tab--active { background: var(--grad); color: #fff; box-shadow: var(--shadow); }

/* ===== Steps ===== */
.steps { display: none; max-width: 760px; margin: 44px auto 0; flex-direction: column; gap: 18px; }
.steps--active { display: flex; }
.step {
  display: flex; gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.step:hover { border-color: rgba(124,92,255,.4); transform: translateX(4px); }
.step__num {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-weight: 900; font-size: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.step__body { min-width: 0; }
.step__body h3 { font-size: 19px; margin-bottom: 6px; }
.step__body p { color: var(--text-dim); font-size: 16px; }

/* ===== FAQ ===== */
.faq { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 24px;
}
.faq__item summary {
  cursor: pointer; font-weight: 700; font-size: 17px;
  padding: 18px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; font-size: 24px; color: var(--accent); font-weight: 400; transition: transform .28s cubic-bezier(.22,.61,.36,1); }
.faq__item.is-open summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--text-dim); padding: 0 0 20px; font-size: 16px; }
/* Smooth open/close via grid-rows — no JS height measurement, no layout-thrash freeze */
.faq__reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s cubic-bezier(.22,.61,.36,1); }
.faq__reveal > * { overflow: hidden; min-height: 0; }
.faq__item.is-open .faq__reveal { grid-template-rows: 1fr; }
@media (prefers-reduced-motion: reduce) {
  .faq__reveal { transition: none; }
}
.faq__item a { color: var(--accent); }

/* ===== CTA ===== */
.cta { padding: 30px 0 90px; }
.cta__inner {
  text-align: center;
  background: var(--grad);
  border-radius: 28px;
  padding: 60px 30px;
  box-shadow: 0 30px 70px -25px rgba(124, 92, 255, 0.7);
}
.cta__inner h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; }
.cta__inner p { margin: 14px auto 30px; max-width: 480px; font-size: 18px; opacity: .95; }
.cta__inner .btn--primary { background: #fff; color: #1a2440; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.cta__inner .btn--primary:hover { background: #f0f3ff; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-dim); font-size: 14px; flex-wrap: wrap; gap: 12px; }
.footer__inner a:hover { color: var(--accent); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--surface-2);
  border: 1px solid rgba(74,222,128,.4);
  color: #fff; font-weight: 600;
  padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  opacity: 0; transition: all .35s cubic-bezier(.2,.8,.2,1);
  z-index: 100;
}
.toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .hero__stats { gap: 30px; }
  .config-box { padding: 26px 20px; }
  .step { padding: 22px 18px; gap: 16px; }
  .btn--copy { width: 100%; }
  .hero__actions { width: 100%; }
  /* Compact header CTA: icon-only (full text lives in the hero button below) */
  .logo { white-space: nowrap; }
  .header .btn--sm .btn__label { display: none; }
  .header .btn--sm { padding: 10px 14px; }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* Ultra-narrow phones (iPhone SE 1st gen, small Androids) */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero { padding: 60px 0 50px; }
  .hero__title { font-size: 32px; letter-spacing: -1px; }
  .hero__subtitle { font-size: 16px; }
  .badge { font-size: 12px; padding: 7px 12px; }
  .logo { font-size: 19px; }
  .header__inner { gap: 10px; }
  .btn--sm { padding: 9px 14px; font-size: 13px; }
  .tab { padding: 11px 16px; font-size: 14px; }
  .step__num { width: 40px; height: 40px; font-size: 18px; }
  .step__body h3 { font-size: 17px; }
  .step__body p { font-size: 15px; }
}

/* Large desktops — keep content readable, don't over-stretch */
@media (min-width: 1600px) {
  :root { --maxw: 1200px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .btn--primary.btn--lg { animation: none; }
  .btn::after { transition: none; }
  * { scroll-behavior: auto; }
}
