/* =====================================================
   amzdoc.help — Design System (main.css)
   v1.0 — 2026-04-28 (P1-8 fix)

   Подключение:
     <link rel="stylesheet" href="/css/main.css">

   Принципы:
   - Один источник правды для design tokens (:root)
   - Семантические компоненты: .btn, .card, .stat, .faq-item, .story
   - Sans-serif как база, ui-monospace ТОЛЬКО для .mono акцентов
   - Orbitron — для бренда и заголовков
   - Никаких inline-style блоков на страницах (всё здесь)
===================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Палитра */
  --bg: #000;
  --neon: #0dfc7b;
  --neon-dark: #06b85a;
  --text: #cfeedd;
  --muted: #a6d9be;
  --card: rgba(0,0,0,.6);
  --stroke: rgba(13,252,123,.28);
  --grid: rgba(13,252,123,.12);
  --danger: #ff4444;
  --warn: #ffa726;

  /* Типографика */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --font-brand: 'Orbitron', 'Segoe UI', sans-serif;

  /* Размеры */
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --container-narrow: 900px;
  --container-text: 820px;
  --shadow: 0 6px 20px rgba(13,252,123,.18);
  --shadow-hover: 0 0 28px rgba(13,252,123,.55);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Декоративная сетка фоном (не нужен <div class="perspective-grid">) */
body::before {
  content: ""; position: fixed; inset: 0;
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to top, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25; z-index: -2;
}
body::after {
  content: ""; position: fixed; inset: 0;
  background: radial-gradient(circle at center top, rgba(13,252,123,.25), transparent 70%);
  z-index: -1;
}

a { color: var(--neon); }
img { max-width: 100%; height: auto; }

/* ---------- LAYOUT ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: var(--container-narrow); }
.container.text { max-width: var(--container-text); }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon);
  font-family: var(--font-brand);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
}
h1 { font-size: clamp(36px, 5vw, 64px); margin-bottom: 16px; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: clamp(20px, 2vw, 24px); font-family: var(--font-sans); margin-bottom: 10px; }
h4 { font-size: clamp(18px, 1.8vw, 22px); font-family: var(--font-sans); }

p { margin: 0 0 12px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.85);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(6px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-wrap img { height: 60px; filter: drop-shadow(0 0 8px var(--neon)); }
.brand-text {
  font-family: var(--font-brand);
  font-size: 20px; font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon);
  letter-spacing: 2px;
}
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  color: var(--neon); text-decoration: none;
  font-size: 15px; font-weight: 600;
}
.site-nav a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-nav { flex-wrap: wrap; gap: 14px; }
  .logo-wrap img { height: 48px; }
  .brand-text { font-size: 18px; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--stroke);
  background: rgba(13,252,123,.15);
  color: #fff;
  border-radius: 14px;
  text-decoration: none;
  font-size: 16px; font-weight: 700;
  transition: .25s;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 16px var(--neon); }
.btn--small { padding: 10px 22px; font-size: 14px; }
.btn--ghost {
  background: transparent;
  color: var(--neon);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(13,252,123,.08); border-color: var(--neon); }

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 70px 0 50px; }
.hero p {
  max-width: 720px; margin: 0 auto 22px;
  color: var(--muted); font-size: 18px; line-height: 1.6;
}
.brand-hero {
  font-family: var(--font-brand);
  font-size: 24px; font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 16px var(--neon);
  margin-bottom: 14px;
  letter-spacing: 2px;
}

/* ---------- STATS BAR ---------- */
.stats-bar {
  display: flex; justify-content: center; gap: 50px;
  flex-wrap: wrap; padding: 40px 0;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,.4);
}
.stat { text-align: center; }
.stat-num {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon);
  display: block;
  font-family: var(--font-brand);
}
.stat-label {
  color: var(--muted); font-size: 14px; letter-spacing: .5px;
}

/* ---------- PROCESS / STEPS ---------- */
.process { padding: 50px 0; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin-top: 24px; text-align: center;
}
.process-step {
  padding: 26px 20px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--card);
}
.step-num {
  font-size: 36px; font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon);
  display: block; margin-bottom: 8px;
  font-family: var(--font-brand);
}
.step-title { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-desc { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- CARDS / GRID ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 768px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  text-decoration: none;
  display: block;
}
a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--neon);
  z-index: 2;
}
.card .content { padding: 20px; }

