/* ============================================================
   Хайнет — AI App Builder Landing
   Dark / minimal / premium-tech. One accent. No noise.
   ============================================================ */

:root {
  --bg: #050507;
  --bg-alt: #0a0b0d;
  --surface: #0e0f12;
  --surface-2: #131418;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f5;
  --text-2: #9ba1a8;
  --text-3: #61666d;
  --accent: #00dc82;
  --accent-soft: rgba(0, 220, 130, 0.12);
  --accent-text: #04130b;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-lg: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1160px;
  --section-pad: clamp(80px, 12vw, 140px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: var(--accent); color: var(--accent-text); }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }
.center { text-align: center; }
.dim { color: var(--text-3); }

/* ---------------- Typography ---------------- */

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 650; }

h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); text-wrap: balance; }

h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

.lede {
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  margin-top: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: clamp(48px, 7vw, 80px); }

.quote-line { margin-top: 56px; font-size: 1.15rem; color: var(--text); }

/* ---------------- Sections ---------------- */

.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover { background: #2ee89c; }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); }

.btn-lg { height: 56px; padding: 0 34px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 0.9rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- Nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 5, 7, 0.75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.logo-mark { color: var(--text); }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  color: var(--text-2);
  font-size: 0.94rem;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
.nav-cta { display: none; color: var(--accent); font-weight: 650; }

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  padding: 150px 0 110px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.badge {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-2);
  margin-bottom: 28px;
}

.hero h1 { max-width: 840px; margin: 0 auto; }

.hero-sub {
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  margin: 24px auto 0;
  max-width: 620px;
}

.hero-cta { margin-top: 36px; }

.hero-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 26px;
  color: var(--text-3);
  font-size: 0.92rem;
}

/* ---- Phone mockup ---- */

.phone-wrap { margin-top: 72px; display: flex; justify-content: center; }

.phone {
  width: min(330px, 86vw);
  border-radius: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #17181c, #0c0d10);
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 90px -50px rgba(0, 220, 130, 0.25);
}

.phone-screen {
  position: relative;
  border-radius: 36px;
  background: #0a0b0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  aspect-ratio: 9 / 18.6;
  overflow: hidden;
  text-align: left;
}
.phone-screen::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 22px;
  background: #000;
  border-radius: 12px;
  z-index: 3;
}

.screen-state {
  position: absolute;
  inset: 0;
  padding: 56px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

/* Prompt state */
.s-chat {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.s-chat.ai {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-bottom-left-radius: 6px;
}
.s-chat.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  border-bottom-right-radius: 6px;
  min-height: 46px;
  min-width: 62%;
}
.s-build-btn {
  margin-top: 8px;
  align-self: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.92rem;
}
.s-build-btn span { color: var(--accent); }

/* Building state */
.state-building { justify-content: center; }
.s-checklist { display: flex; flex-direction: column; gap: 12px; }
.s-checklist li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-3);
  opacity: 0.35;
}
.s-checklist li::before {
  content: "○";
  font-size: 0.9rem;
  color: inherit;
}
.phone.is-building .s-checklist li {
  animation: check-in 0.45s ease forwards;
  animation-delay: calc(var(--i) * 0.75s + 0.25s);
}
@keyframes check-in {
  from { color: var(--text-3); opacity: 0.35; }
  to { color: var(--accent); opacity: 1; }
}
.phone.is-building .s-checklist li::before {
  animation: tick 0.3s ease forwards;
  animation-delay: calc(var(--i) * 0.75s + 0.35s);
}
@keyframes tick { to { content: "✓"; } }

