/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0d0f14;
  --bg-dark:    #080a0e;
  --surface:    #141720;
  --surface-2:  #1c2030;
  --border:     #252a3a;
  --accent:     #6ee7b7;      /* emerald */
  --accent-2:   #818cf8;      /* indigo */
  --text:       #e2e8f0;
  --muted:      #64748b;
  --danger:     #f87171;
  --radius:     10px;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans:  'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ── Layout helpers ───────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }
.section-dark { background: var(--bg-dark); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
}

.accent { color: var(--accent); }

/* ── Nav ──────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav ul a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 24px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0.8;
}

.cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero .sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  transition: border-color 0.2s, color 0.2s;
}
.badge:hover { border-color: var(--accent); color: var(--accent); }

/* hero background orb */
.hero-orb {
  position: absolute;
  top: -200px;
  right: -300px;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110,231,183,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ── About ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 16px; line-height: 1.75; }
.about-text strong { color: var(--text); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label { font-size: 0.8rem; color: var(--muted); }

/* ── Card grid ────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover { border-color: var(--accent-2); transform: translateY(-2px); }

.card-icon { font-size: 1.6rem; margin-bottom: 14px; }

.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; }

.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; }

/* ── Telegram ─────────────────────────────────────────── */
.tg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.tg-list { list-style: none; display: flex; flex-direction: column; gap: 28px; }

.tg-list li { display: flex; gap: 16px; align-items: flex-start; }

.tg-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
}

.tg-list li div strong { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.tg-list li div p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* chat widget */
.tg-chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 420px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.chat-avatar { font-size: 1.4rem; }

.chat-name { font-size: 0.9rem; font-weight: 600; }

.chat-status {
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg time { font-size: 0.7rem; color: var(--muted); align-self: flex-end; }

.msg-in {
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-out {
  background: rgba(110, 231, 183, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.25);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  color: var(--accent);
}

.chat-input {
  display: flex;
  padding: 12px 16px;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-input input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input input:focus { border-color: var(--accent); }
.chat-input input::placeholder { color: var(--muted); }

.chat-input button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-input button:hover { opacity: 0.85; }

/* typing indicator */
.typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span {
  width: 6px; height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }

/* ── Contact ──────────────────────────────────────────── */
.contact-container { text-align: center; }
.contact-container .section-title { margin-bottom: 12px; }
.contact-container .section-sub { margin-bottom: 36px; }

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
}
.cta-button:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; }

.social-row { margin-top: 28px; display: flex; justify-content: center; gap: 24px; }

.social-link {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.social-link:hover { color: var(--text); }

/* ── Footer ───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-dark);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ── Process panel ────────────────────────────────────── */
.process-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.process-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.process-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.process-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Mobile nav toggle ────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 15, 20, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  nav ul.open { display: flex; }

  nav ul li a {
    display: block;
    padding: 14px 32px;
    font-size: 1rem;
  }

  .about-grid,
  .tg-layout { grid-template-columns: 1fr; gap: 40px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }

  .card-grid { grid-template-columns: 1fr; }

  footer .container { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
