/* ============================================================
   VINDEX · styles.css
   Дизайн-система для статичного HTML-сайта
   vitvetbiz.ru · Ветров и партнёры
   ============================================================ */

/* ─── GOOGLE FONTS ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=Bebas+Neue&display=swap');

/* ─── CSS ПЕРЕМЕННЫЕ ─────────────────────────────────────── */
:root {
  --bg:    #F4F1EB;   /* тёплый белый — основной фон */
  --ink:   #0D1829;   /* тёмно-синий — текст на светлом */
  --slate: #1E2D3D;   /* только nav и footer */
  --red:   #C5293E;   /* акцент — CTA, угроза, метки */
  --gold:  #B8913A;   /* premium (не для экрана) */
  --mid:   #E5DFCF;   /* разделители, рамки, gap */
  --dim:   #6B7280;   /* вторичный текст */
  --white: #FFFFFF;   /* карточки */

  --font-serif: 'Cormorant', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-bebas: 'Bebas Neue', sans-serif;

  --section-x:  52px;
  --section-y:  68px;
}

/* ─── ТЁМНАЯ ТЕМА ────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:    #141A24;
    --ink:   #E8E2D4;
    --slate: #0D1420;
    --mid:   #253040;
    --dim:   #7A8FA0;
    --white: #1B2534;
  }
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ─── ТИПОГРАФИКА ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
}
h1 { font-size: clamp(36px, 5vw, 62px); }
h2 { font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 32px; }
h3 { font-size: clamp(20px, 2.5vw, 24px); }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.section-pad {
  padding: var(--section-y) var(--section-x);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--section-x);
}

/* Сетка карточек — gap 1px на фоне var(--mid) */
.card-grid {
  display: grid;
  gap: 1px;
  background: var(--mid);
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  padding: 36px 32px;
  transition: background 0.15s, border-top-color 0.15s;
  border-top: 2px solid transparent;
}
.card:hover {
  background: #FAFAF5;
  border-top-color: var(--red);
  cursor: pointer;
}

/* ─── КОМПОНЕНТЫ ─────────────────────────────────────────── */

/* Section label */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--red);
  flex-shrink: 0;
}

/* Красный вертикальный разделитель */
.red-bar {
  width: 3px;
  background: var(--red);
  flex-shrink: 0;
}

/* Stat card */
.stat-card {
  background: var(--white);
  padding: 28px 32px;
  border-top: 2px solid var(--red);
}
.stat-card .stat-number {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--slate);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--section-x);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo-bar {
  width: 3px;
  height: 54px;
  background: var(--red);
}
.nav-logo-text {
  font-family: var(--font-bebas);
  font-size: 20px;
  letter-spacing: 7px;
  color: #F4F1EB;
  padding-left: 14px;
}
.nav-links {
  display: flex;
}
.nav-link {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7A9AB8;
  padding: 22px 18px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: #F4F1EB;
  border-bottom-color: var(--red);
}
.nav-cta {
  background: var(--red);
  color: #fff;
  padding: 11px 28px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.9; }

/* ─── КНОПКИ ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: #F4F1EB;
  padding: 14px 34px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-red {
  background: var(--red);
  color: #fff;
  padding: 14px 34px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  display: inline-block;
}
.btn-red:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  color: var(--dim);
  padding: 14px 22px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid var(--mid);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.15s, color 0.15s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

/* ─── ФОРМЫ — единый стандарт ────────────────────────────── */
.vdx-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vdx-input,
.vdx-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--mid);
  background: var(--white);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
  appearance: none;
}
.vdx-input:focus,
.vdx-textarea:focus { border-color: var(--red); }
.vdx-input.error,
.vdx-textarea.error { border-color: var(--red); }
.vdx-input::placeholder,
.vdx-textarea::placeholder { color: var(--dim); }

.vdx-textarea {
  min-height: 96px;
  resize: vertical;
}

.vdx-submit {
  width: 100%;
  padding: 13px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.15s;
}
.vdx-submit:hover { opacity: 0.9; }
.vdx-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-error  { font-size: 11px; color: var(--red); margin-top: 4px; }
.form-hint   { font-size: 11px; color: var(--dim); margin-top: 8px; }
.form-success {
  padding: 18px 22px;
  border-left: 3px solid var(--red);
  background: var(--bg);
}
.form-success-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
}
.form-success-sub { font-size: 13px; color: var(--dim); }