.s-building {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 6px;
}
.s-progress {
  height: 4px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.s-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
}
.phone.is-building .s-progress span {
  animation: progress-fill 4.2s ease forwards;
}
@keyframes progress-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* Live state */
.state-live { align-items: center; text-align: center; }
.s-rocket { font-size: 2.6rem; }
.s-live-title { font-weight: 700; font-size: 1.15rem; }
.s-live-url {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 220, 130, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* State visibility driven by JS classes */
.phone.is-prompt .state-prompt { opacity: 1; transform: none; }
.phone.is-building .state-building { opacity: 1; transform: none; }
.phone.is-live .state-live { opacity: 1; transform: none; }

/* checkmark circles become ticks */
.s-checklist li::before { content: "○"; }
.phone.is-building .s-checklist li::before {
  animation: tick 0.3s ease forwards;
  animation-delay: calc(var(--i) * 0.75s + 0.35s);
}
@keyframes tick { to { content: "✓"; } }

.dots::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* ---------------- 02 Idea → App (промпт → интерфейс) ---------------- */

.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.prompt-head {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.prompt-text {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text);
}

.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.chip {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-2);
  background: var(--bg-alt);
}
.chip.on {
  background: var(--accent-soft);
  border-color: rgba(0, 220, 130, 0.35);
  color: var(--accent);
}

.idea-result {
  text-align: center;
  font-size: 1.12rem;
  margin: 56px 0 28px;
}
.idea-result .dim { color: var(--text-3); }

/* ---------------- 03 Work cards ---------------- */

.work-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.work-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.work-card p { color: var(--text-2); font-size: 0.95rem; margin-top: 10px; flex: 1; }

.term {
  margin-top: 26px;
  background: #08090b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  min-height: 132px;
}
.term-line { color: var(--text-3); opacity: 0; }
.term-line.ok { color: var(--accent); }
.term-line.err { color: var(--danger); }
.term-line.url { color: var(--accent); }
.term.play .term-line { animation: term-in 0.4s ease forwards; }
.term.play .term-line:nth-child(1) { animation-delay: 0.2s; }
.term.play .term-line:nth-child(2) { animation-delay: 1.1s; }
.term.play .term-line:nth-child(3) { animation-delay: 2.0s; }
.term.play .term-line:nth-child(4) { animation-delay: 2.9s; }
.term.play .term-line:nth-child(5) { animation-delay: 3.8s; }
@keyframes term-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.term-cursor {
  width: 7px; height: 14px;
  background: var(--accent);
  display: inline-block;
  animation: caret-blink 1s steps(1) infinite;
  border-radius: 1px;
  margin-top: 4px;
}

/* ---------------- 04 Conversational demo ---------------- */

.demo-conv {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.conv-chat {
  padding: 28px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-end;
  min-height: 380px;
}
.conv-msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.conv-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  border-bottom-right-radius: 5px;
}
.conv-msg.ai {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  border-bottom-left-radius: 5px;
}

.conv-preview { background: var(--bg-alt); }
.conv-preview-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.conv-preview-title {
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
.conv-live-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.conv-app { padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: background 0.6s ease; }
.conv-app-top { font-weight: 700; margin-bottom: 4px; }
.conv-app-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 15px;
  font-size: 0.9rem;
  color: var(--text-2);
}
.conv-app-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.conv-app-row b.ok { color: var(--accent); font-weight: 600; font-size: 0.82rem; }

