/* ═══════════════════════════════════════════
   nw-hero-demo.css — index4 Demo-first Homepage
   @keyframes здесь безопасны (внешний .css файл)
═══════════════════════════════════════════ */

/* ── Reset helpers ── */
*, *::before, *::after { box-sizing: border-box; }

/* ══════════════════════════════════════════
   1. HERO — DARK
══════════════════════════════════════════ */
.nwh-hero {
  background: #0B0F14;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.nwh-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
  pointer-events: none;
}
.nwh-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Hero grid */
.nwh-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 1023px) {
  .nwh-hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Left: copy */
.nwh-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 20px;
}
.nwh-hero-kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6366f1;
  animation: nwhPulse 2s ease-in-out infinite;
}
@keyframes nwhPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}

.nwh-hero-h1 {
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.07;
  color: #fff;
  margin: 0 0 20px;
}
.nwh-hero-h1 em {
  font-style: normal;
  color: #818cf8;
}
.nwh-hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  max-width: 460px;
  margin: 0 0 36px;
}

/* CTA buttons */
.nwh-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.nwh-btn-primary {
  height: 48px;
  padding: 0 28px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, transform .1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nwh-btn-primary:hover { background: #4f52d1; color: #fff; text-decoration: none; transform: translateY(-1px); }
.nwh-btn-secondary {
  height: 48px;
  padding: 0 24px;
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nwh-btn-secondary:hover { border-color: rgba(255,255,255,.5); color: #fff; text-decoration: none; }

/* Trust pills */
.nwh-trust-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nwh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
}
.nwh-pill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #22c55e;
}

/* ── RIGHT: Mini Demo Panel ── */
.nwh-demo-panel {
  background: #13181f;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

/* Demo panel tabs */
.nwh-demo-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: #0d1117;
  overflow-x: auto;
  scrollbar-width: none;
}
.nwh-demo-tabs::-webkit-scrollbar { display: none; }
.nwh-demo-tab {
  flex: none;
  padding: 0 18px;
  height: 42px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,255,255,.35);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.nwh-demo-tab:hover { color: rgba(255,255,255,.7); }
.nwh-demo-tab.active { color: #818cf8; border-bottom-color: #6366f1; }

/* Demo controls */
.nwh-demo-controls {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nwh-demo-url {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 0 12px;
  height: 34px;
  flex: 1;
}
.nwh-demo-url-icon { font-size: 11px; color: rgba(255,255,255,.3); }
.nwh-demo-url-input {
  border: none;
  background: none;
  outline: none;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,.75);
  width: 100%;
  font-weight: 600;
}
.nwh-demo-run {
  height: 34px;
  padding: 0 16px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, opacity .15s;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nwh-demo-run:hover { background: #4f52d1; }
.nwh-demo-run.loading { opacity: .6; pointer-events: none; }
.nwh-run-spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nwhSpin .6s linear infinite;
  display: none;
}
.nwh-demo-run.loading .nwh-run-spinner { display: block; }
.nwh-demo-run.loading .nwh-run-lbl { display: none; }
@keyframes nwhSpin { to { transform: rotate(360deg); } }

/* Output cols */
.nwh-output-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 600px) {
  .nwh-output-cols { grid-template-columns: 1fr; }
}
.nwh-output-col { border-right: 1px solid rgba(255,255,255,.06); }
.nwh-output-col:last-child { border-right: none; }
.nwh-output-head {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nwh-output-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.nwh-output-label.after { color: rgba(129,140,248,.9); }
.nwh-status-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  display: none;
}
.nwh-status-badge.show { display: inline-block; }
.nwh-badge-seo      { background: rgba(99,102,241,.2); color: #818cf8; }
.nwh-badge-security { background: rgba(239,68,68,.15); color: #f87171; }
.nwh-badge-qa       { background: rgba(245,158,11,.15); color: #fbbf24; }
.nwh-badge-ui       { background: rgba(168,85,247,.15); color: #c084fc; }

.nwh-code {
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.45);
  min-height: 160px;
  white-space: pre;
  overflow-x: auto;
  background: #13181f;
}
.nwh-output-col:last-child .nwh-code { background: #111820; }

/* Diff inside dark code */
.nwh-add { background: rgba(34,197,94,.12); color: #4ade80; display: block; margin: 0 -14px; padding: 0 14px; }
.nwh-rem { background: rgba(239,68,68,.1);  color: #f87171; display: block; margin: 0 -14px; padding: 0 14px; opacity: .75; text-decoration: line-through; }
.nwh-chg { background: rgba(251,191,36,.08); color: #fbbf24; display: block; margin: 0 -14px; padding: 0 14px; }

/* Placeholder */
.nwh-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 160px; gap: 8px;
  color: rgba(255,255,255,.18); font-size: 12px;
}

/* ══════════════════════════════════════════
   2. QUICK EXPLANATION
══════════════════════════════════════════ */
.nwh-explain {
  background: #fff;
  padding: 56px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nwh-explain-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.nwh-explain-text {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  color: #111;
  line-height: 1.6;
  margin: 0 0 12px;
}
.nwh-explain-sub {
  font-size: clamp(15px, 1.6vw, 17px);
  color: #444;
  line-height: 1.65;
  margin: 0;
}
.nwh-explain-sub strong { color: #111; }

/* ══════════════════════════════════════════
   3. SCENARIOS
══════════════════════════════════════════ */
.nwh-scenarios {
  padding: 80px 0;
  background: #fafafa;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nwh-section-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
  display: block;
}
.nwh-section-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.025em;
  color: #111;
  margin: 0 0 10px;
  line-height: 1.1;
}
.nwh-section-sub {
  font-size: 16px;
  color: #444;
  margin: 0 0 48px;
  max-width: 520px;
}

.nwh-scenarios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 991px) { .nwh-scenarios-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .nwh-scenarios-grid { grid-template-columns: 1fr; } }

.nwh-scenario-card {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.09);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.nwh-scenario-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 20px rgba(99,102,241,.12);
  transform: translateY(-2px);
}
.nwh-scenario-card.active {
  border-color: #6366f1;
  background: rgba(99,102,241,.03);
  box-shadow: 0 4px 20px rgba(99,102,241,.15);
}
.nwh-sc-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.nwh-sc-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
}
.nwh-sc-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 14px;
}
.nwh-sc-try {
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .15s;
}
.nwh-sc-try:hover { gap: 8px; text-decoration: none; color: #4f52d1; }

/* ══════════════════════════════════════════
   4. ARCHITECTURE
══════════════════════════════════════════ */
.nwh-arch {
  padding: 80px 0;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nwh-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 48px;
}
.nwh-flow-node {
  padding: 14px 22px;
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  background: #fff;
  white-space: nowrap;
  text-align: center;
  min-width: 100px;
}
.nwh-flow-node small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #999;
  margin-top: 3px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nwh-flow-node.ninja {
  background: #0B0F14;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.25), 0 8px 24px rgba(0,0,0,.3);
  transform: scale(1.08);
}
.nwh-flow-node.ninja small { color: #818cf8; }
.nwh-flow-arr {
  font-size: 18px;
  color: rgba(0,0,0,.2);
  padding: 0 8px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .nwh-flow { flex-direction: column; }
  .nwh-flow-arr { transform: rotate(90deg); }
}

.nwh-arch-note {
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  color: #555;
}
.nwh-arch-note strong { color: #111; }

/* ══════════════════════════════════════════
   5. CAPABILITIES
══════════════════════════════════════════ */
.nwh-caps {
  padding: 80px 0;
  background: #fafafa;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nwh-caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 991px) { .nwh-caps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .nwh-caps-grid { grid-template-columns: 1fr; } }

.nwh-cap-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 12px;
  padding: 28px;
}
.nwh-cap-icon { font-size: 32px; margin-bottom: 14px; display: block; }
.nwh-cap-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}
.nwh-cap-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  margin: 0 0 16px;
}
.nwh-cap-cta {
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: gap .15s;
}
.nwh-cap-cta:hover { gap: 8px; color: #4f52d1; }

/* ══════════════════════════════════════════
   6. TRUST / SCREENSHOTS
══════════════════════════════════════════ */
.nwh-trust {
  padding: 80px 0 100px;
  background: #fff;
}
.nwh-trust-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 991px) { .nwh-trust-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .nwh-trust-cards { grid-template-columns: 1fr; } }

.nwh-trust-card {
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9f9;
}
.nwh-trust-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #9ca3af;
}
.nwh-trust-body { padding: 16px 18px; }
.nwh-trust-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}
.nwh-trust-note {
  font-size: 12px;
  color: #666;
}

/* ══════════════════════════════════════════
   7. EXPANDED DEMO (Playground)
══════════════════════════════════════════ */
.nwh-playground {
  padding: 80px 0;
  background: #0B0F14;
}
.nwh-playground .nwh-section-kicker { color: rgba(129,140,248,.7); }
.nwh-playground .nwh-section-title { color: #fff; }
.nwh-playground .nwh-section-sub { color: rgba(255,255,255,.55); }

/* ── Playground dropdown ── */
.nwh-pg-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.nwh-pg-select {
  height: 40px;
  padding: 0 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  outline: none;
  cursor: pointer;
  min-width: 200px;
}
.nwh-pg-select option { background: #1a1f2b; color: #fff; }
.nwh-pg-url {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 0 14px;
  height: 40px;
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}
.nwh-pg-url-input {
  border: none;
  background: none;
  outline: none;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,.75);
  width: 100%;
  font-weight: 600;
}
.nwh-pg-run {
  height: 40px;
  padding: 0 22px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nwh-pg-run:hover { background: #4f52d1; }
.nwh-pg-run.loading { opacity: .6; pointer-events: none; }
.nwh-pg-spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nwhSpin .6s linear infinite;
  display: none;
}
.nwh-pg-run.loading .nwh-pg-spinner { display: block; }
.nwh-pg-run.loading .nwh-pg-lbl { display: none; }

/* Playground output */
.nwh-pg-card {
  background: #13181f;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
}
.nwh-pg-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
@media (max-width: 767px) { .nwh-pg-cols { grid-template-columns: 1fr; } }
.nwh-pg-col { border-right: 1px solid rgba(255,255,255,.06); }
.nwh-pg-col:last-child { border-right: none; }
.nwh-pg-colhead {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1117;
}
.nwh-pg-collabel {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.nwh-pg-collabel.after { color: rgba(129,140,248,.9); }
.nwh-pg-badge {
  font-size: 9px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; display: none;
}
.nwh-pg-badge.show { display: inline-block; }
.nwh-pg-code {
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(255,255,255,.45);
  min-height: 180px;
  white-space: pre;
  overflow-x: auto;
  background: #13181f;
}
.nwh-pg-col:last-child .nwh-pg-code { background: #111820; }

/* Playground summary */
.nwh-pg-summary {
  padding: 20px 20px;
  display: none;
  border-top: 1px solid rgba(255,255,255,.06);
  background: #0d1117;
}
.nwh-pg-summary.show { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 767px) { .nwh-pg-summary.show { grid-template-columns: 1fr; } }
.nwh-pg-sum-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 8px;
}
.nwh-pg-sum-name { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.nwh-pg-sum-meta {
  font-size: 11px; color: rgba(255,255,255,.45);
  font-family: 'Courier New', monospace; white-space: pre; line-height: 1.6;
}
.nwh-pg-sum-changes { display: flex; flex-direction: column; gap: 5px; }
.nwh-pg-sum-change {
  font-size: 12px; color: rgba(255,255,255,.75);
  display: flex; align-items: center; gap: 7px;
}
.nwh-pg-sum-change::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: #22c55e; flex-shrink: 0;
}
.nwh-pg-sum-impact { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.6; }

/* ── Shared utilities ── */
.nwh-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.nwh-text-center { text-align: center; }
.nwh-mb-0 { margin-bottom: 0 !important; }