/* Service row card */
.service-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
}
.service-row > div:first-child { flex: 1; min-width: 200px; }
.price { min-width: 160px; text-align: right; flex-shrink: 0; }
.price strong { color: var(--neon); font-size: 24px; display: block; }
.price .unit { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* ---------- SUCCESS STORIES ---------- */
.story {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: var(--card);
}
.story-media {
  aspect-ratio: 3/4;
  display: grid; place-items: center;
  background: #060a07;
  border-bottom: 1px solid var(--stroke);
}
.story-media img { width: 100%; height: 100%; object-fit: contain; }
.case-text {
  text-align: center; color: var(--neon);
  padding: 14px 14px 6px; font-size: 16px; font-weight: 700;
}
.case-meta {
  text-align: center; color: var(--muted);
  padding: 0 14px 16px; font-size: 13px; line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--neon); }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--neon);
  font-size: 24px;
  font-weight: 300;
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--neon); }
.faq-answer {
  color: var(--muted);
  font-size: 15px; line-height: 1.65;
  padding-top: 14px; margin-top: 14px;
  border-top: 1px solid rgba(13,252,123,.15);
}
.faq-answer a { color: var(--neon); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb-visual {
  font-size: 14px; color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb-visual a { color: var(--muted); text-decoration: none; }
.breadcrumb-visual a:hover { color: var(--neon); }
.breadcrumb-visual .current { color: var(--neon); }

/* ---------- HIGHLIGHT BOX ---------- */
.highlight {
  background: rgba(13,252,123,.08);
  border-left: 3px solid var(--neon);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.warning {
  background: rgba(255,68,68,.08);
  border-left: 3px solid var(--danger);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}

/* ---------- CONTACT SECTION ---------- */
#direct-contacts {
  padding: 60px 0;
  background: rgba(0,0,0,.4);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
#direct-contacts .card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-icons {
  display: flex; justify-content: center; gap: 30px;
  flex-wrap: wrap; margin: 24px 0;
}
.contact-icon {
  text-decoration: none; color: var(--text);
  font-size: 15px; text-align: center; font-weight: 600;
  transition: .3s;
}
.contact-icon:hover { color: var(--neon); text-shadow: 0 0 8px var(--neon); }

/* ---------- FOOTER ---------- */
.site-footer {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  color: #eaeaea;
  text-align: center;
  padding: 30px 16px;
  background: #000;
  border-top: 1px solid var(--stroke);
  font-size: 14px;
}
.site-footer .footer-links a {
  font-size: 14px;
  color: var(--neon);
  text-decoration: none;
  font-weight: 500;
}
.site-footer .footer-links a:hover { text-decoration: underline; }
.site-footer .disclaimer {
  color: #888;
  font-size: 12px;
  max-width: 700px;
  margin: 14px auto 0;
  line-height: 1.5;
}

/* ---------- BLOG / ARTICLE ---------- */
.page-content {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 40px;
  margin: 30px 0 60px;
}
.page-content ul, .page-content ol { padding-left: 24px; }
.page-content li { margin-bottom: 10px; }
.meta-info { font-size: 14px; color: var(--muted); margin-top: 8px; margin-bottom: 24px; }
.page-content blockquote {
  border-left: 3px solid var(--neon);
  padding: 16px 20px;
  margin: 20px 0;
  background: rgba(13,252,123,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.page-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.page-content th, .page-content td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}
.page-content th { color: var(--neon); font-weight: 700; }

/* CTA box */
.cta-box {
  text-align: center;
  padding: 30px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  margin: 40px 0;
  background: rgba(13,252,123,.05);
}

/* Disclaimer (general) */
.disclaimer-block {
  color: #888; font-size: 13px; line-height: 1.5;
  border-top: 1px solid var(--stroke);
  padding-top: 20px; margin-top: 40px;
}

/* ---------- FORM (контакт-форма) ---------- */
.form-step { display: none; animation: fadeUp .25s ease; }
.form-step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.problem-card {
  background: rgba(13,252,123,.03);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 18px 12px;
  cursor: pointer;
  text-align: center;
  transition: .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  color: var(--text);
}
.problem-card:hover { border-color: var(--neon); background: rgba(13,252,123,.07); transform: translateY(-2px); }
.problem-card.selected { border-color: var(--neon); background: rgba(13,252,123,.1); box-shadow: 0 0 16px rgba(13,252,123,.15); }
.p-icon { width: 36px; height: 36px; color: var(--neon); flex-shrink: 0; }
.problem-title { font-weight: 700; color: var(--neon); font-size: 14px; }
.selected-badge {
  color: var(--neon); font-weight: 700; font-size: 13px;
  padding: 6px 14px;
  background: rgba(13,252,123,.08);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  display: inline-block; margin-bottom: 16px;
  letter-spacing: .5px;
}
.form-label {
  display: block; color: var(--muted);
  font-size: 14px; margin: 12px 0 5px; font-weight: 600;
}
.form-input {
  width: 100%; padding: 11px 14px;
  background: rgba(13,252,123,.03);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text); font: 14px inherit;
  outline: none; transition: .2s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--neon); box-shadow: 0 0 8px rgba(13,252,123,.12); }
textarea.form-input { resize: vertical; min-height: 50px; }
.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }
.btn-back {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font: 14px inherit;
  transition: .2s;
  font-family: inherit;
}
.btn-back:hover { border-color: var(--neon); color: var(--neon); }
.btn-submit {
  background: rgba(13,252,123,.15);
  border: 1px solid var(--neon);
  color: #fff;
  padding: 13px 28px;
  border-radius: 12px;
  cursor: pointer;
  font: 15px inherit;
  font-weight: 700;
  transition: .25s;
  flex-shrink: 0;
  font-family: inherit;
}
.btn-submit:hover { background: rgba(13,252,123,.25); box-shadow: 0 0 16px rgba(13,252,123,.25); transform: translateY(-1px); }
.tg-alt {
  text-align: center; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--stroke);
  font-size: 14px;
}
.tg-alt a { font-weight: 700; }

@media (max-width: 500px) {
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .problem-grid .problem-card:last-child { grid-column: span 2; }
}

/* ---------- BLOG INDEX CARDS ---------- */
.blog-list { margin: 40px 0; display: grid; gap: 24px; }
.blog-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: .3s;
}
.blog-card:hover {
  border-color: var(--neon);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.blog-card h2 { margin: 0 0 8px; font-size: 22px; }
.blog-card .meta { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.blog-card p { color: var(--text); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------- UTILITY ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.divider { height: 1px; background: var(--stroke); margin: 40px 0; }

/* ---------- LEGACY: совместимость со старыми inline-стилями ---------- */
/* (нужно для страниц, ещё не мигрированных на main.css)
   После того как все страницы перейдут — этот блок можно удалить. */
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--neon); text-decoration: none; font-size: 15px; font-weight: 600; }
nav a:hover { text-decoration: underline; }
header { /* старый именованный selector — оставлен на переходный период */ }
footer { /* то же */ }