/* ─── МОДАЛЬНОЕ ОКНО ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 24, 41, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  background: var(--bg);
  padding: 32px 36px;
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--mid);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.modal-sub { font-size: 11px; color: var(--red); letter-spacing: 1.5px; text-transform: uppercase; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--dim);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-body { padding: 28px 36px 36px; }

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--slate);
  padding: 52px var(--section-x);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
}
.footer-logo {
  font-family: var(--font-bebas);
  font-size: 32px;
  letter-spacing: 7px;
  color: #F4F1EB;
  margin-bottom: 8px;
}
.footer-tag { font-size: 11px; color: #7A9AB8; letter-spacing: 1px; line-height: 1.8; }
.footer-col-title { font-size: 11px; letter-spacing: 2.5px; color: var(--red); text-transform: uppercase; margin-bottom: 16px; }
.footer-item { font-size: 11px; color: #7A9AB8; line-height: 2.2; }
.footer-item a { color: #7A9AB8; transition: color 0.15s; }
.footer-item a:hover { color: #F4F1EB; }

/* ─── АНИМАЦИИ ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeUp 0.7s ease both; }
.animate-1 { animation-delay: 0.1s; }
.animate-2 { animation-delay: 0.22s; }
.animate-3 { animation-delay: 0.36s; }
.animate-4 { animation-delay: 0.5s; }

/* ─── АДАПТИВНОСТЬ ───────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-x: 32px; --section-y: 52px; }
  .nav-links { display: none; }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  :root { --section-x: 20px; --section-y: 40px; }
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════
   СТАТЬИ · /analytics/, /cases/, /services/
   ═══════════════════════════════════════════════════════ */

:root {
  --art-bg-warm:  #FAF8F5;
  --art-bg-card:  #F0EDE6;
  --art-max-w:    740px;
  --art-gap:      3.2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --art-bg-warm:  #1A2430;
    --art-bg-card:  #1E2C3A;
  }
}

/* ─── КОНТЕЙНЕР СТАТЬИ ──────────────────────────────── */
.art-body {
  max-width: var(--art-max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  font-size: 17px;
  line-height: 1.72;
}

/* ─── BREADCRUMB ────────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}
.breadcrumb a {
  color: var(--dim);
  transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span   { color: var(--ink); }

/* ─── ЗАГОЛОВКИ (внутри .art-body) ──────────────────── */
.art-body h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem 0;
}

.art-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.25;
  margin: var(--art-gap) 0 0.7rem 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--mid);
}

.art-body h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.3;
  margin: 2.2rem 0 0.5rem 0;
}

/* ─── АБЗАЦЫ ────────────────────────────────────────── */
.art-body p {
  margin: 0 0 1.15rem 0;
}

/* ─── LEAD / ОПРЕДЕЛЕНИЕ ────────────────────────────── */
.art-definition {
  margin-bottom: 2rem;
  padding: 1.5rem 1.5rem 1rem;
  background: var(--art-bg-warm);
  border-left: 4px solid var(--ink);
  border-radius: 0 4px 4px 0;
}

.art-lead {
  font-size: 18.5px;
  line-height: 1.68;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

/* Первый h2 после definition — без верхнего бордера */
.art-definition + .art-section > h2:first-child {
  border-top: none;
  padding-top: 0;
}

/* ─── СЕКЦИИ ────────────────────────────────────────── */
.art-section {
  margin-bottom: var(--art-gap);
}
.art-section > p:last-child { margin-bottom: 0; }

/* ─── CTA В ТЕЛЕ ────────────────────────────────────── */
.art-cta {
  margin: 2.4rem 0;
  padding: 1.6rem 1.6rem 1.2rem;
  background: var(--art-bg-warm);
  border-left: 4px solid var(--red);
  border-radius: 0 4px 4px 0;
}

.art-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  border-top: none;
  padding-top: 0;
}

.art-cta p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--dim);
  margin-bottom: 0.7rem;
}
.art-cta p:last-child { margin-bottom: 0; }

.art-cta a {
  color: var(--red);
  font-weight: 500;
  transition: opacity 0.15s;
}
.art-cta a:hover { opacity: 0.75; }

/* ─── ФИНАЛЬНЫЙ CTA ─────────────────────────────────── */
.art-cta-final {
  margin: var(--art-gap) 0 2.4rem;
  padding: 2rem 1.8rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
}

.art-cta-final h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--bg);
  margin: 0 0 0.8rem 0;
  border-top: none;
  padding-top: 0;
}