/* elements added by AI: collapsed by default, expand smoothly on .show-N */
.conv-add {
  opacity: 0;
  transform: translateY(8px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -10px;
  border-color: transparent;
  overflow: hidden;
  transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.45s ease,
    padding 0.45s ease, margin 0.45s ease, border-color 0.45s ease;
}
.conv-app.show-1 .conv-app-row.conv-add {
  opacity: 1;
  transform: none;
  max-height: 60px;
  margin-top: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-color: var(--border);
}
.conv-app.show-2 { background: #0a0b0d; }
.conv-app.show-2 .conv-app-row { background: var(--surface-2); }
.conv-app.show-2 .conv-theme-note.conv-add {
  opacity: 1;
  transform: none;
  max-height: 60px;
  margin-top: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  border-color: var(--border-strong);
}
.conv-app.show-3 .conv-chart.conv-add {
  opacity: 1;
  transform: none;
  max-height: 120px;
  margin-top: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-color: var(--border);
}
.conv-theme-note {
  font-size: 0.82rem;
  color: var(--text-3);
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  padding: 10px 15px;
}
.conv-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 84px;
  padding: 12px 15px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.conv-chart span {
  flex: 1;
  height: var(--h, 40%);
  background: var(--accent);
  opacity: 0.85;
  border-radius: 3px 3px 0 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s ease 0.1s;
}
.conv-app.show-3 .conv-chart span { transform: scaleY(1); }

/* chat messages appear per step (cumulative) */
#demo-conv .conv-msg.ai { opacity: 1; transform: none; }
#demo-conv.step-1 .conv-msg[data-step="1"],
#demo-conv.step-2 .conv-msg[data-step="1"],
#demo-conv.step-3 .conv-msg[data-step="1"] { opacity: 1; transform: none; }
#demo-conv.step-2 .conv-msg[data-step="2"],
#demo-conv.step-3 .conv-msg[data-step="2"] { opacity: 1; transform: none; }
#demo-conv.step-3 .conv-msg[data-step="3"] { opacity: 1; transform: none; }

.conv-tagline {
  text-align: center;
  margin-top: 44px;
  font-size: 1.1rem;
  color: var(--text);
}

/* ---------------- 05 Architecture ---------------- */

.arch {
  max-width: 420px;
  margin: 0 auto 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.arch-node,
.arch-server-row {
  font-family: var(--mono);
  font-size: 0.82rem;
}
.arch-app {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 12px;
}
.arch-arrow { color: var(--text-3); font-size: 0.8rem; }
.arch-server {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.arch-server-title {
  padding: 12px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.arch-server-row {
  padding: 11px 18px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.arch-server-row:last-child { border-bottom: 0; }
.arch-url {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid rgba(0, 220, 130, 0.35);
  background: var(--accent-soft);
  padding: 10px 18px;
  border-radius: 10px;
}

.server-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sf-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.sf-item h3 { font-size: 1rem; }
.sf-item p { color: var(--text-2); font-size: 0.9rem; margin-top: 8px; }

/* ---------------- 06 How it works ---------------- */

.story {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-left: 0;
}
.story-line {
  position: absolute;
  left: 21px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--border);
}
.story-line span {
  display: block;
  width: 100%;
  height: calc(var(--progress, 0) * 100%);
  background: var(--accent);
  transition: height 0.1s linear;
}
.story-step {
  position: relative;
  display: flex;
  gap: 26px;
  padding: 26px 0;
}
.story-num {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.story-step.active .story-num {
  color: var(--accent);
  border-color: rgba(0, 220, 130, 0.5);
}
.story-body h3 { font-size: 1.15rem; }
.story-body p { color: var(--text-2); margin-top: 6px; font-size: 0.97rem; }

.story-final {
  margin-top: 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.story-rocket { font-size: 2.4rem; }
.story-live {
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
}
.story-url {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
}

/* ---------------- 07 Before / After ---------------- */

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
.ba-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
}
.ba-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
}
.ba-col p { margin: 0; }
.ba-swap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.98rem;
}
.ba-arrow { color: var(--text-3); }
.ba-list {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ba-list li {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
}
.ba-now { border-color: rgba(0, 220, 130, 0.3); }
.ba-quote {
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.ba-done {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}
.ba-result { margin-top: 52px; font-size: 1.1rem; }

/* ---------------- 08 Mobile first ---------------- */

.mobile-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 80px);
}
.mobile-states {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 650;
  font-size: 1.05rem;
}
.mobile-states span:not(.mf-arrow) { color: var(--text-2); }
.mobile-states span:last-child { color: var(--accent); }
.mf-arrow { color: var(--text-3); font-size: 0.8rem; }

.mobile-phone {
  width: min(280px, 74vw);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #17181c, #0c0d10);
  padding: 10px;
}
.mobile-phone-screen {
  border-radius: 32px;
  background: #0a0b0d;
  border: 1px solid var(--border);
  aspect-ratio: 9 / 17;
  padding: 30px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.82rem;
}
.mp-top { font-weight: 700; margin-bottom: 4px; }
.mp-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--text-2);
}
.mp-row.ok { color: var(--accent); border-color: rgba(0, 220, 130, 0.3); }
.mp-live {
  margin-top: auto;
  text-align: center;
  font-family: var(--mono);
  color: var(--accent);
  border: 1px dashed rgba(0, 220, 130, 0.4);
  border-radius: 10px;
  padding: 10px;
}
.mobile-all {
  margin-top: 56px;
  font-size: 1.2rem;
  font-weight: 650;
}

/* ---------------- 09 Use cases ---------------- */

.use-cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.uc {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.uc:hover { border-color: rgba(0, 220, 130, 0.4); transform: translateY(-3px); }

.uc-mock {
  height: 190px;
  background: #08090b;
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 22px;
}
.uc-body { padding: 24px 26px 26px; }
.uc-body p { color: var(--text-2); font-size: 0.93rem; margin-top: 8px; }
.uc-cta {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.uc:hover .uc-cta { opacity: 1; transform: none; }

/* mini mockups */
.ucm-crm { display: flex; width: 100%; height: 100%; gap: 10px; }
.ucm-side {
  width: 34px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ucm-side span { height: 5px; background: var(--border-strong); border-radius: 3px; }
.ucm-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ucm-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.ucm-bars span {
  flex: 1;
  height: var(--h, 50%);
  background: var(--accent);
  opacity: 0.8;
  border-radius: 3px 3px 0 0;
}
.ucm-line { height: 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.ucm-line.short { width: 55%; }

.ucm-cal { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.ucm-cal-head { font-size: 0.78rem; color: var(--text-2); margin-bottom: 10px; font-weight: 600; }
.ucm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ucm-cal-grid span { aspect-ratio: 1; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.ucm-cal-grid span.busy { background: var(--surface-2); border-color: rgba(0, 220, 130, 0.4); }
.ucm-cal-grid span.sel { background: var(--accent); border-color: var(--accent); }

.ucm-track { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.ucm-task {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ucm-task i {
  height: 4px;
  border-radius: 3px;
  background: var(--accent);
  width: var(--w, 50%);
  opacity: 0.85;
}

.ucm-saas { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ucm-stats { display: flex; gap: 8px; }
.ucm-stats span {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 4px;
}
.ucm-graph {
  height: 56px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.ucm-graph svg { width: 100%; height: 100%; }
.ucm-graph polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

/* ---------------- 10 Emotional ---------------- */

.section-emotional {
  padding: calc(var(--section-pad) * 1.35) 0;
  background: var(--bg);
}
.emo-q {
  font-size: clamp(1.8rem, 4.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-3);
  transition: color 0.8s ease;
}
.emo-q.lit { color: var(--text); }
.emo-chain {
  margin: 48px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.emo-stage {
  font-weight: 700;
  letter-spacing: 0.24em;
  font-size: 0.85rem;
  color: var(--text-3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease, color 0.6s ease;
}
.emo-arrow { color: var(--text-3); opacity: 0; transition: opacity 0.6s ease 0.2s; }
.emo-chain.lit .emo-stage { opacity: 1; transform: none; color: var(--text-2); }
.emo-chain.lit .emo-stage:last-child { color: var(--accent); }
.emo-chain.lit .emo-arrow { opacity: 1; }
.emo-url {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease 1.4s, transform 0.6s ease 1.4s;
}
.emo-chain.lit ~ .emo-url { opacity: 1; transform: none; }
.emo-final { margin-top: 28px; font-size: 1.1rem; }

/* ---------------- 11 Continuous ---------------- */

.continuous {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cont-msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 15px 18px;
  opacity: 0;
  transform: translateY(10px);
}
.cont-msg span { font-size: 0.95rem; }
.cont-msg em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
}
.continuous.play .cont-msg {
  animation: cont-in 0.5s ease forwards;
  animation-delay: calc(var(--i) * 1.6s + 0.2s);
}
.continuous.play .cont-msg em { opacity: 1; }
@keyframes cont-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 12 Pricing ---------------- */

.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: left;
}
.pricing-tier {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--accent);
}
.pricing-price {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 12px;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
}
.pricing-note { color: var(--text-2); margin-top: 10px; }
.pricing-list {
  margin: 28px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-list li {
  padding-left: 30px;
  position: relative;
  font-size: 0.97rem;
  color: var(--text);
}
.pricing-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.pricing-fine {
  margin-top: 18px;
  color: var(--text-3);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------------- FAQ ---------------- */

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item.open { border-color: var(--border-strong); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 20px 24px;
  font-weight: 650;
  font-size: 1rem;
  min-height: 56px;
}
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 14px; height: 14px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--text-3);
  transition: transform 0.25s ease, background 0.25s ease;
}
.faq-icon::before {
  left: 0; top: 6px;
  width: 14px; height: 2px;
}
.faq-icon::after {
  left: 6px; top: 0;
  width: 2px; height: 14px;
}
.faq-item.open .faq-icon::after { transform: scaleY(0); }
.faq-item.open .faq-icon::before { background: var(--accent); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  padding: 0 24px 22px;
  color: var(--text-2);
  font-size: 0.97rem;
}

/* ---------------- Final CTA ---------------- */

.section-final {
  padding: calc(var(--section-pad) * 1.5) 0;
}
.final-title {
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  max-width: 800px;
  margin: 0 auto;
  text-wrap: balance;
}
.section-final .lede { margin-bottom: 40px; }
.final-note { margin-top: 26px; color: var(--text-3); font-size: 0.92rem; }
.final-url {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--text-3);
}

.caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------------- Footer ---------------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
  align-items: flex-start;
}
.footer-brand p { color: var(--text-2); font-size: 0.95rem; margin-top: 16px; }
.footer-brand .footer-rkn {
  color: var(--text-3);
  font-size: 0.82rem;
  margin-top: 14px;
}
.footer-nav, .footer-legal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 120px;
}
.footer-nav h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.footer-nav { margin-left: auto; }
.footer-nav-docs { max-width: 260px; }
.footer-nav a, .footer-legal a {
  color: var(--text-2);
  font-size: 0.94rem;
  transition: color 0.2s ease;
}
.footer-nav a:hover, .footer-legal a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--text-2); }

/* ---------------- Subscribe form (final CTA) ---------------- */

.subscribe {
  max-width: 520px;
  margin: 72px auto 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.subscribe h3 { font-size: 1.15rem; margin-bottom: 18px; }
.subscribe-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.subscribe-row input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 50px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease;
}
.subscribe-row input[type="email"]:focus { border-color: rgba(0, 220, 130, 0.5); }
.subscribe-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 10px;
  cursor: pointer;
}
.subscribe-check input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg-alt);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.subscribe-check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.subscribe-check input:checked::before {
  content: "✓";
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
}
.subscribe-check a { color: var(--accent); }
.subscribe-status {
  margin: 10px 0 0;
  font-size: 0.88rem;
  min-height: 1.3em;
}
.subscribe-status.ok { color: var(--accent); }
.subscribe-status.err { color: var(--danger); }

/* ---------------- Sticky mobile CTA ---------------- */

.sticky-cta {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  box-shadow: 0 16px 40px -12px rgba(0, 220, 130, 0.45);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sticky-cta.visible { opacity: 1; transform: none; }

/* ---------------- Reveal on scroll ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------------- 02: промпт → интерфейс ---------------- */

/* компактный UI приложения внутри телефона */
.s-app-top { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.s-app-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin: 12px 0 7px;
}
.s-app-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.s-app-chips .chip { padding: 6px 11px; font-size: 0.78rem; }
.s-app-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 7px;
}
.s-app-row b { color: var(--text); }
.s-app-row b.ok { color: var(--accent); }

/* ---- Промпт превращается в интерфейс ---- */

.v3-col { display: flex; flex-direction: column; gap: 24px; }
.v3-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
}
.v3-lines { display: flex; flex-direction: column; gap: 16px; }
.v3-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-2);
  font-size: 1.02rem;
  opacity: 0.45;
  transition: opacity 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}
.v3-line::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.v3-line.done {
  opacity: 1;
  color: var(--text);
  border-color: rgba(0, 220, 130, 0.35);
}
.v3-line.done::before {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 220, 130, 0.5);
}
.v3-line.v3-final .v3-txt { color: var(--accent); font-weight: 650; }

