/* ============================================================
   ainimbus.ru — главная (вариант A)
   Палитра: фон #F7F4EF, акцент терракота #C4612F, текст #1F2421
   ============================================================ */

:root {
  --bg: #F7F4EF;
  --accent: #C4612F;
  --accent-dark: #a84f22;
  --accent-soft: rgba(196, 97, 47, 0.10);
  --text: #1F2421;
  --text-muted: #5c615c;
  --card: #FFFFFF;
  --border: #e8e1d6;
  --border-strong: #d9cfbf;

  --font-display: "Fraunces", "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(31, 36, 33, 0.06);
  --shadow-md: 0 12px 32px rgba(31, 36, 33, 0.10);
  --shadow-lg: 0 24px 60px rgba(31, 36, 33, 0.14);

  --max-w: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0; }

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

em {
  font-style: italic;
  color: var(--accent);
}

img, svg { display: block; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 36, 33, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}
.logo img {
  height: 38px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 28px;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s ease;
}
.site-nav a:hover { color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: rgba(247, 244, 239, 0.98);
}
.mobile-nav a {
  padding: 12px 4px;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a.btn { margin-top: 12px; border-bottom: none; }
.mobile-nav[hidden] { display: none; }

/* ---------- Секции ---------- */
section { padding: 96px 0; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-lead {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 96px;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(196, 97, 47, 0.10), transparent 60%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title { margin-bottom: 22px; }
.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero-proof li { position: relative; padding-left: 20px; }
.hero-proof li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-media { position: relative; }

.photo-placeholder {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #e8b18f 0%, #C4612F 55%, #8c3f1c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.photo-caption {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
}

.hero-badge {
  position: absolute;
  left: -24px;
  bottom: 32px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.hero-badge strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.hero-badge span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Карточки (общее) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.cards-grid {
  display: grid;
  gap: 24px;
}

/* ---------- Блок 2: дифференциация ---------- */
.diff-grid { grid-template-columns: repeat(4, 1fr); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}

.diff-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.diff-card p { font-size: 0.94rem; color: var(--text-muted); font-weight: 300; }

/* ---------- Блок 3: процесс ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step {
  position: relative;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step-time {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 2px;
}
.step p { font-size: 0.94rem; color: var(--text-muted); font-weight: 300; }

/* ---------- Блок 4: тарифы ---------- */
.pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }

.price-card {
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card h3 { font-size: 1.35rem; margin-bottom: 16px; }
.price { margin-bottom: 20px; }
.price-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}
.price-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.price-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.price-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 13px;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--accent);
}
.price-card .btn { margin-top: auto; }

.price-featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
}
.price-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pricing-note {
  margin-top: 28px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Блок 5: кейсы ---------- */
.cases-grid { grid-template-columns: repeat(3, 1fr); }

.case-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.case-card h3 { font-size: 1.2rem; margin-bottom: 18px; }

.case-delta { display: flex; flex-direction: column; gap: 12px; }
.delta {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.delta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.delta-value { font-size: 0.98rem; font-weight: 500; }
.delta-up { color: var(--accent); }

/* ---------- Блок 6: живое демо ---------- */
.demo-widget {
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--accent);
  color: #fff;
}
.demo-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-meta { display: flex; flex-direction: column; line-height: 1.2; }
.demo-meta strong { font-size: 0.95rem; font-weight: 600; }
.demo-online { font-size: 0.75rem; opacity: 0.85; }
.demo-mode {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,.2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.demo-body {
  min-height: 300px;
  max-height: 380px;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
  animation: msg-in .25s ease;
}
.msg-agent {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg .msg-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-bottom: 4px;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.demo-quick button {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.demo-quick button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.demo-input {
  display: flex;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.demo-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  background: var(--bg);
}
.demo-input input:focus { border-color: var(--accent); }

.demo-footnote {
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 520px;
}

/* ---------- Блок 7: технологии ---------- */
.tech-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tech-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tech-item .chip { margin-bottom: 0; flex-shrink: 0; }
.tech-item h3 { font-size: 1rem; margin-bottom: 4px; }
.tech-item p { font-size: 0.86rem; color: var(--text-muted); font-weight: 300; }

/* ---------- Блок 8: CTA + форма ---------- */
.contact {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(196, 97, 47, 0.10), transparent 60%),
    var(--bg);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.contact-team { margin-top: 32px; }
.avatars { display: flex; margin-bottom: 12px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -10px;
}
.avatar:first-child { margin-left: 0; }
/* TODO-PLACEHOLDER-team-avatars: фоновые градиенты — временные заглушки вместо фото команды */
.avatar.a1 { background: linear-gradient(135deg, #e8b18f, #C4612F); }
.avatar.a2 { background: linear-gradient(135deg, #b7c4b1, #5c6b57); }
.avatar.a3 { background: linear-gradient(135deg, #d8c4a3, #a8874e); }
.avatar.a4 { background: linear-gradient(135deg, #c3b9d6, #6f5f8e); }
.contact-team p { font-size: 0.92rem; color: var(--text-muted); }

.lead-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 500; }
.field input,
.field textarea {
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  transition: border-color .15s ease;
}
.field input:focus,
.field textarea:focus { border-color: var(--accent); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c0392b; }

.form-hint {
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--text-muted);
}
.form-hint.error { color: #c0392b; }
.form-hint.success { color: #2e7d32; }

/* ---------- Блок 9: FAQ ---------- */
.faq-container { max-width: 760px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-weight: 300;
}

/* ---------- Футер ---------- */
.site-footer {
  background: var(--text);
  color: rgba(247, 244, 239, 0.85);
  padding: 64px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(247, 244, 239, 0.5);
  margin-bottom: 6px;
}
.footer-col a, .footer-col p { font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-brand p { color: rgba(247, 244, 239, 0.6); font-weight: 300; }
.footer-brand .logo { color: #fff; }
.footer-col nav { display: flex; flex-direction: column; gap: 10px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(247, 244, 239, 0.12);
  font-size: 0.8rem;
  color: rgba(247, 244, 239, 0.5);
}
.footer-note { color: rgba(247, 244, 239, 0.35); }

/* ============================================================
   АДАПТИВ
   ============================================================ */

/* Планшет (<=1024) */
@media (max-width: 1024px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tech-strip { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
}

/* Планшет (<=768) */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }

  .site-nav { display: none; }
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: flex; }

  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-badge { left: -12px; }

  .pricing-grid { grid-template-columns: 1fr; }
  .price-featured { order: -1; }

  .contact-inner { grid-template-columns: 1fr; gap: 36px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Мобильный (<=480) */
@media (max-width: 480px) {
  .container { padding: 0 18px; }

  .diff-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tech-strip { grid-template-columns: 1fr; }

  .hero-actions .btn { width: 100%; }
  .hero-proof { flex-direction: column; gap: 8px; }

  .lead-form { padding: 24px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* Предпочтение уменьшенного движения */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg { animation: none; }
  .btn { transition: none; }
}