.art-cta-final p {
  color: rgba(244, 241, 235, 0.8);
  font-size: 15.5px;
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.art-cta-final a {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.art-cta-final a:hover { opacity: 0.8; }

/* ─── КНОПКА CTA ────────────────────────────────────── */
.art-btn {
  display: inline-block;
  background: var(--red);
  color: #fff !important;
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
  text-decoration: none !important;
  border: none;
  border-bottom: none !important;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin: 0.6rem 0 0.8rem;
}
.art-btn:hover { opacity: 0.88; }

/* Кнопка в финальном CTA — белая на тёмном */
.art-cta-final .art-btn {
  background: var(--bg);
  color: var(--ink) !important;
}
.art-cta-final .art-btn:hover { opacity: 0.9; }

/* ─── КЕЙСЫ ─────────────────────────────────────────── */
.art-cases {
  margin: 1.6rem 0;
}

.art-case-card {
  padding: 1.3rem 1.5rem;
  background: var(--art-bg-card);
  border: 1px solid var(--mid);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.art-case-card p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ─── БЛОК УСЛУГ ────────────────────────────────────── */
.art-services {
  margin: var(--art-gap) 0 2rem;
  padding: 1.4rem 1.5rem 1.2rem;
  background: var(--art-bg-card);
  border: 1px solid var(--mid);
  border-radius: 4px;
}

.art-services > p > strong {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.art-services ul {
  list-style: none;
  margin: 0.8rem 0 0;
}

.art-services li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--mid);
  font-size: 15px;
  line-height: 1.55;
}
.art-services li:first-child { border-top: none; }

.art-services a {
  color: var(--red);
  font-weight: 500;
}
.art-services a:hover { text-decoration: underline; }

/* ─── ЧЕКЛИСТ ───────────────────────────────────────── */
.art-checklist {
  margin: 1.6rem 0;
  padding: 1.4rem 1.5rem;
  background: var(--art-bg-warm);
  border: 1px solid var(--mid);
  border-radius: 4px;
}

.art-checklist ul { list-style: none; }

.art-checklist li {
  padding: 0.5rem 0 0.5rem 1.6rem;
  position: relative;
  font-size: 15.5px;
  line-height: 1.55;
}

.art-checklist li::before {
  content: '\2610';
  position: absolute;
  left: 0;
  color: var(--red);
}

/* ─── FAQ ───────────────────────────────────────────── */
.faq-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--mid);
}
.faq-item:first-of-type {
  border-top: 1px solid var(--mid);
}

.faq-q {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.5rem 0;
  border-top: none !important;
  padding-top: 0 !important;
}

.faq-a-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--dim);
  margin: 0;
}

/* ─── АВТОР ─────────────────────────────────────────── */
.art-author {
  margin: var(--art-gap) 0 2rem;
  padding: 1.4rem 0;
  border-top: 2px solid var(--ink);
}

.art-author__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin: 0 0 0.3rem;
}

.art-author__name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}

.art-author__name a {
  color: var(--ink);
}
.art-author__name a:hover { color: var(--red); }

.art-author__bio {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.5;
  margin: 0;
}

/* ─── ДАТА ──────────────────────────────────────────── */
.art-date {
  font-size: 13px;
  color: var(--dim);
  margin: 1.5rem 0 0;
}

/* ─── ССЫЛКИ В ТЕКСТЕ ───────────────────────────────── */
.art-body a {
  color: var(--red);
  border-bottom: 1px solid rgba(197, 41, 62, 0.25);
  transition: border-color 0.15s;
}
.art-body a:hover {
  border-bottom-color: var(--red);
}

/* Исключения — компоненты со своими стилями ссылок */
.breadcrumb a,
.art-cta a,
.art-cta-final a,
.art-services a,
.art-author__name a {
  border-bottom: none;
}

/* ─── STRONG в начале абзаца ────────────────────────── */
.art-body p > strong:first-child {
  color: var(--ink);
}

/* ─── АДАПТИВ СТАТЕЙ ────────────────────────────────── */
@media (max-width: 600px) {
  .art-body {
    padding: 1.2rem 1rem 3rem;
    font-size: 16px;
  }
  .art-body h1 { font-size: 1.65rem; margin-bottom: 1.2rem; }
  .art-body h2 { font-size: 1.3rem; }
  .art-body h3 { font-size: 1.1rem; }
  .art-definition,
  .art-cta,
  .art-cta-final,
  .art-case-card,
  .art-services,
  .art-checklist {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .art-lead { font-size: 17px; }
}