.v3-phone-wrap { display: flex; justify-content: center; }
.v3-app {
  padding: 56px 20px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

/* группы интерфейса появляются по шагам */
.v3-g {
  opacity: 0;
  transform: translateY(10px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.6s ease, margin 0.6s ease;
}
#v3-screen.show-1 #v3-g1,
#v3-screen.show-2 #v3-g1,
#v3-screen.show-3 #v3-g1,
#v3-screen.show-4 #v3-g1,
#v3-screen.show-5 #v3-g1,
#v3-screen.show-2 #v3-g2,
#v3-screen.show-3 #v3-g2,
#v3-screen.show-4 #v3-g2,
#v3-screen.show-5 #v3-g2,
#v3-screen.show-3 #v3-g3,
#v3-screen.show-4 #v3-g3,
#v3-screen.show-5 #v3-g3,
#v3-screen.show-4 #v3-g4,
#v3-screen.show-5 #v3-g4 {
  opacity: 1;
  transform: none;
  max-height: 220px;
  margin-top: 10px;
}
.v3-live {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid rgba(0, 220, 130, 0.35);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 9px 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#v3-screen.show-5 .v3-live { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .v3-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .conv-msg, .emo-stage, .emo-arrow, .emo-url, .cont-msg { opacity: 1; transform: none; }
  .uc-cta { opacity: 1; transform: none; }
  .term .term-line { opacity: 1; }
  .phone .screen-state { opacity: 0; }
  .phone.is-prompt .state-prompt { opacity: 1; transform: none; }
  .s-checklist li, .s-checklist li::before { opacity: 1; }
  .caret { animation: none; }
  .conv-add {
    opacity: 1; transform: none; max-height: none; margin-top: 0;
    border-color: var(--border);
  }
  .story-line span { height: 100%; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  .work-cards { grid-template-columns: 1fr; }
  .server-features { grid-template-columns: repeat(2, 1fr); }
  .demo-conv { grid-template-columns: 1fr; }
  .conv-chat { border-right: 0; border-bottom: 1px solid var(--border); min-height: 0; }
  .before-after { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 7, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 8px 24px 16px;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav.menu-open .nav-links { display: flex; }
  .burger { display: flex; }
  .nav-actions .btn-ghost, .nav-actions .btn-primary { display: none; }
  .nav-cta { display: flex; }

  .hero { padding-top: 120px; }
  .hero-points { flex-direction: column; align-items: center; gap: 6px; }

  .use-cases { grid-template-columns: 1fr; }
  .server-features { grid-template-columns: 1fr; }
  .mobile-flow { flex-direction: column; }
  .mobile-states { align-items: center; text-align: center; }

  .section-head { margin-bottom: 44px; }

  .sticky-cta { display: flex; }

  .term { min-height: 0; }
  .conv-chat { min-height: 0; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-nav { margin-left: 0; }
  .footer-nav-docs { max-width: none; }
  .subscribe-row { flex-direction: column; }
  .subscribe-row .btn { width: 100%; }
}
