/* ===== Base ===== */
:root {
  --bg: #0b0e14;
  --bg-card: #121722;
  --border: #1f2633;
  --text: #e6e9ef;
  --muted: #8a93a6;
  --accent: #4ade80;
  --accent-2: #38bdf8;
  --warn: #fbbf24;
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

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

/* ===== Background ===== */
.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: radial-gradient(ellipse at top, #000 20%, transparent 70%);
  opacity: .5;
}

.bg-glow {
  position: fixed; z-index: -1;
  width: 700px; height: 700px;
  top: -250px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(74, 222, 128, .18), rgba(56, 189, 248, .08) 40%, transparent 70%);
  filter: blur(40px);
}

/* ===== Nav ===== */
.nav {
  max-width: 1100px; margin: 0 auto;
  padding: 24px;
  display: flex; justify-content: space-between; align-items: center;
}

.logo { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }

.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav nav { display: flex; gap: 28px; }
.nav nav a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* ===== Hero ===== */
main { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0 100px;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .8rem;
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, .3);
  background: rgba(74, 222, 128, .08);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 24px;
}

.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  70%  { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { color: var(--muted); font-size: 1.1rem; max-width: 480px; margin-bottom: 32px; }

.buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: .95rem;
  transition: transform .15s, box-shadow .2s, background .2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent); color: #062b14;
  box-shadow: 0 8px 24px rgba(74, 222, 128, .25);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(74, 222, 128, .4); }

.btn-ghost { border: 1px solid var(--border); background: var(--bg-card); }
.btn-ghost:hover { border-color: var(--muted); }

/* ===== Terminal ===== */
.terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg);
  transition: transform .4s;
}
.terminal:hover { transform: perspective(1200px) rotateY(0); }

.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}
.terminal-bar span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: 10px; font-style: normal; font-family: var(--mono); font-size: .78rem; color: var(--muted); }

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #c9d1d9;
}

.prompt { color: var(--accent); }
.ok { color: var(--accent); }
.warn { color: var(--warn); }

.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 0;
  animation: typing 2.5s steps(31) 1s forwards;
}
@keyframes typing { to { width: 31ch; } }  /* = длина команды в символах */

.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Sections ===== */
.section { padding: 60px 0; }

.section-title {
  font-family: var(--mono);
  font-size: 1.6rem;
  margin-bottom: 32px;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, .4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.card-icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

/* ===== Timeline ===== */
.timeline { list-style: none; position: relative; padding-left: 8px; }

.timeline::before {
  content: "";
  position: absolute; left: 29px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--border) 60%);
}

.timeline li {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 14px 0;
  position: relative;
}

.step {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--mono); font-size: .85rem; font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--muted);
  z-index: 1;
}

.timeline h3 { font-size: 1.05rem; margin-bottom: 2px; }
.timeline p { color: var(--muted); font-size: .95rem; }

.timeline li.done .step { background: var(--accent); border-color: var(--accent); color: #062b14; }

.timeline li.current .step {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, .12);
}
.timeline li.current h3::after {
  content: "в процессе";
  margin-left: 10px;
  font-family: var(--mono); font-size: .7rem; font-weight: 400;
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, .3);
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle;
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.8rem; font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--muted); font-size: .9rem; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 60px 24px 40px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  font-size: .95rem;
}
.footer .muted { font-family: var(--mono); font-size: .8rem; margin-top: 6px; }

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 60px; }
  .terminal { transform: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav nav { gap: 16px; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .nav nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .typing { width: auto; }
}
