/* ===== Design tokens (из promptica.pen) ===== */
:root {
  --bg: #0A0A0B;
  --surface: #141416;
  --surface-2: #1B1B1E;
  --border: #26262A;
  --text: #EDEDED;
  --muted: #8A8A8F;
  --accent: #6366F1;
  --accent-glow: #4F46E5;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --font-heading: "Geist", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --maxw: 1200px;
  --pad-x: clamp(20px, 6vw, 120px);
  --section-y: clamp(56px, 9vw, 88px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.svg-mono { color: var(--text); }

/* lucide icons render as <svg>; size by context */
[data-lucide] { width: 16px; height: 16px; }
svg { display: inline-block; vertical-align: middle; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5457e6; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: #3a3a40; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 14px var(--pad-x);
  background: rgba(10,10,11,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 600; font-size: 18px; }
.logo img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 28px;
  padding: clamp(64px, 9vw, 110px) var(--pad-x) 72px;
}
.hero::before {
  content: ""; position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 520px; max-width: 90vw;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.18), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; color: var(--muted);
}
.eyebrow svg { width: 14px; height: 14px; color: var(--accent); }

.headline { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; max-width: 1000px; }
.rotate-line { display: inline-flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 1.05em; line-height: 1.05; vertical-align: top; }
.caret { margin-bottom: .08em; }
.rotate { color: var(--accent); white-space: nowrap; }
.caret { display: inline-block; width: 5px; height: .9em; border-radius: 1px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.subhead { max-width: 640px; font-size: clamp(16px, 2vw, 18px); line-height: 1.55; color: var(--muted); }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding-top: 8px; }

/* ===== Console ===== */
.console {
  width: 100%; max-width: 1080px; margin-top: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 24px 80px rgba(99,102,241,.25);
  text-align: left;
}
.win-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.win-bar .mono:nth-of-type(1) { flex: 1; }
.dots { display: flex; gap: 8px; }
.dots span { width: 11px; height: 11px; border-radius: 50%; background: #3A3A3F; }
.console-body { display: flex; min-height: 320px; }
.sidebar { width: 280px; flex-shrink: 0; padding: 18px; border-right: 1px solid var(--border); }
.pipeline-label { font-size: 11px; letter-spacing: .5px; margin-bottom: 8px; }
.step-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.step-row svg { width: 16px; height: 16px; flex-shrink: 0; }
.step-row.pending { color: var(--muted); }
.step-row.pending svg { color: var(--muted); }
.step-row.active svg { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--bg); }
.log-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.result {
  display: flex; align-items: center; gap: 12px; padding: 16px; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-sm);
  font-weight: 500; font-size: 14px;
}
.result svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== Trust ===== */
.trust { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 36px var(--pad-x) 60px; text-align: center; }
.trust .mono { font-size: 12px; letter-spacing: .5px; }
.marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 52px; }
.marks span { font-family: var(--font-heading); font-weight: 600; font-size: 18px; color: var(--muted); opacity: .65; }

/* ===== Generic section ===== */
.section { padding: var(--section-y) var(--pad-x); }
.section-head { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.eyebrow-accent { font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; color: var(--accent); }
.h2 { font-size: clamp(30px, 4.6vw, 42px); line-height: 1.1; }
.section-sub { max-width: 600px; margin: 0 auto; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* ===== Services cards ===== */
.cards-3 { max-width: var(--maxw); margin: 52px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 18px; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card h3 { font-size: 20px; line-height: 1.25; }
.card p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.badge { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.badge svg { width: 22px; height: 22px; color: var(--accent); }
.badge.sm { width: 42px; height: 42px; background: var(--bg); }
.badge.sm svg { width: 20px; height: 20px; }

/* ===== Approach ===== */
.approach { background: var(--surface); }
.steps { max-width: var(--maxw); margin: 56px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: 1px solid var(--border); }
.step .num { font-weight: 500; font-size: 14px; }
.step h3 { font-size: 19px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ===== Why / metrics ===== */
.metrics { max-width: var(--maxw); margin: 52px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.metric { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); }
.num-big { font-family: var(--font-heading); font-weight: 600; font-size: clamp(34px, 4vw, 44px); line-height: 1.05; }
.metric p { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ===== Cases ===== */
.cases { background: var(--surface); }
.cases-grid { max-width: var(--maxw); margin: 52px auto 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case { display: flex; flex-direction: column; gap: 16px; padding: 30px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.case-top { display: flex; align-items: center; gap: 12px; }
.case-top .mono { font-size: 12px; letter-spacing: .5px; }
.case h3 { font-size: 20px; line-height: 1.25; }
.case > p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.case-res { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 500; font-size: 14px; line-height: 1.45; }
.case-res svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== CTA ===== */
.cta { padding: clamp(64px, 10vw, 96px) var(--pad-x); }
.cta-card {
  max-width: 920px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  padding: clamp(36px, 6vw, 60px); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 20px 90px rgba(99,102,241,.2);
}
.cta-action { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tg-btn { padding: 15px 28px; }
.tg-btn svg { width: 18px; height: 18px; }
.human-note { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.human-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== Footer ===== */
.footer { padding: 56px var(--pad-x) 36px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.brand { max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.brand p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.footer-cols { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col .mono { font-size: 11px; letter-spacing: .5px; }
.footer-col a { font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom .mono { font-size: 12px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
  .console-body { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  /* На узких телефонах разрешаем перенос вращающейся фразы */
  .rotate { white-space: normal; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .marks { gap: 28px; }
  .marks span { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .step-row.active svg { animation: none; }
}
