:root {
  --bg: #08080a;
  --bg2: rgba(18, 18, 22, 0.6);
  --fg: #f1f5f9;
  --fg2: #8892a4;
  --fg3: #3d4558;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --green: #10b981;
  --orange: #f59e0b;
  --border: rgba(255,255,255,0.07);
  --glass: rgba(255,255,255,0.03);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --- BG DECORATIONS --- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 70%);
}

.blob {
  position: fixed; border-radius: 50%; filter: blur(130px);
  z-index: -1; animation: drift 18s infinite alternate ease-in-out;
  pointer-events: none;
}
.blob-1 { background: var(--cyan); width: 500px; height: 500px; top: -220px; right: -180px; opacity: 0.2; }
.blob-2 { background: var(--purple); width: 580px; height: 580px; bottom: -250px; left: -200px; opacity: 0.18; animation-duration: 22s; }
.blob-3 { background: var(--blue); width: 300px; height: 300px; top: 40%; right: 10%; opacity: 0.08; animation-duration: 14s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 50px) scale(1.12); }
}

/* --- LAYOUT --- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* --- NAVBAR --- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,10,0.7);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem;
  color: var(--fg); text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-logo { width: 30px; height: 30px; }

.nav-end { display: flex; align-items: center; gap: 20px; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  color: var(--fg2); font-weight: 600; font-size: 0.85rem;
  padding: 5px 9px; border-radius: 6px; transition: all .2s;
  font-family: inherit;
}
.lang-switch button:hover, .lang-switch button.active {
  color: var(--fg); background: var(--glass);
}

.nav-link-cta {
  color: var(--fg2);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-link-cta:hover {
  color: var(--fg);
  border-bottom-color: var(--fg2);
}

.nav-github {
  display: flex;
  align-items: center;
  color: var(--fg2);
  transition: color .2s, transform .2s;
  padding: 4px;
}
.nav-github:hover {
  color: var(--fg);
  transform: scale(1.15);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--fg2);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color .2s;
}
.card-link:hover { color: var(--cyan); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px; font-weight: 600;
  font-size: 0.95rem; text-decoration: none; transition: all .25s;
  cursor: pointer; border: none; font-family: inherit; white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-large { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: #000; font-weight: 700;
  box-shadow: 0 4px 20px rgba(34,211,238,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34,211,238,0.35);
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }

/* --- HERO --- */
.hero { padding: 100px 0 80px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text { max-width: 560px; }

.badge {
  display: inline-block;
  padding: 5px 14px; border-radius: 20px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  color: var(--cyan); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.03em; margin-bottom: 24px;
}

h1 {
  font-size: 3.4rem; font-weight: 900;
  line-height: 1.05; letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--fg2); font-size: 1.1rem; margin-bottom: 36px; max-width: 480px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.hero-providers {
  display: flex; align-items: center; gap: 12px;
  color: var(--fg2); font-size: 0.85rem;
}

.provider-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 3px 10px; border-radius: 5px;
  background: var(--glass); border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--fg2); font-weight: 500;
}

/* --- TELEGRAM MOCKUP --- */
.tg-mockup {
  background: #17212b;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  max-width: 400px; width: 100%; margin: 0 0 0 auto;
  animation: slideIn .8s ease-out both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tg-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: #1e2b36;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tg-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #000;
}

.tg-name { display: block; font-weight: 600; font-size: 0.95rem; color: #fff; }
.tg-status { font-size: 0.75rem; color: #52b788; }

.tg-messages { padding: 20px 16px 20px; display: flex; flex-direction: column; gap: 8px; }

.msg {
  max-width: 80%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.88rem; line-height: 1.5; display: flex; gap: 8px; align-items: flex-start;
}
.msg code {
  font-family: monospace; font-size: 0.82em;
  background: rgba(255,255,255,0.1); padding: 1px 5px; border-radius: 4px;
}

.msg-out {
  align-self: flex-end; background: #2b5278; color: #e8f4fd;
  border-bottom-right-radius: 4px;
}
.msg-in {
  align-self: flex-start; background: #232e3c; color: #d1dce7;
  border-bottom-left-radius: 4px;
}
.msg-prefix { font-size: 1rem; flex-shrink: 0; }

.dot-anim {
  display: inline-block;
  animation: dots 1.4s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* --- HOW IT WORKS --- */
.how {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
}

.section-title {
  text-align: center; font-size: 2.2rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 64px;
}

.how-steps {
  display: flex; align-items: flex-start; gap: 16px;
  justify-content: center;
}

.step {
  flex: 1; max-width: 300px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
}
.step-num {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em;
  color: var(--cyan); margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--fg2); }

.step-arrow {
  font-size: 1.5rem; color: var(--fg3);
  padding-top: 40px; flex-shrink: 0;
}

/* --- FEATURES --- */
.features {
  padding: 80px 0 100px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}

.feature-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 28px 32px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at 60% 40%, rgba(255,255,255,0.04), transparent 70%);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.14); }
.feature-card:hover::before { opacity: 1; }

.card-wide { grid-column: span 1; }

.feat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feat-icon svg { width: 22px; height: 22px; }

.icon-blue   { background: rgba(59,130,246,.12); color: var(--blue); }
.icon-cyan   { background: rgba(34,211,238,.12); color: var(--cyan); }
.icon-purple { background: rgba(168,85,247,.12); color: var(--purple); }
.icon-green  { background: rgba(16,185,129,.12); color: var(--green); }
.icon-orange { background: rgba(245,158,11,.12); color: var(--orange); }
.icon-pink   { background: rgba(236,72,153,.12); color: var(--pink); }

.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { font-size: 0.88rem; color: var(--fg2); line-height: 1.6; }

/* --- CTA BANNER --- */
.cta-section {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
  border-top: 1px solid var(--border);
}
.cta-inner {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 24px; padding: 64px 48px;
  text-align: center;
}
.diamond-icon { font-size: 2.5rem; margin-bottom: 20px; opacity: 0.7; }
.cta-inner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -0.03em; }

/* --- FOOTER --- */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.copyright { color: var(--fg2); font-size: 0.875rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--fg2); font-size: 0.875rem; text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--fg); }

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .tg-mockup { margin: 0 auto; }
  .how-steps { flex-direction: column; align-items: center; }
  .step-arrow { padding-top: 0; transform: rotate(90deg); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: 40px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
